[PATCH 08/38] Convert CONFIG_POWER_LTC3676 et al to Kconfig

Tom Rini
2022-11-19T23:47:51Z

This converts the following to Kconfig:
CONFIG_POWER_FSL
CONFIG_POWER_FSL_MC13892
CONFIG_POWER_HI6553
CONFIG_POWER_LTC3676
CONFIG_POWER_PFUZE100
CONFIG_POWER_PFUZE3000
CONFIG_POWER_SPI
CONFIG_POWER_TPS65090_EC
CONFIG_POWER_TPS65218
CONFIG_POWER_TPS65910

Signed-off-by: Tom Rini <trini@konsulko.com>
---
board/freescale/common/Makefile | 2 ++
configs/am335x_baltos_defconfig | 1 +
configs/am335x_boneblack_vboot_defconfig | 1 +
configs/am335x_evm_defconfig | 1 +
configs/am335x_evm_spiboot_defconfig | 1 +
configs/am335x_hs_evm_defconfig | 1 +
configs/am335x_hs_evm_uart_defconfig | 1 +
configs/am335x_sl50_defconfig | 1 +
configs/am43xx_evm_defconfig | 2 ++
configs/am43xx_evm_qspiboot_defconfig | 2 ++
configs/am43xx_evm_rtconly_defconfig | 2 ++
configs/am43xx_evm_usbhost_boot_defconfig | 2 ++
configs/am43xx_hs_evm_defconfig | 2 ++
configs/am43xx_hs_evm_qspi_defconfig | 2 ++
configs/cl-som-imx7_defconfig | 1 +
configs/cm_t43_defconfig | 1 +
configs/gwventana_emmc_defconfig | 2 ++
configs/gwventana_gw5904_defconfig | 2 ++
configs/gwventana_nand_defconfig | 2 ++
configs/hikey_defconfig | 1 +
configs/imx8mq_evk_defconfig | 1 +
configs/kontron_pitx_imx8m_defconfig | 1 +
configs/mx51evk_defconfig | 2 ++
configs/mx53loco_defconfig | 1 +
configs/mx6sabreauto_defconfig | 1 +
configs/mx6sabresd_defconfig | 1 +
configs/novena_defconfig | 1 +
configs/pcm051_rev3_defconfig | 1 +
configs/phycore-am335x-r2-regor_defconfig | 1 +
configs/phycore-am335x-r2-wega_defconfig | 1 +
configs/pico-dwarf-imx7d_defconfig | 1 +
configs/pico-hobbit-imx7d_defconfig | 1 +
configs/pico-imx7d_bl33_defconfig | 1 +
configs/pico-imx7d_defconfig | 1 +
configs/pico-nymph-imx7d_defconfig | 1 +
configs/pico-pi-imx7d_defconfig | 1 +
configs/udoo_neo_defconfig | 1 +
configs/vining_2000_defconfig | 1 +
drivers/power/Kconfig | 21 ++++++++++++++++++
drivers/power/pmic/Kconfig | 27 +++++++++++++++++++++++
drivers/power/pmic/Makefile | 7 +++---
drivers/power/power_fsl.c | 2 --
include/configs/am335x_evm.h | 3 ---
include/configs/am335x_sl50.h | 7 ------
include/configs/am43xx_evm.h | 8 -------
include/configs/baltos.h | 3 ---
include/configs/cl-som-imx7.h | 1 -
include/configs/cm_t43.h | 3 ---
include/configs/el6x_common.h | 1 -
include/configs/gw_ventana.h | 2 --
include/configs/hikey.h | 2 --
include/configs/imx8mq_evk.h | 1 -
include/configs/kontron_pitx_imx8m.h | 1 -
include/configs/mx51evk.h | 2 --
include/configs/mx53loco.h | 2 --
include/configs/mx6sabreauto.h | 1 -
include/configs/mx6sabresd.h | 1 -
include/configs/novena.h | 1 -
include/configs/peach-pi.h | 2 --
include/configs/phycore_am335x_r2.h | 2 --
include/configs/pico-imx7d.h | 1 -
include/configs/tqma6.h | 1 -
include/configs/udoo_neo.h | 1 -
include/configs/vining_2000.h | 1 -
64 files changed, 101 insertions(+), 52 deletions(-)

diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 377c6aa077dc..cc1371867d86 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -61,7 +61,9 @@ obj-$(CONFIG_TARGET_P4080DS) += ics307_clk.o
obj-$(CONFIG_TARGET_P5040DS) += ics307_clk.o
obj-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o
obj-$(CONFIG_ZM7300) += zm7300.o
+ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y)
obj-$(CONFIG_POWER_PFUZE100) += pfuze.o
+endif
obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze.o
obj-$(CONFIG_POWER_MC34VR500) += mc34vr500.o
ifneq (,$(filter $(SOC), imx8ulp imx9))
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index bd23b71b096e..9976cee81fcc 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -79,6 +79,7 @@ CONFIG_PHY_SMSC=y
CONFIG_DM_MDIO=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index 66b7fb6e06d8..442783a9d02b 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -76,6 +76,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_DM_PMIC is not set
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index f0fbe475b394..cee31676d440 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -101,6 +101,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_DM_PMIC is not set
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 3d04e6fa934a..ae4a7018d39c 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -88,6 +88,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_DM_PMIC is not set
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index 8d3a4548d9a0..5dc9ba98fdea 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -80,6 +80,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_DM_PMIC is not set
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig
index 7080b14c4671..68513c1b6a92 100644
--- a/configs/am335x_hs_evm_uart_defconfig
+++ b/configs/am335x_hs_evm_uart_defconfig
@@ -81,6 +81,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_DM_PMIC is not set
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 65b20550c0c6..673824cfecf4 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -75,6 +75,7 @@ CONFIG_PHY_SMSC=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PMIC_TPS65217=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 2dfd936057f0..2faf1322f9ea 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -88,6 +88,8 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY=y
CONFIG_SPL_PHY=y
CONFIG_OMAP_USB2_PHY=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 0b759c8c2c40..20e1a469aaa1 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -53,6 +53,8 @@ CONFIG_SF_DEFAULT_SPEED=48000000
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig
index 357da192b83b..4241070930f7 100644
--- a/configs/am43xx_evm_rtconly_defconfig
+++ b/configs/am43xx_evm_rtconly_defconfig
@@ -72,6 +72,8 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_PHY_GIGE=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 0e58221c8203..91270d032bff 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -91,6 +91,8 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY=y
CONFIG_SPL_PHY=y
CONFIG_OMAP_USB2_PHY=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index 2b5a7fb2599b..b6b74af735e7 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -86,6 +86,8 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY=y
CONFIG_SPL_PHY=y
CONFIG_OMAP_USB2_PHY=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig
index 68a96518878b..3d3530d967c6 100644
--- a/configs/am43xx_hs_evm_qspi_defconfig
+++ b/configs/am43xx_hs_evm_qspi_defconfig
@@ -55,6 +55,8 @@ CONFIG_SF_DEFAULT_SPEED=48000000
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_POWER_TPS65218=y
+CONFIG_POWER_TPS62362=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig
index f3ee559d21fc..3571dba6d2ae 100644
--- a/configs/cl-som-imx7_defconfig
+++ b/configs/cl-som-imx7_defconfig
@@ -95,6 +95,7 @@ CONFIG_PHY_ATHEROS=y
CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_DM_REGULATOR=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 0a5ce2046f1c..867ca3032058 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -95,6 +95,7 @@ CONFIG_PHY_ATHEROS=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_TPS65218=y
CONFIG_POWER_I2C=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index cabe09e6d389..ce81b558ee21 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -119,6 +119,8 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_LTC3676=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index f58abd9c5e57..3ef909a1ce30 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -123,6 +123,8 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_LTC3676=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index a41b3c4c97ef..d3d4876658a0 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -129,6 +129,8 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_LTC3676=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index d023653815cd..152459ece8dc 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -34,6 +34,7 @@ CONFIG_HIKEY_GPIO=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_K3=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_HI6553=y
CONFIG_CONS_INDEX=4
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 274cdb948d7c..79a27dedb371 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -88,6 +88,7 @@ CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/kontron_pitx_imx8m_defconfig
index d2726b1c2002..898a0b45e85a 100644
--- a/configs/kontron_pitx_imx8m_defconfig
+++ b/configs/kontron_pitx_imx8m_defconfig
@@ -95,6 +95,7 @@ CONFIG_PINCTRL_IMX8M=y
CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index d76ebe8fd229..774523bc84b8 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -54,6 +54,8 @@ CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_POWER_FSL=y
+CONFIG_POWER_SPI=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index 193120f71a46..08bcd35f0734 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -58,6 +58,7 @@ CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_POWER_FSL=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_USB=y
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index 2aa15ce8c651..634473f30743 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -95,6 +95,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index 766ce0edc459..4f7d3704203e 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -102,6 +102,7 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE100=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_POWER_I2C=y
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index f6690b4ac85f..5f761799a21f 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -79,6 +79,7 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE100=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index 373c609d2141..3ed55916d23d 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -56,6 +56,7 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHY_SMSC=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/phycore-am335x-r2-regor_defconfig b/configs/phycore-am335x-r2-regor_defconfig
index b6b5274f03ee..1b3167656852 100644
--- a/configs/phycore-am335x-r2-regor_defconfig
+++ b/configs/phycore-am335x-r2-regor_defconfig
@@ -83,6 +83,7 @@ CONFIG_SYS_NAND_U_BOOT_OFFS=0x20000
CONFIG_DM_SPI_FLASH=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/phycore-am335x-r2-wega_defconfig b/configs/phycore-am335x-r2-wega_defconfig
index 5012049fed98..c5ffb4127470 100644
--- a/configs/phycore-am335x-r2-wega_defconfig
+++ b/configs/phycore-am335x-r2-wega_defconfig
@@ -84,6 +84,7 @@ CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND=0x100000
CONFIG_DM_SPI_FLASH=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_SPL_POWER_TPS65910=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig
index 821357827a79..46777e04fdb9 100644
--- a/configs/pico-dwarf-imx7d_defconfig
+++ b/configs/pico-dwarf-imx7d_defconfig
@@ -81,6 +81,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index 759866ce1195..fb354d1cdee7 100644
--- a/configs/pico-hobbit-imx7d_defconfig
+++ b/configs/pico-hobbit-imx7d_defconfig
@@ -81,6 +81,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
index 8631f81f3333..35e6f1d5493e 100644
--- a/configs/pico-imx7d_bl33_defconfig
+++ b/configs/pico-imx7d_bl33_defconfig
@@ -77,6 +77,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=4
CONFIG_MXC_UART=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index a84954d22fd5..13cc97bb73cc 100644
--- a/configs/pico-imx7d_defconfig
+++ b/configs/pico-imx7d_defconfig
@@ -81,6 +81,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig
index 821357827a79..46777e04fdb9 100644
--- a/configs/pico-nymph-imx7d_defconfig
+++ b/configs/pico-nymph-imx7d_defconfig
@@ -81,6 +81,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index dec428097472..6e92366beff0 100644
--- a/configs/pico-pi-imx7d_defconfig
+++ b/configs/pico-pi-imx7d_defconfig
@@ -81,6 +81,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 95428e199359..f62a585b1c39 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -57,6 +57,7 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE3000=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_ANATOP=y
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 3b5658ddc890..7f84209b6555 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -89,6 +89,7 @@ CONFIG_PCIE_IMX=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_POWER_LEGACY=y
+CONFIG_POWER_PFUZE100=y
CONFIG_POWER_I2C=y
CONFIG_PWM_IMX=y
CONFIG_DM_SERIAL=y
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index bc47cf144dd0..5dbcde333ba5 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -430,6 +430,10 @@ config PALMAS_POWER
bool "Palmas power support"
depends on OMAP54XX

