From 5915505126236fce93b0b7ce231c20bb451cbdf5 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 28 Nov 2024 16:24:51 +0100 Subject: [PATCH 1/3] [nrf fromlist] soc: nordic: nrf54l: remove configuration of DCDC regulator Since nrfx 3.9 integration, configuration is executed in MDK SystemInit(). Upstream PR #: 82268 Signed-off-by: Nikodem Kastelik --- soc/nordic/nrf54l/soc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/soc/nordic/nrf54l/soc.c b/soc/nordic/nrf54l/soc.c index 65f6cc183ce..56e48800ed4 100644 --- a/soc/nordic/nrf54l/soc.c +++ b/soc/nordic/nrf54l/soc.c @@ -154,11 +154,6 @@ static inline void power_and_clock_configuration(void) } #if (DT_PROP(DT_NODELABEL(vregmain), regulator_initial_mode) == NRF5X_REG_MODE_DCDC) -#if defined(__CORTEX_M) && !defined(NRF_TRUSTZONE_NONSECURE) && defined(__ARM_FEATURE_CMSE) - if (*(uint32_t volatile *)0x00FFC334 <= 0x180A1D00) { - *(uint32_t volatile *)0x50120640 = 0x1EA9E040; - } -#endif nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MAIN, true); #endif From 0d8d7b8a6f7b3d1f8fb22aa990e1c24371aff1f2 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Mon, 2 Dec 2024 12:36:26 +0100 Subject: [PATCH 2/3] [nrf fromlist] soc: nordic: nrf54l: add preliminary workaround for nRF54L anomaly 31 This workaround will be replaced with a variant executed at SystemInit() level, once MDK implements it. Upstream PR #: 82268 Signed-off-by: Nikodem Kastelik --- soc/nordic/nrf54l/soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/soc/nordic/nrf54l/soc.c b/soc/nordic/nrf54l/soc.c index 56e48800ed4..d96679b8e85 100644 --- a/soc/nordic/nrf54l/soc.c +++ b/soc/nordic/nrf54l/soc.c @@ -38,6 +38,7 @@ #endif #include +#include #include LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); @@ -154,6 +155,13 @@ static inline void power_and_clock_configuration(void) } #if (DT_PROP(DT_NODELABEL(vregmain), regulator_initial_mode) == NRF5X_REG_MODE_DCDC) +#if NRF54L_ERRATA_31_ENABLE_WORKAROUND + /* Workaround for Errata 31 */ + if (nrf54l_errata_31()) { + *((volatile uint32_t *)0x50120624ul) = 20 | 1<<5; + *((volatile uint32_t *)0x5012063Cul) &= ~(1<<19); + } +#endif nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MAIN, true); #endif From bf85045221ca8ab4d35e4fa74381b8fd056f5fa5 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Mon, 2 Dec 2024 12:42:09 +0100 Subject: [PATCH 3/3] [nrf fromlist] modules: nordic: nrfx: workaround MDK erratas symbol for nRF54L05 & L10 MDK 8.68.1 uses nRF54L15_XXAA symbol for determining whether given errata is applicable or not for nRF54L Series SoCs. This causes all erratas to be disabled for nRF54L05 and nRF54L10. To mitigate this DEVELOP_IN_NRF54L15 symbol needs to be defined, and removed once new MDK is integrated. Upstream PR #: 82268 Signed-off-by: Nikodem Kastelik --- modules/hal_nordic/nrfx/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index fc3c8adb371..1665c122c9f 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -44,10 +44,12 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_CPUPPR NRF54H20_XXAA NRF_PPR) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_CPUFLPR NRF54H20_XXAA NRF_FLPR) -zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L05 NRF54L05_XXAA) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L05 NRF54L05_XXAA + DEVELOP_IN_NRF54L15) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L05_CPUAPP NRF_APPLICATION) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L05_CPUFLPR NRF_FLPR) -zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L10 NRF54L10_XXAA) +zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L10 NRF54L10_XXAA + DEVELOP_IN_NRF54L15) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L10_CPUAPP NRF_APPLICATION) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L10_CPUFLPR NRF_FLPR) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L15 NRF54L15_XXAA)