diff --git a/soc/arm/nxp_imx/rt/soc_rt10xx.c b/soc/arm/nxp_imx/rt/soc_rt10xx.c index be7983b7030..500ad5e9056 100644 --- a/soc/arm/nxp_imx/rt/soc_rt10xx.c +++ b/soc/arm/nxp_imx/rt/soc_rt10xx.c @@ -15,6 +15,7 @@ #include #include #include +#include #if CONFIG_USB_DC_NXP_EHCI #include "usb_phy.h" #include "usb_dc_mcux.h" @@ -164,6 +165,12 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetDiv(kCLOCK_LcdifDiv, 1); #endif + +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET + /* Enable clock output for ENET1 */ + IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, true); +#endif + #if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI CLOCK_EnableUsbhs0PhyPllClock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency)); diff --git a/soc/arm/nxp_imx/rt/soc_rt11xx.c b/soc/arm/nxp_imx/rt/soc_rt11xx.c index 29eca1dc45c..aee048379d6 100644 --- a/soc/arm/nxp_imx/rt/soc_rt11xx.c +++ b/soc/arm/nxp_imx/rt/soc_rt11xx.c @@ -372,6 +372,9 @@ static ALWAYS_INLINE void clock_init(void) rootCfg.mux = kCLOCK_ENET1_ClockRoot_MuxSysPll1Div2; rootCfg.div = 10; CLOCK_SetRootClock(kCLOCK_Root_Enet1, &rootCfg); + /* Set ENET_REF_CLK as an output driven by ENET1_CLK_ROOT */ + IOMUXC_GPR->GPR4 |= (IOMUXC_GPR_GPR4_ENET_REF_CLK_DIR(0x01U) | + IOMUXC_GPR_GPR4_ENET_TX_CLK_SEL(0x1U)); #endif #ifdef CONFIG_PTP_CLOCK_MCUX