[PATCH net 1/3] net: stmmac: socfpga: Enable internal GMII when using 1000BaseX

Maxime Chevallier posted 3 patches 9 months, 3 weeks ago
There is a newer version of this series
[PATCH net 1/3] net: stmmac: socfpga: Enable internal GMII when using 1000BaseX
Posted by Maxime Chevallier 9 months, 3 weeks ago
Dwmac Socfpga may be used with an instance of a Lynx / Altera TSE PCS,
in which case it gains support for 1000BaseX.

It appears that the PCS is wired to the MAC through an internal GMII
bus. Make sure that we enable the GMII_MII mode for the internal MAC when
using 1000BaseX.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 59f90b123c5b..027356033e5e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -256,6 +256,7 @@ static int socfpga_set_phy_mode_common(int phymode, u32 *val)
 	case PHY_INTERFACE_MODE_MII:
 	case PHY_INTERFACE_MODE_GMII:
 	case PHY_INTERFACE_MODE_SGMII:
+	case PHY_INTERFACE_MODE_1000BASEX:
 		*val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII;
 		break;
 	case PHY_INTERFACE_MODE_RMII:
-- 
2.49.0
Re: [PATCH net 1/3] net: stmmac: socfpga: Enable internal GMII when using 1000BaseX
Posted by Russell King (Oracle) 9 months, 3 weeks ago
On Tue, Apr 22, 2025 at 11:46:55AM +0200, Maxime Chevallier wrote:
> Dwmac Socfpga may be used with an instance of a Lynx / Altera TSE PCS,
> in which case it gains support for 1000BaseX.
> 
> It appears that the PCS is wired to the MAC through an internal GMII
> bus. Make sure that we enable the GMII_MII mode for the internal MAC when
> using 1000BaseX.
> 
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!