Skip to content

Commit c38a22e

Browse files
jurenatkartben
authored andcommitted
dts: arm: st: c0: Add power states
Adds power-states node to support stop mode. As idle timer is used RTC. Signed-off-by: Tomáš Juřena <[email protected]>
1 parent e4e666b commit c38a22e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dts/arm/st/c0/stm32c0.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
/ {
7474
chosen {
7575
zephyr,flash-controller = &flash;
76+
zephyr,cortex-m-idle-timer = &rtc;
7677
};
7778

7879
cpus {
@@ -83,6 +84,22 @@
8384
device_type = "cpu";
8485
compatible = "arm,cortex-m0+";
8586
reg = <0>;
87+
cpu-power-states = <&stop>;
88+
};
89+
90+
power-states {
91+
stop: stop {
92+
compatible = "zephyr,power-state";
93+
power-state-name = "suspend-to-idle";
94+
/* It is really hard to establish these numbers precisely.
95+
* We are basing on RTC as a wakeup source with 62,5us tick.
96+
* It requires a proper margin. Additionally, sys_clock_announce
97+
* works within system tick boundaries (100us by default),
98+
* which also introduces some shift.
99+
*/
100+
min-residency-us = <400>;
101+
exit-latency-us = <300>;
102+
};
86103
};
87104
};
88105

0 commit comments

Comments
 (0)