Skip to content

Commit de76ab1

Browse files
erwangocfriedt
authored andcommitted
boards: b_u585i_iot02a: Provide PM configuration
Provide configuration for "suspend to idle" states for b_u585i_iot02a target. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 997e458 commit de76ab1

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

boards/arm/b_u585i_iot02a/Kconfig.defconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ config SPI_STM32_INTERRUPT
1212
default y
1313
depends on SPI
1414

15+
choice STM32_LPTIM_CLOCK
16+
default STM32_LPTIM_CLOCK_LSE
17+
depends on STM32_LPTIM_TIMER
18+
endchoice
19+
1520
endif # BOARD_B_U585I_IOT02A

boards/arm/b_u585i_iot02a/b_u585i_iot02a-common.dtsi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@
2828
gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
2929
};
3030
};
31+
32+
power-states {
33+
stop0: state0 {
34+
compatible = "zephyr,power-state";
35+
power-state-name = "suspend-to-idle";
36+
substate-id = <1>;
37+
min-residency-us = <100>;
38+
};
39+
stop1: state1 {
40+
compatible = "zephyr,power-state";
41+
power-state-name = "suspend-to-idle";
42+
substate-id = <2>;
43+
min-residency-us = <500>;
44+
};
45+
stop2: state2 {
46+
compatible = "zephyr,power-state";
47+
power-state-name = "suspend-to-idle";
48+
substate-id = <3>;
49+
min-residency-us = <900>;
50+
};
51+
};
3152
};
3253

3354
&clk_lse {

boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
};
2626
};
2727

28+
&cpu0 {
29+
cpu-power-states = <&stop0 &stop1 &stop2>;
30+
};
31+
32+
&lptim1 {
33+
status = "okay";
34+
};
35+
2836
&usart1 {
2937
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
3038
current-speed = <115200>;

0 commit comments

Comments
 (0)