[U-Boot] [PATCH 34/48] stm32mp1: board: Update the way vdd-supply is retrieved from DT
Patrick Delaunay
patrick.delaunay at st.com
Tue Jul 30 17:16:42 UTC 2019
Due to kernel DT alignment, pwr-supply is renamed to vdd-supply
and is a subnode of pwr-regulators.
Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---
arch/arm/dts/stm32mp157a-avenger96.dts | 5 ++++-
arch/arm/dts/stm32mp157a-dk1.dts | 5 ++++-
arch/arm/dts/stm32mp157c-ed1.dts | 5 ++++-
board/st/stm32mp1/stm32mp1.c | 8 +++++---
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/arch/arm/dts/stm32mp157a-avenger96.dts b/arch/arm/dts/stm32mp157a-avenger96.dts
index ba86cf5..5b15a4a 100644
--- a/arch/arm/dts/stm32mp157a-avenger96.dts
+++ b/arch/arm/dts/stm32mp157a-avenger96.dts
@@ -283,7 +283,10 @@
};
&pwr {
- pwr-supply = <&vdd>;
+ pwr-regulators {
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+ };
};
&rng1 {
diff --git a/arch/arm/dts/stm32mp157a-dk1.dts b/arch/arm/dts/stm32mp157a-dk1.dts
index 1d5c1a6..ba612a5 100644
--- a/arch/arm/dts/stm32mp157a-dk1.dts
+++ b/arch/arm/dts/stm32mp157a-dk1.dts
@@ -308,7 +308,10 @@
};
&pwr {
- pwr-supply = <&vdd>;
+ pwr-regulators {
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+ };
};
&rng1 {
diff --git a/arch/arm/dts/stm32mp157c-ed1.dts b/arch/arm/dts/stm32mp157c-ed1.dts
index 94ac025..3e8b7b5 100644
--- a/arch/arm/dts/stm32mp157c-ed1.dts
+++ b/arch/arm/dts/stm32mp157c-ed1.dts
@@ -218,7 +218,10 @@
};
&pwr {
- pwr-supply = <&vdd>;
+ pwr-regulators {
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+ };
};
&rng1 {
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index c61a562..a96e675 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -471,7 +471,9 @@ static void sysconf_init(void)
* => U-Boot set the register only if VDD < 2.7V (in DT)
* but this value need to be consistent with board design
*/
- ret = syscon_get_by_driver_data(STM32MP_SYSCON_PWR, &pwr_dev);
+ ret = uclass_get_device_by_driver(UCLASS_PMIC,
+ DM_GET_DRIVER(stm32mp_pwr_pmic),
+ &pwr_dev);
if (!ret) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_GET_DRIVER(stm32mp_bsec),
@@ -485,8 +487,8 @@ static void sysconf_init(void)
if (!ret)
otp = otp & BIT(13);
- /* get VDD = pwr-supply */
- ret = device_get_supply_regulator(pwr_dev, "pwr-supply",
+ /* get VDD = vdd-supply */
+ ret = device_get_supply_regulator(pwr_dev, "vdd-supply",
&pwr_reg);
/* check if VDD is Low Voltage */
--
2.7.4
More information about the U-Boot
mailing list