diff --git a/dts/arm/nxp/nxp_rt118x.dtsi b/dts/arm/nxp/nxp_rt118x.dtsi index b8527a1f0f5..dc25cfb24ec 100644 --- a/dts/arm/nxp/nxp_rt118x.dtsi +++ b/dts/arm/nxp/nxp_rt118x.dtsi @@ -1019,6 +1019,30 @@ #size-cells = <0>; }; + usdhc1: usdhc@2850000 { + compatible = "nxp,imx-usdhc"; + reg = <0x2850000 0x4000>; + status = "disabled"; + interrupts = <86 0>; + clocks = <&ccm IMX_CCM_USDHC1_CLK 0 0>; + max-current-330 = <1020>; + max-current-180 = <1020>; + max-bus-freq = <208000000>; + min-bus-freq = <400000>; + }; + + usdhc2: usdhc@2860000 { + compatible = "nxp,imx-usdhc"; + reg = <0x2860000 0x4000>; + status = "disabled"; + interrupts = <87 0>; + clocks = <&ccm IMX_CCM_USDHC2_CLK 0 0>; + max-current-330 = <1020>; + max-current-180 = <1020>; + max-bus-freq = <208000000>; + min-bus-freq = <400000>; + }; + edma3: dma-controller@4000000 { #dma-cells = <2>; compatible = "nxp,mcux-edma"; diff --git a/soc/nxp/imxrt/imxrt118x/soc.c b/soc/nxp/imxrt/imxrt118x/soc.c index 1d6362447de..3aad5b6ee3e 100644 --- a/soc/nxp/imxrt/imxrt118x/soc.c +++ b/soc/nxp/imxrt/imxrt118x/soc.c @@ -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;