phy: lan966x: add support for QUSGMII
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 26 Aug 2022 14:17:22 +0000 (16:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Aug 2022 11:54:48 +0000 (12:54 +0100)
Makes so that the serdes driver also takes QUSGMII in consideration.
It's configured exactly as QSGMII as far as the serdes driver is
concerned.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/phy/microchip/lan966x_serdes.c

index e86a879..d1a50fa 100644 (file)
@@ -401,6 +401,9 @@ static int serdes_set_mode(struct phy *phy, enum phy_mode mode, int submode)
            submode == PHY_INTERFACE_MODE_2500BASEX)
                submode = PHY_INTERFACE_MODE_SGMII;
 
+       if (submode == PHY_INTERFACE_MODE_QUSGMII)
+               submode = PHY_INTERFACE_MODE_QSGMII;
+
        for (i = 0; i < ARRAY_SIZE(lan966x_serdes_muxes); i++) {
                if (macro->idx != lan966x_serdes_muxes[i].idx ||
                    mode != lan966x_serdes_muxes[i].mode ||