Commit b8ac21d2 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tsn-endpoint-driver'



Gerhard Engleder says:

====================
TSN endpoint Ethernet MAC driver

This series adds a driver for my FPGA based TSN endpoint Ethernet MAC.
It also includes the device tree binding.

The device is designed as Ethernet MAC for TSN networks. It will be used
in PLCs with real-time requirements up to isochronous communication with
protocols like OPC UA Pub/Sub.

v3:
 - set MAC mode based on PHY information (Andrew Lunn)
 - remove/postpone loopback mode interface (Andrew Lunn)
 - add suppress_preamble node support (Andrew Lunn)
 - add mdio timeout (Andrew Lunn)
 - no need to call phy_start_aneg (Andrew Lunn)
 - remove unreachable code (Andrew Lunn)
 - move 'struct napi_struct' closer to queues (Vinicius Costa Gomes)
 - remove unused variable (kernel test robot)
 - switch from mdio interrupt to polling
 - mdio register without PHY address flag
 - thread safe interrupt enable register
 - add PTP_1588_CLOCK_OPTIONAL dependency to Kconfig
 - introduce dmadev for DMA allocation
 - mdiobus for platforms without device tree
 - prepare MAC address support for platforms without device tree
 - add missing interrupt disable to probe error path

v2:
 - add C45 check (Andrew Lunn)
 - forward phy_connect_direct() return value (Andrew Lunn)
 - use phy_remove_link_mode() (Andrew Lunn)
 - do not touch PHY directly, use PHY subsystem (Andrew Lunn)
 - remove management data lock (Andrew Lunn)
 - use phy_loopback (Andrew Lunn)
 - remove GMII2RGMII handling, use xgmiitorgmii (Andrew Lunn)
 - remove char device for direct TX/RX queue access (Andrew Lunn)
 - mdio node for mdiobus (Rob Herring)
 - simplify compatible node (Rob Herring)
 - limit number of items of reg and interrupts nodes (Rob Herring)
 - restrict phy-connection-type node (Rob Herring)
 - reference to mdio.yaml under mdio node (Rob Herring)
 - remove device tree (Michal Simek)
 - fix %llx warning (kernel test robot)
 - fix unused tmp variable warning (kernel test robot)
 - add missing of_node_put() for of_parse_phandle()
 - use devm_mdiobus_alloc()
 - simplify mdiobus read/write
 - reduce required nodes
 - ethtool priv flags interface for loopback
 - add missing static for some functions
 - remove obsolete hardware defines
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a18e6521 403f69bb
Loading
Loading
Loading
Loading
+79 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/engleder,tsnep.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TSN endpoint Ethernet MAC binding

maintainers:
  - Gerhard Engleder <gerhard@engleder-embedded.com>

allOf:
  - $ref: ethernet-controller.yaml#

properties:
  compatible:
    const: engleder,tsnep

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  local-mac-address: true

  mac-address: true

  nvmem-cells: true

  nvmem-cells-names: true

  phy-connection-type:
    enum:
      - mii
      - gmii
      - rgmii
      - rgmii-id

  phy-mode: true

  phy-handle: true

  mdio:
    type: object
    $ref: "mdio.yaml#"
    description: optional node for embedded MDIO controller

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    axi {
        #address-cells = <2>;
        #size-cells = <2>;
        tnsep0: ethernet@a0000000 {
            compatible = "engleder,tsnep";
            reg = <0x0 0xa0000000 0x0 0x10000>;
            interrupts = <0 89 1>;
            interrupt-parent = <&gic>;
            local-mac-address = [00 00 00 00 00 00];
            phy-mode = "rgmii";
            phy-handle = <&phy0>;
            mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                suppress-preamble;
                phy0: ethernet-phy@1 {
                    reg = <1>;
                    rxc-skew-ps = <1080>;
                };
            };
        };
    };
+2 −0
Original line number Diff line number Diff line
@@ -379,6 +379,8 @@ patternProperties:
    description: Silicon Laboratories (formerly Energy Micro AS)
  "^engicam,.*":
    description: Engicam S.r.l.
  "^engleder,.*":
    description: Engleder
  "^epcos,.*":
    description: EPCOS AG
  "^epfl,.*":
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ config DNET
source "drivers/net/ethernet/dec/Kconfig"
source "drivers/net/ethernet/dlink/Kconfig"
source "drivers/net/ethernet/emulex/Kconfig"
source "drivers/net/ethernet/engleder/Kconfig"
source "drivers/net/ethernet/ezchip/Kconfig"
source "drivers/net/ethernet/faraday/Kconfig"
source "drivers/net/ethernet/freescale/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ obj-$(CONFIG_DNET) += dnet.o
obj-$(CONFIG_NET_VENDOR_DEC) += dec/
obj-$(CONFIG_NET_VENDOR_DLINK) += dlink/
obj-$(CONFIG_NET_VENDOR_EMULEX) += emulex/
obj-$(CONFIG_NET_VENDOR_ENGLEDER) += engleder/
obj-$(CONFIG_NET_VENDOR_EZCHIP) += ezchip/
obj-$(CONFIG_NET_VENDOR_FARADAY) += faraday/
obj-$(CONFIG_NET_VENDOR_FREESCALE) += freescale/
+38 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Engleder network device configuration
#

config NET_VENDOR_ENGLEDER
	bool "Engleder devices"
	default y
	help
	  If you have a network (Ethernet) card belonging to this class, say Y.

	  Note that the answer to this question doesn't directly affect the
	  kernel: saying N will just cause the configurator to skip all
	  the questions about Engleder devices. If you say Y, you will be asked
	  for your specific card in the following questions.

if NET_VENDOR_ENGLEDER

config TSNEP
	tristate "TSN endpoint support"
	depends on PTP_1588_CLOCK_OPTIONAL
	select PHYLIB
	help
	  Support for the Engleder TSN endpoint Ethernet MAC IP Core.

	  To compile this driver as a module, choose M here. The module will be
	  called tsnep.

config TSNEP_SELFTESTS
	bool "TSN endpoint self test support"
	default n
	depends on TSNEP
	help
	  This enables self test support within the TSN endpoint driver.

	  If unsure, say N.

endif # NET_VENDOR_ENGLEDER
Loading