Commit 28a134f5 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: felix: Use PHY_INTERFACE_MODE_INTERNAL instead of GMII

phy-mode = "gmii" is confusing because it may mean that the port
supports the 8-bit-wide parallel data interface pinout, which it
doesn't.

It may also be confusing because one of the "gmii" internal ports is
actually overclocked to run at 2.5Gbps (even though, yes, as far as the
switch MAC is concerned, it still thinks it's gigabit).

So use the phy-mode = "internal" property to describe the internal ports
inside the NXP LS1028A chip (the ones facing the ENETC). The change
should be fine, because the device tree bindings document is yet to be
introduced, and there are no stable DT blobs in use.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarMichael Walle <michael@walle.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c102b6fd
...@@ -176,8 +176,7 @@ static void felix_phylink_validate(struct dsa_switch *ds, int port, ...@@ -176,8 +176,7 @@ static void felix_phylink_validate(struct dsa_switch *ds, int port,
phylink_set(mask, 100baseT_Full); phylink_set(mask, 100baseT_Full);
phylink_set(mask, 1000baseT_Full); phylink_set(mask, 1000baseT_Full);
/* The internal ports that run at 2.5G are overclocked GMII */ if (state->interface == PHY_INTERFACE_MODE_INTERNAL ||
if (state->interface == PHY_INTERFACE_MODE_GMII ||
state->interface == PHY_INTERFACE_MODE_2500BASEX || state->interface == PHY_INTERFACE_MODE_2500BASEX ||
state->interface == PHY_INTERFACE_MODE_USXGMII) { state->interface == PHY_INTERFACE_MODE_USXGMII) {
phylink_set(mask, 2500baseT_Full); phylink_set(mask, 2500baseT_Full);
......
...@@ -955,8 +955,7 @@ static int vsc9959_prevalidate_phy_mode(struct ocelot *ocelot, int port, ...@@ -955,8 +955,7 @@ static int vsc9959_prevalidate_phy_mode(struct ocelot *ocelot, int port,
phy_interface_t phy_mode) phy_interface_t phy_mode)
{ {
switch (phy_mode) { switch (phy_mode) {
case PHY_INTERFACE_MODE_GMII: case PHY_INTERFACE_MODE_INTERNAL:
/* Only supported on internal to-CPU ports */
if (port != 4 && port != 5) if (port != 4 && port != 5)
return -ENOTSUPP; return -ENOTSUPP;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment