Skip to content

Commit 83b5f02

Browse files
juhosgdavem330
authored andcommitted
net: phy: Introduce PSGMII PHY interface mode
The PSGMII interface is similar to QSGMII. The main difference is that the PSGMII interface combines five SGMII lines into a single link while in QSGMII only four lines are combined. Similarly to the QSGMII, this interface mode might also needs special handling within the MAC driver. It is commonly used by Qualcomm with their QCA807x PHY series and modern WiSoC-s. Add definitions for the PHY layer to allow to express this type of connection between the MAC and PHY. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Robert Marko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent de875d3 commit 83b5f02

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

Documentation/networking/phy.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ Some of the interface modes are described below:
323323
contrast with the 1000BASE-X phy mode used for Clause 38 and 39 PMDs, this
324324
interface mode has different autonegotiation and only supports full duplex.
325325

326+
``PHY_INTERFACE_MODE_PSGMII``
327+
This is the Penta SGMII mode, it is similar to QSGMII but it combines 5
328+
SGMII lines into a single link compared to 4 on QSGMII.
329+
326330
Pause frames / flow control
327331
===========================
328332

drivers/net/phy/phy-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ int phy_interface_num_ports(phy_interface_t interface)
142142
case PHY_INTERFACE_MODE_QSGMII:
143143
case PHY_INTERFACE_MODE_QUSGMII:
144144
return 4;
145+
case PHY_INTERFACE_MODE_PSGMII:
146+
return 5;
145147
case PHY_INTERFACE_MODE_MAX:
146148
WARN_ONCE(1, "PHY_INTERFACE_MODE_MAX isn't a valid interface mode");
147149
return 0;

drivers/net/phy/phylink.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ static int phylink_interface_max_speed(phy_interface_t interface)
210210
case PHY_INTERFACE_MODE_RGMII_RXID:
211211
case PHY_INTERFACE_MODE_RGMII_ID:
212212
case PHY_INTERFACE_MODE_RGMII:
213+
case PHY_INTERFACE_MODE_PSGMII:
213214
case PHY_INTERFACE_MODE_QSGMII:
214215
case PHY_INTERFACE_MODE_QUSGMII:
215216
case PHY_INTERFACE_MODE_SGMII:
@@ -475,6 +476,7 @@ unsigned long phylink_get_capabilities(phy_interface_t interface,
475476
case PHY_INTERFACE_MODE_RGMII_RXID:
476477
case PHY_INTERFACE_MODE_RGMII_ID:
477478
case PHY_INTERFACE_MODE_RGMII:
479+
case PHY_INTERFACE_MODE_PSGMII:
478480
case PHY_INTERFACE_MODE_QSGMII:
479481
case PHY_INTERFACE_MODE_QUSGMII:
480482
case PHY_INTERFACE_MODE_SGMII:
@@ -868,6 +870,7 @@ static int phylink_parse_mode(struct phylink *pl,
868870

869871
switch (pl->link_config.interface) {
870872
case PHY_INTERFACE_MODE_SGMII:
873+
case PHY_INTERFACE_MODE_PSGMII:
871874
case PHY_INTERFACE_MODE_QSGMII:
872875
case PHY_INTERFACE_MODE_QUSGMII:
873876
case PHY_INTERFACE_MODE_RGMII:

include/linux/phy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ extern const int phy_10gbit_features_array[1];
110110
* @PHY_INTERFACE_MODE_XGMII: 10 gigabit media-independent interface
111111
* @PHY_INTERFACE_MODE_XLGMII:40 gigabit media-independent interface
112112
* @PHY_INTERFACE_MODE_MOCA: Multimedia over Coax
113+
* @PHY_INTERFACE_MODE_PSGMII: Penta SGMII
113114
* @PHY_INTERFACE_MODE_QSGMII: Quad SGMII
114115
* @PHY_INTERFACE_MODE_TRGMII: Turbo RGMII
115116
* @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
@@ -147,6 +148,7 @@ typedef enum {
147148
PHY_INTERFACE_MODE_XGMII,
148149
PHY_INTERFACE_MODE_XLGMII,
149150
PHY_INTERFACE_MODE_MOCA,
151+
PHY_INTERFACE_MODE_PSGMII,
150152
PHY_INTERFACE_MODE_QSGMII,
151153
PHY_INTERFACE_MODE_TRGMII,
152154
PHY_INTERFACE_MODE_100BASEX,
@@ -254,6 +256,8 @@ static inline const char *phy_modes(phy_interface_t interface)
254256
return "xlgmii";
255257
case PHY_INTERFACE_MODE_MOCA:
256258
return "moca";
259+
case PHY_INTERFACE_MODE_PSGMII:
260+
return "psgmii";
257261
case PHY_INTERFACE_MODE_QSGMII:
258262
return "qsgmii";
259263
case PHY_INTERFACE_MODE_TRGMII:

0 commit comments

Comments
 (0)