• Vladimir Oltean's avatar
    net: dsa: sja1105: add a PHY interface type compatibility matrix · 91a05078
    Vladimir Oltean authored
    On the SJA1105, all ports support the parallel "xMII" protocols (MII,
    RMII, RGMII) except for port 4 on SJA1105R/S which supports only SGMII.
    This was relatively easy to model, by special-casing the SGMII port.
    
    On the SJA1110, certain ports can be pinmuxed between SGMII and xMII, or
    between SGMII and an internal 100base-TX PHY. This creates problems,
    because the driver's assumption so far was that if a port supports
    SGMII, it uses SGMII.
    
    We allow the device tree to tell us how the port pinmuxing is done, and
    check that against a PHY interface type compatibility matrix for
    plausibility.
    
    The other big change is that instead of doing SGMII configuration based
    on what the port supports, we do it based on what is the configured
    phy_mode of the port.
    
    The 2500base-x support added in this patch is not complete.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    91a05078
sja1105_spi.c 18.7 KB