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

Merge branch 'add-sparx5i-driver'

Steen Hegelund says:

====================
Adding the Sparx5i Switch Driver

This series provides the Microchip Sparx5i Switch Driver

The SparX-5 Enterprise Ethernet switch family provides a rich set of
Enterprise switching features such as advanced TCAM-based VLAN and QoS
processing enabling delivery of differentiated services, and security
through TCAMbased frame processing using versatile content aware processor
(VCAP). IPv4/IPv6 Layer 3 (L3) unicast and multicast routing is supported
with up to 18K IPv4/9K IPv6 unicast LPM entries and up to 9K IPv4/3K IPv6
(S,G) multicast groups. L3 security features include source guard and
reverse path forwarding (uRPF) tasks. Additional L3 features include
VRF-Lite and IP tunnels (IP over GRE/IP).

The SparX-5 switch family features a highly flexible set of Ethernet ports
with support for 10G and 25G aggregation links, QSGMII, USGMII, and
USXGMII.  The device integrates a powerful 1 GHz dual-core ARM® Cortex®-A53
CPU enabling full management of the switch and advanced Enterprise
applications.

The SparX-5 switch family targets managed Layer 2 and Layer 3 equipment in
SMB, SME, and Enterprise where high port count 1G/2.5G/5G/10G switching
with 10G/25G aggregation links is required.

The SparX-5 switch family consists of following SKUs:

  VSC7546 SparX-5-64 supports up to 64 Gbps of bandwidth with the following
  primary port configurations.
   - 6 ×10G
   - 16 × 2.5G + 2 × 10G
   - 24 × 1G + 4 × 10G

  VSC7549 SparX-5-90 supports up to 90 Gbps of bandwidth with the following
  primary port configurations.
   - 9 × 10G
   - 16 × 2.5G + 4 × 10G
   - 48 × 1G + 4 × 10G

  VSC7552 SparX-5-128 supports up to 128 Gbps of bandwidth with the
  following primary port configurations.
   - 12 × 10G
   - 6 x 10G + 2 x 25G
   - 16 × 2.5G + 8 × 10G
   - 48 × 1G + 8 × 10G

  VSC7556 SparX-5-160 supports up to 160 Gbps of bandwidth with the
  following primary port configurations.
   - 16 × 10G
   - 10 × 10G + 2 × 25G
   - 16 × 2.5G + 10 × 10G
   - 48 × 1G + 10 × 10G

  VSC7558 SparX-5-200 supports up to 200 Gbps of bandwidth with the
  following primary port configurations.
   - 20 × 10G
   - 8 × 25G

In addition, the device supports one 10/100/1000/2500/5000 Mbps
SGMII/SerDes node processor interface (NPI) Ethernet port.

Time sensitive networking (TSN) is supported through a comprehensive set of
features including frame preemption, cut-through, frame replication and
elimination for reliability, enhanced scheduling: credit-based shaping,
time-aware shaping, cyclic queuing, and forwarding, and per-stream policing
and filtering.

Together with IEEE 1588 and IEEE 802.1AS support, this guarantees
low-latency deterministic networking for Industrial Ethernet.

The Sparx5i support is developed on the PCB134 and PCB135 evaluation boards.

- PCB134 main networking features:
  - 12x SFP+ front 10G module slots (connected to Sparx5i through SFI).
  - 8x SFP28 front 25G module slots (connected to Sparx5i through SFI high
    speed).
  - Optional, one additional 10/100/1000BASE-T (RJ45) Ethernet port
    (on-board VSC8211 PHY connected to Sparx5i through SGMII).

- PCB135 main networking features:
  - 48x1G (10/100/1000M) RJ45 front ports using 12xVSC8514 QuadPHY’s each
    connected to VSC7558 through QSGMII.
  - 4x10G (1G/2.5G/5G/10G) RJ45 front ports using the AQR407 10G QuadPHY
    each port connects to VSC7558 through SFI.
  - 4x SFP28 25G module slots on back connected to VSC7558 through SFI high
    speed.
  - Optional, one additional 1G (10/100/1000M) RJ45 port using an on-board
    VSC8211 PHY, which can be connected to VSC7558 NPI port through SGMII
    using a loopback add-on PCB)

