blob: a449bcc4c7c6e22754145d98004cafdaedb0d429 [file] [log] [blame]
developercfa104b2023-01-11 17:40:41 +08001diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
2index b3f25a9..6a38a1c 100644
3--- a/drivers/net/phy/phylink.c
4+++ b/drivers/net/phy/phylink.c
5@@ -299,6 +299,10 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
6 phylink_set(pl->supported, 2500baseX_Full);
7 break;
8
9+ case PHY_INTERFACE_MODE_5GBASER:
10+ phylink_set(pl->supported, 5000baseT_Full);
11+ break;
12+
13 case PHY_INTERFACE_MODE_10GKR:
14 phylink_set(pl->supported, 10baseT_Half);
15 phylink_set(pl->supported, 10baseT_Full);
16diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
17index 0d5ac2a..a702c9b 100644
18--- a/drivers/net/phy/sfp-bus.c
19+++ b/drivers/net/phy/sfp-bus.c
20@@ -302,6 +302,9 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus,
21 phylink_test(link_modes, 10000baseT_Full))
22 return PHY_INTERFACE_MODE_10GKR;
23
24+ if (phylink_test(link_modes, 5000baseT_Full))
25+ return PHY_INTERFACE_MODE_5GBASER;
26+
27 if (phylink_test(link_modes, 2500baseX_Full))
28 return PHY_INTERFACE_MODE_2500BASEX;
29
30diff --git a/include/linux/phy.h b/include/linux/phy.h
31index 34bdd16..77fad08 100644
32--- a/include/linux/phy.h
33+++ b/include/linux/phy.h
34@@ -98,6 +98,7 @@ typedef enum {
35 PHY_INTERFACE_MODE_TRGMII,
36 PHY_INTERFACE_MODE_1000BASEX,
37 PHY_INTERFACE_MODE_2500BASEX,
38+ PHY_INTERFACE_MODE_5GBASER,
39 PHY_INTERFACE_MODE_RXAUI,
40 PHY_INTERFACE_MODE_XAUI,
41 /* 10GBASE-KR, XFI, SFI - single lane 10G Serdes */
42@@ -172,6 +173,8 @@ static inline const char *phy_modes(phy_interface_t interface)
43 return "1000base-x";
44 case PHY_INTERFACE_MODE_2500BASEX:
45 return "2500base-x";
46+ case PHY_INTERFACE_MODE_5GBASER:
47+ return "5gbase-r";
48 case PHY_INTERFACE_MODE_RXAUI:
49 return "rxaui";
50 case PHY_INTERFACE_MODE_XAUI: