[PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode for J784S4

From: Leonardo Costa

Date: Mon Nov 30 2026 - 06:05:21 EST


From: Leonardo Costa <leonardo.costa@xxxxxxxxxxx>

The CPSW9G on J784S4 supports 10GBASE-R (XFI), which the TRM encodes in
CTRLMMR_ENETn_CTRL.PORT_MODE_SEL with the same value as USXGMII (0x5,
"USXGMII/XFI"). Accept 10GBASE-R with the same encoding as USXGMII and
enable it for J784S4.

Signed-off-by: Leonardo Costa <leonardo.costa@xxxxxxxxxxx>
---
drivers/phy/ti/phy-gmii-sel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c
index 3649dc75c2889..e3a167e45b7c1 100644
--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -118,7 +118,8 @@ static int phy_gmii_sel_mode(struct phy *phy, enum phy_mode mode, int submode)
break;

case PHY_INTERFACE_MODE_USXGMII:
- if (!(soc_data->extra_modes & BIT(PHY_INTERFACE_MODE_USXGMII)))
+ case PHY_INTERFACE_MODE_10GBASER:
+ if (!(soc_data->extra_modes & BIT(submode)))
goto unsupported;
else
gmii_sel_mode = J72XX_GMII_SEL_MODE_USXGMII;
@@ -290,7 +291,7 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_cpsw9g_soc_j784s4 = {
BIT(PHY_GMII_SEL_FIXED_TX_DELAY),
.regfields = phy_gmii_sel_fields_am654,
.extra_modes = BIT(PHY_INTERFACE_MODE_QSGMII) | BIT(PHY_INTERFACE_MODE_SGMII) |
- BIT(PHY_INTERFACE_MODE_USXGMII),
+ BIT(PHY_INTERFACE_MODE_USXGMII) | BIT(PHY_INTERFACE_MODE_10GBASER),
.num_ports = 8,
.num_qsgmii_main_ports = 2,
};

--
2.43.0