diff options
| author | Serge Semin <fancer.lancer@gmail.com> | 2026-08-12 19:43:53 +0300 |
|---|---|---|
| committer | Serge Semin <fancer.lancer@gmail.com> | 2026-08-13 20:38:43 +0300 |
| commit | 4db915253f713a182b8cd01a332be313e352c37b (patch) | |
| tree | db7642121a9e850cfb3dbc825d5d5a8c713a3886 | |
| parent | ff59a6c08753a287f80f7f9b56cf6092f409ce3b (diff) | |
| download | linux-4db915253f713a182b8cd01a332be313e352c37b.tar.gz linux-4db915253f713a182b8cd01a332be313e352c37b.zip | |
net: stmmac: xgmac: Fix PHY-interface select naming
In accordance with [1] the phy_intf_sel_i[1:0] signal is encoded as
follows:
00: non-RGMII interface (XGMII/GMII/MII)
01: RGMII interface
10: RMII Interface
11: Reserved
So convert convert PHY_INTF_GMII to being PHY_INTF_XGMII with
multi-variant MII-based name and add PHY_INTF_RMII interface name to
comply with the official DW XGMAC databook.
[1] DesignWare® Cores XGMAC - 10G Ethernet MAC, Revision 3.20a,
October 2022, p. 424.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/common.h | 5 | ||||
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 42c0130fd1f3..a549dd82eafa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -324,9 +324,10 @@ struct stmmac_safety_stats { #define PHY_INTF_SEL_SMII 6 #define PHY_INTF_SEL_REVMII 7 -/* XGMAC uses a different encoding - from the AgileX5 documentation */ -#define PHY_INTF_GMII 0 +/* XGMAC uses a different encoding */ +#define PHY_INTF_XGMII 0 #define PHY_INTF_RGMII 1 +#define PHY_INTF_RMII 2 /* MSI defines */ #define STMMAC_MSI_VEC_MAX 32 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 103c8b4be9d1..a4cbdac59c4b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -147,8 +147,9 @@ static const char *stmmac_dwmac_actphyif[8] = { }; static const char *stmmac_dwxgmac_phyif[4] = { - [PHY_INTF_GMII] = "GMII", + [PHY_INTF_XGMII] = "(XG)MII", [PHY_INTF_RGMII] = "RGMII", + [PHY_INTF_RMII] = "RMII", }; static irqreturn_t stmmac_interrupt(int irq, void *dev_id); |