This series provides support for:
  - SFPs and DAC cables via PHYLINK with a number of 5G, 10G and 25G
    devices and media types.
  - Port module configuration for 10M to 25G speeds with SGMII, QSGMII,
    1000BASEX, 2500BASEX and 10GBASER as appropriate for these modes.
  - SerDes configuration via the Sparx5i SerDes driver (see below).
  - Host mode providing register based injection and extraction.
  - Switch mode providing MAC/VLAN table learning and Layer2 switching
    offloaded to the Sparx5i switch.
  - STP state, VLAN support, host/bridge port mode, Forwarding DB, and
    configuration and statistics via ethtool.

More support will be added at a later stage.

The Sparx5i Chip Register Model can be browsed at this location:
https://github.com/microchip-ung/sparx-5_reginfo
and the datasheet is available here:
https://ww1.microchip.com/downloads/en/DeviceDoc/SparX-5_Family_L2L3_Enterprise_10G_Ethernet_Switches_Datasheet_00003822B.pdf

The series depends on the following series currently on their way
into the kernel:

- 25G Base-R phy mode
  Link: https://lore.kernel.org/r/20210611125453.313308-1-steen.hegelund@microchip.com/
- Sparx5 Reset Driver
  Link: https://lore.kernel.org/r/20210416084054.2922327-1-steen.hegelund@microchip.com/



ChangeLog:
v5:
    - cover letter
        - updated the description to match the latest data sheets
    - basic driver
        - added error message in case of reset controller error
        - port struct: replacing has_sfp with inband, adding pause_adv
    - host mode
        - port cleanup: unregisters netdevs and then removes phylink etc
        - checking for pause_adv when comparing port config changes
        - getting duplex and pause state in the link_up callback.
        - getting inband, autoneg and pause_adv config in the pcs_config
          callback.
    - port
        - use only the pause_adv bits when getting aneg status
        - use the inband state when updating the PCS and port config
v4:
    - basic driver:
        Using devm_reset_control_get_optional_shared to get the reset
        control, and let the reset framework check if it is valid.
    - host mode (phylink):
        Use the PCS operations to get state and update configuration.
        Removed the setting of interface modes.  Let phylink control this.
        Using the new 5gbase-r and 25gbase-r modes.
        Using a helper function to check if one of the 3 base-r modes has
        been selected.
        Currently it will not be possible to change the interface mode by
        changing the speed (e.g via ethtool).  This will be added later.
v3:
    - basic driver:
        - removed unneeded braces
        - release reference to ports node after use
        - use dev_err_probe to handle DEFER
        - update error value when bailing out (a few cases)
        - updated formatting of port struct and grouping of bool values
        - simplified the spx5_rmw and spx5_inst_rmw inline functions
    - host mode (netdev):
        - removed lockless flag
        - added port timer init
    - host mode (packet - manual injection):
        - updated error counters in error situations
        - implemented timer handling of watermark threshold: stop and
          restart netif queues.
        - fixed error message handling (rate limited)
        - fixed comment style error
        - used DIV_ROUND_UP macro
        - removed a debug message for open ports

v2:
    - Updated bindings:
        - drop minItems for the reg property
    - Statistics implementation:
        - Reorganized statistics into ethtool groups:
            eth-phy, eth-mac, eth-ctrl, rmon
          as defined by the IEEE 802.3 categories and RFC 2819.
        - The remaining statistics are provided by the classic ethtool
          statistics command.
    - Hostmode support:
        - Removed netdev renaming
        - Validate ethernet address in sparx5_set_mac_address()
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c88c192d d0f482bb
Loading
Loading
Loading
Loading
+226 −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/microchip,sparx5-switch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip Sparx5 Ethernet switch controller

maintainers:
  - Steen Hegelund <steen.hegelund@microchip.com>
  - Lars Povlsen <lars.povlsen@microchip.com>

description: |
  The SparX-5 Enterprise Ethernet switch family provides a rich set of
  Enterprise switching features such as advanced TCAM-based VLAN and
  QoS processing enabling delivery of differentiated services, and
  security through TCAM-based frame processing using versatile content
  aware processor (VCAP).

  IPv4/IPv6 Layer 3 (L3) unicast and multicast routing is supported
  with up to 18K IPv4/9K IPv6 unicast LPM entries and up to 9K IPv4/3K
  IPv6 (S,G) multicast groups.

  L3 security features include source guard and reverse path
  forwarding (uRPF) tasks. Additional L3 features include VRF-Lite and
  IP tunnels (IP over GRE/IP).

  The SparX-5 switch family targets managed Layer 2 and Layer 3
  equipment in SMB, SME, and Enterprise where high port count
  1G/2.5G/5G/10G switching with 10G/25G aggregation links is required.

