# Freescale Gianfar (TSEC) MDIO Device

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

> Device-tree binding reference for Freescale Gianfar (TSEC) MDIO Device.

<!-- 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;fsl&#44;gianfar&#45;mdio&#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">This binding describes the MDIO is a bus to which the PHY devices are connected. For each device that exists on this bus, a child node should be created.
Some TSECs are associated with an internal Ten-Bit Interface (TBI) PHY. This PHY is accessed through the local MDIO bus. These buses are defined similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi". The TBI PHYs underneath them are similar to normal PHYs, but the reg property is considered instructive, rather than descriptive. The reg property should be chosen so it doesn't interfere with other PHYs on the bus.</p>
</div>

**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;mdio&#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**
> >
> > <a id="dt-b1552e19ec991b63c205"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-21d2b88e26180a30ceac"></a> <span id="dt-0aa59650917fd5f1dfca"><code>&#34;fsl&#44;gianfar&#45;tbi&#34;</code></span>, <span id="dt-18dee4d0f1c867c2a216"><code>&#34;fsl&#44;gianfar&#45;mdio&#34;</code></span>, <span id="dt-1ca993a81beaf5a42b2d"><code>&#34;fsl&#44;etsec2&#45;tbi&#34;</code></span>, <span id="dt-e8a8c494b7ade583ec49"><code>&#34;fsl&#44;etsec2&#45;mdio&#34;</code></span>, <span id="dt-ce32494d89b1e15bdb94"><code>&#34;fsl&#44;ucc&#45;mdio&#34;</code></span>, <span id="dt-3a8ad692fa4d05015344"><code>&#34;ucc&#95;geth&#95;phy&#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> — not listed as required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;fsl&#44;gianfar&#45;tbi&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;fsl&#44;gianfar&#45;mdio&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;fsl&#44;etsec2&#45;tbi&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;fsl&#44;etsec2&#45;mdio&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;fsl&#44;ucc&#45;mdio&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;gianfar&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;ucc&#95;geth&#95;phy&#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>

<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">Offset and length of the register set for the device</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">Optionally, the offset and length of the TBIPA register (TBI PHY address register). If TBIPA register is not specified, the driver will attempt to infer it from the register set specified (your mileage may vary).</p>
> </div>

<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;mdio&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;reg&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;size&#45;cells&#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>mdio&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/mdio.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;ucc&#95;geth&#95;phy&#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;device&#95;type&#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">soc {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    mdio@24520 {
        reg = &lt;0x24520 0x20&gt;;
        compatible = "fsl,gianfar-mdio";
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;

        ethernet-phy@0 {
            reg = &lt;0&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-only OR BSD-2-Clause)</span></p>

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

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

</details>
