Skip to contentSkip to conversation

net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII

PATCH In review Heiner Kallweit 4 participants 9 messages May 23, 2019 – May 24, 2019

Subsystems (4)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

v2 cover net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII

Add support for interface mode USXGMII.

On Freescale boards LS1043A and LS1046A a warning may pop up now because mode xgmii should be changed to usxgmii (as the used Aquantia PHY doesn't support XGMII).

Heiner Kallweit (3):
net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII
dt-bindings: net: document new usxgmii phy mode
net: phy: aquantia: add USXGMII support and warn if XGMII mode is set

 Documentation/devicetree/bindings/net/ethernet.txt | 1 +
 drivers/net/phy/aquantia_main.c                    | 8 ++++++++
 include/linux/phy.h                                | 3 +++
 3 files changed, 12 insertions(+)
Signature · 1 line
2.21.0
author maintainer
#1 lore raw

PATCH v2 1/3 net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII

Add support for interface mode PHY_INTERFACE_MODE_USXGMII.

---
 include/linux/phy.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/phy.h +3 -0
index 073fb151b..7180b1d1e 100644
@@ -103,6 +103,7 @@ typedef enum {
 	PHY_INTERFACE_MODE_XAUI,
 	/* 10GBASE-KR, XFI, SFI - single lane 10G Serdes */
 	PHY_INTERFACE_MODE_10GKR,
+	PHY_INTERFACE_MODE_USXGMII,
 	PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
@@ -178,6 +179,8 @@ static inline const char *phy_modes(phy_interface_t interface)
 		return "xaui";
 	case PHY_INTERFACE_MODE_10GKR:
 		return "10gbase-kr";
+	case PHY_INTERFACE_MODE_USXGMII:
+		return "usxgmii";
 	default:
 		return "unknown";
 	}
Signature · 1 line
2.21.0
author maintainer
#2 lore raw

PATCH v2 2/3 dt-bindings: net: document new usxgmii phy mode

In reply to Heiner Kallweit

Add new interface mode USXGMII to binding documentation.

---
v2:
- binding documentation change added to the series

---
 Documentation/devicetree/bindings/net/ethernet.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/net/ethernet.txt +1 -0
index e88c3641d..5475682bf 100644
@@ -43,6 +43,7 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
   * "rxaui"
   * "xaui"
   * "10gbase-kr" (10GBASE-KR, XFI, SFI)
+  * "usxgmii"
 - phy-connection-type: the same as "phy-mode" property but described in the
   Devicetree Specification;
 - phy-handle: phandle, specifies a reference to a node representing a PHY
Signature · 1 line
2.21.0
author maintainer
#5 lore raw

PATCH v2 3/3 net: phy: aquantia: add USXGMII support and warn if XGMII mode is set

In reply to Heiner Kallweit

So far we didn't support mode USXGMII, and in order to not break few boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and warn if XGMII mode is set.

v2:
- add warning if XGMII mode is set

---
 drivers/net/phy/aquantia_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/phy/aquantia_main.c +8 -0
index 0fedd28fd..3b29d3811 100644
@@ -27,6 +27,7 @@
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK	GENMASK(7, 3)
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR	0
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI	2
+#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII	3
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII	6
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII	10
 
@@ -360,6 +361,9 @@ static int aqr107_read_status(struct phy_device *phydev)
 	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI:
 		phydev->interface = PHY_INTERFACE_MODE_10GKR;
 		break;
+	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII:
+		phydev->interface = PHY_INTERFACE_MODE_USXGMII;
+		break;
 	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII:
 		phydev->interface = PHY_INTERFACE_MODE_SGMII;
 		break;
@@ -488,9 +492,13 @@ static int aqr107_config_init(struct phy_device *phydev)
 	if (phydev->interface != PHY_INTERFACE_MODE_SGMII &&
 	    phydev->interface != PHY_INTERFACE_MODE_2500BASEX &&
 	    phydev->interface != PHY_INTERFACE_MODE_XGMII &&
+	    phydev->interface != PHY_INTERFACE_MODE_USXGMII &&
 	    phydev->interface != PHY_INTERFACE_MODE_10GKR)
 		return -ENODEV;
 
+	WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,
+	     "Your devicetree is out of date, please update it. The AQR107 family doesn't support XGMII, maybe you mean USXGMII.\n");
+
 	ret = aqr107_wait_reset_complete(phydev);
 	if (!ret)
 		aqr107_chip_info(phydev);
Signature · 1 line
2.21.0
maintainer Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set

Quoted 9 lines · Heiner Kallweit

So far we didn't support mode USXGMII, and in order to not break few boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and warn if XGMII mode is set.

v2:
- add warning if XGMII mode is set

Andrew

Reviewed-by on v2 3/3
#7 lore raw

Re: [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set

In reply to Heiner Kallweit
Quoted 9 lines · Heiner Kallweit

So far we didn't support mode USXGMII, and in order to not break few boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and warn if XGMII mode is set.

v2:
- add warning if XGMII mode is set

Signature · 1 line
Florian
maintainer
#8 lore raw
In reply to Heiner Kallweit

From: Heiner Kallweit <[email protected]>
Date: Thu, 23 May 2019 20:06:10 +0200

Quoted 5 lines

Add support for interface mode USXGMII.

On Freescale boards LS1043A and LS1046A a warning may pop up now because mode xgmii should be changed to usxgmii (as the used Aquantia PHY doesn't support XGMII).

Series applied.