+config POWER_FSL
+ bool "Power control (legacy) for Freescale / NXP platforms"
+ depends on POWER_LEGACY
+
config POWER_I2C
bool "I2C-based power control for legacy power"
depends on POWER_LEGACY
@@ -440,6 +444,10 @@ config POWER_I2C
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.

+config POWER_SPI
+ bool "SPI-based power control for legacy power_fsl driver"
+ depends on POWER_FSL && !POWER_I2C
+
config SPL_POWER_I2C
bool "I2C-based power control for legacy power"
depends on SPL_POWER_LEGACY
@@ -451,4 +459,17 @@ config SPL_POWER_I2C
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.

+choice
+ prompt "PMIC chip"
+ default POWER_FSL_MC13892
+ depends on POWER_FSL && POWER_I2C
+
+config POWER_FSL_MC13892
+ bool "MC13892"
+
+config POWER_FSL_MC34704
+ bool "MC34704"
+
+endchoice
+
endif
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index d30bb4d4e9cc..d94048db5f7e 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -393,8 +393,35 @@ config PMIC_TPS65217
only, and you can enable the regulator/charger drivers separately if
required.

+config POWER_TPS65218
+ bool "Enable legacy driver for TPS65218 PMIC"
+
+config POWER_TPS62362
+ bool "Enable legacy driver for TPS62362 PMIC"
+
+config SPL_POWER_TPS62362
+ bool "Enable legacy driver for TPS62362 PMIC in SPL"
+ default y if POWER_TPS62362
+ depends on SPL
+
+config SPL_POWER_TPS65910
+ bool "Enable legacy driver for TPS65910 PMIC in SPL"
+ depends on SPL
+
if POWER_LEGACY || SPL_POWER_LEGACY

