Skip to content

Commit 61e9be0

Browse files
Bartosz Golaszewskikuba-moo
authored andcommitted
net: stmmac: qcom-ethqos: add support for 2.5G BASEX mode
Add support for 2.5G speed in 2500BASEX mode to the QCom ethqos driver. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 946b6c4 commit 61e9be0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,14 @@ static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos)
665665
return val;
666666
}
667667

668+
static void qcom_ethqos_speed_mode_2500(struct net_device *ndev, void *data)
669+
{
670+
struct stmmac_priv *priv = netdev_priv(ndev);
671+
672+
priv->plat->max_speed = 2500;
673+
priv->plat->phy_interface = PHY_INTERFACE_MODE_2500BASEX;
674+
}
675+
668676
static int ethqos_configure(struct qcom_ethqos *ethqos)
669677
{
670678
return ethqos->configure_func(ethqos);
@@ -787,6 +795,9 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
787795
case PHY_INTERFACE_MODE_RGMII_TXID:
788796
ethqos->configure_func = ethqos_configure_rgmii;
789797
break;
798+
case PHY_INTERFACE_MODE_2500BASEX:
799+
plat_dat->speed_mode_2500 = qcom_ethqos_speed_mode_2500;
800+
fallthrough;
790801
case PHY_INTERFACE_MODE_SGMII:
791802
ethqos->configure_func = ethqos_configure_sgmii;
792803
break;

0 commit comments

Comments
 (0)