soc: nordic: nrf54h: poweroff: Add support for s2ram

Add functions for local domain suspend to RAM. Add matching resume
procedure. Add pm_s2ram function for determining source of reset.
Add preserving NVIC and MPU state in retained RAM when CPU is powered off
during S2RAM procedure.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
This commit is contained in:
Adam Kondraciuk 2024-05-06 13:59:32 +02:00 committed by Anas Nashif
commit ee9d23945f
9 changed files with 414 additions and 2 deletions

View file

@ -8,6 +8,8 @@
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
#include <hal/nrf_power.h>
#elif defined(CONFIG_SOC_SERIES_NRF54HX)
#include <power.h>
#else
#include <hal/nrf_regulators.h>
#endif
@ -16,6 +18,8 @@ void z_sys_poweroff(void)
{
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
nrf_power_system_off(NRF_POWER);
#elif defined(CONFIG_SOC_SERIES_NRF54HX)
nrf_poweroff();
#else
nrf_regulators_system_off(NRF_REGULATORS);
#endif