# Freescale Three-Speed Ethernet Controller (TSEC), "Gianfar"

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

> Device-tree binding reference for Freescale Three-Speed Ethernet Controller (TSEC), "Gianfar".

<!-- SPDX-License-Identifier: GPL-2.0 -->


<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;fsl&#44;gianfar&#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;J&#46; Neuschäfer &#60;j&#46;ne&#64;posteo&#46;net&#62;&#34;</code></span>

<a id="dt-865ef19e891fb9fe7b15"></a>

## Automatic schema selection (<code>select</code>)

> <a id="dt-b8f9d7db8bb8155c0df4"></a>
>
> ### Exactly one of these rules must match (<code>oneOf</code>)
>
> <a id="dt-2bc4642286156d4d6baf"></a>
>
> #### Rule 1
>
> > <a id="dt-ec952d78212dd8b7f332"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-6c357a3b441cbe392a66"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-dfe9bf4042ad8b444ff6"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8b8f86d2234738a06f84"><code>&#34;gianfar&#34;</code></span>
> >
> > <a id="dt-83a8e83209ae8040dbed"></a>
> >
> > **<code>device&#95;type</code> — required here**
> >
> > **Exact value (<code>const</code>):** <span id="dt-8d9372a733a74bf6fb2a"><code>&#34;network&#34;</code></span>
> >
> > **Required in this object (<code>required</code>):** <a id="dt-958ea5bf126b48903ba1"></a> <span id="dt-253ece427ba5f769cdb4"><code>&#34;device&#95;type&#34;</code></span>
>
> <a id="dt-8a6f54a57bc1e975f343"></a>
>
> #### Rule 2
>
> > <a id="dt-a2d21d3a1a2bfddd22a0"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-9d6f38bcd022c879059c"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > **Exact value (<code>const</code>):** <span id="dt-b0626f2aada677ef72fb"><code>&#34;fsl&#44;etsec2&#34;</code></span>
>
> **Required in this object (<code>required</code>):** <a id="dt-c7b135d3aebb6d627788"></a> <span id="dt-7b7a89ef483af1198868"><code>&#34;compatible&#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;gianfar&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;fsl&#44;etsec2&#34;</code></span>

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

### <code>device&#95;type</code> — not listed as required here

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

<a id="dt-35a8a57fdd6e9ed01be8"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-9fa9ba5f2a2ecb1852df"></a> <span id="dt-de7581f8f00afe7c340f"><code>&#34;FEC&#34;</code></span>, <span id="dt-2d951a265ada8f310c90"><code>&#34;TSEC&#34;</code></span>, <span id="dt-ab5b94300c411207ffda"><code>&#34;eTSEC&#34;</code></span>

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

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

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

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

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

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

<a id="dt-2efe70314a961a652abe"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-01d9ce7fc56f712455be"></a> <span id="dt-94d3735d14e27e2d7df1"><code>1</code></span>, <span id="dt-0dda607ef98de398e3f7"><code>2</code></span>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-11f8fcdf7ed0ce5274ad"></a> <span id="dt-1df5884131042d9f2b35"><code>1</code></span>, <span id="dt-0d778c9f0ef0966b501c"><code>2</code></span>

<a id="dt-19cbc5b7e5dabb16c580"></a>

### <code>cell&#45;index</code> — not listed as required here

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

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

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

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

<a id="dt-985aed94c3a5de8e946a"></a>

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

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

**Item 1**

> <div id="dt-094ee990c529b33ab668">
> <p style="white-space: pre-wrap">Transmit interrupt or single combined interrupt</p>
> </div>

<a id="dt-14fdf3275cf454d3c593"></a>

**Item 2**

> <div id="dt-f26fcb0c97f34db34fe4">
> <p style="white-space: pre-wrap">Receive interrupt</p>
> </div>

<a id="dt-6825e597892563d56556"></a>

**Item 3**

> <div id="dt-2c85367ad575dfda8b35">
> <p style="white-space: pre-wrap">Error interrupt</p>
> </div>

<a id="dt-4603ee192633e8dffc49"></a>

### <code>dma&#45;coherent</code> — not listed as required here

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

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

### <code>fsl&#44;magic&#45;packet</code> — not listed as required here

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

<div id="dt-bab1e4e1b597c172df72">
<p style="white-space: pre-wrap">If present, indicates that the hardware supports waking up via magic packet.</p>
</div>

<a id="dt-2fc82838d4056596ced9"></a>

### <code>fsl&#44;wake&#45;on&#45;filer</code> — not listed as required here

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

