Skip to content

Commit 87a3988

Browse files
vladimirolteanPaolo Abeni
authored andcommitted
net: dsa: mv88e6xxx: accept phy-mode = "internal" for internal PHY ports
The ethernet-controller dt-schema, mostly pushed forward by Linux, has the "internal" PHY mode for denoting MAC connections to an internal PHY. U-Boot may provide device tree blobs where this phy-mode is specified, so make the Linux driver accept them. It appears that the current behavior with phy-mode = "internal" was introduced when mv88e6xxx started reporting supported_interfaces to phylink. Prior to that, I don't think it would have any issues accepting this phy-mode. Fixes: d4ebf12 ("net: dsa: mv88e6xxx: populate supported_interfaces and mac_capabilities") Link: https://lore.kernel.org/linux-arm-kernel/20221205172709.kglithpbhdbsakvd@skbuf/T/ Reported-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Tim Harvey <tharvey@gateworks.com> # imx6q-gw904.dts Link: https://lore.kernel.org/r/20221205194845.2131161-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 9e62465 commit 87a3988

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • drivers/net/dsa/mv88e6xxx

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,10 +833,13 @@ static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,
833833

834834
chip->info->ops->phylink_get_caps(chip, port, config);
835835

836-
/* Internal ports need GMII for PHYLIB */
837-
if (mv88e6xxx_phy_is_internal(ds, port))
836+
if (mv88e6xxx_phy_is_internal(ds, port)) {
837+
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
838+
config->supported_interfaces);
839+
/* Internal ports with no phy-mode need GMII for PHYLIB */
838840
__set_bit(PHY_INTERFACE_MODE_GMII,
839841
config->supported_interfaces);
842+
}
840843
}
841844

842845
static void mv88e6xxx_mac_config(struct dsa_switch *ds, int port,

0 commit comments

Comments
 (0)