return 0;
}
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
#define I2C_PMIC 0
int power_init_board(void)
{
return 0;
}
-#endif /* CONFIG_POWER */
+#endif /* CONFIG_POWER_LEGACY */
/*
* cl_som_imx7_setup_wdog() - watchdog configuration.
},
};
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
#define I2C_PMIC 0
int power_init_board(void)
{
return 0;
}
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
#define I2C_PMIC 0
int power_init_board(void)
{
}
#endif
-#if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC)
+#if defined(CONFIG_POWER_LEGACY) || defined(CONFIG_DM_PMIC)
int power_init_board(void)
{
set_ps_hold_ctrl();
return 0;
}
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
#define I2C_PMIC 3
int power_init_board(void)
{
};
}
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
/* setup board specific PMIC */
int power_init_board(void)
{
};
#endif
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
int power_init_board(void)
{
struct pmic *p;
obj-$(CONFIG_TWL4030_POWER) += twl4030.o
obj-$(CONFIG_TWL6030_POWER) += twl6030.o
obj-$(CONFIG_PALMAS_POWER) += palmas.o
-obj-$(CONFIG_POWER) += power_core.o
+obj-$(CONFIG_POWER_LEGACY) += power_core.o
obj-$(CONFIG_DIALOG_POWER) += power_dialog.o
obj-$(CONFIG_POWER_FSL) += power_fsl.o
obj-$(CONFIG_POWER_I2C) += power_i2c.o
obj-$(CONFIG_$(SPL_)DM_REGULATOR_COMMON) += regulator_common.o
obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o
obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o
-obj-$(CONFIG_REGULATOR_RK8XX) += rk8xx.o
+obj-$(CONFIG_$(SPL_TPL_)REGULATOR_RK8XX) += rk8xx.o
obj-$(CONFIG_DM_REGULATOR_S2MPS11) += s2mps11_regulator.o
obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o
/* Power */
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_POWER_TPS65218
#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define CONFIG_AM437X_USB2PHY2_HOST
/* Power */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_TPS65218
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
/*
* PMIC
*/
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#include <linux/sizes.h>
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_HI6553
#define CONFIG_REMAKE_ELF
#undef CONFIG_DM_MMC
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define I2C_RETIMER_ADDR 0x18
/* PMIC */
-#define CONFIG_POWER
-#ifdef CONFIG_POWER
+#define CONFIG_POWER_LEGACY
+#ifdef CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_MXC_UART_BASE UART1_BASE
/* PMIC Controller */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_SPI
#define CONFIG_POWER_FSL
#define CONFIG_FSL_PMIC_BUS 0
#define CONFIG_MXC_USB_FLAGS 0
/* PMIC Controller */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_DIALOG_POWER
#define CONFIG_POWER_FSL
/* DMA stuff, needed for GPMI/MXS NAND support */
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20
#if !defined(CONFIG_DM_PMIC)
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
/* I2C Configs */
/* PMIC */
-#define CONFIG_POWER
+#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_EXTRA_ENV_SETTINGS \
OPMODE_ON,
};
-#ifdef CONFIG_POWER
+#ifdef CONFIG_POWER_LEGACY
int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV);
int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode);
int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV);
enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
-#ifdef CONFIG_POWER
+/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
+#ifdef CONFIG_POWER_LEGACY
enum { I2C_PMIC, I2C_NUM, };
enum { PMIC_READ, PMIC_WRITE, };
enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
struct pmic *parent;
struct list_head list;
};
-#endif /* CONFIG_POWER */
+#endif /* CONFIG_POWER_LEGACY */
+/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
#ifdef CONFIG_DM_PMIC
/**
* U-Boot PMIC Framework
uint trans_len;
};
-#endif /* CONFIG_DM_PMIC */
+#endif /* DM_PMIC */
-#ifdef CONFIG_POWER
+/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
+#ifdef CONFIG_POWER_LEGACY
+
+/* Legacy API, do not use */
int pmic_init(unsigned char bus);
int power_init_board(void);
int pmic_dialog_init(unsigned char bus);
int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
-#endif
+#endif /* CONFIG_POWER_LEGACY */
#define pmic_i2c_addr (p->hw.i2c.addr)
#define pmic_i2c_tx_num (p->hw.i2c.tx_num)
CONFIG_POST_SKIP_ENV_FLAGS
CONFIG_POST_UART
CONFIG_POST_WATCHDOG
-CONFIG_POWER
CONFIG_POWER_FSL
CONFIG_POWER_FSL_MC13892
CONFIG_POWER_HI6553
CONFIG_POWER_I2C
+CONFIG_POWER_LEGACY
CONFIG_POWER_LTC3676
CONFIG_POWER_LTC3676_I2C_ADDR
CONFIG_POWER_MAX77696_I2C_ADDR