]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: add a PHY interface type compatibility matrix
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 May 2021 22:59:36 +0000 (01:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Jun 2021 05:40:26 +0000 (22:40 -0700)
commit1181c3db7058b515dfce602aa11fd1f5d1e6c399
tree047358fd244090ea8f57ce462b721732fdf040f0
parent0fc6c7422ee3dfe950921e6ed80055f9f7301d61
net: dsa: sja1105: add a PHY interface type compatibility matrix

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: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_spi.c