-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Add mcxw23 power management support #98986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0c8cf48
074b6d8
d76dfa1
72874e1
90ebbbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
zejiang0jason marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,12 +32,47 @@ | |
| reg = <0>; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| cpu-power-states = <&idle &suspend &standby>; | ||
|
|
||
| mpu: mpu@e000ed90 { | ||
| compatible = "arm,armv8m-mpu"; | ||
| reg = <0xe000ed90 0x40>; | ||
| }; | ||
| }; | ||
|
|
||
| power-states { | ||
| /* Idle mode maps to Sleep mode. */ | ||
| idle: idle { | ||
| compatible = "zephyr,power-state"; | ||
| power-state-name = "runtime-idle"; | ||
| min-residency-us = <60>; | ||
| exit-latency-us = <16>; | ||
| zephyr,pm-device-disabled; | ||
| }; | ||
|
|
||
| /* Suspend mode maps to Deep Sleep mode. */ | ||
| suspend: suspend { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deep sleep shall point to standby (This is the case for other NXP SoCs).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code is added because ostimer can't work in standby mode for some SOCs, but it work in MCXW23 deep sleep and power down mode, so that code is not necessary. |
||
| compatible = "zephyr,power-state"; | ||
| power-state-name = "suspend-to-idle"; | ||
| min-residency-us = <1300>; | ||
| exit-latency-us = <749>; | ||
| }; | ||
|
|
||
| /* Standby mode maps to Power Down mode with CPU retention . */ | ||
| standby: standby { | ||
| compatible = "zephyr,power-state"; | ||
| power-state-name = "standby"; | ||
| min-residency-us = <2000>; | ||
| exit-latency-us = <1345>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| /* For the resource which will be off and lose content. */ | ||
| standby_off_domain: standby-off-domain { | ||
| compatible = "power-domain-soc-state-change"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please note that power_domain_soc_state_change is likely only useful when PM_DEVICE_SYSTEM_MANAGED is enabled.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Could you please share more details? |
||
| #power-domain-cells = <0>; | ||
| onoff-power-states = <&standby>; | ||
| }; | ||
|
|
||
| sysclk: system-clock { | ||
|
|
@@ -175,6 +210,7 @@ | |
| mode = <0>; | ||
| input = <0>; | ||
| prescale = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| }; | ||
|
|
||
| ctimer1: ctimer@9000 { | ||
|
|
@@ -187,6 +223,7 @@ | |
| mode = <0>; | ||
| input = <0>; | ||
| prescale = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| }; | ||
|
|
||
| ctimer2: ctimer@28000 { | ||
|
|
@@ -199,6 +236,7 @@ | |
| mode = <0>; | ||
| input = <0>; | ||
| prescale = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| }; | ||
|
|
||
| ctimer3: ctimer@29000 { | ||
|
|
@@ -211,6 +249,7 @@ | |
| mode = <0>; | ||
| input = <0>; | ||
| prescale = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| }; | ||
|
|
||
| ctimer4: ctimer@2a000 { | ||
|
|
@@ -223,6 +262,7 @@ | |
| mode = <0>; | ||
| input = <0>; | ||
| prescale = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| }; | ||
|
|
||
| sc_timer: pwm@85000 { | ||
|
|
@@ -232,6 +272,7 @@ | |
| status = "disabled"; | ||
| clocks = <&syscon MCUX_SCTIMER_CLK>; | ||
| prescaler = <2>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| #pwm-cells = <3>; | ||
| }; | ||
|
|
||
|
|
@@ -251,6 +292,7 @@ | |
| resets = <&reset NXP_SYSCON_RESET(1, 11)>; | ||
| dmas = <&dma0 4 &dma0 5>; | ||
| dma-names = "rx", "tx"; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| status = "disabled"; | ||
| }; | ||
|
|
||
|
|
@@ -262,6 +304,8 @@ | |
| resets = <&reset NXP_SYSCON_RESET(1, 12)>; | ||
| dmas = <&dma0 6 &dma0 7>; | ||
| dma-names = "rx", "tx"; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| power-domains = <&standby_off_domain>; | ||
| status = "disabled"; | ||
| }; | ||
|
|
||
|
|
@@ -273,6 +317,8 @@ | |
| resets = <&reset NXP_SYSCON_RESET(1, 13)>; | ||
| dmas = <&dma0 8 &dma0 9>; | ||
| dma-names = "rx", "tx"; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| power-domains = <&standby_off_domain>; | ||
| status = "disabled"; | ||
| }; | ||
|
|
||
|
|
@@ -288,6 +334,8 @@ | |
| reg = <0x82000 0x1000>; | ||
| interrupts = <1 1>; | ||
| dma-channels = <23>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| power-domains = <&standby_off_domain>; | ||
| status = "disabled"; | ||
| #dma-cells = <1>; | ||
| }; | ||
|
|
@@ -297,6 +345,8 @@ | |
| reg = <0xa7000 0x1000>; | ||
| interrupts = <58 1>; | ||
| dma-channels = <10>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
| power-domains = <&standby_off_domain>; | ||
| status = "disabled"; | ||
| #dma-cells = <1>; | ||
| }; | ||
|
|
@@ -329,6 +379,7 @@ | |
| resets = <&reset NXP_SYSCON_RESET(1, 0)>; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| zephyr,disabling-power-states = <&suspend &standby>; | ||
|
|
||
| mrt0_channel0: mrt0_channel@0 { | ||
| compatible = "nxp,mrt-channel"; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| # Copyright 2025 NXP | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config SOC_SERIES_MCXW2XX | ||
| select HAS_POWEROFF |
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.