From: Florinel Iordache <florinel.iordache@nxp.com>
To: davem@davemloft.net, netdev@vger.kernel.org, andrew@lunn.ch,
f.fainelli@gmail.com, hkallweit1@gmail.com,
linux@armlinux.org.uk
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
robh+dt@kernel.org, mark.rutland@arm.com, kuba@kernel.org,
corbet@lwn.net, shawnguo@kernel.org, leoyang.li@nxp.com,
madalin.bucur@oss.nxp.com, ioana.ciornei@nxp.com,
linux-kernel@vger.kernel.org,
Florinel Iordache <florinel.iordache@nxp.com>
Subject: [PATCH net-next v2 3/9] net: phy: add kr phy connection type
Date: Fri, 24 Apr 2020 15:46:25 +0300 [thread overview]
Message-ID: <1587732391-3374-4-git-send-email-florinel.iordache@nxp.com> (raw)
In-Reply-To: <1587732391-3374-1-git-send-email-florinel.iordache@nxp.com>
Add support for backplane kr phy connection types currently available
(10gbase-kr, 40gbase-kr4) and the required phylink updates (cover all
the cases for KR modes which are clause 45 compatible to correctly assign
phy_interface and phylink#supported)
Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
---
drivers/net/phy/phylink.c | 15 ++++++++++++---
include/linux/phy.h | 6 +++++-
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 34ca12a..9a31f68 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -4,6 +4,7 @@
* technologies such as SFP cages where the PHY is hot-pluggable.
*
* Copyright (C) 2015 Russell King
+ * Copyright 2020 NXP
*/
#include <linux/ethtool.h>
#include <linux/export.h>
@@ -304,7 +305,6 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
break;
case PHY_INTERFACE_MODE_USXGMII:
- case PHY_INTERFACE_MODE_10GKR:
case PHY_INTERFACE_MODE_10GBASER:
phylink_set(pl->supported, 10baseT_Half);
phylink_set(pl->supported, 10baseT_Full);
@@ -318,7 +318,6 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
phylink_set(pl->supported, 2500baseX_Full);
phylink_set(pl->supported, 5000baseT_Full);
phylink_set(pl->supported, 10000baseT_Full);
- phylink_set(pl->supported, 10000baseKR_Full);
phylink_set(pl->supported, 10000baseKX4_Full);
phylink_set(pl->supported, 10000baseCR_Full);
phylink_set(pl->supported, 10000baseSR_Full);
@@ -327,6 +326,14 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
phylink_set(pl->supported, 10000baseER_Full);
break;
+ case PHY_INTERFACE_MODE_10GKR:
+ phylink_set(pl->supported, 10000baseKR_Full);
+ break;
+
+ case PHY_INTERFACE_MODE_40GKR4:
+ phylink_set(pl->supported, 40000baseKR4_Full);
+ break;
+
case PHY_INTERFACE_MODE_XLGMII:
phylink_set(pl->supported, 25000baseCR_Full);
phylink_set(pl->supported, 25000baseKR_Full);
@@ -860,7 +867,9 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
if (phy->is_c45 &&
interface != PHY_INTERFACE_MODE_RXAUI &&
interface != PHY_INTERFACE_MODE_XAUI &&
- interface != PHY_INTERFACE_MODE_USXGMII)
+ interface != PHY_INTERFACE_MODE_USXGMII &&
+ interface != PHY_INTERFACE_MODE_10GKR &&
+ interface != PHY_INTERFACE_MODE_40GKR4)
config.interface = PHY_INTERFACE_MODE_NA;
else
config.interface = interface;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 2432ca4..d7cca4b 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -6,6 +6,7 @@
* Author: Andy Fleming
*
* Copyright (c) 2004 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
*/
#ifndef __PHY_H
@@ -107,8 +108,9 @@
/* 10GBASE-R, XFI, SFI - single lane 10G Serdes */
PHY_INTERFACE_MODE_10GBASER,
PHY_INTERFACE_MODE_USXGMII,
- /* 10GBASE-KR - with Clause 73 AN */
+ /* Backplane KR */
PHY_INTERFACE_MODE_10GKR,
+ PHY_INTERFACE_MODE_40GKR4,
PHY_INTERFACE_MODE_MAX,
} phy_interface_t;
@@ -190,6 +192,8 @@ static inline const char *phy_modes(phy_interface_t interface)
return "usxgmii";
case PHY_INTERFACE_MODE_10GKR:
return "10gbase-kr";
+ case PHY_INTERFACE_MODE_40GKR4:
+ return "40gbase-kr4";
default:
return "unknown";
}
--
1.9.1
next prev parent reply other threads:[~2020-04-24 12:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 12:46 [PATCH net-next v2 0/9] net: ethernet backplane support Florinel Iordache
2020-04-24 12:46 ` [PATCH net-next v2 1/9] doc: net: add backplane documentation Florinel Iordache
2020-04-25 10:28 ` Russell King - ARM Linux admin
2020-04-24 12:46 ` [PATCH net-next v2 2/9] dt-bindings: net: add backplane dt bindings Florinel Iordache
2020-04-24 19:55 ` Rob Herring
2020-04-25 10:27 ` Russell King - ARM Linux admin
2020-04-24 12:46 ` Florinel Iordache [this message]
2020-04-24 13:42 ` [PATCH net-next v2 3/9] net: phy: add kr phy connection type Andrew Lunn
2020-04-25 10:22 ` Russell King - ARM Linux admin
2020-04-24 12:46 ` [PATCH net-next v2 4/9] net: fman: add kr support for dpaa1 mac Florinel Iordache
2020-04-24 12:46 ` [PATCH net-next v2 5/9] net: dpaa2: add kr support for dpaa2 mac Florinel Iordache
2020-04-24 12:46 ` [PATCH net-next v2 7/9] net: phy: enable qoriq backplane support Florinel Iordache
2020-04-25 10:52 ` Russell King - ARM Linux admin
2020-04-24 12:46 ` [PATCH net-next v2 8/9] net: phy: add bee algorithm for kr training Florinel Iordache
2020-04-24 12:46 ` [PATCH net-next v2 9/9] arm64: dts: add serdes and mdio description Florinel Iordache
2020-04-24 13:26 ` [PATCH net-next v2 0/9] net: ethernet backplane support Andrew Lunn
[not found] ` <1587732391-3374-7-git-send-email-florinel.iordache@nxp.com>
2020-04-24 13:47 ` [PATCH net-next v2 6/9] net: phy: add backplane kr driver support Andrew Lunn
2020-04-24 13:52 ` Andrew Lunn
2020-04-25 10:47 ` Russell King - ARM Linux admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1587732391-3374-4-git-send-email-florinel.iordache@nxp.com \
--to=florinel.iordache@nxp.com \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=madalin.bucur@oss.nxp.com \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).