Skip to content

Commit

Permalink
board: MIMXRT1062-FMURT6: Fix the sequence of Enet2 ref clk enablement
Browse files Browse the repository at this point in the history
This patch sets ENET2 ref clock to be generated by External OSC

ENET2 ref clock direction as output

ENET2 ref clk frequency to 50MHz

Signed-off-by: Sumit Batra <[email protected]>
  • Loading branch information
sumitbatra-nxp committed May 31, 2023
1 parent c245a16 commit affb7d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/ethernet/eth_mcux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,12 @@ static void eth_mcux_init(const struct device *dev)
kENET_RxAccelProtoCheckEnabled;
}

/* Set ENET2 ref clock to be generated by External OSC,*/
/* direction as output and frequency to 50MHz */
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay)
IOMUXC_GPR->GPR1 |= (IOMUXC_GPR_GPR1_ENET2_CLK_SEL_MASK |
IOMUXC_GPR_GPR1_ENET2_TX_CLK_DIR_MASK);
#endif
ENET_Init(context->base,
&context->enet_handle,
&enet_config,
Expand Down
5 changes: 5 additions & 0 deletions soc/arm/nxp_imx/rt/soc_rt10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ const clock_enet_pll_config_t ethPllConfig = {
#else
.enableClkOutput25M = false,
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
.loopDivider = 1,
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay)
.loopDivider1 = 1,
#endif
};
#endif

Expand Down

0 comments on commit affb7d4

Please sign in to comment.