+config POWER_HI6553
+ bool "Enable legacy driver for HI6553 PMIC"
+
+config POWER_LTC3676
+ bool "Enable legacy driver for LTC3676 PMIC"
+
+config POWER_PFUZE100
+ bool "Enable legacy driver for PFUZE100 PMIC"
+
+config POWER_PFUZE3000
+ bool "Enable legacy driver for PFUZE3000 PMIC"
+
config POWER_MC34VR500
bool "Enable driver for Freescale MC34VR500 PMIC"
---help---
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index e78dc1e20535..c3180c582085 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_PMIC_STPMIC1) += stpmic1.o
obj-$(CONFIG_PMIC_TPS65217) += pmic_tps65217.o
obj-$(CONFIG_PMIC_TPS65219) += tps65219.o
obj-$(CONFIG_PMIC_TPS65941) += tps65941.o
+obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o

ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y)
obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o
@@ -40,9 +41,9 @@ obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o
obj-$(CONFIG_POWER_PCA9450) += pmic_pca9450.o
obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
obj-$(CONFIG_POWER_PFUZE3000) += pmic_pfuze3000.o
-obj-$(CONFIG_POWER_TPS62362) += pmic_tps62362.o
-obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
-obj-$(CONFIG_POWER_TPS65910) += pmic_tps65910.o
obj-$(CONFIG_POWER_HI6553) += pmic_hi6553.o
obj-$(CONFIG_POWER_MC34VR500) += pmic_mc34vr500.o
endif
+
+obj-$(CONFIG_$(SPL_)POWER_TPS62362) += pmic_tps62362.o
+obj-$(CONFIG_SPL_POWER_TPS65910) += pmic_tps65910.o
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index 7180b5127a5b..9bb7e39f2cc2 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -49,8 +49,6 @@ int pmic_init(unsigned char bus)
p->interface = PMIC_I2C;
p->hw.i2c.addr = CFG_SYS_FSL_PMIC_I2C_ADDR;
p->hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH;
-#else
-#error "You must select CONFIG_POWER_SPI or CONFIG_POWER_I2C"
#endif

return 0;
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 69b8b048ce39..755f7fae3e4f 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -165,9 +165,6 @@
#define CFG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
#define CFG_SYS_NS16550_COM6 0x481aa000 /* UART5 */

-/* PMIC support */
-#define CONFIG_POWER_TPS65910
-
#ifdef CONFIG_MTD_RAW_NAND
/* NAND: device related configs */
/* NAND: driver related configs */
diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h
index 4af9edafca8f..342a068c855f 100644
--- a/include/configs/am335x_sl50.h
+++ b/include/configs/am335x_sl50.h
@@ -43,11 +43,4 @@
#define CFG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
#define CFG_SYS_NS16550_COM6 0x481aa000 /* UART5 */

-/* PMIC support */
-#define CONFIG_POWER_TPS65910
-
-/* SPL */
-
-/* Network. */
-
#endif /* ! __CONFIG_AM335X_SL50_H */
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index bcdff2e98acd..7659c1cc0619 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -16,14 +16,6 @@
/* NS16550 Configuration */
#define CFG_SYS_NS16550_CLK 48000000

-/* I2C Configuration */
-
-/* Power */
-#define CONFIG_POWER_TPS65218
-#define CONFIG_POWER_TPS62362
-
-/* SPL defines. */
-
/* Enabling L2 Cache */
#define CFG_SYS_PL310_BASE 0x48242000

diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index f29729d09bac..6f6552e6dc34 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -188,9 +188,6 @@
#define CFG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
#define CFG_SYS_NS16550_COM6 0x481aa000 /* UART5 */

-/* PMIC support */
-#define CONFIG_POWER_TPS65910
-
/* SPL */
#ifndef CONFIG_NOR_BOOT

diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index b1f9470d9ca4..4aaa52f26980 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -19,7 +19,6 @@
#define IMX_FEC_BASE ENET_IPS_BASE_ADDR

/* PMIC */
-#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08

#define CONFIG_PCA953X
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 8ad1cfb5ded3..fcc17fc6b7ce 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -28,9 +28,6 @@
42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, }

