Commit f378a8c7 authored by Lucien Zhao's avatar Lucien Zhao Committed by Fabio Baltieri
Browse files

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



enable clock in soc.c
register two usdhc instances

Signed-off-by: default avatarLucien Zhao <lucien.zhao@nxp.com>
parent e44a7684
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -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";
+18 −0
Original line number Diff line number Diff line
@@ -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;