• Icenowy Zheng's avatar
    net-next: stmmac: dwmac-sun8i: force EPHY clock freq to 24MHz · 1450ba8a
    Icenowy Zheng authored
    The EPHY control part of the EMAC syscon register has a bit called
    CLK_SEL. On the datasheet it says that if it's 0 the EPHY clock is 25MHz
    and if it's 1 the clock is 24MHz.
    
    However, according to the datasheets, no Allwinner SoC with EPHY has any
    extra xtal input pins for the EPHY, and the system xtal is 24MHz.
    
    That means the EPHY is not possible to get a 25MHz xtal input, and thus
    the frequency can only be 24MHz.
    
    It doesn't matter on H3 as the default value of H3 is 24MHz, however on
    V3s the default value is wrongly set to 25MHz, which prevented the EPHY
    from working properly.
    
    Force the EPHY clock frequency to 24MHz.
    Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1450ba8a
dwmac-sun8i.c 25.2 KB