Skip to content

Commit cd1717f

Browse files
nordic-krchlstnl
authored andcommitted
soc: nordic: nrf54h: power: Changes needed to enable soft off
Add missing settings in LRCCONF needed before soft off. Add releasing GRTC request. Add enabling of DCACHE and ICACHE memory blocks during init. It is a default register value but we can enter init when waken up from soft off and in that case values there will coming from power off sequence and not from HW device reset. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 5ba508d commit cd1717f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

soc/nordic/nrf54h/power.c

+7
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ void nrf_poweroff(void)
6565
#if !defined(CONFIG_SOC_NRF54H20_CPURAD)
6666
/* Disable retention */
6767
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_MAIN, false);
68+
nrf_lrcconf_poweron_force_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_MAIN, false);
69+
#else
70+
/* Active power domain (fast clock domain). */
6871
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false);
72+
nrf_lrcconf_poweron_force_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_0, false);
73+
/* Radio power domain (slow clock domain). */
74+
nrf_lrcconf_retain_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_1, false);
75+
nrf_lrcconf_poweron_force_set(NRF_LRCCONF010, NRF_LRCCONF_POWER_DOMAIN_1, false);
6976
#endif
7077
common_suspend();
7178

soc/nordic/nrf54h/soc.c

+9
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,16 @@ static int nordicsemi_nrf54h_init(void)
129129
{
130130
int err;
131131

132+
if (IS_ENABLED(CONFIG_ICACHE)) {
133+
nrf_memconf_ramblock_control_enable_set(NRF_MEMCONF, RAMBLOCK_POWER_ID,
134+
RAMBLOCK_CONTROL_BIT_ICACHE, true);
135+
}
132136
sys_cache_instr_enable();
137+
138+
if (IS_ENABLED(CONFIG_DCACHE)) {
139+
nrf_memconf_ramblock_control_enable_set(NRF_MEMCONF, RAMBLOCK_POWER_ID,
140+
RAMBLOCK_CONTROL_BIT_DCACHE, true);
141+
}
133142
sys_cache_data_enable();
134143

135144
power_domain_init();

0 commit comments

Comments
 (0)