soc: rt11xx: Enabled GPTP module clock

gPTP module clock is enabled for rt11xx. gPTP is not working correctly
on the RT10xx or RT11xx series, but this module clock needs to be
enabled

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-01-10 17:54:18 -06:00 committed by Anas Nashif
commit 0fddb3e458
2 changed files with 11 additions and 1 deletions

View file

@ -79,7 +79,9 @@ if PTP_CLOCK_MCUX
config ETH_MCUX_PTP_CLOCK_SRC_HZ
int "Frequency of the clock source for the PTP timer"
default 50000000
default 50000000 if SOC_SERIES_KINETIS_K6X
default 50000000 if SOC_SERIES_IMX_RT10XX
default 24000000 if SOC_SERIES_IMX_RT11XX
help
Set the frequency in Hz sourced to the PTP timer.
If the value is set properly, the timer will be accurate.

View file

@ -367,11 +367,19 @@ static ALWAYS_INLINE void clock_init(void)
#ifdef CONFIG_ETH_MCUX
/* 50 MHz ENET clock */
rootCfg.mux = kCLOCK_ENET1_ClockRoot_MuxSysPll1Div2;
rootCfg.div = 10;
CLOCK_SetRootClock(kCLOCK_Root_Enet1, &rootCfg);
#endif
#ifdef CONFIG_PTP_CLOCK_MCUX
/* 24MHz PTP clock */
rootCfg.mux = kCLOCK_ENET_TIMER1_ClockRoot_MuxOscRc48MDiv2;
rootCfg.div = 1;
CLOCK_SetRootClock(kCLOCK_Root_Enet_Timer1, &rootCfg);
#endif
#ifdef CONFIG_SPI_MCUX_LPSPI
/* Configure lpspi using Osc48MDiv2 */
rootCfg.mux = kCLOCK_LPSPI1_ClockRoot_MuxOscRc48MDiv2;