properties:
  $nodename:
    pattern: "^switch@[0-9a-f]+$"

  compatible:
    const: microchip,sparx5-switch

  reg:
    items:
      - description: cpu target
      - description: devices target
      - description: general control block target

  reg-names:
    items:
      - const: cpu
      - const: devices
      - const: gcb

  interrupts:
    minItems: 1
    items:
      - description: register based extraction
      - description: frame dma based extraction

  interrupt-names:
    minItems: 1
    items:
      - const: xtr
      - const: fdma

  resets:
    items:
      - description: Reset controller used for switch core reset (soft reset)

  reset-names:
    items:
      - const: switch

  mac-address: true

  ethernet-ports:
    type: object
    patternProperties:
      "^port@[0-9a-f]+$":
        type: object

        properties:
          '#address-cells':
            const: 1
          '#size-cells':
            const: 0

          reg:
            description: Switch port number

          phys:
            maxItems: 1
            description:
              phandle of a Ethernet SerDes PHY.  This defines which SerDes
              instance will handle the Ethernet traffic.

          phy-mode:
            description:
              This specifies the interface used by the Ethernet SerDes towards
              the PHY or SFP.

          microchip,bandwidth:
            description: Specifies bandwidth in Mbit/s allocated to the port.
            $ref: "/schemas/types.yaml#/definitions/uint32"
            maximum: 25000

          phy-handle:
            description:
              phandle of a Ethernet PHY.  This is optional and if provided it
              points to the cuPHY used by the Ethernet SerDes.

          sfp:
            description:
              phandle of an SFP.  This is optional and used when not specifying
              a cuPHY.  It points to the SFP node that describes the SFP used by
              the Ethernet SerDes.

          managed: true

          microchip,sd-sgpio:
            description:
              Index of the ports Signal Detect SGPIO in the set of 384 SGPIOs
              This is optional, and only needed if the default used index is
              is not correct.
            $ref: "/schemas/types.yaml#/definitions/uint32"
            minimum: 0
            maximum: 383

        required:
          - reg
          - phys
          - phy-mode
          - microchip,bandwidth

        oneOf:
          - required:
              - phy-handle
          - required:
              - sfp
              - managed

required:
  - compatible
  - reg
  - reg-names
  - interrupts
  - interrupt-names
  - resets
  - reset-names
  - ethernet-ports

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    switch: switch@600000000 {
      compatible = "microchip,sparx5-switch";
      reg =  <0 0x401000>,
             <0x10004000 0x7fc000>,
             <0x11010000 0xaf0000>;
      reg-names = "cpu", "devices", "gcb";
      interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
      interrupt-names = "xtr";
      resets = <&reset 0>;
      reset-names = "switch";
      ethernet-ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port0: port@0 {
          reg = <0>;
          microchip,bandwidth = <1000>;
          phys = <&serdes 13>;
          phy-handle = <&phy0>;
          phy-mode = "qsgmii";
        };
        /* ... */
        /* Then the 25G interfaces */
        port60: port@60 {
          reg = <60>;
          microchip,bandwidth = <25000>;
          phys = <&serdes 29>;
          phy-mode = "10gbase-r";
          sfp = <&sfp_eth60>;
          managed = "in-band-status";
          microchip,sd-sgpio = <365>;
        };
        port61: port@61 {
          reg = <61>;
          microchip,bandwidth = <25000>;
          phys = <&serdes 30>;
          phy-mode = "10gbase-r";
          sfp = <&sfp_eth61>;
          managed = "in-band-status";
          microchip,sd-sgpio = <369>;
        };
        port62: port@62 {
          reg = <62>;
          microchip,bandwidth = <25000>;
          phys = <&serdes 31>;
          phy-mode = "10gbase-r";
          sfp = <&sfp_eth62>;
          managed = "in-band-status";
          microchip,sd-sgpio = <373>;
        };
        port63: port@63 {
          reg = <63>;
          microchip,bandwidth = <25000>;
          phys = <&serdes 32>;
          phy-mode = "10gbase-r";
          sfp = <&sfp_eth63>;
          managed = "in-band-status";
          microchip,sd-sgpio = <377>;
        };
        /* Finally the Management interface */
        port64: port@64 {
          reg = <64>;
          microchip,bandwidth = <1000>;
          phys = <&serdes 0>;
          phy-handle = <&phy64>;
          phy-mode = "sgmii";
          mac-address = [ 00 00 00 01 02 03 ];
        };
      };
    };

