Skip to content
  • Ye Li's avatar
    MLK-12452-1 FEC: Update fec driver to support two MDIO · a46e14a1
    Ye Li authored
    
    
    On i.MX6SX, 6UL and 7D, there are two enet controllers each has a
    MDIO port. Some boards share the MDIO port for the two enets. So
    introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate
    the MDIO port for sharing.
    In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter
    the CONFIG_FEC_MXC_MDIO_BASE.
    
    Without defining this configuration, the enet will uses own MDIO port.
    Also add this configurationfor FEC DM driver, since the ENET PHY currently
    does not support FDT.
    
    Modify the dev_id for DM driver, the first fec will set dev_id with 0, while
    second fec sets the dev_id with 1. So the MII bus name won't be duplicated.
    Then we can add two FEC devices from DTB.
    
    Signed-off-by: default avatarYe Li <ye.li@nxp.com>
    (cherry picked from commit 088afc073c480bd02208145bfb04259ccdf391c1)
    a46e14a1