Skip to contentSkip to conversation

ARM: dts: stm32: Remove buck3 regulator-always-on on AV96

PATCH In review Marek Vasut 2 participants 3 messages Sep 23, 2022 – Oct 18, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: stm32: Remove buck3 regulator-always-on on AV96

In case the regulator-always-on is present in regulator DT node, the regulator is always reconfigured to the voltage set in DT on probe, even if regulator_set_value() has been called before. Drop the property from AV96 U-Boot DT and enable the regulator manually in code, as the board already reconfigures the Buck3 regulator in code per PMIC NVM content instead.

Fixes 0adf10a87b1 ("ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96")

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi | 4 ++++
 board/dhelectronics/dh_stm32mp1/board.c              | 1 +
 2 files changed, 5 insertions(+)
arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi +4 -0
index 5bed53e3fdb..b6fceb9ad58 100644
@@ -102,6 +102,10 @@
 	hnp-srp-disable;
 };
 
+&vdd {
+	/delete-property/ regulator-always-on;
+};
+
 &vdd_io {
 	u-boot,dm-spl;
 };
board/dhelectronics/dh_stm32mp1/board.c +1 -0
index 9188f5381eb..b0284609183 100644
@@ -595,6 +595,7 @@ static void board_init_regulator_av96(void)
 
 	/* Adjust Buck3 per preconfigured PMIC voltage from NVM. */
 	regulator_set_value(rdev, uv);
+	regulator_set_enable(rdev, true);
 }
 
 static void board_init_regulator(void)
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw

HI Marek

Quoted 37 lines · Marek Vasut

In case the regulator-always-on is present in regulator DT node, the regulator is always reconfigured to the voltage set in DT on probe, even if regulator_set_value() has been called before. Drop the property from AV96 U-Boot DT and enable the regulator manually in code, as the board already reconfigures the Buck3 regulator in code per PMIC NVM content instead.

Fixes 0adf10a87b1 ("ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96")

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi | 4 ++++
 board/dhelectronics/dh_stm32mp1/board.c              | 1 +
 2 files changed, 5 insertions(+)
arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi +4 -0
index 5bed53e3fdb..b6fceb9ad58 100644
@@ -102,6 +102,10 @@
 	hnp-srp-disable;
 };
 
+&vdd {
+	/delete-property/ regulator-always-on;
+};
+
 &vdd_io {
 	u-boot,dm-spl;
 };
board/dhelectronics/dh_stm32mp1/board.c +0 -0
index 9188f5381eb..b0284609183 100644

board/dhelectronics/dh_stm32mp1/board.c static void board_init_regulator_av96(void) · line 601

Quoted 7 lines
board/dhelectronics/dh_stm32mp1/board.c +1 -0
@@ -595,6 +595,7 @@ static void board_init_regulator_av96(void)
 
 	/* Adjust Buck3 per preconfigured PMIC voltage from NVM. */
 	regulator_set_value(rdev, uv);
+	regulator_set_enable(rdev, true);
 }
 
 static void board_init_regulator(void)

Patrice

#2 lore raw
Quoted 46 lines · Patrice CHOTARD

HI Marek

Quoted 43 lines · Marek Vasut

In case the regulator-always-on is present in regulator DT node, the regulator is always reconfigured to the voltage set in DT on probe, even if regulator_set_value() has been called before. Drop the property from AV96 U-Boot DT and enable the regulator manually in code, as the board already reconfigures the Buck3 regulator in code per PMIC NVM content instead.

Fixes 0adf10a87b1 ("ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96")

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>

---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi | 4 ++++
 board/dhelectronics/dh_stm32mp1/board.c              | 1 +
 2 files changed, 5 insertions(+)
arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi +4 -0
index 5bed53e3fdb..b6fceb9ad58 100644
@@ -102,6 +102,10 @@
 	hnp-srp-disable;
 };
 
+&vdd {
+	/delete-property/ regulator-always-on;
+};
+
 &vdd_io {
 	u-boot,dm-spl;
 };
board/dhelectronics/dh_stm32mp1/board.c +1 -0
index 9188f5381eb..b0284609183 100644
@@ -595,6 +595,7 @@ static void board_init_regulator_av96(void)
 
 	/* Adjust Buck3 per preconfigured PMIC voltage from NVM. */
 	regulator_set_value(rdev, uv);
+	regulator_set_enable(rdev, true);
 }
 
Quoted 5 lines

board/dhelectronics/dh_stm32mp1/board.c static void board_init_regulator_av96(void) · line 601

Quoted 1 line
board/dhelectronics/dh_stm32mp1/board.c +0 -0
 static void board_init_regulator(void)

Patrice

Applied on stm32-u-boot/master

Thanks