diff options
| author | Vincent Jardin <vjardin@free.fr> | 2026-09-02 19:12:55 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-02 19:13:03 -0700 |
| commit | e8965b0523f2fb0b6d42deeaaa94c0ede7ce4ebb (patch) | |
| tree | f64c4bbd768f15481674f614daa2e52da3b57a06 | |
| parent | 795eb0feb4012eddf8dad45cb358351125cf5f8a (diff) | |
| download | linux-next-e8965b0523f2fb0b6d42deeaaa94c0ede7ce4ebb.tar.gz linux-next-e8965b0523f2fb0b6d42deeaaa94c0ede7ce4ebb.zip | |
net: pcs: lynx: add support for 25GBASE-R
The Lynx PCS never supported 25GBASE-R. Add it, so that a 25G DPMAC on
LX2160A can be driven by phylink.
The SerDes side had the mode since the commit
1cab8fba5073 ("phy: lynx-28g: add support for 25GBASER")
and dpaa2-mac maps DPMAC_ETH_IF_CAUI to PHY_INTERFACE_MODE_25GBASER,
but the PCS never handled it, so phylink_validate() failed with the
interface.
25GBASE-R is a serial mode without clause-37 in-band autonegotiation,
exactly like 10GBASE-R: it does not needs any configuration, its state
is read with phylink_mii_c45_pcs_get_state(), and it reports
LINK_INBAND_DISABLE.
phylink_mii_c45_pcs_get_state() is extended in the same patch because
without it the link comes up reporting Unknown/Unknown.
Suggested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Co-developed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260922-for-upstream-lynx-25gbaser-v1-v2-1-1e6cf79c7b52@free.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/pcs/pcs-lynx.c | 6 | ||||
| -rw-r--r-- | drivers/net/phy/phylink.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c index a92081560e64..da4f99059eef 100644 --- a/drivers/net/pcs/pcs-lynx.c +++ b/drivers/net/pcs/pcs-lynx.c @@ -46,6 +46,7 @@ static unsigned int lynx_pcs_inband_caps(struct phylink_pcs *pcs, return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE; case PHY_INTERFACE_MODE_10GBASER: + case PHY_INTERFACE_MODE_25GBASER: return LINK_INBAND_DISABLE; case PHY_INTERFACE_MODE_USXGMII: @@ -97,6 +98,7 @@ static void lynx_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode, lynx_pcs_get_state_usxgmii(lynx->mdio, state); break; case PHY_INTERFACE_MODE_10GBASER: + case PHY_INTERFACE_MODE_25GBASER: phylink_mii_c45_pcs_get_state(lynx->mdio, state); break; default: @@ -188,7 +190,8 @@ static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode, return lynx_pcs_config_usxgmii(lynx->mdio, ifmode, advertising, neg_mode); case PHY_INTERFACE_MODE_10GBASER: - /* Nothing to do here for 10GBASER */ + case PHY_INTERFACE_MODE_25GBASER: + /* Nothing to do here for 10GBASER and 25GBASER */ break; default: return -EOPNOTSUPP; @@ -279,6 +282,7 @@ static const phy_interface_t lynx_interfaces[] = { PHY_INTERFACE_MODE_1000BASEX, PHY_INTERFACE_MODE_2500BASEX, PHY_INTERFACE_MODE_10GBASER, + PHY_INTERFACE_MODE_25GBASER, PHY_INTERFACE_MODE_USXGMII, PHY_INTERFACE_MODE_10G_QXGMII, }; diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 3ec3bb439109..ff4375f1e910 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -4360,6 +4360,11 @@ void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs, state->duplex = DUPLEX_FULL; break; + case PHY_INTERFACE_MODE_25GBASER: + state->speed = SPEED_25000; + state->duplex = DUPLEX_FULL; + break; + default: break; } |