-/* Power */
-#define CONFIG_POWER_TPS65218
-
/* Enabling L2 Cache */
#define CFG_SYS_PL310_BASE 0x48242000

diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index 141f9913e639..89e071c0df66 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -17,7 +17,6 @@
#define CFG_SYS_FSL_USDHC_NUM 2

/* PMIC */
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

/* Commands */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index b855bbc25fb8..65283afd2a06 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -30,9 +30,7 @@
/*
* PMIC
*/
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
-#define CONFIG_POWER_LTC3676
#define CONFIG_POWER_LTC3676_I2C_ADDR 0x3c

/* Various command support */
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index eefdbd6ed11b..d4280decc9f0 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -13,8 +13,6 @@

#include <linux/sizes.h>

-#define CONFIG_POWER_HI6553
-
/* Physical Memory Map */

/* CONFIG_TEXT_BASE needs to align with where ATF loads bl33.bin */
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index aa29e7884f9e..688c0bf70080 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -18,7 +18,6 @@
#define CONFIG_MALLOC_F_ADDR 0x182000
/* For RAW image gives a error info not panic */

-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif

diff --git a/include/configs/kontron_pitx_imx8m.h b/include/configs/kontron_pitx_imx8m.h
index 2abcb849a281..17c63d834107 100644
--- a/include/configs/kontron_pitx_imx8m.h
+++ b/include/configs/kontron_pitx_imx8m.h
@@ -20,7 +20,6 @@
/* For RAW image gives a error info not panic */

-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif

diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 6d9b954587ef..d9d76d7c08da 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -21,8 +21,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE

/* PMIC Controller */
-#define CONFIG_POWER_SPI
-#define CONFIG_POWER_FSL
#define CONFIG_FSL_PMIC_BUS 0
#define CONFIG_FSL_PMIC_CS 0
#define CONFIG_FSL_PMIC_CLK 2500000
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index b52e70c95a04..d0107fcc8cb1 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -22,8 +22,6 @@
#define CONFIG_MXC_USB_FLAGS 0

/* PMIC Controller */
-#define CONFIG_POWER_FSL
-#define CONFIG_POWER_FSL_MC13892
#define CFG_SYS_DIALOG_PMIC_I2C_ADDR 0x48
#define CFG_SYS_FSL_PMIC_I2C_ADDR 0x8

diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index 1a2160cce594..f5f95a1bd1ce 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -37,7 +37,6 @@
/* DMA stuff, needed for GPMI/MXS NAND support */

/* PMIC */
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

#endif /* __MX6SABREAUTO_CONFIG_H */
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 0d06b6dc4671..78a554d0ccba 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -25,7 +25,6 @@
#endif

/* PMIC */
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

/* USB Configs */
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 6f588f99c34b..16a89b97b06c 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -50,7 +50,6 @@
#endif

/* PMIC */
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

/* UART */
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h
index bfc0011fbf96..fb6eb572cfad 100644
--- a/include/configs/peach-pi.h
+++ b/include/configs/peach-pi.h
@@ -22,8 +22,6 @@

#define CFG_SYS_SDRAM_BASE 0x20000000

-#define CONFIG_POWER_TPS65090_EC
-
/* DRAM Memory Banks */
#define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */

diff --git a/include/configs/phycore_am335x_r2.h b/include/configs/phycore_am335x_r2.h
index 43a60825b575..f922491637d9 100644
--- a/include/configs/phycore_am335x_r2.h
+++ b/include/configs/phycore_am335x_r2.h
@@ -79,8 +79,6 @@
#define V_OSCK 25000000 /* Clock output from T2 */
#define V_SCLK V_OSCK

-#define CONFIG_POWER_TPS65910
-
#ifdef CONFIG_MTD_RAW_NAND
/* NAND: device related configs */
/* NAND: driver related configs */
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 7028264d7220..83907b06ebb4 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -98,7 +98,6 @@
#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE

/* PMIC */
-#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08

/* FLASH and environment organization */
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 9c3454add463..7a1ad9544a30 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -31,7 +31,6 @@
#define CONFIG_I2C_MULTI_BUS

#if !defined(CONFIG_DM_PMIC)
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define TQMA6_PFUZE100_I2C_BUS 2
#endif
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 0e0d5b5b3e4c..d4c92233acaa 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -62,7 +62,6 @@
#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE

/* PMIC */
-#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define PFUZE3000_I2C_BUS 0

diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index ab5cd5cf6365..1a71b300fc55 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -31,7 +31,6 @@
#define CFG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR

/* PMIC */
-#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08

/* Network */
--
2.25.1