# Lantiq GSWIP and MaxLinear GSW1xx Ethernet switches

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Network bindings / dsa_

> Device-tree binding reference for Lantiq GSWIP and MaxLinear GSW1xx Ethernet switches.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;net&#47;dsa&#47;lantiq&#44;gswip&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">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.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d5c57c22d966a033492b">[<code>dsa&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/dsa/dsa.md#dt-root>)</span>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Hauke Mehrtens &#60;hauke&#64;hauke&#45;m&#46;de&#62;&#34;</code></span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;intel&#44;gsw150&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;lantiq&#44;peb7084&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;lantiq&#44;xrx200&#45;gswip&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;lantiq&#44;xrx300&#45;gswip&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;lantiq&#44;xrx330&#45;gswip&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;maxlinear&#44;gsw120&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;maxlinear&#44;gsw125&#34;</code></span>, <span id="dt-3edbd20dc5b59e47edf5"><code>&#34;maxlinear&#44;gsw140&#34;</code></span>, <span id="dt-07feb33463d5c114ab05"><code>&#34;maxlinear&#44;gsw141&#34;</code></span>, <span id="dt-1e634b71c3167df349bb"><code>&#34;maxlinear&#44;gsw145&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-4b3e7791b11b96c3db87"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>3</code></span>

<a id="dt-a25ee402afa562132bc5"></a>

### <code>reg&#45;names</code> — not listed as required here

<a id="dt-cb45e4d562022f44522c"></a>

#### Array item rules (<code>items</code>)

<a id="dt-ad0326e242afa18bd21a"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;switch&#34;</code></span>

<a id="dt-12013039402717d72b48"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-8472c6e17fb2491b6ba3"><code>&#34;mdio&#34;</code></span>

<a id="dt-dd584520d0fd1feaa634"></a>

**Item 3**

> **Exact value (<code>const</code>):** <span id="dt-bd78c6ffbdc5ce20feb0"><code>&#34;mii&#34;</code></span>

<a id="dt-61fd0c6095df05615feb"></a>

### <code>mdio</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-980b6ef0e51b942a4596">[<code>&#47;schemas&#47;net&#47;mdio&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/mdio.md#dt-root>)</span>

<a id="dt-3293bd7c0139f521bb91"></a>

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-58181d8a88e3fb0be0cd"></a>

#### Properties and child nodes (<code>properties</code>)

<a id="dt-4db39d476da3c063c73d"></a>

**<code>compatible</code> — not listed as required here**

**Exact value (<code>const</code>):** <span id="dt-903238ae113d38d2cb76"><code>&#34;lantiq&#44;xrx200&#45;mdio&#34;</code></span>

<a id="dt-4a305bb901fc8402d07c"></a>

### <code>gphy&#45;fw</code> — not listed as required here

**Value type (<code>type</code>):** <span id="dt-786fe2a87574b102f5e1"><code>&#34;object&#34;</code></span>

<a id="dt-29c6e644e0c9be52ad1f"></a>

#### Properties and child nodes (<code>properties</code>)

<a id="dt-39430e356c752a4c8cd1"></a>

**<code>&#35;address&#45;cells</code> — not listed as required here**

**Exact value (<code>const</code>):** <span id="dt-fb0c8d1a3951ea9f9d48"><code>1</code></span>

<a id="dt-c4921a079335c6b57d77"></a>

**<code>&#35;size&#45;cells</code> — not listed as required here**

**Exact value (<code>const</code>):** <span id="dt-3d56967050796cff3e98"><code>0</code></span>

<a id="dt-e0525ffd010f1f39e488"></a>

**<code>compatible</code> — required here**

<a id="dt-cfe3a72911c247bd0792"></a>

**Array item rules (<code>items</code>)**

<a id="dt-8bf041b85e1fd86a246f"></a>

**Item 1**

> **Allowed values (<code>enum</code>):** <a id="dt-5b3f5de1badf1322bc67"></a> <span id="dt-e5ebe4b89585b40f5b3e"><code>&#34;lantiq&#44;xrx200&#45;gphy&#45;fw&#34;</code></span>, <span id="dt-20f15a77b0a9dc4da7f6"><code>&#34;lantiq&#44;xrx300&#45;gphy&#45;fw&#34;</code></span>, <span id="dt-978228adf31b1153c2f0"><code>&#34;lantiq&#44;xrx330&#45;gphy&#45;fw&#34;</code></span>

<a id="dt-da0e3709764d01c4e99c"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-08865b0447ac9b5e4cc7"><code>&#34;lantiq&#44;gphy&#45;fw&#34;</code></span>

<a id="dt-39804a2ba265ad90fd42"></a>

**<code>lantiq&#44;rcu</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-14e4e86cf72d729250b9">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-2533fa46618221e83225>)</span>

<div id="dt-64256f562438f2b2e477">
<p style="white-space: pre-wrap">phandle to the RCU syscon</p>
</div>

<a id="dt-de6fa686314b02657ae7"></a>

#### Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-fb6bf50d427de06d8dc5"></a>

**<code>&#94;gphy&#64;&#91;0&#45;9a&#45;f&#93;&#123;1&#44;2&#125;&#36;</code> — name matches this regular expression**

**Value type (<code>type</code>):** <span id="dt-8d233fc3ef9e26708857"><code>&#34;object&#34;</code></span>

<a id="dt-62e88e18c10fc8ef647f"></a>

**Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)**

<code>false</code>

Not allowed by this rule.

<a id="dt-7dd452332012ac91193a"></a>

**Properties and child nodes (<code>properties</code>)**

<a id="dt-588f4eebd2a470b73368"></a>

**<code>reg</code> — required here**

**Minimum value (<code>minimum</code>):** <span id="dt-bb74076a4304139d136a"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-0e9815d294ebbc35fff0"><code>255</code></span>

<div id="dt-42f8492cd6b54ac6dba6">
<p style="white-space: pre-wrap">Offset of the GPHY firmware register in the RCU register range</p>
</div>

<a id="dt-aa49c8c0206c35cbe76f"></a>

**<code>resets</code> — not listed as required here**

<a id="dt-97395f38669a2e59303e"></a>

**Array item rules (<code>items</code>)**

<a id="dt-d917ea8c4be1326c5c28"></a>

**Item 1**

> <div id="dt-97bb04dd064d2eed6068">
> <p style="white-space: pre-wrap">GPHY reset line</p>
> </div>

<a id="dt-452b9a277eecac3ce2a7"></a>

**<code>reset&#45;names</code> — not listed as required here**

<a id="dt-5a2816ad5219f7f45a28"></a>

**Array item rules (<code>items</code>)**

<a id="dt-08e6d4bd8a7b4c82c193"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-ff34e0030bb8bb0a1bcc"><code>&#34;gphy&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-dba10699227359483df6"></a> <span id="dt-70fc8239e64b65801cd1"><code>&#34;reg&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-2ecd83671ab5ec33aea9"></a> <span id="dt-43d6fafce3403cb401a9"><code>&#34;compatible&#34;</code></span>, <span id="dt-4f0766975cb7ad70150e"><code>&#34;lantiq&#44;rcu&#34;</code></span>

<a id="dt-0d98fb7cb36648305f7e"></a>

#### Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-e92215bd3c2f5373b164"></a>

## Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-72f7c7e4702b1d0922c3"></a>

### <code>&#94;&#40;ethernet&#45;&#41;&#63;ports&#36;</code> — name matches this regular expression

**Value type (<code>type</code>):** <span id="dt-b8022744e1b5b5813e6a"><code>&#34;object&#34;</code></span>

<a id="dt-9ccb3562f541d96281b2"></a>

#### Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-f3e2878a014b99a58525"></a>

**<code>&#94;&#40;ethernet&#45;&#41;&#63;port&#64;&#91;0&#45;6&#93;&#36;</code> — name matches this regular expression**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8a924f6f07c2f4ccd9c0">[<code>dsa&#45;port&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/dsa/dsa-port.md#dt-root>)</span>

<a id="dt-487399357da86d53724c"></a>

**All of these rules must match (<code>allOf</code>)**

<a id="dt-bd8288f0b9f14ac4b97d"></a>

**Rule 1**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-2b89bd5d96ee055be62e">[<code>&#47;schemas&#47;phy&#47;phy&#45;common&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-phy/phy-common-props.md#dt-root>)</span>

<a id="dt-57f3e112380914e8b1ae"></a>

**Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)**

<code>false</code>

Not allowed by this rule.

<a id="dt-55a5a3136b8711b66ecf"></a>

**Properties and child nodes (<code>properties</code>)**

<a id="dt-1128bc46ed432f451907"></a>

**<code>maxlinear&#44;slew&#45;rate&#45;txc</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-c728fa6fc808842455fe">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Allowed values (<code>enum</code>):** <a id="dt-f4d723b88c6d4a0cad02"></a> <span id="dt-6620e61f7fab37c4591e"><code>0</code></span>, <span id="dt-1d7a695835aad0a0cfa3"><code>1</code></span>

<div id="dt-15c0a1dfe9d7fbd7ee5e">
<p style="white-space: pre-wrap">RMII/RGMII TX Clock Slew Rate:</p>
<pre><code>  0: Normal
  1: Slow</code></pre>
<p style="white-space: pre-wrap">If not present, the configuration made by the switch bootloader is
preserved.</p>
</div>

<a id="dt-9da30304328a2c3d3e2a"></a>

**<code>maxlinear&#44;slew&#45;rate&#45;txd</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-72e349024b3e7c57056a">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Allowed values (<code>enum</code>):** <a id="dt-9a8573652d8f53f702b5"></a> <span id="dt-7cf089ad7c75acf80cbf"><code>0</code></span>, <span id="dt-619f41e8b8c325aa9d23"><code>1</code></span>

<div id="dt-c43da0ebb5dd96ea2457">
<p style="white-space: pre-wrap">RMII/RGMII TX Non-Clock PAD Slew Rate:</p>
<pre><code>  0: Normal
  1: Slow</code></pre>
<p style="white-space: pre-wrap">If not present, the configuration made by the switch bootloader is
preserved.</p>
</div>

<a id="dt-f79d25a97fbd080c1f79"></a>

**<code>maxlinear&#44;rmii&#45;refclk&#45;out</code> — not listed as required here**

**Value type (<code>type</code>):** <span id="dt-da0b91a81d07d4d20b88"><code>&#34;boolean&#34;</code></span>

<div id="dt-77c5cc155c7c9f624199">
<p style="white-space: pre-wrap">Configure the RMII reference clock to be a clock output rather than an input. Only applicable for RMII mode.</p>
</div>

<a id="dt-c839285fecf3cf1eba83"></a>

**<code>tx&#45;internal&#45;delay&#45;ps</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-efb70a507d1216d8de3c"></a> <span id="dt-7320fa2d5b0134a339be"><code>0</code></span>, <span id="dt-65f6024f51969d4d9eec"><code>500</code></span>, <span id="dt-2b74774e3636e2ceffb3"><code>1000</code></span>, <span id="dt-e66a620819fd71c143c6"><code>1500</code></span>, <span id="dt-b61e3158fbebc3c2f2c2"><code>2000</code></span>, <span id="dt-cd45faa792ab246ff0e7"><code>2500</code></span>, <span id="dt-b9f8ea1681e7e7454925"><code>3000</code></span>, <span id="dt-c60d53d60aed6c32c34a"><code>3500</code></span>

<div id="dt-e13334189fa115880828">
<p style="white-space: pre-wrap">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.</p>
</div>

<a id="dt-1bf3e1d44ad395780ec4"></a>

**<code>rx&#45;internal&#45;delay&#45;ps</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-6929c84a5324ff0d1d52"></a> <span id="dt-e8cba1363c0b300753e0"><code>0</code></span>, <span id="dt-230a47985605beca6af6"><code>500</code></span>, <span id="dt-3f4d162e53da61941f3c"><code>1000</code></span>, <span id="dt-944aa2a5bf91ee76b80d"><code>1500</code></span>, <span id="dt-51318050a7307beb0452"><code>2000</code></span>, <span id="dt-b6bd504206cd5ab8295a"><code>2500</code></span>, <span id="dt-42f27bd7a59a10ca7cc1"><code>3000</code></span>, <span id="dt-2d720dd9e680d9e70323"><code>3500</code></span>

<div id="dt-57edfa41817e03148c52">
<p style="white-space: pre-wrap">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.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-b5c9dbe70762f9ad7bb5"></a> <span id="dt-d017b1b1b5a0bb01c549"><code>&#34;lantiq&#44;xrx200&#45;gswip&#34;</code></span>, <span id="dt-b1891799a94ae03bda89"><code>&#34;lantiq&#44;xrx300&#45;gswip&#34;</code></span>, <span id="dt-f7ddd2674cdadacec733"><code>&#34;lantiq&#44;xrx330&#45;gswip&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-f6af340cf87a1ddfe255"></a>
> >
> > **<code>reg</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-fffe812d0ea9e20356f9"><code>3</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-144fc3e6513e11ca4459"><code>3</code></span>
> >
> > <a id="dt-6068d11efbd574a6ef78"></a>
> >
> > **<code>mdio</code> — not listed as required here**
> >
> > **Required in this object (<code>required</code>):** <a id="dt-01a051f3a4a6fc8ee755"></a> <span id="dt-73787a8e89dee3bd3794"><code>&#34;compatible&#34;</code></span>
>
> <a id="dt-f985d6aaa3f73a650205"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-0b56c96a40292905ded0"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-b8e4772f5364b2c96f73"></a>
> >
> > **<code>reg</code> — not listed as required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-8494f22b818f1d4ae683"><code>1</code></span>
> >
> > <a id="dt-82a7719afad9931179f9"></a>
> >
> > **<code>reg&#45;names</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.
> >
> > <a id="dt-55b518e832b99586e196"></a>
> >
> > **<code>gphy&#45;fw</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">switch@e108000 {
        compatible = "lantiq,xrx200-gswip";
        reg = &lt;0xe108000 0x3100&gt;,  /* switch */
              &lt;0xe10b100 0xd8&gt;,    /* mdio */
              &lt;0xe10b1d8 0x130&gt;;   /* mii */
        dsa,member = &lt;0 0&gt;;

        ports {
                #address-cells = &lt;1&gt;;
                #size-cells = &lt;0&gt;;

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

                port@1 {
                        reg = &lt;1&gt;;
                        label = "lan4";
                        phy-mode = "rgmii";
                        phy-handle = &lt;&amp;phy1&gt;;
                };

                port@2 {
                        reg = &lt;2&gt;;
                        label = "lan2";
                        phy-mode = "internal";
                        phy-handle = &lt;&amp;phy11&gt;;
                };

                port@4 {
                        reg = &lt;4&gt;;
                        label = "lan1";
                        phy-mode = "internal";
                        phy-handle = &lt;&amp;phy13&gt;;
                };

                port@5 {
                        reg = &lt;5&gt;;
                        label = "wan";
                        phy-mode = "rgmii";
                        phy-handle = &lt;&amp;phy5&gt;;
                };

                port@6 {
                        reg = &lt;0x6&gt;;
                        phy-mode = "internal";
                        ethernet = &lt;&amp;eth0&gt;;

                        fixed-link {
                                speed = &lt;1000&gt;;
                                full-duplex;
                        };
                };
        };

        mdio {
                #address-cells = &lt;1&gt;;
                #size-cells = &lt;0&gt;;
                compatible = "lantiq,xrx200-mdio";

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

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

                gphy@20 {
                        reg = &lt;0x20&gt;;

                        resets = &lt;&amp;reset0 31 30&gt;;
                        reset-names = "gphy";
                };

                gphy@68 {
                        reg = &lt;0x68&gt;;

                        resets = &lt;&amp;reset0 29 28&gt;;
                        reset-names = "gphy";
                };
        };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">#include &lt;dt-bindings/leds/common.h&gt;
#include &lt;dt-bindings/phy/phy.h&gt;

mdio {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    switch@1f {
        compatible = "maxlinear,gsw125";
        reg = &lt;0x1f&gt;;

        ports {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;

            port@0 {
                reg = &lt;0&gt;;
                label = "lan0";
                phy-handle = &lt;&amp;switchphy0&gt;;
                phy-mode = "internal";
            };

            port@1 {
                reg = &lt;1&gt;;
                label = "lan1";
                phy-handle = &lt;&amp;switchphy1&gt;;
                phy-mode = "internal";
            };

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

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

                fixed-link {
                    speed = &lt;1000&gt;;
                    full-duplex;
                };
            };
        };

        mdio {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;

            switchphy0: ethernet-phy@0 {
                reg = &lt;0&gt;;

                leds {
                    #address-cells = &lt;1&gt;;
                    #size-cells = &lt;0&gt;;

                    led@0 {
                        reg = &lt;0&gt;;
                        color = &lt;LED_COLOR_ID_GREEN&gt;;
                        function = LED_FUNCTION_LAN;
                    };
                };
            };

            switchphy1: ethernet-phy@1 {
                reg = &lt;1&gt;;

                leds {
                    #address-cells = &lt;1&gt;;
                    #size-cells = &lt;0&gt;;

                    led@0 {
                        reg = &lt;0&gt;;
                        color = &lt;LED_COLOR_ID_GREEN&gt;;
                        function = LED_FUNCTION_LAN;
                    };
                };
            };
        };
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