<div id="dt-c332ee130f9af0b09606">
<p style="white-space: pre-wrap">If present, indicates that the hardware supports waking up by Filer General Purpose Interrupt (FGPI) asserted on the Rx int line. This is an advanced power management capability allowing certain packet types (user) defined by filer rules to wake up the system.</p>
</div>

<a id="dt-0225588d66ec8dad25ad"></a>

### <code>bd&#45;stash</code> — not listed as required here

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

<div id="dt-7d980819c0cfa958d43a">
<p style="white-space: pre-wrap">If present, indicates that the hardware supports stashing buffer descriptors in the L2.</p>
</div>

<a id="dt-071babec466f4307d5c2"></a>

### <code>rx&#45;stash&#45;len</code> — not listed as required here

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

<div id="dt-e91632057e3b8d5d9a1c">
<p style="white-space: pre-wrap">Denotes the number of bytes of a received buffer to stash in the L2.</p>
</div>

<a id="dt-3a52895b14795d9ccc82"></a>

### <code>rx&#45;stash&#45;idx</code> — not listed as required here

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

<div id="dt-61a6d186e05acbf0f84b">
<p style="white-space: pre-wrap">Denotes the index of the first byte from the received buffer to stash in the L2.</p>
</div>

<a id="dt-6559e7fe83bbd0c22149"></a>

### <code>fsl&#44;num&#95;rx&#95;queues</code> — not listed as required here

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

<div id="dt-71ce8e22905020c48d63">
<p style="white-space: pre-wrap">Number of receive queues</p>
</div>

**Exact value (<code>const</code>):** <span id="dt-005ab87e4acf2c5b3101"><code>8</code></span>

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

### <code>fsl&#44;num&#95;tx&#95;queues</code> — not listed as required here

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

<div id="dt-3a15e7fcfa0fbb2e7da4">
<p style="white-space: pre-wrap">Number of transmit queues</p>
</div>

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

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

### <code>tbi&#45;handle</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1cf2285bb2a58645ac3d">[<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-800a1cac74187885d0d9">
<p style="white-space: pre-wrap">Reference (phandle) to the TBI node</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;model&#34;</code></span>

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

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

<a id="dt-75cf817a0589e577a38e"></a>

### <code>&#94;mdio&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-14fffc75a65751445e82">[<code>&#47;schemas&#47;net&#47;fsl&#44;gianfar&#45;mdio&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/fsl-gianfar-mdio.md#dt-root>)</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>ethernet&#45;controller&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/ethernet-controller.md#dt-root>)</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**
> >
> > <a id="dt-d1402748b5f4caf0b18a"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-9b74ad9882646c4a5116"><code>&#34;fsl&#44;etsec2&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-8b91e530d80f7cc46df3"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-82a89cacc15af664350f"></a>
> >
> > **<code>&#94;queue&#45;group&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression**
> >
> > **Value type (<code>type</code>):** <span id="dt-11053922f0813623267c"><code>&#34;object&#34;</code></span>
> >
> > <a id="dt-eaf007fd60a1f33696d9"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-af785f37710b75949f21"></a>
> >
> > **<code>reg</code> — required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-6745917db1c0d3f04e38"><code>1</code></span>
> >
> > <a id="dt-e8d634744f79ad2b5aaa"></a>
> >
> > **<code>interrupts</code> — required here**
> >
> > <a id="dt-be93ef4bbd28f21fad01"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-0cfe7e8663b55354d5c1"></a>
> >
> > **Item 1**
> >
> > > <div id="dt-1d41d45208153be2bf6d">
> > > <p style="white-space: pre-wrap">Transmit interrupt</p>
> > > </div>
> >
> > <a id="dt-640552dd0dd3a3345d7b"></a>
> >
> > **Item 2**
> >
> > > <div id="dt-80961312c4058867583a">
> > > <p style="white-space: pre-wrap">Receive interrupt</p>
> > > </div>
> >
> > <a id="dt-56cc266022355b5c67dc"></a>
> >
> > **Item 3**
> >
> > > <div id="dt-8275fc644a035af0b68a">
> > > <p style="white-space: pre-wrap">Error interrupt</p>
> > > </div>
> >
> > **Required in this object (<code>required</code>):** <a id="dt-2ca9782206b4c08caa48"></a> <span id="dt-ea8e434ad629832b078f"><code>&#34;reg&#34;</code></span>, <span id="dt-6744d6f77744318714aa"><code>&#34;interrupts&#34;</code></span>
> >
> > <a id="dt-4cd1664a09749b830650"></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-56ef1e95d4edd6e6f24c"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-fa517e64e1a26bde5333"></a> <span id="dt-3f0dc1b361e0cd17ff53"><code>&#34;reg&#34;</code></span>

