Commit 79713a53 authored by Declan Snyder's avatar Declan Snyder Committed by Daniel DeGrasse
Browse files

soc: imxrt11xx: Clean up LDO configs



The LDO config should not be forcefully selected at SOC level. Instead,
use soft default y so that board definition can unset it if desired.

Also, in the soc.c, the LDO code should be on both the rt1160 and
rt1170, so the definitions should exist, and ifdef is not needed. So can
switch to IS_ENABLED to decrease configuration complexity of the source
code.

Signed-off-by: default avatarDeclan Snyder <declan.snyder@nxp.com>
parent 305a7e6c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ config SOC_SERIES_IMXRT11XX
	select CPU_HAS_DCACHE if CPU_CORTEX_M7
	select CPU_HAS_FPU
	select CPU_HAS_FPU_DOUBLE_PRECISION if CPU_CORTEX_M7
	select BYPASS_LDO_LPSR
	select ADJUST_LDO
	select HAS_MCUX_PWM
	select HAS_MCUX_USDHC1
	select HAS_MCUX_USDHC2
@@ -62,9 +60,11 @@ config MCUX_CORE_SUFFIX
	default "_cm4" if SOC_MIMXRT1176_CM4 || SOC_MIMXRT1166_CM4

config BYPASS_LDO_LPSR
	default y
	bool "Bypass LDO lpsr"

config ADJUST_LDO
	default y
	bool "Adjust LDO setting"

endif # SOC_SERIES_IMXRT11XX
+19 −19
Original line number Diff line number Diff line
@@ -147,12 +147,12 @@ __weak void clock_init(void)
	}
#endif

#if CONFIG_BYPASS_LDO_LPSR
	if (IS_ENABLED(CONFIG_BYPASS_LDO_LPSR)) {
		PMU_StaticEnableLpsrAnaLdoBypassMode(ANADIG_LDO_SNVS, true);
		PMU_StaticEnableLpsrDigLdoBypassMode(ANADIG_LDO_SNVS, true);
#endif
	}

#if CONFIG_ADJUST_LDO
	if (IS_ENABLED(CONFIG_ADJUST_LDO)) {
		pmu_static_lpsr_ana_ldo_config_t lpsrAnaConfig;
		pmu_static_lpsr_dig_config_t lpsrDigConfig;

@@ -168,7 +168,7 @@ __weak void clock_init(void)
			lpsrDigConfig.targetVoltage = kPMU_LpsrDigTargetStableVoltage1P117V;
			PMU_StaticLpsrDigLdoInit(ANADIG_LDO_SNVS, &lpsrDigConfig);
		}
#endif
	}

	/* PLL LDO shall be enabled first before enable PLLs */