• Vladimir Oltean's avatar
    net: dsa: sja1105: register the PCS MDIO bus for SJA1110 · 27871359
    Vladimir Oltean authored
    On the SJA1110, the PCS of each SERDES-capable port is accessed through
    a different memory window which is 0x100 bytes in size, denoted by
    "pcs_base".
    
    In each PCS register access window, the XPCS MMDs are accessed in an
    indirect way: in pages/banks of up to 0x100 addresses each. Changing the
    page/bank is done by writing to a special register at the end of the
    access window.
    
    The MDIO register map accessed indirectly through the indirect banked
    method described above is similar to what SJA1105 has: upper 5 bits are
    the MMD, lower 16 bits are the MDIO address within that MMD.
    
    Since the PHY ID reported by the XPCS inside SJA1110 is also all zeroes
    (like SJA1105), we need to trap those reads and return a fake PHY ID so
    that the xpcs driver can apply some specific fixups for our integration.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    27871359
sja1105_mdio.c 11.9 KB