Commit 8a39bee1 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'arrow-speedchips-xrs700x-dsa-driver'

George McCollister says:

====================
Arrow SpeedChips XRS700x DSA Driver

This series adds a DSA driver for the Arrow SpeedChips XRS 7000 series
of HSR/PRP gigabit switch chips.

The chips use Flexibilis IP.
More information can be found here:
 https://www.flexibilis.com/products/speedchips-xrs7000/

The switches have up to three RGMII ports and one MII port and are
managed via mdio or i2c. They use a one byte trailing tag to identify
the switch port when in managed mode so I've added a tag driver which
implements this.

This series contains minimal DSA functionality which may be built upon
in future patches. The ultimate goal is to add HSR and PRP
(IEC 62439-3 Clause 5 & 4) offloading with integration into net/hsr.
====================

Link: https://lore.kernel.org/r/20210114195734.55313-1-george.mccollister@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents e7fa5c80 8204c2b0
Loading
Loading
Loading
Loading
+73 −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/dsa/arrow,xrs700x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Arrow SpeedChips XRS7000 Series Switch Device Tree Bindings

allOf:
  - $ref: dsa.yaml#

maintainers:
  - George McCollister <george.mccollister@gmail.com>

description:
  The Arrow SpeedChips XRS7000 Series of single chip gigabit Ethernet switches
  are designed for critical networking applications. They have up to three
  RGMII ports and one RMII port and are managed via i2c or mdio.

properties:
  compatible:
    oneOf:
      - enum:
          - arrow,xrs7003e
          - arrow,xrs7003f
          - arrow,xrs7004e
          - arrow,xrs7004f

  reg:
    maxItems: 1

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        switch@8 {
            compatible = "arrow,xrs7004e";
            reg = <0x8>;

            ethernet-ports {
                #address-cells = <1>;
                #size-cells = <0>;
                ethernet-port@1 {
                    reg = <1>;
                    label = "lan0";
                    phy-handle = <&swphy0>;
                    phy-mode = "rgmii-id";
                };
                ethernet-port@2 {
                    reg = <2>;
                    label = "lan1";
                    phy-handle = <&swphy1>;
                    phy-mode = "rgmii-id";
                };
                ethernet-port@3 {
                    reg = <3>;
                    label = "cpu";
                    ethernet = <&fec1>;
                    fixed-link {
                        speed = <1000>;
                        full-duplex;
                    };
                };
            };
        };
    };
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ source "drivers/net/dsa/qca/Kconfig"

source "drivers/net/dsa/sja1105/Kconfig"

source "drivers/net/dsa/xrs700x/Kconfig"

config NET_DSA_QCA8K
	tristate "Qualcomm Atheros QCA8K Ethernet switch family support"
	depends on NET_DSA
+1 −0
Original line number Diff line number Diff line
@@ -24,3 +24,4 @@ obj-y += mv88e6xxx/
obj-y				+= ocelot/
obj-y				+= qca/
obj-y				+= sja1105/
obj-y				+= xrs700x/
+26 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config NET_DSA_XRS700X
	tristate
	depends on NET_DSA
	select NET_DSA_TAG_XRS700X
	select REGMAP
	help
	  This enables support for Arrow SpeedChips XRS7003/7004 gigabit
	  Ethernet switches.

config NET_DSA_XRS700X_I2C
	tristate "Arrow XRS7000X series switch in I2C mode"
	depends on NET_DSA && I2C
	select NET_DSA_XRS700X
	select REGMAP_I2C
	help
	  Enable I2C support for Arrow SpeedChips XRS7003/7004 gigabit Ethernet
	  switches.

config NET_DSA_XRS700X_MDIO
	tristate "Arrow XRS7000X series switch in MDIO mode"
	depends on NET_DSA
	select NET_DSA_XRS700X
	help
	  Enable MDIO support for Arrow SpeedChips XRS7003/7004 gigabit Ethernet
	  switches.
+4 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_NET_DSA_XRS700X) += xrs700x.o
obj-$(CONFIG_NET_DSA_XRS700X_I2C) += xrs700x_i2c.o
obj-$(CONFIG_NET_DSA_XRS700X_MDIO) += xrs700x_mdio.o
Loading