i2c: Convert CONFIG_POWER_I2C et al to Kconfig

This converts the following to Kconfig:
   CONFIG_POWER_I2C
   CONFIG_POWER_LEGACY

They are handled at the same time due to a dependency between them.
Update the Makefile rule to use legacy power only in U-Boot proper.
Unfortunately a separate rule is needed in SPL to be able to build
legacy power.  Add SPL related symbols for both, to allow for SPL-only
usage.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
[trini: More SPL related cleanups, reword commit message]
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2021-08-08 12:20:27 -06:00 committed by Tom Rini
parent 29d7153ec3
commit 9d8665b709
68 changed files with 131 additions and 65 deletions

View file

@ -267,7 +267,7 @@ int board_init(void)
return 0;
}
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
@ -293,7 +293,7 @@ int power_init_board(void)
return 0;
}
#endif /* CONFIG_POWER_LEGACY */
#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
/*
* cl_som_imx7_setup_wdog() - watchdog configuration.

View file

@ -63,7 +63,7 @@ struct i2c_pads_info i2c_pad_info1 = {
},
};
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{

View file

@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis)
return 0;
}
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{

View file

@ -185,7 +185,7 @@ int board_early_init_f(void)
}
#endif
#if defined(CONFIG_POWER_LEGACY) || defined(CONFIG_DM_PMIC)
#if CONFIG_IS_ENABLED(POWER_LEGACY) || CONFIG_IS_ENABLED(DM_PMIC)
int power_init_board(void)
{
set_ps_hold_ctrl();

View file

@ -60,7 +60,7 @@ int dram_init(void)
return 0;
}
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 3
int power_init_board(void)
{

View file

@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void)
};
}
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
/* setup board specific PMIC */
int power_init_board(void)
{

View file

@ -96,7 +96,7 @@ static struct i2c_pads_info i2c_pad_info1 = {
};
#endif
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
int power_init_board(void)
{
struct pmic *p;

View file

@ -49,6 +49,8 @@ CONFIG_SF_DEFAULT_SPEED=48000000
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_SPL_POWER_I2C=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y

View file

@ -82,7 +82,9 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
CONFIG_PHY_ATHEROS=y
CONFIG_MII=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y

View file

@ -82,6 +82,8 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHY_ATHEROS=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y

View file

@ -102,8 +102,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y

View file

@ -106,8 +106,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y

View file

@ -108,8 +108,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y

View file

@ -26,6 +26,7 @@ CONFIG_SYS_MMC_ENV_PART=2
CONFIG_MMC_DW=y
CONFIG_MMC_DW_K3=y
CONFIG_DM_ETH=y
CONFIG_POWER_LEGACY=y
CONFIG_CONS_INDEX=4
CONFIG_USB=y
CONFIG_USB_DWC2=y

View file

@ -81,9 +81,11 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y

View file

@ -52,11 +52,13 @@ CONFIG_PHY=y
CONFIG_PHY_IMX8MQ_USB=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y

View file

@ -54,11 +54,13 @@ CONFIG_FSL_USDHC=y
CONFIG_DM_ETH=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y

View file

@ -83,6 +83,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y

View file

@ -65,6 +65,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y

View file

@ -69,6 +69,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y

View file

@ -87,6 +87,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y

View file

@ -81,6 +81,8 @@ CONFIG_FMAN_ENET=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y

View file

@ -81,6 +81,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y

View file

@ -62,6 +62,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y

View file

@ -68,6 +68,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y

View file

@ -42,6 +42,7 @@ CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX5=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y

View file

@ -48,9 +48,11 @@ CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX5=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_USB=y
CONFIG_USB_EHCI_MX5=y

View file

@ -90,7 +90,9 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y

View file

@ -99,8 +99,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y

View file

@ -70,6 +70,8 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
CONFIG_IMX_THERMAL=y

View file

@ -92,9 +92,11 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y

View file

@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y

View file

@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y

View file

@ -66,6 +66,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=4
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y

View file

@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y

View file

@ -52,11 +52,13 @@ CONFIG_FSL_USDHC=y
CONFIG_DM_ETH=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y

View file

@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y

View file

@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y

View file

@ -50,5 +50,7 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y

View file

@ -78,6 +78,8 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_PWM_IMX=y
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y

View file

@ -38,6 +38,8 @@ CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_MXC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
CONFIG_POWER_LEGACY=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_USB=y
CONFIG_WATCHDOG_TIMEOUT_MSECS=30000

View file

@ -1,5 +1,34 @@
menu "Power"
config POWER_LEGACY
bool "Legacy power support"
help
Note: This is a legacy option. Use DM_PMIC instead.
Enable support for power control in U-Boot. This includes support
for PMICs (Power-management Integrated Circuits) and some of the
features provided by PMICs. In particular, voltage regulators can
be used to enable/disable power and vary its voltage. That can be
useful in U-Boot to turn on boot peripherals and adjust CPU voltage
so that the clock speed can be increased. This enables the drivers
in drivers/power, drivers/power/pmic and drivers/power/regulator
as part of a build.
config SPL_POWER_LEGACY
bool "Legacy power support in SPL"
default y if POWER_LEGACY
help
Note: This is a legacy option. Use SPL_DM_PMIC instead.
Enable support for power control in SPL. This includes support
for PMICs (Power-management Integrated Circuits) and some of the
features provided by PMICs. In particular, voltage regulators can
be used to enable/disable power and vary its voltage. That can be
useful in SPL to turn on boot peripherals and adjust CPU voltage
so that the clock speed can be increased. This enables the drivers
in drivers/power, drivers/power/pmic and drivers/power/regulator
as part of a build.
source "drivers/power/acpi_pmc/Kconfig"
source "drivers/power/domain/Kconfig"
@ -383,4 +412,25 @@ config POWER_MT6323
This adds poweroff driver for mt6323
this pmic is used on mt7623 / Bananapi R2
config POWER_I2C
bool "I2C-based power control for legacy power"
depends on POWER_LEGACY
help
Enable this to use the I2C driver designed for the legacy PMIC
interface.
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.
config SPL_POWER_I2C
bool "I2C-based power control for legacy power"
depends on SPL_POWER_LEGACY
default y if POWER_I2C
help
Enable this to use the I2C driver designed for the legacy PMIC
interface.
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.
endmenu

View file

@ -16,9 +16,9 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o
obj-$(CONFIG_TWL4030_POWER) += twl4030.o
obj-$(CONFIG_TWL6030_POWER) += twl6030.o
obj-$(CONFIG_PALMAS_POWER) += palmas.o
obj-$(CONFIG_POWER_LEGACY) += power_core.o
obj-$(CONFIG_$(SPL_TPL_)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_TPL_)POWER_I2C) += power_i2c.o
obj-$(CONFIG_POWER_SPI) += power_spi.o
obj-$(CONFIG_POWER_MT6323) += mt6323.o

View file

@ -23,10 +23,6 @@
/* I2C Configuration */
/* Power */
#if !CONFIG_IS_ENABLED(DM_I2C)
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_POWER_TPS65218
#define CONFIG_POWER_TPS62362

View file

@ -22,8 +22,6 @@
#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08

View file

@ -50,8 +50,6 @@
#define CONFIG_AM437X_USB2PHY2_HOST
/* Power */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_TPS65218
/* Enabling L2 Cache */

View file

@ -23,8 +23,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

View file

@ -65,8 +65,6 @@
/*
* PMIC
*/
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define CONFIG_POWER_LTC3676

View file

@ -13,7 +13,6 @@
#include <linux/sizes.h>
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_HI6553
#define CONFIG_REMAKE_ELF

View file

@ -31,8 +31,6 @@
#undef CONFIG_DM_MMC
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
#endif

View file

@ -44,8 +44,6 @@
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif

View file

@ -40,9 +40,6 @@
#undef CONFIG_DM_MMC
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_REMAKE_ELF

View file

@ -124,10 +124,6 @@
#define I2C_RETIMER_ADDR 0x18
/* PMIC */
#define CONFIG_POWER_LEGACY
#ifdef CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
/*
* Environment

View file

@ -30,7 +30,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
/* PMIC Controller */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_SPI
#define CONFIG_POWER_FSL
#define CONFIG_FSL_PMIC_BUS 0

View file

@ -33,8 +33,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* PMIC Controller */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_DIALOG_POWER
#define CONFIG_POWER_FSL
#define CONFIG_POWER_FSL_MC13892

View file

@ -59,8 +59,6 @@
/* DMA stuff, needed for GPMI/MXS NAND support */
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

View file

@ -38,8 +38,6 @@
#endif
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

View file

@ -68,8 +68,6 @@
#endif
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

View file

@ -29,8 +29,6 @@
#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
#endif

View file

@ -122,8 +122,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08

View file

@ -40,9 +40,6 @@
#undef CONFIG_DM_MMC
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#endif
#define CONFIG_REMAKE_ELF

View file

@ -42,8 +42,6 @@
#define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20
#if !defined(CONFIG_DM_PMIC)
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define TQMA6_PFUZE100_I2C_BUS 2

View file

@ -68,8 +68,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define PFUZE3000_I2C_BUS 0

View file

@ -40,8 +40,6 @@
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

View file

@ -52,8 +52,6 @@
/* I2C Configs */
/* PMIC */
#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_I2C
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \

View file

@ -154,7 +154,7 @@ enum {
OPMODE_ON,
};
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(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);

View file

@ -18,7 +18,7 @@
enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
enum { I2C_PMIC, I2C_NUM, };
enum { PMIC_READ, PMIC_WRITE, };
enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
@ -83,7 +83,7 @@ struct pmic {
struct pmic *parent;
struct list_head list;
};
#endif /* CONFIG_POWER_LEGACY */
#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
#ifdef CONFIG_DM_PMIC
@ -311,7 +311,7 @@ struct uc_pmic_priv {
#endif /* DM_PMIC */
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
#ifdef CONFIG_POWER_LEGACY
#if CONFIG_IS_ENABLED(POWER_LEGACY)
/* Legacy API, do not use */
int pmic_init(unsigned char bus);
@ -324,7 +324,7 @@ int pmic_probe(struct pmic *p);
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 /* CONFIG_POWER_LEGACY */
#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
#define pmic_i2c_addr (p->hw.i2c.addr)
#define pmic_i2c_tx_num (p->hw.i2c.tx_num)

View file

@ -1035,8 +1035,6 @@ CONFIG_POST_WATCHDOG
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