Microchip Ocelot Switch Family

Schema identifier ($id): "http://devicetree.org/schemas/net/dsa/mscc,ocelot.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Vladimir Oltean <vladimir.oltean@nxp.com>", "Claudiu Manoil <claudiu.manoil@nxp.com>", "Alexandre Belloni <alexandre.belloni@bootlin.com>", "UNGLinuxDriver@microchip.com"

There are multiple switches which are either part of the Ocelot-1 family, or derivatives of this architecture. These switches can be found embedded in various SoCs and accessed using MMIO, or as discrete chips and accessed over SPI or PCIe. The present DSA binding shall be used when the host controlling them performs packet I/O primarily through an Ethernet port of the switch (which is attached to an Ethernet port of the host), rather than through Frame DMA or register-based I/O.

VSC9953 (Seville):

  This is found in the NXP T1040, where it is a memory-mapped platform
  device.
  The following PHY interface types are supported:
    - phy-mode = "internal": on ports 8 and 9
    - phy-mode = "sgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
    - phy-mode = "qsgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
    - phy-mode = "1000base-x": on ports 0, 1, 2, 3, 4, 5, 6, 7

VSC9959 (Felix):

  This is found in the NXP LS1028A. It is a PCI device, part of the larger
  enetc root complex. As a result, the ethernet-switch node is a sub-node of
  the PCIe root complex node and its "reg" property conforms to the parent
  node bindings, describing it as PF 5 of device 0, bus 0.
  If any external switch port is enabled, the enetc PF2 (enetc_port2) should
  be enabled as well. This is because the internal MDIO bus (exposed through
  EA BAR 0) used to access the MAC PCS registers truly belongs to the enetc
  port 2 and not to Felix.
  The following PHY interface types are supported:
    - phy-mode = "internal": on ports 4 and 5
    - phy-mode = "sgmii": on ports 0, 1, 2, 3
    - phy-mode = "qsgmii": on ports 0, 1, 2, 3
    - phy-mode = "usxgmii": on ports 0, 1, 2, 3
    - phy-mode = "1000base-x": on ports 0, 1, 2, 3
    - phy-mode = "2500base-x": on ports 0, 1, 2, 3

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "mscc,vsc9953-switch", "pci1957,eef0"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Used to signal availability of PTP TX timestamps, and state changes of the MAC merge layer of ports that support Frame Preemption.

little-endian — not listed as required here #

true — No constraints added by this property rule.

big-endian — not listed as required here #

true — No constraints added by this property rule.

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): dsa.yaml#/$defs/ethernet-ports

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "pci1957,eef0"

When the condition matches (then) #

Required in this object (required): "interrupts"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>

pcie { /* Integrated Endpoint Root Complex */
    #address-cells = <3>;
    #size-cells = <2>;

    ethernet-switch@0,5 {
        compatible = "pci1957,eef0";
        reg = <0x000500 0 0 0 0>;
        interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;

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

            port@0 {
                reg = <0>;
                phy-mode = "qsgmii";
                phy-handle = <&phy0>;
                managed = "in-band-status";
            };

            port@1 {
                reg = <1>;
                phy-mode = "qsgmii";
                phy-handle = <&phy1>;
                managed = "in-band-status";
            };

            port@2 {
                reg = <2>;
                phy-mode = "qsgmii";
                phy-handle = <&phy2>;
                managed = "in-band-status";
            };

            port@3 {
                reg = <3>;
                phy-mode = "qsgmii";
                phy-handle = <&phy3>;
                managed = "in-band-status";
            };

            port@4 {
                reg = <4>;
                ethernet = <&enetc_port2>;
                phy-mode = "internal";

                fixed-link {
                    speed = <2500>;
                    full-duplex;
                    pause;
                };
            };

            port@5 {
                reg = <5>;
                ethernet = <&enetc_port3>;
                phy-mode = "internal";

                fixed-link {
                    speed = <1000>;
                    full-duplex;
                    pause;
                };
            };
        };
    };
};
soc {
    #address-cells = <1>;
    #size-cells = <1>;

    ethernet-switch@800000 {
        compatible = "mscc,vsc9953-switch";
        reg = <0x800000 0x290000>;
        little-endian;

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

            port@0 {
                reg = <0>;
                phy-mode = "qsgmii";
                phy-handle = <&phy0>;
                managed = "in-band-status";
            };

            port@1 {
                reg = <1>;
                phy-mode = "qsgmii";
                phy-handle = <&phy1>;
                managed = "in-band-status";
            };

            port@2 {
                reg = <2>;
                phy-mode = "qsgmii";
                phy-handle = <&phy2>;
                managed = "in-band-status";
            };

            port@3 {
                reg = <3>;
                phy-mode = "qsgmii";
                phy-handle = <&phy3>;
                managed = "in-band-status";
            };

            port@4 {
                reg = <4>;
                phy-mode = "qsgmii";
                phy-handle = <&phy4>;
                managed = "in-band-status";
            };

            port@5 {
                reg = <5>;
                phy-mode = "qsgmii";
                phy-handle = <&phy5>;
                managed = "in-band-status";
            };

            port@6 {
                reg = <6>;
                phy-mode = "qsgmii";
                phy-handle = <&phy6>;
                managed = "in-band-status";
            };

            port@7 {
                reg = <7>;
                phy-mode = "qsgmii";
                phy-handle = <&phy7>;
                managed = "in-band-status";
            };

            port@8 {
                reg = <8>;
                phy-mode = "internal";
                ethernet = <&enet0>;

                fixed-link {
                    speed = <2500>;
                    full-duplex;
                    pause;
                };
            };

            port@9 {
                reg = <9>;
                phy-mode = "internal";
                ethernet = <&enet1>;

                fixed-link {
                    speed = <2500>;
                    full-duplex;
                    pause;
                };
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR MIT)

Line 93: Felix VSC9959 (NXP LS1028A)

Line 164: Seville VSC9953 (NXP T1040)

Edit this page