]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: enetc: allow phy-mode = "1000base-x"
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 3 Jan 2024 11:34:45 +0000 (13:34 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Jan 2024 00:56:54 +0000 (16:56 -0800)
The driver code proper is handled by the lynx_pcs. The enetc just needs
to populate phylink's supported_interfaces array, and return true for
this phy-mode in enetc_port_has_pcs(), such that it creates an internal
MDIO bus through which the Lynx PCS registers are accessed.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20240103113445.3892971-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_pf.c

index c153dc083aff0fe618563d2161cdf8ae90b6682c..11b14555802c9a638a02497ce485925f7f8f3a17 100644 (file)
@@ -920,6 +920,7 @@ static void enetc_imdio_remove(struct enetc_pf *pf)
 static bool enetc_port_has_pcs(struct enetc_pf *pf)
 {
        return (pf->if_mode == PHY_INTERFACE_MODE_SGMII ||
+               pf->if_mode == PHY_INTERFACE_MODE_1000BASEX ||
                pf->if_mode == PHY_INTERFACE_MODE_2500BASEX ||
                pf->if_mode == PHY_INTERFACE_MODE_USXGMII);
 }
@@ -1116,6 +1117,8 @@ static int enetc_phylink_create(struct enetc_ndev_priv *priv,
                  pf->phylink_config.supported_interfaces);
        __set_bit(PHY_INTERFACE_MODE_SGMII,
                  pf->phylink_config.supported_interfaces);
+       __set_bit(PHY_INTERFACE_MODE_1000BASEX,
+                 pf->phylink_config.supported_interfaces);
        __set_bit(PHY_INTERFACE_MODE_2500BASEX,
                  pf->phylink_config.supported_interfaces);
        __set_bit(PHY_INTERFACE_MODE_USXGMII,