From 4240ce88408f1c3f22cd4ce3638ce8964efd41b4 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Wed, 30 Oct 2024 16:11:11 +0100 Subject: [PATCH] [nrf fromlist] soc: nordic: nrf54l: fix configuration of DCDC regulator DCDC regulator on nRF54L may not always works as intended. Apply a fix addressing that. Upstream PR #: 80635 Signed-off-by: Nikodem Kastelik (cherry picked from commit d59b845455e7e4d1637ed994afabf95ea5af58f8) --- soc/nordic/nrf54l/soc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soc/nordic/nrf54l/soc.c b/soc/nordic/nrf54l/soc.c index 56e48800ed4..2098b7f87df 100644 --- a/soc/nordic/nrf54l/soc.c +++ b/soc/nordic/nrf54l/soc.c @@ -154,6 +154,11 @@ 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 *)0x00FFC334 <= 0x180A1D00) { + *(uint32_t *)0x50120640 = 0x1FAAE85C; + } +#endif nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MAIN, true); #endif