Skip to content

Commit 3a76b39

Browse files
committed
dts: mcxw7x: Add Power Management support
Add support for power management states Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent ca68c77 commit 3a76b39

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

dts/arm/nxp/nxp_mcxw7x_common.dtsi

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
cpu0: cpu@0 {
3333
compatible = "arm,cortex-m33f";
3434
reg = <0>;
35+
cpu-power-states = <&sleep &sleep_optimized &deep_sleep_optimized>;
3536
#address-cells = <1>;
3637
#size-cells = <1>;
3738

@@ -40,6 +41,77 @@
4041
reg = <0xe000ed90 0x40>;
4142
};
4243
};
44+
45+
power-states {
46+
/* This is corresponding to entering the "sleep" mode
47+
* of the MCXW without any futher configurations. This is most simple
48+
* state and is just entered by doing WFI mostly.
49+
*/
50+
sleep: sleep {
51+
compatible = "zephyr,power-state";
52+
power-state-name = "runtime-idle";
53+
min-residency-us = <100>;
54+
exit-latency-us = <0>;
55+
};
56+
/* This is corresponding to "sleep mode" with extra
57+
* optimization by gating the clocks of certain peripherals,
58+
* also the subdomains voltage levels could be configured differently
59+
* Note it is "suspend-to-idle" for zephyr due to some peripherals may
60+
* lose operation if their clock is gated, even though it is same
61+
* hardware power mode.
62+
*/
63+
sleep_optimized: sleep-optimized {
64+
compatible = "zephyr,power-state";
65+
power-state-name = "suspend-to-idle";
66+
substate-id = <0>;
67+
min-residency-us = <500>;
68+
exit-latency-us = <10>;
69+
};
70+
/* This is corresponding to the "deep sleep" mode of the SOC
71+
* with no extra configurations. Note it is also "suspend-to-idle"
72+
* due to some peripherals may stop operating but do not lose their
73+
* state. Therefore the differentation from the optimized sleep state
74+
* is the substate id.
75+
*/
76+
/*deep_sleep: deep-sleep {
77+
compatible = "zephyr,power-state";
78+
power-state-name = "suspend-to-idle";
79+
substate-id = <1>;
80+
exit-latency-us = <11>;
81+
};*/
82+
/* It is possible to do more configuring of the hardware in addition
83+
* to just enter deep sleep, the peripherals in core domain
84+
* can be power gated instead of just low power retention,
85+
* and different peripheral in wakeup domain can be put in low power
86+
* instead of remaining operational. So this is "standby" due to
87+
* allowing configure of power gating peripherals which could lose state
88+
*/
89+
deep_sleep_optimized: deep-sleep-optimized {
90+
compatible = "zephyr,power-state";
91+
power-state-name = "standby";
92+
min-residency-us = <1000>;
93+
exit-latency-us = <11>;
94+
};
95+
/* This is a theoretical case of using the "power down" mode of the SOC
96+
* and manually saving and restoring the CPU operating state from RAM,
97+
* and re-initializing the peripherals. The wake domain peripherals
98+
* can actually remain active in this mode too.
99+
*/
100+
/*power_down: power-down {
101+
compatible = "zephyr,power-state";
102+
power-state-name = "suspend-to-ram";
103+
exit-latency-us = <235>;
104+
};*/
105+
/* This mode essentially turns everything off and is like rebooting
106+
* from scratch. only the VDD_SYS domain or external reset can wake
107+
* the device such as RTC and LPTMR or GPIOD and the memory is not retain.
108+
*/
109+
/*deep_power_down: deep-power-down {
110+
compatible = "zephyr,power-state";
111+
power-state-name = "soft-off";
112+
exit-latency-us = <835>;
113+
};*/
114+
};
43115
};
44116

45117
soc {

0 commit comments

Comments
 (0)