<a id="dt-317510ea5c8bf789ca60"></a>

### Rule 3

> <a id="dt-15ef78abba37234c7e3a"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-81c13bb46c56768b42c8"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-fdf8357a2aa88f4480bf"></a>
> >
> > **<code>model</code> — not listed as required here**
> >
> > <a id="dt-98f3453148bddc67db30"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-1b2e73a194c050ad0695"></a> <span id="dt-e2d4ff4751a692b9ee38"><code>&#34;TSEC&#34;</code></span>, <span id="dt-baae9f32ca219dabb096"><code>&#34;eTSEC&#34;</code></span>
>
> <a id="dt-86c371e5831ff1f84ce5"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-4b2e0558620eefde94e1"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-3a46c9d3a981c9cf87fd"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > <a id="dt-23f0ba8b8eaba2447950"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-0a39c3e674d2d7e538bd"></a>
> >
> > **Item 1**
> >
> > > <div id="dt-6a9eecf190b1cf0b5933">
> > > <p style="white-space: pre-wrap">Transmit interrupt</p>
> > > </div>
> >
> > <a id="dt-0da999ad1daac1f50120"></a>
> >
> > **Item 2**
> >
> > > <div id="dt-0729efbf4e7b1dc2716d">
> > > <p style="white-space: pre-wrap">Receive interrupt</p>
> > > </div>
> >
> > <a id="dt-7624777d59dad05f1a7e"></a>
> >
> > **Item 3**
> >
> > > <div id="dt-8eabab31cea65a1a5e77">
> > > <p style="white-space: pre-wrap">Error interrupt</p>
> > > </div>

<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">ethernet@24000 {
    device_type = "network";
    model = "TSEC";
    compatible = "gianfar";
    reg = &lt;0x24000 0x1000&gt;;
    local-mac-address = [ 00 00 00 00 00 00 ];
    interrupts = &lt;29 2&gt;, &lt;30 2&gt;, &lt;34 2&gt;;
    interrupt-parent = &lt;&amp;mpic&gt;;
    phy-handle = &lt;&amp;phy0&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

ethernet@24000 {
    compatible = "gianfar";
    reg = &lt;0x24000 0x1000&gt;;
    ranges = &lt;0x0 0x24000 0x1000&gt;;
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;
    cell-index = &lt;0&gt;;
    device_type = "network";
    model = "eTSEC";
    local-mac-address = [ 00 00 00 00 00 00 ];
    interrupts = &lt;32 IRQ_TYPE_LEVEL_LOW&gt;,
                 &lt;33 IRQ_TYPE_LEVEL_LOW&gt;,
                 &lt;34 IRQ_TYPE_LEVEL_LOW&gt;;
    interrupt-parent = &lt;&amp;ipic&gt;;

    mdio@520 {
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;
        compatible = "fsl,gianfar-mdio";
        reg = &lt;0x520 0x20&gt;;
    };
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

bus {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    ethernet {
        compatible = "fsl,etsec2";
        ranges;
        device_type = "network";
        #address-cells = &lt;2&gt;;
        #size-cells = &lt;2&gt;;
        interrupt-parent = &lt;&amp;gic&gt;;
        model = "eTSEC";
        fsl,magic-packet;
        dma-coherent;

        queue-group@2d10000 {
            reg = &lt;0x0 0x2d10000 0x0 0x1000&gt;;
            interrupts = &lt;GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH&gt;,
                         &lt;GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH&gt;,
                         &lt;GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH&gt;;
        };

        queue-group@2d14000  {
            reg = &lt;0x0 0x2d14000 0x0 0x1000&gt;;
            interrupts = &lt;GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH&gt;,
                         &lt;GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH&gt;,
                         &lt;GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH&gt;;
        };
    };
};
</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</span></p>

<p id="dt-comment-1"><strong>Line 12:</strong> <span> This is needed to distinguish gianfar.yaml and gianfar-mdio.yaml, because</span></p>

<p id="dt-comment-2"><strong>Line 13:</strong> <span> both use compatible = "gianfar" (with different device_type values)</span></p>

<p id="dt-comment-3"><strong>Line 125:</strong> <span> eTSEC2 controller nodes have "queue group" subnodes and don't need a "reg"</span></p>

<p id="dt-comment-4"><strong>Line 126:</strong> <span> property.</span></p>

<p id="dt-comment-5"><strong>Line 156:</strong> <span> TSEC and eTSEC devices require three interrupts</span></p>

</details>
