• Christophe Roullier's avatar
    net: ethernet: stmmac: simplify phy modes management for stm32 · 1bb694e2
    Christophe Roullier authored
    No new feature, just to simplify stm32 part to be easier to use.
    Add by default all Ethernet clocks in DT, and activate or not in function
    of phy mode, clock frequency, if property "st,ext-phyclk" is set or not.
    Keep backward compatibility
    --------------------------------------------------------------------------
    |PHY_MODE |    Normal | PHY wo crystal|   PHY wo crystal   |  No 125Mhz  |
    |         |	      |      25MHz    |        50MHz       |  from PHY   |
    --------------------------------------------------------------------------
    |  MII    |	 -    |     eth-ck    |       n/a          |	    n/a  |
    |         |	      | st,ext-phyclk |                    |             |
    --------------------------------------------------------------------------
    |  GMII   |	 -    |     eth-ck    |       n/a          |	    n/a  |
    |         |	      | st,ext-phyclk |                    |             |
    --------------------------------------------------------------------------
    | RGMII   |	 -    |     eth-ck    |       n/a          |     eth-ck  |
    |         |	     | st,ext-phyclk |                    |st,eth-clk-sel|
    |         |	     |               |                    |       or     |
    |         |	     |               |                    | st,ext-phyclk|
    ----------------==--------------------------------------------------------
    | RMII    |	 -   |     eth-ck    |      eth-ck        |       n/a    |
    |         | 	     | st,ext-phyclk | st,eth-ref-clk-sel |              |
    |         | 	     |               | or st,ext-phyclk   |              |
    --------------------------------------------------------------------------
    Signed-off-by: default avatarChristophe Roullier <christophe.roullier@st.com>
    Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1bb694e2
dwmac-stm32.c 14.6 KB