dts: arm: nxp: nxp_rt118x: add acmp instances

enable acmp clock in rt118x/soc.c file

add instances and enable clock for rt118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This commit is contained in:
Lucien Zhao 2024-08-31 14:28:06 +08:00 committed by Carles Cufí
commit 2680c7d020
2 changed files with 46 additions and 0 deletions

View file

@ -269,6 +269,20 @@ static ALWAYS_INLINE void clock_init(void)
#endif /* CONFIG_COUNTER_MCUX_GPT */
#ifdef CONFIG_MCUX_ACMP
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(acmp1), okay) \
|| DT_NODE_HAS_STATUS(DT_NODELABEL(acmp2), okay) \
|| DT_NODE_HAS_STATUS(DT_NODELABEL(acmp3), okay) \
|| DT_NODE_HAS_STATUS(DT_NODELABEL(acmp4), okay))
/* Configure ACMP using MuxSysPll3Out */
rootCfg.mux = kCLOCK_ACMP_ClockRoot_MuxSysPll3Out;
rootCfg.div = 2;
CLOCK_SetRootClock(kCLOCK_Root_Acmp, &rootCfg);
#endif
#endif /* CONFIG_MCUX_ACMP */
/* Keep core clock ungated during WFI */
CCM->LPCG[1].LPM0 = 0x33333333;
CCM->LPCG[1].LPM1 = 0x33333333;