# Generic DSA Switch Port

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

> Device-tree binding reference for Generic DSA Switch Port.

<!-- 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;dsa&#45;port&#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>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Andrew Lunn &#60;andrew&#64;lunn&#46;ch&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Florian Fainelli &#60;f&#46;fainelli&#64;gmail&#46;com&#62;&#34;</code></span>, <span id="dt-2f1516674166ff6e66b8"><code>&#34;Vladimir Oltean &#60;olteanv&#64;gmail&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">A DSA switch port is a component of a switch that manages one MAC, and can pass Ethernet frames. It can act as a stanadard Ethernet switch port, or have DSA-specific functionality.</p>
</div>

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

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

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

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

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">Port number</p>
> </div>

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

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

<div id="dt-f7c1a813bb0d2e9dd066">
<p style="white-space: pre-wrap">Describes the label associated with this port, which will become the netdev name</p>
</div>

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

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

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

<div id="dt-01910b582d9abfbc2032">
<p style="white-space: pre-wrap">Should be a list of phandles to other switch's DSA port. This port is used as the outgoing port towards the phandle ports. The full routing information must be given, not just the one hop routes to neighbouring switches</p>
</div>

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

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

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

> **Maximum number of items (<code>maxItems</code>):** <span id="dt-cfca47103c27e6b40244"><code>1</code></span>

<a id="dt-0786c8413c06de5a9549"></a>

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

<div id="dt-4d79ddc0d163cb5c7207">
<p style="white-space: pre-wrap">Should be a phandle to a valid Ethernet device node.  This host device is what the switch port is connected to</p>
</div>

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

<a id="dt-6b2b62e7bcd7880a1fab"></a>

### <code>dsa&#45;tag&#45;protocol</code> — not listed as required here

<div id="dt-20b5b3dc37a9533794a4">
<p style="white-space: pre-wrap">Instead of the default, the switch will use this tag protocol if possible. Useful when a device supports multiple protocols and the default is incompatible with the Ethernet device.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-5a4d97ce373f33e6ee04"></a> <span id="dt-47ebcf42c9568eede1ad"><code>&#34;dsa&#34;</code></span>, <span id="dt-7f8cd26b6298b77da4c4"><code>&#34;edsa&#34;</code></span>, <span id="dt-ee865c8879be05f52063"><code>&#34;ocelot&#34;</code></span>, <span id="dt-948897a82e1d22539320"><code>&#34;ocelot&#45;8021q&#34;</code></span>, <span id="dt-7726b948028d4f8406be"><code>&#34;rtl8&#95;4&#34;</code></span>, <span id="dt-435bb4858e7c4080dbf3"><code>&#34;rtl8&#95;4t&#34;</code></span>, <span id="dt-14c4887cf82f000d1f5a"><code>&#34;seville&#34;</code></span>

<a id="dt-158e3f6339df9dc0e448"></a>

## Condition (<code>if</code>)

> <a id="dt-0eb64f3a950da3ba47d4"></a>
>
> ### Exactly one of these rules must match (<code>oneOf</code>)
>
> <a id="dt-2efba783c6e2fb391fa5"></a>
>
> #### Rule 1
>
> > **Required in this object (<code>required</code>):** <a id="dt-038a4a38dfafa3d92f70"></a> <span id="dt-f7207083536f50c57080"><code>&#34;ethernet&#34;</code></span>
>
> <a id="dt-311f81b190f70d38be2b"></a>
>
> #### Rule 2
>
> > **Required in this object (<code>required</code>):** <a id="dt-8c27c66e7d350aff351a"></a> <span id="dt-08c6748a2aa44f06f740"><code>&#34;link&#34;</code></span>

<a id="dt-94d3067a06aec87aad7f"></a>

## When the condition matches (<code>then</code>)

> <a id="dt-2dbdf1cd03832479bcfb"></a>
>
> ### All of these rules must match (<code>allOf</code>)
>
> <a id="dt-bf0cbdfe75126c71b328"></a>
>
> #### Rule 1
>
> > **Required in this object (<code>required</code>):** <a id="dt-09dd1a7079115090d1a2"></a> <span id="dt-f18dfd20e41cab618f8a"><code>&#34;phy&#45;mode&#34;</code></span>
>
> <a id="dt-218e05f27a3ba2c4f2e6"></a>
>
> #### Rule 2
>
> > <a id="dt-b844fc0881954046a90f"></a>
> >
> > **Exactly one of these rules must match (<code>oneOf</code>)**
> >
> > <a id="dt-4979ee1094b27ccd7963"></a>
> >
> > **Rule 1**
> >
> > > **Required in this object (<code>required</code>):** <a id="dt-4b92ec4a82d60f0b525d"></a> <span id="dt-585666f3cc973c9f1f6f"><code>&#34;fixed&#45;link&#34;</code></span>
> >
> > <a id="dt-a93935ea8f45f489dabd"></a>
> >
> > **Rule 2**
> >
> > > **Required in this object (<code>required</code>):** <a id="dt-0dc6a9151dfe4e51de75"></a> <span id="dt-27dc26b2579f0af4354d"><code>&#34;phy&#45;handle&#34;</code></span>
> >
> > <a id="dt-e1c8892aa1268cdd2e43"></a>
> >
> > **Rule 3**
> >
> > > **Required in this object (<code>required</code>):** <a id="dt-e69e253be96505734881"></a> <span id="dt-db81e3ddb85cba816ad5"><code>&#34;managed&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

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

<code>true</code>

Allowed by this rule.

## 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>

<p id="dt-comment-1"><strong>Line 62:</strong> <span> CPU and DSA ports must have phylink-compatible link descriptions</span></p>

</details>
