devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Madalin Bucur <madalin.bucur@oss.nxp.com>
To: davem@davemloft.net, netdev@vger.kernel.org,
	linux@armlinux.org.uk, andrew@lunn.ch
Cc: f.fainelli@gmail.com, hkallweit1@gmail.com, shawnguo@kernel.org,
	leoyang.li@nxp.com, devicetree@vger.kernel.org,
	robh+dt@kernel.org, mark.rutland@arm.com,
	Madalin Bucur <madalin.bucur@oss.nxp.com>
Subject: [PATCH net-next v2 4/7] net: fsl/fman: add support for PHY_INTERFACE_MODE_SFI
Date: Mon, 23 Dec 2019 12:14:10 +0200	[thread overview]
Message-ID: <1577096053-20507-5-git-send-email-madalin.bucur@oss.nxp.com> (raw)
In-Reply-To: <1577096053-20507-1-git-send-email-madalin.bucur@oss.nxp.com>

Add support for the SFI PHY interface mode.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
 drivers/net/ethernet/freescale/fman/fman_memac.c | 2 ++
 drivers/net/ethernet/freescale/fman/mac.c        | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index d0b12efadd6c..09fdec935bf2 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -440,6 +440,7 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg,
 	tmp = 0;
 	switch (phy_if) {
 	case PHY_INTERFACE_MODE_XFI:
+	case PHY_INTERFACE_MODE_SFI:
 	case PHY_INTERFACE_MODE_XGMII:
 		tmp |= IF_MODE_10G;
 		break;
@@ -456,6 +457,7 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg,
 	/* TX_FIFO_SECTIONS */
 	tmp = 0;
 	if (phy_if == PHY_INTERFACE_MODE_XFI ||
+	    phy_if == PHY_INTERFACE_MODE_SFI ||
 	    phy_if == PHY_INTERFACE_MODE_XGMII) {
 		if (slow_10g_if) {
 			tmp |= (TX_FIFO_SECTIONS_TX_AVAIL_SLOW_10G |
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 2944188c19b3..5e6317742c38 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -542,6 +542,7 @@ static const u16 phy2speed[] = {
 	[PHY_INTERFACE_MODE_QSGMII]		= SPEED_1000,
 	[PHY_INTERFACE_MODE_XGMII]		= SPEED_10000,
 	[PHY_INTERFACE_MODE_XFI]		= SPEED_10000,
+	[PHY_INTERFACE_MODE_SFI]		= SPEED_10000,
 };
 
 static struct platform_device *dpaa_eth_add_device(int fman_id,
@@ -800,6 +801,7 @@ static int mac_probe(struct platform_device *_of_dev)
 
 	/* The 10G interface only supports one mode */
 	if (mac_dev->phy_if == PHY_INTERFACE_MODE_XFI ||
+	    mac_dev->phy_if == PHY_INTERFACE_MODE_SFI ||
 	    mac_dev->phy_if == PHY_INTERFACE_MODE_XGMII)
 		mac_dev->if_support = SUPPORTED_10000baseT_Full;
 
-- 
2.1.0


  parent reply	other threads:[~2019-12-23 10:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 10:14 [PATCH net-next v2 0/7] Add PHY connection types for XFI and SFI Madalin Bucur
2019-12-23 10:14 ` [PATCH net-next v2 1/7] net: phy: add interface modes for XFI, SFI Madalin Bucur
2019-12-23 10:57   ` Russell King - ARM Linux admin
2019-12-23 11:10     ` Andrew Lunn
2019-12-23 10:14 ` [PATCH net-next v2 2/7] net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G Madalin Bucur
2019-12-23 10:14 ` [PATCH net-next v2 3/7] net: fsl/fman: add support for PHY_INTERFACE_MODE_XFI Madalin Bucur
2019-12-23 10:14 ` Madalin Bucur [this message]
2019-12-23 10:14 ` [PATCH net-next v2 5/7] net: phy: aquantia: " Madalin Bucur
2019-12-23 10:14 ` [PATCH net-next v2 6/7] dt-bindings: net: add xfi, sfi to phy-connection-type Madalin Bucur
2019-12-23 10:14 ` [PATCH net-next v2 7/7] arm64: dts: ls104xardb: set correct PHY interface mode Madalin Bucur

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=1577096053-20507-5-git-send-email-madalin.bucur@oss.nxp.com \
    --to=madalin.bucur@oss.nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux@armlinux.org.uk \
    --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).