Skip to content

Commit 3cb0697

Browse files
soc: st: stm32: wba: replace Kconfig power supply configuration with DT
Replace the existing infrastructure to specify power supply configuration through Kconfig with Devicetree, and update all boards according to new mechanism. Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
1 parent f376091 commit 3cb0697

File tree

11 files changed

+25
-34
lines changed

11 files changed

+25
-34
lines changed

boards/st/nucleo_wba55cg/nucleo_wba55cg.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@
112112
apb7-prescaler = <1>;
113113
};
114114

115+
&pwr {
116+
power-supply = "smps";
117+
};
118+
115119
&iwdg {
116120
status = "okay";
117121
};

boards/st/nucleo_wba55cg/nucleo_wba55cg_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@ CONFIG_ARM_MPU=y
1616

1717
# Enable HW stack protection
1818
CONFIG_HW_STACK_PROTECTION=y
19-
20-
# Enable the internal SMPS regulator
21-
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y

boards/st/nucleo_wba65ri/nucleo_wba65ri.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
apb7-prescaler = <1>;
102102
};
103103

104+
&pwr {
105+
power-supply = "smps";
106+
};
107+
104108
&iwdg {
105109
status = "okay";
106110
};

boards/st/nucleo_wba65ri/nucleo_wba65ri_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ CONFIG_ARM_MPU=y
1919

2020
# Enable HW stack protection
2121
CONFIG_HW_STACK_PROTECTION=y
22-
23-
# Enable the internal SMPS regulator
24-
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y

boards/st/nucleo_wba65ri/nucleo_wba65ri_stm32wba65xx_ns_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ CONFIG_ARM_MPU=y
1717
# Enable HW stack protection
1818
CONFIG_HW_STACK_PROTECTION=y
1919

20-
# Enable the internal SMPS regulator
21-
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y
22-
2320
# Header offset since TF-M has no BL2 hence Zephyr is not signed
2421
CONFIG_ROM_START_OFFSET=0x400
2522

boards/st/stm32wba65i_dk1/stm32wba65i_dk1.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@
109109
apb7-prescaler = <1>;
110110
};
111111

112+
&pwr {
113+
power-supply = "smps";
114+
};
115+
112116
&iwdg {
113117
status = "okay";
114118
};

boards/st/stm32wba65i_dk1/stm32wba65i_dk1_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ CONFIG_ARM_MPU=y
1717
# Enable HW stack protection
1818
CONFIG_HW_STACK_PROTECTION=y
1919

20-
# Enable the internal SMPS regulator
21-
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y
22-
2320
# Enable ADC for joystick
2421
CONFIG_ADC=y

boards/st/stm32wba65i_dk1/stm32wba65i_dk1_stm32wba65xx_ns_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ CONFIG_ARM_MPU=y
1717
# Enable HW stack protection
1818
CONFIG_HW_STACK_PROTECTION=y
1919

20-
# Enable the internal SMPS regulator
21-
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y
22-
2320
# Enable ADC for joystick
2421
CONFIG_ADC=y
2522

dts/arm/st/wba/stm32wba.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
};
166166

167167
pwr: power@46020800 {
168-
compatible = "st,stm32-pwr";
168+
compatible = "st,stm32-dualreg-pwr", "st,stm32-pwr";
169169
reg = <0x46020800 0x400>;
170170
wkup-pins-nb = <8>;
171171
wkup-pin-srcs = <2>;

soc/st/stm32/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ config STM32_WKUP_PINS
7575
help
7676
Enable support for STM32 PWR wake-up pins.
7777

78-
choice POWER_SUPPLY_CHOICE
79-
prompt "STM32 power supply configuration"
80-
default POWER_SUPPLY_LDO
81-
depends on SOC_STM32WBA55XX || SOC_STM32WBA65XX
82-
83-
config POWER_SUPPLY_LDO
84-
bool "LDO supply"
85-
86-
config POWER_SUPPLY_DIRECT_SMPS
87-
bool "Direct SMPS supply"
88-
89-
endchoice
90-
9178
config STM32_BACKUP_PROTECTION
9279
bool "SoC has backup domain protection access"
9380
help

0 commit comments

Comments
 (0)