netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII
@ 2019-05-23 18:06 Heiner Kallweit
  2019-05-23 18:06 ` [PATCH net-next v2 1/3] " Heiner Kallweit
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Heiner Kallweit @ 2019-05-23 18:06 UTC (permalink / raw)
  To: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Andrew Lunn, Florian Fainelli, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

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(+)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net-next v2 1/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII
  2019-05-23 18:06 [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Heiner Kallweit
@ 2019-05-23 18:06 ` Heiner Kallweit
  2019-05-23 18:07 ` [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode Heiner Kallweit
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Heiner Kallweit @ 2019-05-23 18:06 UTC (permalink / raw)
  To: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Andrew Lunn, Florian Fainelli, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

Add support for interface mode PHY_INTERFACE_MODE_USXGMII.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 include/linux/phy.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 073fb151b..7180b1d1e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -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";
 	}
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode
  2019-05-23 18:06 [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Heiner Kallweit
  2019-05-23 18:06 ` [PATCH net-next v2 1/3] " Heiner Kallweit
@ 2019-05-23 18:07 ` Heiner Kallweit
  2019-05-23 18:14   ` Andrew Lunn
  2019-05-23 18:18   ` Florian Fainelli
  2019-05-23 18:09 ` [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set Heiner Kallweit
  2019-05-24 20:39 ` [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII David Miller
  3 siblings, 2 replies; 9+ messages in thread
From: Heiner Kallweit @ 2019-05-23 18:07 UTC (permalink / raw)
  To: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Andrew Lunn, Florian Fainelli, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

Add new interface mode USXGMII to binding documentation.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- binding documentation change added to the series
---
 Documentation/devicetree/bindings/net/ethernet.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt
index e88c3641d..5475682bf 100644
--- a/Documentation/devicetree/bindings/net/ethernet.txt
+++ b/Documentation/devicetree/bindings/net/ethernet.txt
@@ -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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set
  2019-05-23 18:06 [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Heiner Kallweit
  2019-05-23 18:06 ` [PATCH net-next v2 1/3] " Heiner Kallweit
  2019-05-23 18:07 ` [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode Heiner Kallweit
@ 2019-05-23 18:09 ` Heiner Kallweit
  2019-05-23 18:14   ` Andrew Lunn
  2019-05-23 18:19   ` Florian Fainelli
  2019-05-24 20:39 ` [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII David Miller
  3 siblings, 2 replies; 9+ messages in thread
From: Heiner Kallweit @ 2019-05-23 18:09 UTC (permalink / raw)
  To: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Andrew Lunn, Florian Fainelli, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

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

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/aquantia_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
index 0fedd28fd..3b29d3811 100644
--- a/drivers/net/phy/aquantia_main.c
+++ b/drivers/net/phy/aquantia_main.c
@@ -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);
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode
  2019-05-23 18:07 ` [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode Heiner Kallweit
@ 2019-05-23 18:14   ` Andrew Lunn
  2019-05-23 18:18   ` Florian Fainelli
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2019-05-23 18:14 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Florian Fainelli, David Miller, netdev,
	linux-arm-kernel, devicetree

On Thu, May 23, 2019 at 08:07:56PM +0200, Heiner Kallweit wrote:
> Add new interface mode USXGMII to binding documentation.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set
  2019-05-23 18:09 ` [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set Heiner Kallweit
@ 2019-05-23 18:14   ` Andrew Lunn
  2019-05-23 18:19   ` Florian Fainelli
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2019-05-23 18:14 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Madalin-cristian Bucur, Shawn Guo, Li Yang, Rob Herring,
	Mark Rutland, Florian Fainelli, David Miller, netdev,
	linux-arm-kernel, devicetree

On Thu, May 23, 2019 at 08:09:08PM +0200, Heiner Kallweit wrote:
> 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
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode
  2019-05-23 18:07 ` [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode Heiner Kallweit
  2019-05-23 18:14   ` Andrew Lunn
@ 2019-05-23 18:18   ` Florian Fainelli
  1 sibling, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2019-05-23 18:18 UTC (permalink / raw)
  To: Heiner Kallweit, Madalin-cristian Bucur, Shawn Guo, Li Yang,
	Rob Herring, Mark Rutland, Andrew Lunn, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

On 5/23/19 11:07 AM, Heiner Kallweit wrote:
> Add new interface mode USXGMII to binding documentation.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set
  2019-05-23 18:09 ` [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set Heiner Kallweit
  2019-05-23 18:14   ` Andrew Lunn
@ 2019-05-23 18:19   ` Florian Fainelli
  1 sibling, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2019-05-23 18:19 UTC (permalink / raw)
  To: Heiner Kallweit, Madalin-cristian Bucur, Shawn Guo, Li Yang,
	Rob Herring, Mark Rutland, Andrew Lunn, David Miller
  Cc: netdev, linux-arm-kernel, devicetree

On 5/23/19 11:09 AM, Heiner Kallweit wrote:
> 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
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII
  2019-05-23 18:06 [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Heiner Kallweit
                   ` (2 preceding siblings ...)
  2019-05-23 18:09 ` [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set Heiner Kallweit
@ 2019-05-24 20:39 ` David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-05-24 20:39 UTC (permalink / raw)
  To: hkallweit1
  Cc: madalin.bucur, shawnguo, leoyang.li, robh+dt, mark.rutland,
	andrew, f.fainelli, netdev, linux-arm-kernel, devicetree

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 23 May 2019 20:06:10 +0200

> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-05-24 20:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 18:06 [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Heiner Kallweit
2019-05-23 18:06 ` [PATCH net-next v2 1/3] " Heiner Kallweit
2019-05-23 18:07 ` [PATCH net-next v2 2/3] dt-bindings: net: document new usxgmii phy mode Heiner Kallweit
2019-05-23 18:14   ` Andrew Lunn
2019-05-23 18:18   ` Florian Fainelli
2019-05-23 18:09 ` [PATCH net-next v2 3/3] net: phy: aquantia: add USXGMII support and warn if XGMII mode is set Heiner Kallweit
2019-05-23 18:14   ` Andrew Lunn
2019-05-23 18:19   ` Florian Fainelli
2019-05-24 20:39 ` [PATCH net-next v2 0/3] net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).