Skip to content

Commit 16c7620

Browse files
adamkondraciukhakonfam
authored andcommitted
[nrf fromlist] dts: arm: nordic: Add power states for nRF54H20
Upstream PR #: 79067 Add `idle` and `s2ram` power states for nRF54H20 cpuapp and cpurad. Also the substate `idle_cache_disable` added. Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit 19a2be222d94985e349766a1e1ba7264d6d2bc0a)
1 parent 65cf04c commit 16c7620

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

dts/common/nordic/nrf54h20.dtsi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
device_type = "cpu";
3131
clocks = <&cpuapp_hsfll>;
3232
clock-frequency = <DT_FREQ_M(320)>;
33-
cpu-power-states = <&idle &s2ram>;
33+
cpu-power-states = <&idle_cache_disabled &s2ram>;
3434
};
3535

3636
cpurad: cpu@3 {
@@ -39,6 +39,7 @@
3939
device_type = "cpu";
4040
clocks = <&cpurad_hsfll>;
4141
clock-frequency = <DT_FREQ_M(256)>;
42+
cpu-power-states = <&idle_cache_disabled>;
4243
};
4344

4445
cpuppr: cpu@d {
@@ -127,12 +128,14 @@
127128
};
128129

129130
power-states {
130-
idle: idle {
131+
// substate-id = <0>; is reserved for "idle", cache powered on
132+
// substate-id = <1>; is reserved for "idle-cache-retained"
133+
idle_cache_disabled: idle_cache_disabled {
131134
compatible = "zephyr,power-state";
132135
power-state-name = "suspend-to-idle";
136+
substate-id = <2>;
133137
min-residency-us = <100000>;
134138
};
135-
136139
s2ram: s2ram {
137140
compatible = "zephyr,power-state";
138141
power-state-name = "suspend-to-ram";

soc/nordic/nrf54h/power.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void nrf_poweroff(void)
6868
nrf_resetinfo_resetreas_local_set(NRF_RESETINFO, 0);
6969
nrf_resetinfo_restore_valid_set(NRF_RESETINFO, false);
7070

71-
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
71+
#if !defined(NRF_RADIOCORE)
7272
/* Disable retention */
7373
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_MAIN, false);
7474
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false);
@@ -98,7 +98,7 @@ static void s2idle_enter(uint8_t substate_id)
9898
case 1: /* Substate for idle with cache retained - not implemented yet. */
9999
break;
100100
case 2: /* Substate for idle with cache disabled. */
101-
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
101+
#if !defined(NRF_RADIOCORE)
102102
soc_lrcconf_poweron_request(node, NRF_LRCCONF_POWER_MAIN);
103103
#endif
104104
common_suspend();
@@ -127,7 +127,7 @@ static void s2idle_exit(uint8_t substate_id)
127127
break;
128128
case 2: /* Substate for idle with cache disabled. */
129129
common_resume();
130-
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
130+
#if !defined(NRF_RADIOCORE)
131131
soc_lrcconf_poweron_release(node, NRF_LRCCONF_POWER_MAIN);
132132
#endif
133133
default: /* Unknown substate. */
@@ -140,7 +140,7 @@ static void s2idle_exit(uint8_t substate_id)
140140
static void s2ram_exit(void)
141141
{
142142
common_resume();
143-
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
143+
#if !defined(NRF_RADIOCORE)
144144
/* Re-enable domain retention. */
145145
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, true);
146146
#endif
@@ -156,7 +156,7 @@ static int sys_suspend_to_ram(void)
156156
NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK);
157157
nrf_resetinfo_restore_valid_set(NRF_RESETINFO, true);
158158

159-
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
159+
#if !defined(NRF_RADIOCORE)
160160
/* Disable retention */
161161
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false);
162162
#endif

0 commit comments

Comments
 (0)