From bead99fede868367ddfaec6b8966e96be0624ec0 Mon Sep 17 00:00:00 2001 From: Lukasz Stepnicki Date: Wed, 18 Sep 2024 16:51:33 +0200 Subject: [PATCH] [nrf fromlist] modules: hal_nordic: dvfs: patch medlow trim entry DVFS medlow oppoint should use trim entry index 2, this needs to be updated in hal/hal_nordic. Currently this is not possible because of time constraints that is why this temporary patch is applied. This is the only point where new_f_trim_entry is used. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/78665 Signed-off-by: Lukasz Stepnicki --- modules/hal_nordic/nrfs/dvfs/ld_dvfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c b/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c index 78c67ffa6a4..1faffbdb3c2 100644 --- a/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c +++ b/modules/hal_nordic/nrfs/dvfs/ld_dvfs.c @@ -264,6 +264,11 @@ int32_t ld_dvfs_configure_hsfll(enum dvfs_frequency_setting oppoint) uint8_t freq_trim = get_dvfs_oppoint_data(oppoint)->new_f_trim_entry; + /* Temporary patch fixing medlow oppoint trim index */ + if (oppoint == DVFS_FREQ_MEDLOW) { + freq_trim = 2; + } + #if defined(CONFIG_SOC_NRF54H20_CPUAPP) || defined(CONFIG_SOC_NRF9280_CPUAPP) hsfll_trim.vsup = NRF_FICR->TRIM.APPLICATION.HSFLL.TRIM.VSUP; hsfll_trim.coarse = NRF_FICR->TRIM.APPLICATION.HSFLL.TRIM.COARSE[freq_trim];