diff --git a/soc/nordic/common/poweroff.c b/soc/nordic/common/poweroff.c index ebce3aae77c..c5a3d01ae51 100644 --- a/soc/nordic/common/poweroff.c +++ b/soc/nordic/common/poweroff.c @@ -7,7 +7,9 @@ #include #include -#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) +#if defined(CONFIG_BUILD_WITH_TFM) +#include "tfm_platform_api.h" +#elif defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) #include #elif defined(CONFIG_SOC_SERIES_NRF54HX) #include @@ -65,12 +67,17 @@ void z_sys_poweroff(void) #endif #if defined(CONFIG_SOC_SERIES_NRF54LX) +#if !defined(CONFIG_BUILD_WITH_TFM) /* Set VPR to remain in its reset state when waking from OFF */ nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, VPR_POWER_IDX, VPR_RET_BIT, false); +#endif nrfx_reset_reason_clear(UINT32_MAX); #endif -#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) + +#if defined(CONFIG_BUILD_WITH_TFM) + tfm_platform_system_off(); +#elif defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) nrf_power_system_off(NRF_POWER); #elif defined(CONFIG_SOC_SERIES_NRF54HX) nrf_poweroff(); diff --git a/soc/nordic/nrf54l/Kconfig b/soc/nordic/nrf54l/Kconfig index a3473c96745..7ab1bda0dde 100644 --- a/soc/nordic/nrf54l/Kconfig +++ b/soc/nordic/nrf54l/Kconfig @@ -21,7 +21,7 @@ config SOC_NRF54L_CPUAPP_COMMON select CPU_HAS_FPU select HAS_HW_NRF_RADIO_IEEE802154 select HAS_POWEROFF - select HAS_NORDIC_RAM_CTRL + select HAS_NORDIC_RAM_CTRL if !BUILD_WITH_TFM select HAS_SWO config SOC_NRF54L05_CPUAPP