Internal MAC clock frequency value: 66 MHZ
1. After I set MDC frequency value(FEC_ENET_MII_CLK) are 1/2.36/2.5 MHZ in fec_enet_mii_init function, I measure the value is about 2.3/1.8/5.5 MHz.
MDC frequency setting value and the actual measured value are big difference between the two.
Can you please tell me how to set this value, the measured value will not differ too much?
2. I find that the formulas of reference manual and program are different.
a) i.MX 6Solo/6DualLite Applications Processor Reference Manual (MII Speed Control Register):
Internal MAC clock frequency / ((MSCR[MII_SPEED]+1)x2) = MDC frequency
Example: 25 MHz / ((4 + 1) x 2) = 2.5 MHz
b) Program (fec_enet_mii_init() in fec.c):
fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->mdc_clk),(FEC_ENET_MII_CLK << 2)) << 1;
Can you please tell me which one is correct?