Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions soc/nordic/nrf54h/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ config SOC_NRF54H20_CPURAD_ENABLE_CHECK_VTOR
help
Verify that VTOR is not 0xFFFFFFFF before booting the Radiocore.

config SOC_NRF54H20_DISABLE_ALL_GPIO_RETENTION_WORKAROUND
bool "Disable all GPIO pin retention on boot"
default y
depends on SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD

config SOC_NRF54H20_CPURAD
select SOC_NRF54H20_CPURAD_COMMON

Expand Down
12 changes: 12 additions & 0 deletions soc/nordic/nrf54h/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <zephyr/logging/log_frontend_stmesp.h>
#endif

#include <hal/nrf_gpio.h>
#include <hal/nrf_hsfll.h>
#include <hal/nrf_lrcconf.h>
#include <hal/nrf_spu.h>
Expand Down Expand Up @@ -173,6 +174,17 @@ void soc_early_init_hook(void)
DT_PROP_OR(DT_NODELABEL(nfct), nfct_pins_as_gpios, 0)) {
nrf_nfct_pad_config_enable_set(NRF_NFCT, false);
}

/* This is a workaround for not yet having upstream patches for properly handling
* pin retention. It should be removed as part of the next upmerge.
*/
if (IS_ENABLED(CONFIG_SOC_NRF54H20_DISABLE_ALL_GPIO_RETENTION_WORKAROUND)) {
NRF_GPIO_Type *gpio_regs[GPIO_COUNT] = GPIO_REG_LIST;

for (int i = 0; i < NRFX_ARRAY_SIZE(gpio_regs); i++) {
nrf_gpio_port_retain_set(gpio_regs[i], 0);
}
}
}

#if defined(CONFIG_SOC_LATE_INIT_HOOK)
Expand Down