]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: Tidy up #undef of CONFIG_DM_PMIC
authorSimon Glass <sjg@chromium.org>
Sun, 8 Aug 2021 18:20:25 +0000 (12:20 -0600)
committerTom Rini <trini@konsulko.com>
Sat, 4 Sep 2021 16:26:02 +0000 (12:26 -0400)
Add a proper Kconfig option for SPL so we can remove the hack in some of
the board config files.

This involves adding CONFIG_SPL_DM_PMIC to some of the configs as well
as updateing the Makefile rule for PMIC_RK8XX to exclude SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
[trini: Add SPL_PMIC_RK8XX, enable when needed, handle undef of
        CONFIG_DM_PMIC_PFUZE100 as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
20 files changed:
configs/imx8mm-cl-iot-gate_defconfig
configs/imx8mm_beacon_defconfig
configs/imx8mm_evk_defconfig
configs/imx8mm_venice_defconfig
configs/imx8mn_evk_defconfig
configs/nanopi-r2s-rk3328_defconfig
configs/odroid-go2_defconfig
configs/puma-rk3399_defconfig
configs/roc-cc-rk3328_defconfig
configs/rock-pi-e-rk3328_defconfig
configs/rock64-rk3328_defconfig
configs/tinker-rk3288_defconfig
configs/tinker-s-rk3288_defconfig
configs/verdin-imx8mm_defconfig
drivers/power/pmic/Kconfig
drivers/power/pmic/Makefile
include/configs/imx8mp_evk.h
include/configs/imx8mq_evk.h
include/configs/imx8mq_phanbell.h
include/configs/pico-imx8mq.h

index 835ed9e48e19fd15c5e15ee87ad27c87515b5042..d50a802757116d6029318fc5860586c216c8c090 100644 (file)
@@ -102,6 +102,7 @@ CONFIG_PINCTRL_IMX8M=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_IMX8M_POWER_DOMAIN=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_DM_PMIC_BD71837=y
 CONFIG_SPL_DM_PMIC_BD71837=y
 CONFIG_DM_REGULATOR=y
index 113adc125820432099b7ac125e294887b727a31d..43766605010ea8a0ed6362f16111dc926742341c 100644 (file)
@@ -97,6 +97,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_DM_PMIC_BD71837=y
 CONFIG_SPL_DM_PMIC_BD71837=y
 CONFIG_DM_REGULATOR=y
index 021a7b141e2e144f1c691c0b13a62825b21ca785..8876ad060fd23cfe650f78765bf73253d98264d1 100644 (file)
@@ -74,6 +74,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
index 97a204cf1f4e642e71b898b2b911014943817c3e..67fdb330f9e913637b690fbced256caa9fb2b41b 100644 (file)
@@ -99,6 +99,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_DM_PMIC_BD71837=y
 CONFIG_SPL_DM_PMIC_BD71837=y
 CONFIG_DM_PMIC_MP5416=y
index 24effe5e65a6bf90ae9da567124794281f6bf311..0622e53d9b1cccff88cbbc1a4a5aa6a5a2d46fc1 100644 (file)
@@ -75,6 +75,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
index c85959aba3cb2fb33028de5aa78fc4fc6ff54c30..cafb38ffcee772ceebbca17d4a7c9ac8c9cc857f 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
index 27e3014bd37a83defe0ffcd5b3b660cd5f21b5e2..c744c3a6ea35056df5f59ff243e09e0492720e90 100644 (file)
@@ -83,6 +83,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
index 6a9bb82bd8c701d80fc475320908ead0f46f3818..a0a3059a3620dc9610880eff469d8db0ed806ca9 100644 (file)
@@ -69,6 +69,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_DM_PMIC_FAN53555=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_SPL_DM_REGULATOR_FIXED=y
index 3e7b88cf38dbfdaac88b73ec0a292c33d36946b6..cf04bbc768f87ff19db12d58d27795cc6f96c482 100644 (file)
@@ -71,6 +71,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
index 6aeecf8830915ddc5d38c8b98643dd365bd671c4..520ad8aa883800f6cee4e112cd933e1d49d1c139 100644 (file)
@@ -72,6 +72,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
index c7a776226f8ce209a15e3c6ade6ab00ad0464170..38b91569c23d216ac6945fa7d35a125648ed1660 100644 (file)
@@ -70,6 +70,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
index f2797da78ab98469aefaf682a9f21ea4fec6a864..a9c9a122f64c4984155807513e3a41ed32445fcc 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_SPL_DM_REGULATOR_FIXED=y
index b97d6fab7ce101175aa66b90e4063449f1e46bfc..5145cbc9e17b74d2d31410d66764345b102885fb 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
 CONFIG_SPL_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_SPL_DM_REGULATOR_FIXED=y
index 42b6803ccebd2dadff092d74836f2e6eaf31cf02..72a9c6b0df0e216e6fd605657b33651223d4f874 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_PINCTRL_IMX8M=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_IMX8M_POWER_DOMAIN=y
 CONFIG_DM_PMIC=y
+CONFIG_SPL_DM_PMIC=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_REGULATOR=y
index fd6648b313ee14e3ff2605655a472bca3c5cc969..cf2a9b2c17e470245523b48f1233856944f4569e 100644 (file)
@@ -10,6 +10,19 @@ config DM_PMIC
        - 'drivers/power/pmic/pmic-uclass.c'
        - 'include/power/pmic.h'
 
+config SPL_DM_PMIC
+       bool "Enable Driver Model for PMIC drivers (UCLASS_PMIC) in SPL"
+       depends on SPL_DM
+       default y if DM_PMIC
+       ---help---
+       This config enables the driver-model PMIC support in SPL.
+       UCLASS_PMIC - designed to provide an I/O interface for PMIC devices.
+       For the multi-function PMIC devices, this can be used as parent I/O
+       device for each IC's interface. Then, each children uses its parent
+       for read/write. For detailed description, please refer to the files:
+       - 'drivers/power/pmic/pmic-uclass.c'
+       - 'include/power/pmic.h'
+
 config PMIC_CHILDREN
        bool "Allow child devices for PMICs"
        depends on DM_PMIC
@@ -205,6 +218,15 @@ config PMIC_RK8XX
        accessed via an I2C interface. The device is used with Rockchip SoCs.
        This driver implements register read/write operations.
 
+config SPL_PMIC_RK8XX
+       bool "Enable support for Rockchip PMIC RK8XX"
+       depends on DM_PMIC
+       ---help---
+       The Rockchip RK808 PMIC provides four buck DC-DC convertors, 8 LDOs,
+       an RTC and two low Rds (resistance (drain to source)) switches. It is
+       accessed via an I2C interface. The device is used with Rockchip SoCs.
+       This driver implements register read/write operations.
+
 config PMIC_S2MPS11
        bool "Enable Driver Model for PMIC Samsung S2MPS11"
        depends on DM_PMIC
index 5d1a97e5f6f5c2804178c0652731927fea7e200c..5250eac12f2d1274277f95b850236e8539ae88a6 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright (C) 2012 Samsung Electronics
 # Lukasz Majewski <l.majewski@samsung.com>
 
-obj-$(CONFIG_DM_PMIC) += pmic-uclass.o
+obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o
 obj-$(CONFIG_DM_PMIC_FAN53555) += fan53555.o
 obj-$(CONFIG_$(SPL_)DM_PMIC_DA9063) += da9063.o
 obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o
@@ -20,7 +20,7 @@ obj-$(CONFIG_PMIC_ACT8846) += act8846.o
 obj-$(CONFIG_PMIC_AS3722) += as3722.o as3722_gpio.o
 obj-$(CONFIG_PMIC_MAX8997) += max8997.o
 obj-$(CONFIG_PMIC_PM8916) += pm8916.o
-obj-$(CONFIG_PMIC_RK8XX) += rk8xx.o
+obj-$(CONFIG_$(SPL_TPL_)PMIC_RK8XX) += rk8xx.o
 obj-$(CONFIG_PMIC_RN5T567) += rn5t567.o
 obj-$(CONFIG_PMIC_TPS65090) += tps65090.o
 obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o
index 6497c70314c241179ab8daffd6057288837822ff..9dd4bf7b2415a00839fd224e177086d18de7d68d 100644 (file)
@@ -30,8 +30,6 @@
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #undef CONFIG_DM_MMC
-#undef CONFIG_DM_PMIC
-#undef CONFIG_DM_PMIC_PFUZE100
 
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
index 5c8d9cbcba439cfdba81459736dad08aefeae206..e0666c9addaadb1f51d368c2952b50119a02069d 100644 (file)
@@ -41,8 +41,6 @@
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #undef CONFIG_DM_MMC
-#undef CONFIG_DM_PMIC
-#undef CONFIG_DM_PMIC_PFUZE100
 
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 
 #define CONFIG_OF_SYSTEM_SETUP
 
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_DM_PMIC
-#endif
-
 #endif
index 1e7cfc7b68ba6374662c17e342e2ef1a9b353e36..2fd1302bcfd9c342efa7fba384456a946d288438 100644 (file)
@@ -38,8 +38,6 @@
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #undef CONFIG_DM_MMC
-#undef CONFIG_DM_PMIC
-#undef CONFIG_DM_PMIC_PFUZE100
 
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 
 #define CONFIG_OF_SYSTEM_SETUP
 
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_DM_PMIC
-#endif
-
 #endif
index 3faa334ce126af693618ca754c011c24c4c4fae2..09e0f44872b51aa844d380cbcc19ab0a6e420ddd 100644 (file)
@@ -38,7 +38,6 @@
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #undef CONFIG_DM_MMC
-#undef CONFIG_DM_PMIC
 
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 
 #define CONFIG_OF_SYSTEM_SETUP
 
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_DM_PMIC
-#endif
-
 #define CONFIG_SYS_BOOTM_LEN           SZ_128M
 
 #endif