Lantiq GSWIP and MaxLinear GSW1xx Ethernet switches

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

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

Lantiq GSWIP and MaxLinear GSW1xx switches share the same hardware IP. Lantiq switches are embedded in SoCs and accessed via memory-mapped I/O, while MaxLinear switches are standalone ICs connected via MDIO.

Shared schema rule ($ref): dsa.yaml#

Maintainers (maintainers): "Hauke Mehrtens <hauke@hauke-m.de>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "intel,gsw150", "lantiq,peb7084", "lantiq,xrx200-gswip", "lantiq,xrx300-gswip", "lantiq,xrx330-gswip", "maxlinear,gsw120", "maxlinear,gsw125", "maxlinear,gsw140", "maxlinear,gsw141", "maxlinear,gsw145"

reg — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 3

reg-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "switch"

Item 2

Exact value (const): "mdio"

Item 3

Exact value (const): "mii"

mdio — not listed as required here #

Shared schema rule ($ref): /schemas/net/mdio.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — not listed as required here

Exact value (const): "lantiq,xrx200-mdio"

gphy-fw — not listed as required here #

Value type (type): "object"

Properties and child nodes (properties) #

#address-cells — not listed as required here

Exact value (const): 1

#size-cells — not listed as required here

Exact value (const): 0

compatible — required here

Array item rules (items)

Item 1

Allowed values (enum): "lantiq,xrx200-gphy-fw", "lantiq,xrx300-gphy-fw", "lantiq,xrx330-gphy-fw"

Item 2

Exact value (const): "lantiq,gphy-fw"

lantiq,rcu — required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

phandle to the RCU syscon

Properties matching a name pattern (patternProperties) #

^gphy@[0-9a-f]{1,2}$ — name matches this regular expression

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

reg — required here

Minimum value (minimum): 0

Maximum value (maximum): 255

Offset of the GPHY firmware register in the RCU register range

resets — not listed as required here

Array item rules (items)

Item 1

GPHY reset line

reset-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "gphy"

Required in this object (required): "reg"

Required in this object (required): "compatible", "lantiq,rcu"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

^(ethernet-)?ports$ — name matches this regular expression #

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^(ethernet-)?port@[0-6]$ — name matches this regular expression

Shared schema rule ($ref): dsa-port.yaml#

All of these rules must match (allOf)

Rule 1

Shared schema rule ($ref): /schemas/phy/phy-common-props.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

maxlinear,slew-rate-txc — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1

RMII/RGMII TX Clock Slew Rate:

  0: Normal
  1: Slow

If not present, the configuration made by the switch bootloader is preserved.

maxlinear,slew-rate-txd — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1

RMII/RGMII TX Non-Clock PAD Slew Rate:

  0: Normal
  1: Slow

If not present, the configuration made by the switch bootloader is preserved.

maxlinear,rmii-refclk-out — not listed as required here

Value type (type): "boolean"

Configure the RMII reference clock to be a clock output rather than an input. Only applicable for RMII mode.

tx-internal-delay-ps — not listed as required here

Allowed values (enum): 0, 500, 1000, 1500, 2000, 2500, 3000, 3500

RGMII TX Clock Delay defined in pico seconds. The delay lines adjust the MII clock vs. data timing. If this property is not present the delay is determined by the interface mode.

rx-internal-delay-ps — not listed as required here

Allowed values (enum): 0, 500, 1000, 1500, 2000, 2500, 3000, 3500

RGMII RX Clock Delay defined in pico seconds. The delay lines adjust the MII clock vs. data timing. If this property is not present the delay is determined by the interface mode.

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

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "lantiq,xrx200-gswip", "lantiq,xrx300-gswip", "lantiq,xrx330-gswip"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

mdio — not listed as required here

Required in this object (required): "compatible"

When the condition does not match (else) #

Properties and child nodes (properties)

reg — not listed as required here

Maximum number of items (maxItems): 1

reg-names — not listed as required here

false — Not permitted by this property rule.

gphy-fw — not listed as required here

false — Not permitted by this property rule.

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

switch@e108000 {
        compatible = "lantiq,xrx200-gswip";
        reg = <0xe108000 0x3100>,  /* switch */
              <0xe10b100 0xd8>,    /* mdio */
              <0xe10b1d8 0x130>;   /* mii */
        dsa,member = <0 0>;

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

                port@0 {
                        reg = <0>;
                        label = "lan3";
                        phy-mode = "rgmii-id";
                        phy-handle = <&phy0>;
                        tx-internal-delay-ps = <2000>;
                        rx-internal-delay-ps = <2000>;
                };

                port@1 {
                        reg = <1>;
                        label = "lan4";
                        phy-mode = "rgmii";
                        phy-handle = <&phy1>;
                };

                port@2 {
                        reg = <2>;
                        label = "lan2";
                        phy-mode = "internal";
                        phy-handle = <&phy11>;
                };

                port@4 {
                        reg = <4>;
                        label = "lan1";
                        phy-mode = "internal";
                        phy-handle = <&phy13>;
                };

                port@5 {
                        reg = <5>;
                        label = "wan";
                        phy-mode = "rgmii";
                        phy-handle = <&phy5>;
                };

                port@6 {
                        reg = <0x6>;
                        phy-mode = "internal";
                        ethernet = <&eth0>;

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

        mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                compatible = "lantiq,xrx200-mdio";

                phy0: ethernet-phy@0 {
                        reg = <0x0>;
                };
                phy1: ethernet-phy@1 {
                        reg = <0x1>;
                };
                phy5: ethernet-phy@5 {
                        reg = <0x5>;
                };
                phy11: ethernet-phy@11 {
                        reg = <0x11>;
                };
                phy13: ethernet-phy@13 {
                        reg = <0x13>;
                };
        };

        gphy-fw {
                #address-cells = <1>;
                #size-cells = <0>;
                compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
                lantiq,rcu = <&rcu0>;

                gphy@20 {
                        reg = <0x20>;

                        resets = <&reset0 31 30>;
                        reset-names = "gphy";
                };

                gphy@68 {
                        reg = <0x68>;

                        resets = <&reset0 29 28>;
                        reset-names = "gphy";
                };
        };
};
#include <dt-bindings/leds/common.h>
#include <dt-bindings/phy/phy.h>

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

    switch@1f {
        compatible = "maxlinear,gsw125";
        reg = <0x1f>;

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

            port@0 {
                reg = <0>;
                label = "lan0";
                phy-handle = <&switchphy0>;
                phy-mode = "internal";
            };

            port@1 {
                reg = <1>;
                label = "lan1";
                phy-handle = <&switchphy1>;
                phy-mode = "internal";
            };

            port@4 {
                reg = <4>;
                label = "wan";
                phy-mode = "1000base-x";
                managed = "in-band-status";
                tx-polarity = <PHY_POL_INVERT>;
            };

            port@5 {
                reg = <5>;
                phy-mode = "rgmii-id";
                tx-internal-delay-ps = <2000>;
                rx-internal-delay-ps = <2000>;
                ethernet = <&eth0>;

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

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

            switchphy0: ethernet-phy@0 {
                reg = <0>;

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

                    led@0 {
                        reg = <0>;
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
                    };
                };
            };

            switchphy1: ethernet-phy@1 {
                reg = <1>;

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

                    led@0 {
                        reg = <0>;
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
                    };
                };
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page