From 6f6a8d1a9974acc8107eb937c466d837192b8304 Mon Sep 17 00:00:00 2001 From: Adrian Bieri Date: Fri, 14 Mar 2025 14:41:39 +0100 Subject: [PATCH] soc: nxp: imxrt: add config ADJUST_DCDC for RT10xx There is a configuration of the DCDC in the clock_init for the RT10xx. The RT11xx has a kconfig flag ADJUST_DCDC to enable or disable DCDC adjust code. This flag is now also used for the RT10xx to be able to enable or disable the DCDC adjust code. Signed-off-by: Adrian Bieri --- soc/nxp/imxrt/Kconfig | 4 ++++ soc/nxp/imxrt/imxrt10xx/soc.c | 5 +++-- soc/nxp/imxrt/imxrt11xx/Kconfig | 4 ---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/soc/nxp/imxrt/Kconfig b/soc/nxp/imxrt/Kconfig index c09776302e7..37a2916120b 100644 --- a/soc/nxp/imxrt/Kconfig +++ b/soc/nxp/imxrt/Kconfig @@ -171,6 +171,10 @@ config PM_MCUX_DCDC config PM_MCUX_PMU bool "MCUX power management unit driver" +config ADJUST_DCDC + default y + bool "Adjust internal DCDC output" + config DCDC_VALUE hex "DCDC value for VDD_SOC" diff --git a/soc/nxp/imxrt/imxrt10xx/soc.c b/soc/nxp/imxrt/imxrt10xx/soc.c index 9c11ba5372a..83135d7d834 100644 --- a/soc/nxp/imxrt/imxrt10xx/soc.c +++ b/soc/nxp/imxrt/imxrt10xx/soc.c @@ -151,14 +151,15 @@ __weak void clock_init(void) /* Set PERIPH_CLK MUX to PERIPH_CLK2 */ CLOCK_SetMux(kCLOCK_PeriphMux, 0x1); - /* Setting the VDD_SOC value. - */ +#if CONFIG_ADJUST_DCDC + /* Setting the VDD_SOC value */ DCDC->REG3 = (DCDC->REG3 & (~DCDC_REG3_TRG_MASK)) | DCDC_REG3_TRG(CONFIG_DCDC_VALUE); /* Waiting for DCDC_STS_DC_OK bit is asserted */ while (DCDC_REG0_STS_DC_OK_MASK != (DCDC_REG0_STS_DC_OK_MASK & DCDC->REG0)) { ; } +#endif #ifdef CONFIG_INIT_ARM_PLL CLOCK_InitArmPll(&armPllConfig); /* Configure ARM PLL to 1200M */ diff --git a/soc/nxp/imxrt/imxrt11xx/Kconfig b/soc/nxp/imxrt/imxrt11xx/Kconfig index 624831f3bf5..61a5635c2b8 100644 --- a/soc/nxp/imxrt/imxrt11xx/Kconfig +++ b/soc/nxp/imxrt/imxrt11xx/Kconfig @@ -69,8 +69,4 @@ config BYPASS_LDO_LPSR config ADJUST_LDO bool "Adjust LDO setting" -config ADJUST_DCDC - default y - bool "Adjust internal DCDC output" - endif # SOC_SERIES_IMXRT11XX