Initial driver for Synopsys DWC XLGMAC
Subsystems (5)
cover Initial driver for Synopsys DWC XLGMAC
This series provides the support for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC).
The first patch adds support for Synopsys XLGMII.
The second patch provides the initial driver for Synopsys XLGMAC
The driver has three layers by refactoring AMD XGBE.
dwc-eth-xxx.x
The DWC ethernet core layer (DWC ECL). This layer contains codes
can be shared by different DWC series ethernet cores
dwc-xxx.x (e.g. dwc-xlgmac.c)
The DWC MAC HW adapter layer (DWC MHAL). This layer contains
special support for a specific MAC. e.g. currently, XLGMAC.
xxx-xxx-pci.c xxx-xxx-plat.c (e.g. dwc-xlgmac-pci.c)
The glue adapter layer (GAL). Vendors who adopt Synopsys Etherent
cores can develop a glue driver for their platform.
Jie Deng (2):
net: phy: add extension of phy-mode for XLGMII
net: ethernet: Initial driver for Synopsys DWC XLGMAC
Documentation/devicetree/bindings/net/ethernet.txt | 1 + MAINTAINERS | 6 + drivers/net/ethernet/synopsys/Kconfig | 2 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/synopsys/dwc/Kconfig | 37 + drivers/net/ethernet/synopsys/dwc/Makefile | 9 + drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c | 228 ++ .../net/ethernet/synopsys/dwc/dwc-eth-debugfs.c | 328 +++ drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c | 715 +++++ .../net/ethernet/synopsys/dwc/dwc-eth-ethtool.c | 567 ++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c | 3098 ++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c | 252 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c | 2319 +++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c | 216 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h | 1115 +++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth.h | 738 +++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c | 538 ++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c | 135 + drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h | 85 + include/linux/phy.h | 3 + 20 files changed, 10393 insertions(+) create mode 100644 drivers/net/ethernet/synopsys/dwc/Kconfig create mode 100644 drivers/net/ethernet/synopsys/dwc/Makefile create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h
Signature · 1 line
1.9.1
PATCH 1/2 net: phy: add extension of phy-mode for XLGMII
This patch adds phy-mode support for Synopsys XLGMAC
--- Documentation/devicetree/bindings/net/ethernet.txt | 1 + include/linux/phy.h | 3 +++ 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/net/ethernet.txt +1 -0
@@ -28,6 +28,7 @@ The following properties are common to the Ethernet controllers: * "rtbi" * "smii" * "xgmii" + * "xlgmii" * "trgmii" - phy-connection-type: the same as "phy-mode" property but described in ePAPR; - phy-handle: phandle, specifies a reference to a node representing a PHY
include/linux/phy.h +3 -0
@@ -79,6 +79,7 @@PHY_INTERFACE_MODE_RTBI ,PHY_INTERFACE_MODE_SMII ,PHY_INTERFACE_MODE_XGMII , +PHY_INTERFACE_MODE_XLGMII ,PHY_INTERFACE_MODE_MOCA ,PHY_INTERFACE_MODE_QSGMII , PHY_INTERFACE_MODE_TRGMII,
@@ -136,6 +137,8 @@ static inline const char *phy_modes(phy_interface_t interface)return "smii" ;case PHY_INTERFACE_MODE_XGMII :return "xgmii" ; +case PHY_INTERFACE_MODE_XLGMII : +return "xlgmii" ;case PHY_INTERFACE_MODE_MOCA :return "moca" ;case PHY_INTERFACE_MODE_QSGMII :
Signature · 1 line
1.9.1
PATCH 2/2 net: ethernet: Initial driver for Synopsys DWC XLGMAC
In reply to Jie DengThis patch provides the initial driver for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC)
--- MAINTAINERS | 6 + drivers/net/ethernet/synopsys/Kconfig | 2 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/synopsys/dwc/Kconfig | 37 + drivers/net/ethernet/synopsys/dwc/Makefile | 9 + drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c | 228 ++ .../net/ethernet/synopsys/dwc/dwc-eth-debugfs.c | 328 +++ drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c | 715 +++++ .../net/ethernet/synopsys/dwc/dwc-eth-ethtool.c | 567 ++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c | 3098 ++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c | 252 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c | 2319 +++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c | 216 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h | 1115 +++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth.h | 738 +++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c | 538 ++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c | 135 + drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h | 85 + 18 files changed, 10389 insertions(+) create mode 100644 drivers/net/ethernet/synopsys/dwc/Kconfig create mode 100644 drivers/net/ethernet/synopsys/dwc/Makefile create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h
MAINTAINERS +6 -0
@@ -10639,6 +10639,12 @@ S: Supported F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt F: drivers/net/ethernet/synopsys/dwc_eth_qos.c +SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET (XLGMAC) DRIVER +M: jiedeng <[email protected]> +L: [email protected] +S: Supported +F: drivers/net/ethernet/synopsys/dwc + SYNOPSYS DESIGNWARE I2C DRIVER M: Jarkko Nikula <[email protected]> R: Andy Shevchenko <[email protected]>
drivers/net/ethernet/synopsys/Kconfig +2 -0
@@ -24,4 +24,6 @@ config SYNOPSYS_DWC_ETH_QOS ---help--- This driver supports the DWC Ethernet QoS from Synopsys +source "drivers/net/ethernet/synopsys/dwc/Kconfig" + endif # NET_VENDOR_SYNOPSYS
drivers/net/ethernet/synopsys/Makefile +1 -0
@@ -3,3 +3,4 @@ # obj-$(CONFIG_SYNOPSYS_DWC_ETH_QOS) += dwc_eth_qos.o +obj-y += dwc/
drivers/net/ethernet/synopsys/dwc/Kconfig new file +37 -0
@@ -0,0 +1,37 @@ +# +# Synopsys DWC ethernet drivers configuration +# + +config DWC_ETH + bool + depends on HAS_IOMEM && HAS_DMA + select BITREVERSE + select CRC32 + select PTP_1588_CLOCK + select PHYLIB + +config DWC_XLGMAC_PCI + tristate "Synopsys DWC Enterprise Ethernet (XLGMAC) driver PCI support" + depends on HAS_IOMEM && HAS_DMA + depends on PCI + select BITREVERSE + select CRC32 + select PTP_1588_CLOCK + select PHYLIB + select DWC_ETH + ---help--- + This driver supports the Synopsys DWC Enterprise Ethernet (XLGMAC) + for PCI platform + + To compile this driver as a module, choose M here: the module + will be called snps-dwc-xlgmac. + +config DWC_ETH_DCB + bool "Data Center Bridging (DCB) support" + default n + depends on DWC_ETH && DCB + ---help--- + Say Y here to enable Data Center Bridging (DCB) support in the + driver. + + If unsure, say N.
drivers/net/ethernet/synopsys/dwc/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +obj-$(CONFIG_DWC_XLGMAC_PCI) += snps-dwc-xlgmac.o + +snps-dwc-xlgmac-objs := dwc-xlgmac-pci.o dwc-xlgmac.o + +snps-dwc-xlgmac-$(CONFIG_DWC_ETH) += dwc-eth-net.o dwc-eth-desc.o \ + dwc-eth-hw.o dwc-eth-mdio.o \ + dwc-eth-ethtool.o dwc-eth-ptp.o +snps-dwc-xlgmac-$(CONFIG_DWC_ETH_DCB) += dwc-eth-dcb.o +snps-dwc-xlgmac-$(CONFIG_DEBUG_FS) += dwc-eth-debugfs.o
drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c new file +228 -0
228 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c new file +328 -0
328 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c new file +715 -0
715 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c new file +567 -0
567 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c new file +3098 -0
1,094 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c new file +252 -0
252 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c new file +2319 -0
2,319 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c new file +216 -0
216 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h new file +1115 -0
1,115 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-eth.h new file +738 -0
738 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c new file +538 -0
538 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c new file +135 -0
135 lines not on this page · raw message
drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h new file +85 -0
85 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH net-next 2/2] net: ethernet: Initial driver for Synopsys DWC XLGMAC
Hi!
Quoted 4 lines
This patch provides the initial driver for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC)
Signed-off-by Jie Deng <[email protected]>
I trust this is different hardware from stmmac?
MAINTAINERS S: Supported · line 10643
Quoted 10 lines
MAINTAINERS +2
-0@@ -10639,6 +10639,12 @@ S: Supported F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt F: drivers/net/ethernet/synopsys/dwc_eth_qos.c +SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET (XLGMAC) DRIVER +M: jiedeng <[email protected]>
Jie Deng here?
MAINTAINERS line 2
Quoted 3 lines
MAINTAINERS +2
-0@@ -0,0 +1,228 @@ +/* + * Synopsys DesignWare Ethernet Driver
Your patch title names hardware differently...?
Quoted 37 lines
MAINTAINERS +36
-0+ * + * Copyright (c) 2014-2016 Synopsys, Inc. (www.synopsys.com) + * + * This file is free software; you may copy, redistribute and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or (at + * your option) any later version. + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This file incorporates work covered by the following copyright and + * permission notice: + * The Synopsys DWC ETHER XGMAC Software Driver and documentation + * (hereinafter "Software") is an unsupported proprietary work of Synopsys, + * Inc. unless otherwise expressly agreed to in writing between Synopsys + * and you. + * + * The Software IS NOT an item of Licensed Software or Licensed Product + * under any End User Software License Agreement or Agreement for Licensed + * Product with Synopsys or any supplement thereto. Permission is hereby + * granted, free of charge, to any person obtaining a copy of this software + * annotated with this license and the Software, to deal in the Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS"
MAINTAINERS
Quoted 10 lines
MAINTAINERS +10
-0+ * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE.
Are you sure this is GPL compatible? Can we get a version without this lenghty legaleese?
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi
Quoted 2 lines · Jie Deng
This series provides the support for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC).
Can you explain which GMAC are you targeted ?
A driver which support some Synopsys GMAC IP already exists. It support GMAC 3.5, 3.7, 4.0, 4.10 versions. You can find it in: drivers/net/ethernet/stmicro/stmmac/. When I look at all files your gonna to create, it looks like to ones in stmmac driver so maybe you could easily add your IP inside stmmac driver.
Note that an other driver is existing for synopsys GMAC 4.0 IP. it is located in drivers/net/ethernet/synopsys/dwc_eth_qos.c and coming from AXIS guys. A task is ongoing to only have stmmac driver so it should be harmful to create a new one.
Regards
Alex
Quoted 59 lines
The first patch adds support for Synopsys XLGMII.
The second patch provides the initial driver for Synopsys XLGMACThe driver has three layers by refactoring AMD XGBE.
dwc-eth-xxx.x
The DWC ethernet core layer (DWC ECL). This layer contains codes
can be shared by different DWC series ethernet coresdwc-xxx.x (e.g.
dwc-xlgmac.c)
The DWC MAC HW adapter layer (DWC MHAL). This layer contains
special support for a specific MAC. e.g. currently, XLGMAC.
xxx-xxx-pci.cxxx-xxx-plat.c(e.g.dwc-xlgmac-pci.c)
The glue adapter layer (GAL). Vendors who adopt Synopsys Etherent
cores can develop a glue driver for their platform.Jie Deng (2):
net: phy: add extension of phy-mode for XLGMII
net: ethernet: Initial driver for Synopsys DWC XLGMACDocumentation/devicetree/bindings/net/ethernet.txt | 1 + MAINTAINERS | 6 + drivers/net/ethernet/synopsys/Kconfig | 2 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/synopsys/dwc/Kconfig | 37 + drivers/net/ethernet/synopsys/dwc/Makefile | 9 + drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c | 228 ++ .../net/ethernet/synopsys/dwc/dwc-eth-debugfs.c | 328 +++ drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c | 715 +++++ .../net/ethernet/synopsys/dwc/dwc-eth-ethtool.c | 567 ++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c | 3098 ++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c | 252 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c | 2319 +++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c | 216 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h | 1115 +++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth.h | 738 +++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c | 538 ++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c | 135 + drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h | 85 + include/linux/phy.h | 3 + 20 files changed, 10393 insertions(+) create mode 100644 drivers/net/ethernet/synopsys/dwc/Kconfig create mode 100644 drivers/net/ethernet/synopsys/dwc/Makefile create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h
Re: [PATCH net-next 2/2] net: ethernet: Initial driver for Synopsys DWC XLGMAC
In reply to a message not in the archiveQuoted 49 lines · Jie Deng
Quoted 7 lines · Pavel Machek
Hi!
Quoted 4 lines
This patch provides the initial driver for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC)
Signed-off-by Jie Deng <[email protected]>I trust this is different hardware from stmmac?
Yes, different hardware. Currently, Synopsys has several Ethernet IP cores. But drivers for these hardwares are scattered in different places. I really hope that they can be centralized into driver/net/ethernet/synopsys for maintenance. This makes things easy for others to find the corresponding drivers.
- QoS
drivers/net/ethernet/synopsys/dwc_eth_qos.cdrivers/net/ethernet/stmicro/stmmac/
- XGMAC
driver/net/ethernet/amd/xgbe/
- XLGMAC
No driver for this hardware in mainline at present.Quoted 11 lines
MAINTAINERS S: Supported · line 10643
Quoted 10 lines
MAINTAINERS +2
-0@@ -10639,6 +10639,12 @@ S: Supported F: Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt F: drivers/net/ethernet/synopsys/dwc_eth_qos.c +SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET (XLGMAC) DRIVER +M: jiedeng <[email protected]>Jie Deng here?
Oh, should be Jie Deng here. Thank you!
Quoted 5 lines
MAINTAINERS line 2
Quoted 4 lines
MAINTAINERS +2
-0@@ -0,0 +1,228 @@ +/* + * Synopsys DesignWare Ethernet DriverYour patch title names hardware differently...?
Yes, currently, it should be XLGMAC driver. I extracted the parts can be shared for different Synopsys IPs.
The XLGMAC driver can be divided into three parts
- The DWC ethernet core layer (DWC ECL):
Currently, it supports XLGMAC. But I think this part can be shared for different Synopsys IPs.
Quoted 6 lines
- The DWC MAC HW adapter layer (DWC MHAL):
This part was designed to include special support for a specific MAC IP. Currently, XLGMAC, and I think we can add
something to support XGMAC and QoS in the future.- The glue adapter layer (GAL)
Ok, thanks for description. Hopefully it can be merged in a way that is not too confusing...
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH net-next 1/2] net: phy: add extension of phy-mode for XLGMII
In reply to Jie DengQuoted 1 line · Jie Deng
This patch adds phy-mode support for Synopsys XLGMAC
The functional changes look good, but I would like to see some description of what the XL part stands for here.
While you are modifying this, do you also mind submitting a Device Tree specification change:
https://www.devicetree.org/specifications/
Thanks!
Quoted 41 lines
Signed-off-by Jie Deng <[email protected]>--- Documentation/devicetree/bindings/net/ethernet.txt | 1 + include/linux/phy.h | 3 +++ 2 files changed, 4 insertions(+)Documentation/devicetree/bindings/net/ethernet.txt +1
-0@@ -28,6 +28,7 @@ The following properties are common to the Ethernet controllers: * "rtbi" * "smii" * "xgmii" + * "xlgmii" * "trgmii" - phy-connection-type: the same as "phy-mode" property but described in ePAPR; - phy-handle: phandle, specifies a reference to a node representing a PHYinclude/linux/phy.h +3
-0@@ -79,6 +79,7 @@PHY_INTERFACE_MODE_RTBI ,PHY_INTERFACE_MODE_SMII ,PHY_INTERFACE_MODE_XGMII , +PHY_INTERFACE_MODE_XLGMII ,PHY_INTERFACE_MODE_MOCA ,PHY_INTERFACE_MODE_QSGMII , PHY_INTERFACE_MODE_TRGMII,@@ -136,6 +137,8 @@ static inline const char *phy_modes(phy_interface_t interface)return "smii" ;case PHY_INTERFACE_MODE_XGMII :return "xgmii" ; +case PHY_INTERFACE_MODE_XLGMII : +return "xlgmii" ;case PHY_INTERFACE_MODE_MOCA :return "moca" ;case PHY_INTERFACE_MODE_QSGMII :
Signature · 1 line
Florian
Quoted 14 lines · Alexandre Torgue
Hi
Quoted 2 lines · Jie Deng
This series provides the support for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC).
Can you explain which GMAC are you targeted ?
A driver which support some Synopsys GMAC IP already exists. It support GMAC 3.5, 3.7, 4.0, 4.10 versions. You can find it in:
drivers/net/ethernet/stmicro/stmmac/. When I look at all files your gonna to create, it looks like to ones in stmmac driver so maybe you could easily add your IP inside stmmac driver.
Quoted 8 lines
Note that an other driver is existing for synopsys GMAC 4.0 IP. it is located in
drivers/net/ethernet/synopsys/dwc_eth_qos.cand coming from AXIS guys. A task is ongoing to only have stmmac driver so it should be harmful to create a new one.Regards
Alex
I didn't target any version of GMAC IP. GMAC IP (QoS IP) currently has two drivers in mainline drivers/net/ethernet/synopsys/dwc_eth_qos.c drivers/net/ethernet/stmicro/stmmac/
XGMAC IP: drivers/net/ethernet/amd/xgbe
XLGMAC IP: no driver in mainline at present
For more info about Synopsys Ethernet IP, Please check:
http://www.synopsys.com/IP/InterfaceIP/Ethernet/Pages/default.aspx
I think it should be better to integrate above drivers into drivers/net/ethernet/synopsys/. This helps to reuse codes and makes maintenance easier. I prefer to choose AMD XGBE as a basis. This driver integrated Synopsys internal driver and had most features supported. What do you think about this ?
Quoted 62 lines
Quoted 62 lines
The first patch adds support for Synopsys XLGMII.
The second patch provides the initial driver for Synopsys XLGMACThe driver has three layers by refactoring AMD XGBE.
dwc-eth-xxx.x
The DWC ethernet core layer (DWC ECL). This layer contains codes
can be shared by different DWC series ethernet coresdwc-xxx.x (e.g.
dwc-xlgmac.c)
The DWC MAC HW adapter layer (DWC MHAL). This layer contains
special support for a specific MAC. e.g. currently, XLGMAC.
xxx-xxx-pci.cxxx-xxx-plat.c(e.g.dwc-xlgmac-pci.c)
The glue adapter layer (GAL). Vendors who adopt Synopsys Etherent
cores can develop a glue driver for their platform.Jie Deng (2):
net: phy: add extension of phy-mode for XLGMII
net: ethernet: Initial driver for Synopsys DWC XLGMACDocumentation/devicetree/bindings/net/ethernet.txt | 1 + MAINTAINERS | 6 + drivers/net/ethernet/synopsys/Kconfig | 2 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/synopsys/dwc/Kconfig | 37 + drivers/net/ethernet/synopsys/dwc/Makefile | 9 + drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c | 228 ++ .../net/ethernet/synopsys/dwc/dwc-eth-debugfs.c | 328 +++ drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c | 715 +++++ .../net/ethernet/synopsys/dwc/dwc-eth-ethtool.c | 567 ++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c | 3098 ++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c | 252 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c | 2319 +++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c | 216 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h | 1115 +++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth.h | 738 +++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c | 538 ++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c | 135 + drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h | 85 + include/linux/phy.h | 3 + 20 files changed, 10393 insertions(+) create mode 100644 drivers/net/ethernet/synopsys/dwc/Kconfig create mode 100644 drivers/net/ethernet/synopsys/dwc/Makefile create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h
Re: [PATCH net-next 1/2] net: phy: add extension of phy-mode for XLGMII
In reply to Florian FainelliQuoted 11 lines · Florian Fainelli
Quoted 1 line · Jie Deng
This patch adds phy-mode support for Synopsys XLGMAC
The functional changes look good, but I would like to see some description of what the XL part stands for here.
While you are modifying this, do you also mind submitting a Device Tree specification change:
https://www.devicetree.org/specifications/
Thanks!
Thank you for the information.
Currenlty, the XLGMAC is a new IP from Synopsys. We are using a PCI driver for testing on FPGA platform. Is it possible to add these changes first and submit a device tree in the future?
Quoted 41 lines
Quoted 40 lines
Signed-off-by Jie Deng <[email protected]>--- Documentation/devicetree/bindings/net/ethernet.txt | 1 + include/linux/phy.h | 3 +++ 2 files changed, 4 insertions(+)Documentation/devicetree/bindings/net/ethernet.txt +1
-0@@ -28,6 +28,7 @@ The following properties are common to the Ethernet controllers: * "rtbi" * "smii" * "xgmii" + * "xlgmii" * "trgmii" - phy-connection-type: the same as "phy-mode" property but described in ePAPR; - phy-handle: phandle, specifies a reference to a node representing a PHYinclude/linux/phy.h +3
-0@@ -79,6 +79,7 @@PHY_INTERFACE_MODE_RTBI ,PHY_INTERFACE_MODE_SMII ,PHY_INTERFACE_MODE_XGMII , +PHY_INTERFACE_MODE_XLGMII ,PHY_INTERFACE_MODE_MOCA ,PHY_INTERFACE_MODE_QSGMII , PHY_INTERFACE_MODE_TRGMII,@@ -136,6 +137,8 @@ static inline const char *phy_modes(phy_interface_t interface)return "smii" ;case PHY_INTERFACE_MODE_XGMII :return "xgmii" ; +case PHY_INTERFACE_MODE_XLGMII : +return "xlgmii" ;case PHY_INTERFACE_MODE_MOCA :return "moca" ;case PHY_INTERFACE_MODE_QSGMII :
Hi Jie,
I don't think we have the need to create the "dwc" subdirectory under "synopsys". Its preferable to have them directly under drivers/net/ethernet/synopsys.
Regards,
C.Palminha
Quoted 61 lines · Jie Deng
This series provides the support for 25/40/50/100 GbE devices using Synopsys DWC Enterprise Ethernet (XLGMAC).
The first patch adds support for Synopsys XLGMII.
The second patch provides the initial driver for Synopsys XLGMACThe driver has three layers by refactoring AMD XGBE.
dwc-eth-xxx.x
The DWC ethernet core layer (DWC ECL). This layer contains codes
can be shared by different DWC series ethernet coresdwc-xxx.x (e.g.
dwc-xlgmac.c)
The DWC MAC HW adapter layer (DWC MHAL). This layer contains
special support for a specific MAC. e.g. currently, XLGMAC.
xxx-xxx-pci.cxxx-xxx-plat.c(e.g.dwc-xlgmac-pci.c)
The glue adapter layer (GAL). Vendors who adopt Synopsys Etherent
cores can develop a glue driver for their platform.Jie Deng (2):
net: phy: add extension of phy-mode for XLGMII
net: ethernet: Initial driver for Synopsys DWC XLGMACDocumentation/devicetree/bindings/net/ethernet.txt | 1 + MAINTAINERS | 6 + drivers/net/ethernet/synopsys/Kconfig | 2 + drivers/net/ethernet/synopsys/Makefile | 1 + drivers/net/ethernet/synopsys/dwc/Kconfig | 37 + drivers/net/ethernet/synopsys/dwc/Makefile | 9 + drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c | 228 ++ .../net/ethernet/synopsys/dwc/dwc-eth-debugfs.c | 328 +++ drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c | 715 +++++ .../net/ethernet/synopsys/dwc/dwc-eth-ethtool.c | 567 ++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c | 3098 ++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c | 252 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c | 2319 +++++++++++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c | 216 ++ drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h | 1115 +++++++ drivers/net/ethernet/synopsys/dwc/dwc-eth.h | 738 +++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c | 538 ++++ drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c | 135 + drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h | 85 + include/linux/phy.h | 3 + 20 files changed, 10393 insertions(+) create mode 100644 drivers/net/ethernet/synopsys/dwc/Kconfig create mode 100644 drivers/net/ethernet/synopsys/dwc/Makefile create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-dcb.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-debugfs.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-desc.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ethtool.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-mdio.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-net.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-ptp.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth-regacc.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-eth.h create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.c create mode 100644 drivers/net/ethernet/synopsys/dwc/dwc-xlgmac.h
Andrew Lunn
maintainerRe: [PATCH net-next 1/2] net: phy: add extension of phy-mode for XLGMII
In reply to Jie DengQuoted 11 lines · Jie Deng
Quoted 8 lines · Florian Fainelli
Quoted 1 line · Jie Deng
This patch adds phy-mode support for Synopsys XLGMAC
The functional changes look good, but I would like to see some description of what the XL part stands for here.
While you are modifying this, do you also mind submitting a Device Tree specification change:
Quoted 6 lines
Quoted 3 lines
https://www.devicetree.org/specifications/
Thanks!
Thank you for the information.
Currenlty, the XLGMAC is a new IP from Synopsys.
I think Florian wants to know about the IEEE standard or what ever which defines what the phy-mode XLGMAC is, in the same way there are standards for RGMII, SGMII, etc.
Andrew
Re: [PATCH net-next 1/2] net: phy: add extension of phy-mode for XLGMII
Quoted 14 lines · Andrew Lunn
Quoted 13 lines · Jie Deng
Quoted 11 lines · Florian Fainelli
Quoted 1 line · Jie Deng
This patch adds phy-mode support for Synopsys XLGMAC
The functional changes look good, but I would like to see some description of what the XL part stands for here.
While you are modifying this, do you also mind submitting a Device Tree specification change:
https://www.devicetree.org/specifications/
Thanks!
Quoted 8 lines
Quoted 3 lines
Thank you for the information.
Currenlty, the XLGMAC is a new IP from Synopsys.
I think Florian wants to know about the IEEE standard or what ever which defines what the phy-mode XLGMAC is, in the same way there are standards for RGMII, SGMII, etc.
Andrew
Understood! Thank you !
kbuild test robot
build botRe: [PATCH net-next 2/2] net: ethernet: Initial driver for Synopsys DWC XLGMAC
In reply to Jie Dengurl: https://github.com/0day-ci/linux/commits/Jie-Deng/net-phy-add-extension-of-phy-mode-for-XLGMII/20161207-121843 config: i386-randconfig-h0-12121424 (attached as .config) compiler: gcc-6 (Debian…
Hi Jie,
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jie-Deng/net-phy-add-extension-of-phy-mode-for-XLGMII/20161207-121843
config: i386-randconfig-h0-12121424 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce:
# save the attached .config to linux build tree
make ARCH=i386 All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/synopsys/dwc/dwc-xlgmac-pci.c:17:0:
>> drivers/net/ethernet/synopsys/dwc/dwc-eth.h:662:26: error: 'IEEE_8021QAZ_MAX_TCS' undeclared here (not in a function)
unsigned int prio2q_map[IEEE_8021QAZ_MAX_TCS];
^~~~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:58:0:
>> drivers/net/ethernet/synopsys/dwc/dwc-eth.h:662:26: error: 'IEEE_8021QAZ_MAX_TCS' undeclared here (not in a function)
unsigned int prio2q_map[IEEE_8021QAZ_MAX_TCS];
^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c: In function 'dwc_eth_enable_tx_flow_control':
>> drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:1214:13: error: dereferencing pointer to incomplete type 'struct ieee_ets'
tc = ets->prio_tc[prio];
^~
>> drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:1217:12: error: dereferencing pointer to incomplete type 'struct ieee_pfc'
if (pfc->pfc_en & (1 << tc)) {
^~
drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c: In function 'dwc_eth_config_dcb_tc':
>> drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:1407:8: error: 'IEEE_8021QAZ_TSA_STRICT' undeclared (first use in this function)
case IEEE_8021QAZ_TSA_STRICT:
^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:1407:8: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/ethernet/synopsys/dwc/dwc-eth-hw.c:1413:8: error: 'IEEE_8021QAZ_TSA_ETS' undeclared (first use in this function)
case IEEE_8021QAZ_TSA_ETS:
^~~~~~~~~~~~~~~~~~~~vim +/IEEE_8021QAZ_MAX_TCS +662 drivers/net/ethernet/synopsys/dwc/dwc-eth.h
656 u64 tx_tstamp;
657
658 /* DCB support */
659 struct ieee_ets *ets;
660 struct ieee_pfc *pfc;
661 unsigned int q2tc_map[DWC_ETH_MAX_QUEUES];
> 662 unsigned int prio2q_map[IEEE_8021QAZ_MAX_TCS];
663 u8 num_tcs;
664
665 /* Device control parameters */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation