dts: arm: nxp: rt118x: add two usdhc instances

enable clock in soc.c
register two usdhc instances

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This commit is contained in:
Lucien Zhao 2024-09-06 14:04:37 +08:00 committed by Fabio Baltieri
commit f378a8c7cc
2 changed files with 42 additions and 0 deletions

View file

@ -527,6 +527,24 @@ __weak void clock_init(void)
DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency));
#endif
#ifdef CONFIG_IMX_USDHC
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay)
/* Configure USDHC1 using SysPll2Pfd2 */
rootCfg.mux = kCLOCK_USDHC1_ClockRoot_MuxSysPll2Pfd2;
rootCfg.div = 2;
CLOCK_SetRootClock(kCLOCK_Root_Usdhc1, &rootCfg);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay)
/* Configure USDHC2 using SysPll2Pfd2 */
rootCfg.mux = kCLOCK_USDHC2_ClockRoot_MuxSysPll2Pfd2;
rootCfg.div = 2;
CLOCK_SetRootClock(kCLOCK_Root_Usdhc2, &rootCfg);
#endif
#endif /* CONFIG_IMX_USDHC */
/* Keep core clock ungated during WFI */
CCM->LPCG[1].LPM0 = 0x33333333;
CCM->LPCG[1].LPM1 = 0x33333333;