# MDIO on GPIOs

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

> Device-tree binding reference for MDIO on GPIOs.

<!-- 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;mdio&#45;gpio&#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;Heiner Kallweit &#60;hkallweit1&#64;gmail&#46;com&#62;&#34;</code></span>, <span id="dt-2f1516674166ff6e66b8"><code>&#34;Russell King &#60;linux&#64;armlinux&#46;org&#46;uk&#62;&#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-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;virtual&#44;mdio&#45;gpio&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;microchip&#44;mdio&#45;smi0&#34;</code></span>

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

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

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

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

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

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

<a id="dt-6423357510c4f559d9df"></a>

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-aa7577d23b35bf762b02"><code>2</code></span>

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

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

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

**Item 1**

> <div id="dt-4c4ea268e25fe6fbc567">
> <p style="white-space: pre-wrap">MDC</p>
> </div>

<a id="dt-690ec930bdf6e80a22a3"></a>

**Item 2**

> <div id="dt-04253733744f2f12cd47">
> <p style="white-space: pre-wrap">MDIO</p>
> </div>

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

**Item 3**

> <div id="dt-f6fce015e2d6c65fc404">
> <p style="white-space: pre-wrap">MDO</p>
> </div>

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

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

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

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">aliases {
    mdio-gpio0 = &amp;mdio0;
};

mdio0: mdio {
  compatible = "virtual,mdio-gpio";
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  gpios = &lt;&amp;qe_pio_a 11&gt;,
          &lt;&amp;qe_pio_c 6&gt;;
  ethphy0: 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 36:</strong> <span> Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"</span></p>

<p id="dt-comment-2"><strong>Line 37:</strong> <span> node.</span></p>

</details>
