Skip to content

Commit

Permalink
[driver] axp drivers move to standalong reg file
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzukiTsuru committed Dec 31, 2023
1 parent 4e88076 commit fdcb746
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
2 changes: 2 additions & 0 deletions include/drivers/pmu/axp.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include <sys-i2c.h>

#include "reg-axp.h"

typedef struct _axp_step_info {
uint32_t step_min_vol;
uint32_t step_max_vol;
Expand Down
33 changes: 1 addition & 32 deletions include/drivers/pmu/reg-axp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,6 @@
#include <stdint.h>
#include <types.h>

#include <sys-i2c.h>

/* AXP1530 AXP313A AXP313B AXP323 */
#define AXP1530_CHIP_ID (0x48)
#define AXP313A_CHIP_ID (0x4B)
#define AXP313B_CHIP_ID (0x4C)
#define AXP323_CHIP_ID (0x49)

#define AXP1530_DEVICE_ADDR (0x61A80)
#define AXP1530_RUNTIME_ADDR (0x36)

#define AXP1530_POWER_ON_SOURCE_INDIVATION (0x00)
#define AXP1530_POWER_OFF_SOURCE_INDIVATION (0x01)
#define AXP1530_VERSION (0x03)
#define AXP1530_OUTPUT_POWER_ON_OFF_CTL (0x10)
#define AXP1530_DCDC_DVM_PWM_CTL (0x12)
#define AXP1530_DC1OUT_VOL (0x13)
#define AXP1530_DC2OUT_VOL (0x14)
#define AXP1530_DC3OUT_VOL (0x15)
#define AXP1530_ALDO1OUT_VOL (0x16)
#define AXP1530_DLDO1OUT_VOL (0x17)
#define AXP1530_POWER_DOMN_SEQUENCE (0x1A)
#define AXP1530_PWROK_VOFF_SERT (0x1B)
#define AXP1530_POWER_WAKEUP_CTL (0x1C)
#define AXP1530_OUTPUT_MONITOR_CONTROL (0x1D)
#define AXP1530_POK_SET (0x1E)
#define AXP1530_IRQ_ENABLE (0x20)
#define AXP1530_IRQ_STATUS (0x21)
#define AXP1530_WRITE_LOCK (0x70)
#define AXP1530_ERROR_MANAGEMENT (0x71)
#define AXP1530_DCDC1_2_POWER_ON_DEFAULT_SET (0x80)
#define AXP1530_DCDC3_ALDO1_POWER_ON_DEFAULT_SET (0x81)
#include "reg-axp1530.h"

#endif// __G_REG_AXP_H__
35 changes: 35 additions & 0 deletions include/drivers/pmu/reg-axp1530.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef __REG_AXP1530_H__
#define __REG_AXP1530_H__

/* AXP1530 AXP313A AXP313B AXP323 */
#define AXP1530_CHIP_ID (0x48)
#define AXP313A_CHIP_ID (0x4B)
#define AXP313B_CHIP_ID (0x4C)
#define AXP323_CHIP_ID (0x49)

#define AXP1530_DEVICE_ADDR (0x61A80)
#define AXP1530_RUNTIME_ADDR (0x36)

#define AXP1530_POWER_ON_SOURCE_INDIVATION (0x00)
#define AXP1530_POWER_OFF_SOURCE_INDIVATION (0x01)
#define AXP1530_VERSION (0x03)
#define AXP1530_OUTPUT_POWER_ON_OFF_CTL (0x10)
#define AXP1530_DCDC_DVM_PWM_CTL (0x12)
#define AXP1530_DC1OUT_VOL (0x13)
#define AXP1530_DC2OUT_VOL (0x14)
#define AXP1530_DC3OUT_VOL (0x15)
#define AXP1530_ALDO1OUT_VOL (0x16)
#define AXP1530_DLDO1OUT_VOL (0x17)
#define AXP1530_POWER_DOMN_SEQUENCE (0x1A)
#define AXP1530_PWROK_VOFF_SERT (0x1B)
#define AXP1530_POWER_WAKEUP_CTL (0x1C)
#define AXP1530_OUTPUT_MONITOR_CONTROL (0x1D)
#define AXP1530_POK_SET (0x1E)
#define AXP1530_IRQ_ENABLE (0x20)
#define AXP1530_IRQ_STATUS (0x21)
#define AXP1530_WRITE_LOCK (0x70)
#define AXP1530_ERROR_MANAGEMENT (0x71)
#define AXP1530_DCDC1_2_POWER_ON_DEFAULT_SET (0x80)
#define AXP1530_DCDC3_ALDO1_POWER_ON_DEFAULT_SET (0x81)

#endif // __REG_AXP1530_H__
1 change: 0 additions & 1 deletion src/drivers/pmu/axp1530.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <log.h>

#include <pmu/axp.h>
#include <pmu/reg-axp.h>

/* clang-format off */
static axp_contrl_info axp_ctrl_tbl[] = {
Expand Down

0 comments on commit fdcb746

Please sign in to comment.