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 <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Tim Harvey <[email protected]> # imx6q-gw904.dts Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 9e62465 commit 87a3988

File tree

1 file changed

+5
-2
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+5
-2
lines changed

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)