...
#  vim: set ts=2 sw=2 sts=2 tw=80 et cc=80 ft=yaml :
+92 −2
Original line number Diff line number Diff line
@@ -135,9 +135,12 @@
			};
		};

		reset@611010008 {
			compatible = "microchip,sparx5-chip-reset";
		reset: reset-controller@611010008 {
			compatible = "microchip,sparx5-switch-reset";
			reg = <0x6 0x11010008 0x4>;
			reg-names = "gcb";
			#reset-cells = <1>;
			cpu-syscon = <&cpu_ctrl>;
		};

		uart0: serial@600100000 {
@@ -275,6 +278,21 @@
					"GPIO_46", "GPIO_47";
				function = "emmc";
			};

			miim1_pins: miim1-pins {
				pins = "GPIO_56", "GPIO_57";
				function = "miim";
			};

			miim2_pins: miim2-pins {
				pins = "GPIO_58", "GPIO_59";
				function = "miim";
			};

			miim3_pins: miim3-pins {
				pins = "GPIO_52", "GPIO_53";
				function = "miim";
			};
		};

		sgpio0: gpio@61101036c {
@@ -285,6 +303,8 @@
			clocks = <&sys_clk>;
			pinctrl-0 = <&sgpio0_pins>;
			pinctrl-names = "default";
			resets = <&reset 0>;
			reset-names = "switch";
			reg = <0x6 0x1101036c 0x100>;
			sgpio_in0: gpio@0 {
				compatible = "microchip,sparx5-sgpio-bank";
@@ -292,6 +312,9 @@
				gpio-controller;
				#gpio-cells = <3>;
				ngpios = <96>;
				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-controller;
				#interrupt-cells = <3>;
			};
			sgpio_out0: gpio@1 {
				compatible = "microchip,sparx5-sgpio-bank";
@@ -310,6 +333,8 @@
			clocks = <&sys_clk>;
			pinctrl-0 = <&sgpio1_pins>;
			pinctrl-names = "default";
			resets = <&reset 0>;
			reset-names = "switch";
			reg = <0x6 0x11010484 0x100>;
			sgpio_in1: gpio@0 {
				compatible = "microchip,sparx5-sgpio-bank";
@@ -317,6 +342,9 @@
				gpio-controller;
				#gpio-cells = <3>;
				ngpios = <96>;
				interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-controller;
				#interrupt-cells = <3>;
			};
			sgpio_out1: gpio@1 {
				compatible = "microchip,sparx5-sgpio-bank";
@@ -335,6 +363,8 @@
			clocks = <&sys_clk>;
			pinctrl-0 = <&sgpio2_pins>;
			pinctrl-names = "default";
			resets = <&reset 0>;
			reset-names = "switch";
			reg = <0x6 0x1101059c 0x100>;
			sgpio_in2: gpio@0 {
				reg = <0>;
@@ -342,6 +372,9 @@
				gpio-controller;
				#gpio-cells = <3>;
				ngpios = <96>;
				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-controller;
				#interrupt-cells = <3>;
			};
			sgpio_out2: gpio@1 {
				compatible = "microchip,sparx5-sgpio-bank";
@@ -386,5 +419,62 @@
			#thermal-sensor-cells = <0>;
			clocks = <&ahb_clk>;
		};

		mdio0: mdio@6110102b0 {
			compatible = "mscc,ocelot-miim";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x6 0x110102b0 0x24>;
		};

		mdio1: mdio@6110102d4 {
			compatible = "mscc,ocelot-miim";
			status = "disabled";
			pinctrl-0 = <&miim1_pins>;
			pinctrl-names = "default";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x6 0x110102d4 0x24>;
		};

		mdio2: mdio@6110102f8 {
			compatible = "mscc,ocelot-miim";
			status = "disabled";
			pinctrl-0 = <&miim2_pins>;
			pinctrl-names = "default";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x6 0x110102d4 0x24>;
		};

		mdio3: mdio@61101031c {
			compatible = "mscc,ocelot-miim";
			status = "disabled";
			pinctrl-0 = <&miim3_pins>;
			pinctrl-names = "default";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x6 0x1101031c 0x24>;
		};

		serdes: serdes@10808000 {
			compatible = "microchip,sparx5-serdes";
			#phy-cells = <1>;
			clocks = <&sys_clk>;
			reg = <0x6 0x10808000 0x5d0000>;
		};

		switch: switch@0x600000000 {
			compatible = "microchip,sparx5-switch";
			reg =	<0x6 0 0x401000>,
				<0x6 0x10004000 0x7fc000>,
				<0x6 0x11010000 0xaf0000>;
			reg-names = "cpu", "dev", "gcb";
			interrupt-names = "xtr";
			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
			resets = <&reset 0>;
			reset-names = "switch";
		};
	};
};
+423 −58

File changed.

Preview size limit exceeded, changes collapsed.

+597 −24
Original line number Diff line number Diff line
@@ -7,14 +7,6 @@
#include "sparx5_pcb_common.dtsi"

/{
	aliases {
	    i2c0   = &i2c0;
	    i2c152 = &i2c152;
	    i2c153 = &i2c153;
	    i2c154 = &i2c154;
	    i2c155 = &i2c155;
	};

	gpio-restart {
		compatible = "gpio-restart";
		gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
@@ -97,17 +89,10 @@

&spi0 {
	status = "okay";
	spi@0 {
		compatible = "spi-mux";
		mux-controls = <&mux>;
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>; /* CS0 */
		spi-flash@9 {
	spi-flash@0 {
		compatible = "jedec,spi-nor";
		spi-max-frequency = <8000000>;
			reg = <0x9>; /* SPI */
		};
		reg = <0>;
	};
};

@@ -138,6 +123,11 @@
	};
};

&sgpio2 {
	status = "okay";
	microchip,sgpio-port-ranges = <0 0>, <16 18>, <28 31>;
};

&axi {
	i2c0_imux: i2c0-imux@0 {
		compatible = "i2c-mux-pinctrl";
@@ -149,31 +139,614 @@

&i2c0_imux {
	pinctrl-names =
		"i2c152", "i2c153", "i2c154", "i2c155",
		"i2c_sfp1", "i2c_sfp2", "i2c_sfp3", "i2c_sfp4",
		"idle";
	pinctrl-0 = <&i2cmux_s29>;
	pinctrl-1 = <&i2cmux_s30>;
	pinctrl-2 = <&i2cmux_s31>;
	pinctrl-3 = <&i2cmux_s32>;
	pinctrl-4 = <&i2cmux_pins_i>;
	i2c152: i2c_sfp1 {
	i2c_sfp1: i2c_sfp1 {
		reg = <0x0>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
	i2c153: i2c_sfp2 {
	i2c_sfp2: i2c_sfp2 {
		reg = <0x1>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
	i2c154: i2c_sfp3 {
	i2c_sfp3: i2c_sfp3 {
		reg = <0x2>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
	i2c155: i2c_sfp4 {
	i2c_sfp4: i2c_sfp4 {
		reg = <0x3>;
		#address-cells = <1>;
		#size-cells = <0>;
	};
};

&axi {
	sfp_eth60: sfp-eth60 {
		compatible	   = "sff,sfp";
		i2c-bus            = <&i2c_sfp1>;
		tx-disable-gpios   = <&sgpio_out2 28 0 GPIO_ACTIVE_LOW>;
		rate-select0-gpios = <&sgpio_out2 28 1 GPIO_ACTIVE_HIGH>;
		los-gpios          = <&sgpio_in2 28 0 GPIO_ACTIVE_HIGH>;
		mod-def0-gpios     = <&sgpio_in2 28 1 GPIO_ACTIVE_LOW>;
		tx-fault-gpios     = <&sgpio_in2 28 2 GPIO_ACTIVE_HIGH>;
	};
	sfp_eth61: sfp-eth61 {
		compatible         = "sff,sfp";
		i2c-bus            = <&i2c_sfp2>;
		tx-disable-gpios   = <&sgpio_out2 29 0 GPIO_ACTIVE_LOW>;
		rate-select0-gpios = <&sgpio_out2 29 1 GPIO_ACTIVE_HIGH>;
		los-gpios          = <&sgpio_in2 29 0 GPIO_ACTIVE_HIGH>;
		mod-def0-gpios     = <&sgpio_in2 29 1 GPIO_ACTIVE_LOW>;
		tx-fault-gpios     = <&sgpio_in2 29 2 GPIO_ACTIVE_HIGH>;
	};
	sfp_eth62: sfp-eth62 {
		compatible         = "sff,sfp";
		i2c-bus            = <&i2c_sfp3>;
		tx-disable-gpios   = <&sgpio_out2 30 0 GPIO_ACTIVE_LOW>;
		rate-select0-gpios = <&sgpio_out2 30 1 GPIO_ACTIVE_HIGH>;
		los-gpios          = <&sgpio_in2 30 0 GPIO_ACTIVE_HIGH>;
		mod-def0-gpios     = <&sgpio_in2 30 1 GPIO_ACTIVE_LOW>;
		tx-fault-gpios     = <&sgpio_in2 30 2 GPIO_ACTIVE_HIGH>;
	};
	sfp_eth63: sfp-eth63 {
		compatible         = "sff,sfp";
		i2c-bus            = <&i2c_sfp4>;
		tx-disable-gpios   = <&sgpio_out2 31 0 GPIO_ACTIVE_LOW>;
		rate-select0-gpios = <&sgpio_out2 31 1 GPIO_ACTIVE_HIGH>;
		los-gpios          = <&sgpio_in2 31 0 GPIO_ACTIVE_HIGH>;
		mod-def0-gpios     = <&sgpio_in2 31 1 GPIO_ACTIVE_LOW>;
		tx-fault-gpios     = <&sgpio_in2 31 2 GPIO_ACTIVE_HIGH>;
	};
};

&mdio0 {
	status = "ok";
	phy0: ethernet-phy@0 {
		reg = <0>;
	};
	phy1: ethernet-phy@1 {
		reg = <1>;
	};
	phy2: ethernet-phy@2 {
		reg = <2>;
	};
	phy3: ethernet-phy@3 {
		reg = <3>;
	};
	phy4: ethernet-phy@4 {
		reg = <4>;
	};
	phy5: ethernet-phy@5 {
		reg = <5>;
	};
	phy6: ethernet-phy@6 {
		reg = <6>;
	};
	phy7: ethernet-phy@7 {
		reg = <7>;
	};
	phy8: ethernet-phy@8 {
		reg = <8>;
	};
	phy9: ethernet-phy@9 {
		reg = <9>;
	};
	phy10: ethernet-phy@10 {
		reg = <10>;
	};
	phy11: ethernet-phy@11 {
		reg = <11>;
	};
	phy12: ethernet-phy@12 {
		reg = <12>;
	};
	phy13: ethernet-phy@13 {
		reg = <13>;
	};
	phy14: ethernet-phy@14 {
		reg = <14>;
	};
	phy15: ethernet-phy@15 {
		reg = <15>;
	};
	phy16: ethernet-phy@16 {
		reg = <16>;
	};
	phy17: ethernet-phy@17 {
		reg = <17>;
	};
	phy18: ethernet-phy@18 {
		reg = <18>;
	};
	phy19: ethernet-phy@19 {
		reg = <19>;
	};
	phy20: ethernet-phy@20 {
		reg = <20>;
	};
	phy21: ethernet-phy@21 {
		reg = <21>;
	};
	phy22: ethernet-phy@22 {
		reg = <22>;
	};
	phy23: ethernet-phy@23 {
		reg = <23>;
	};
};

&mdio1 {
	status = "ok";
	phy24: ethernet-phy@24 {
		reg = <0>;
	};
	phy25: ethernet-phy@25 {
		reg = <1>;
	};
	phy26: ethernet-phy@26 {
		reg = <2>;
	};
	phy27: ethernet-phy@27 {
		reg = <3>;
	};
	phy28: ethernet-phy@28 {
		reg = <4>;
	};
	phy29: ethernet-phy@29 {
		reg = <5>;
	};
	phy30: ethernet-phy@30 {
		reg = <6>;
	};
	phy31: ethernet-phy@31 {
		reg = <7>;
	};
	phy32: ethernet-phy@32 {
		reg = <8>;
	};
	phy33: ethernet-phy@33 {
		reg = <9>;
	};
	phy34: ethernet-phy@34 {
		reg = <10>;
	};
	phy35: ethernet-phy@35 {
		reg = <11>;
	};
	phy36: ethernet-phy@36 {
		reg = <12>;
	};
	phy37: ethernet-phy@37 {
		reg = <13>;
	};
	phy38: ethernet-phy@38 {
		reg = <14>;
	};
	phy39: ethernet-phy@39 {
		reg = <15>;
	};
	phy40: ethernet-phy@40 {
		reg = <16>;
	};
	phy41: ethernet-phy@41 {
		reg = <17>;
	};
	phy42: ethernet-phy@42 {
		reg = <18>;
	};
	phy43: ethernet-phy@43 {
		reg = <19>;
	};
	phy44: ethernet-phy@44 {
		reg = <20>;
	};
	phy45: ethernet-phy@45 {
		reg = <21>;
	};
	phy46: ethernet-phy@46 {
		reg = <22>;
	};
	phy47: ethernet-phy@47 {
		reg = <23>;
	};
};

&mdio3 {
	status = "ok";
	phy64: ethernet-phy@64 {
		reg = <28>;
	};
};

&switch {
	ethernet-ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port0: port@0 {
			reg = <0>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 13>;
			phy-handle = <&phy0>;
			phy-mode = "qsgmii";
		};
		port1: port@1 {
			reg = <1>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 13>;
			phy-handle = <&phy1>;
			phy-mode = "qsgmii";
		};
		port2: port@2 {
			reg = <2>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 13>;
			phy-handle = <&phy2>;
			phy-mode = "qsgmii";
		};
		port3: port@3 {
			reg = <3>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 13>;
			phy-handle = <&phy3>;
			phy-mode = "qsgmii";
		};
		port4: port@4 {
			reg = <4>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 14>;
			phy-handle = <&phy4>;
			phy-mode = "qsgmii";
		};
		port5: port@5 {
			reg = <5>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 14>;
			phy-handle = <&phy5>;
			phy-mode = "qsgmii";
		};
		port6: port@6 {
			reg = <6>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 14>;
			phy-handle = <&phy6>;
			phy-mode = "qsgmii";
		};
		port7: port@7 {
			reg = <7>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 14>;
			phy-handle = <&phy7>;
			phy-mode = "qsgmii";
		};
		port8: port@8 {
			reg = <8>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 15>;
			phy-handle = <&phy8>;
			phy-mode = "qsgmii";
		};
		port9: port@9 {
			reg = <9>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 15>;
			phy-handle = <&phy9>;
			phy-mode = "qsgmii";
		};
		port10: port@10 {
			reg = <10>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 15>;
			phy-handle = <&phy10>;
			phy-mode = "qsgmii";
		};
		port11: port@11 {
			reg = <11>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 15>;
			phy-handle = <&phy11>;
			phy-mode = "qsgmii";
		};
		port12: port@12 {
			reg = <12>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 16>;
			phy-handle = <&phy12>;
			phy-mode = "qsgmii";
		};
		port13: port@13 {
			reg = <13>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 16>;
			phy-handle = <&phy13>;
			phy-mode = "qsgmii";
		};
		port14: port@14 {
			reg = <14>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 16>;
			phy-handle = <&phy14>;
			phy-mode = "qsgmii";
		};
		port15: port@15 {
			reg = <15>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 16>;
			phy-handle = <&phy15>;
			phy-mode = "qsgmii";
		};
		port16: port@16 {
			reg = <16>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 17>;
			phy-handle = <&phy16>;
			phy-mode = "qsgmii";
		};
		port17: port@17 {
			reg = <17>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 17>;
			phy-handle = <&phy17>;
			phy-mode = "qsgmii";
		};
		port18: port@18 {
			reg = <18>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 17>;
			phy-handle = <&phy18>;
			phy-mode = "qsgmii";
		};
		port19: port@19 {
			reg = <19>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 17>;
			phy-handle = <&phy19>;
			phy-mode = "qsgmii";
		};
		port20: port@20 {
			reg = <20>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 18>;
			phy-handle = <&phy20>;
			phy-mode = "qsgmii";
		};
		port21: port@21 {
			reg = <21>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 18>;
			phy-handle = <&phy21>;
			phy-mode = "qsgmii";
		};
		port22: port@22 {
			reg = <22>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 18>;
			phy-handle = <&phy22>;
			phy-mode = "qsgmii";
		};
		port23: port@23 {
			reg = <23>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 18>;
			phy-handle = <&phy23>;
			phy-mode = "qsgmii";
		};
		port24: port@24 {
			reg = <24>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 19>;
			phy-handle = <&phy24>;
			phy-mode = "qsgmii";
		};
		port25: port@25 {
			reg = <25>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 19>;
			phy-handle = <&phy25>;
			phy-mode = "qsgmii";
		};
		port26: port@26 {
			reg = <26>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 19>;
			phy-handle = <&phy26>;
			phy-mode = "qsgmii";
		};
		port27: port@27 {
			reg = <27>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 19>;
			phy-handle = <&phy27>;
			phy-mode = "qsgmii";
		};
		port28: port@28 {
			reg = <28>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 20>;
			phy-handle = <&phy28>;
			phy-mode = "qsgmii";
		};
		port29: port@29 {
			reg = <29>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 20>;
			phy-handle = <&phy29>;
			phy-mode = "qsgmii";
		};
		port30: port@30 {
			reg = <30>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 20>;
			phy-handle = <&phy30>;
			phy-mode = "qsgmii";
		};
		port31: port@31 {
			reg = <31>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 20>;
			phy-handle = <&phy31>;
			phy-mode = "qsgmii";
		};
		port32: port@32 {
			reg = <32>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 21>;
			phy-handle = <&phy32>;
			phy-mode = "qsgmii";
		};
		port33: port@33 {
			reg = <33>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 21>;
			phy-handle = <&phy33>;
			phy-mode = "qsgmii";
		};
		port34: port@34 {
			reg = <34>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 21>;
			phy-handle = <&phy34>;
			phy-mode = "qsgmii";
		};
		port35: port@35 {
			reg = <35>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 21>;
			phy-handle = <&phy35>;
			phy-mode = "qsgmii";
		};
		port36: port@36 {
			reg = <36>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 22>;
			phy-handle = <&phy36>;
			phy-mode = "qsgmii";
		};
		port37: port@37 {
			reg = <37>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 22>;
			phy-handle = <&phy37>;
			phy-mode = "qsgmii";
		};
		port38: port@38 {
			reg = <38>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 22>;
			phy-handle = <&phy38>;
			phy-mode = "qsgmii";
		};
		port39: port@39 {
			reg = <39>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 22>;
			phy-handle = <&phy39>;
			phy-mode = "qsgmii";
		};
		port40: port@40 {
			reg = <40>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 23>;
			phy-handle = <&phy40>;
			phy-mode = "qsgmii";
		};
		port41: port@41 {
			reg = <41>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 23>;
			phy-handle = <&phy41>;
			phy-mode = "qsgmii";
		};
		port42: port@42 {
			reg = <42>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 23>;
			phy-handle = <&phy42>;
			phy-mode = "qsgmii";
		};
		port43: port@43 {
			reg = <43>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 23>;
			phy-handle = <&phy43>;
			phy-mode = "qsgmii";
		};
		port44: port@44 {
			reg = <44>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 24>;
			phy-handle = <&phy44>;
			phy-mode = "qsgmii";
		};
		port45: port@45 {
			reg = <45>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 24>;
			phy-handle = <&phy45>;
			phy-mode = "qsgmii";
		};
		port46: port@46 {
			reg = <46>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 24>;
			phy-handle = <&phy46>;
			phy-mode = "qsgmii";
		};
		port47: port@47 {
			reg = <47>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 24>;
			phy-handle = <&phy47>;
			phy-mode = "qsgmii";
		};
		/* Then the 25G interfaces */
		port60: port@60 {
			reg = <60>;
			microchip,bandwidth = <25000>;
			phys = <&serdes 29>;
			phy-mode = "10gbase-r";
			sfp = <&sfp_eth60>;
			managed = "in-band-status";
		};
		port61: port@61 {
			reg = <61>;
			microchip,bandwidth = <25000>;
			phys = <&serdes 30>;
			phy-mode = "10gbase-r";
			sfp = <&sfp_eth61>;
			managed = "in-band-status";
		};
		port62: port@62 {
			reg = <62>;
			microchip,bandwidth = <25000>;
			phys = <&serdes 31>;
			phy-mode = "10gbase-r";
			sfp = <&sfp_eth62>;
			managed = "in-band-status";
		};
		port63: port@63 {
			reg = <63>;
			microchip,bandwidth = <25000>;
			phys = <&serdes 32>;
			phy-mode = "10gbase-r";
			sfp = <&sfp_eth63>;
			managed = "in-band-status";
		};
		/* Finally the Management interface */
		port64: port@64 {
			reg = <64>;
			microchip,bandwidth = <1000>;
			phys = <&serdes 0>;
			phy-handle = <&phy64>;
			phy-mode = "sgmii";
		};
	};
};
+2 −0
Original line number Diff line number Diff line
@@ -54,4 +54,6 @@ config LAN743X
	  To compile this driver as a module, choose M here. The module will be
	  called lan743x.

source "drivers/net/ethernet/microchip/sparx5/Kconfig"

endif # NET_VENDOR_MICROCHIP
Loading