# Microchip Ocelot Switch Family

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

> Device-tree binding reference for Microchip Ocelot Switch Family.

<!-- SPDX-License-Identifier: (GPL-2.0 OR MIT) -->


<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;mscc&#44;ocelot&#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;Vladimir Oltean &#60;vladimir&#46;oltean&#64;nxp&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Claudiu Manoil &#60;claudiu&#46;manoil&#64;nxp&#46;com&#62;&#34;</code></span>, <span id="dt-2f1516674166ff6e66b8"><code>&#34;Alexandre Belloni &#60;alexandre&#46;belloni&#64;bootlin&#46;com&#62;&#34;</code></span>, <span id="dt-3a197c22bf020420f520"><code>&#34;UNGLinuxDriver&#64;microchip&#46;com&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">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.</p>
<p style="white-space: pre-wrap">VSC9953 (Seville):</p>
<pre><code>  This is found in the NXP T1040, where it is a memory-mapped platform
  device.</code></pre>
<pre><code>  The following PHY interface types are supported:</code></pre>
<pre><code>    - 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</code></pre>
<p style="white-space: pre-wrap">VSC9959 (Felix):</p>
<pre><code>  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.</code></pre>
<pre><code>  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.</code></pre>
<pre><code>  The following PHY interface types are supported:</code></pre>
<pre><code>    - 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</code></pre>
</div>

<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;mscc&#44;vsc9953&#45;switch&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;pci1957&#44;eef0&#34;</code></span>

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

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

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

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

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

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">Used to signal availability of PTP TX timestamps, and state changes of the MAC merge layer of ports that support Frame Preemption.</p>
</div>

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

### <code>little&#45;endian</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-319a1197721d8cd4e338"></a>

### <code>big&#45;endian</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

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

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>dsa&#46;yaml&#35;&#47;&#36;defs&#47;ethernet&#45;ports</code>](</kernel/hardware/devicetree-bindings/dt-net/dsa/dsa.md#dt-902a57891fd19db703ff>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > **Exact value (<code>const</code>):** <span id="dt-845f8d468c0609fc60ce"><code>&#34;pci1957&#44;eef0&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-ee96a18d4bb2a9d39bd9"></a> <span id="dt-96ee7f71687cd234a9f8"><code>&#34;interrupts&#34;</code></span>

<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">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

pcie { /* Integrated Endpoint Root Complex */
    #address-cells = &lt;3&gt;;
    #size-cells = &lt;2&gt;;

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

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

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

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

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

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

            port@4 {
                reg = &lt;4&gt;;
                ethernet = &lt;&amp;enetc_port2&gt;;
                phy-mode = "internal";

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

            port@5 {
                reg = &lt;5&gt;;
                ethernet = &lt;&amp;enetc_port3&gt;;
                phy-mode = "internal";

                fixed-link {
                    speed = &lt;1000&gt;;
                    full-duplex;
                    pause;
                };
            };
        };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">soc {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    ethernet-switch@800000 {
        compatible = "mscc,vsc9953-switch";
        reg = &lt;0x800000 0x290000&gt;;
        little-endian;

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

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

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

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

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

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

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

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

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

            port@8 {
                reg = &lt;8&gt;;
                phy-mode = "internal";
                ethernet = &lt;&amp;enet0&gt;;

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

            port@9 {
                reg = &lt;9&gt;;
                phy-mode = "internal";
                ethernet = &lt;&amp;enet1&gt;;

                fixed-link {
                    speed = &lt;2500&gt;;
                    full-duplex;
                    pause;
                };
            };
        };
    };
};
</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 OR MIT)</span></p>

<p id="dt-comment-1"><strong>Line 93:</strong> <span> Felix VSC9959 (NXP LS1028A)</span></p>

<p id="dt-comment-2"><strong>Line 164:</strong> <span> Seville VSC9953 (NXP T1040)</span></p>

</details>
