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.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This commit is contained in:
Nikodem Kastelik 2024-12-02 12:36:26 +01:00 committed by Benjamin Cabé
commit a96b3e3d5d

View file

@ -30,6 +30,7 @@
#endif
#include <soc/nrfx_coredep.h>
#include <nrf_erratas.h>
#include <system_nrf54l.h>
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
@ -153,6 +154,13 @@ static int nordicsemi_nrf54l_init(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