# Aeonsemi AS21XXX Ethernet PHY

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

> Device-tree binding reference for Aeonsemi AS21XXX Ethernet PHY.

<!-- 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;aeonsemi&#44;as21xxx&#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;Christian Marangi &#60;ansuelsmth&#64;gmail&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Aeonsemi AS21xxx Ethernet PHYs requires a firmware to be loaded to actually
work. The same firmware is compatible with various PHYs of the same family.</p>
<p style="white-space: pre-wrap">A PHY with not firmware loaded will be exposed on the MDIO bus with ID
0x7500 0x7500 or 0x7500 0x9410 on C45 registers.</p>
<pre><code>This can be done and is implemented by OEM in 2 different way:
  - Attached SPI flash directly to the PHY with the firmware. The PHY
    will self load the firmware in the presence of this configuration.
  - Manually provided firmware loaded from a file in the filesystem.</code></pre>
<p style="white-space: pre-wrap">Each PHY can support up to 5 LEDs.</p>
<p style="white-space: pre-wrap">AS2xxx PHY Name logic:</p>
<pre><code>AS21x1xxB1
    ^ ^^
    | |J: Supports SyncE/PTP
    | |P: No SyncE/PTP support
    | 1: Supports 2nd Serdes
    | 2: Not 2nd Serdes support
    0: 10G, 5G, 2.5G
    5: 5G, 2.5G
    2: 2.5G</code></pre>
</div>

<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;phy&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-net/ethernet-phy.md#dt-root>)</span>

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

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

> <a id="dt-54d143fae2406295c883"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-e3400bab629503b08322"></a>
>
> #### <code>compatible</code> — required here
>
> <a id="dt-2ae4f0f9580bb5b2e406"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-ce9b069a8031ff280c23"></a> <span id="dt-e79f31d4eec3cf736314"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9410&#34;</code></span>, <span id="dt-b228f13d1a3291d89dd4"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9402&#34;</code></span>, <span id="dt-cc3d5823015e494170a8"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9412&#34;</code></span>, <span id="dt-dcbe8fc5e23061e20c12"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9422&#34;</code></span>, <span id="dt-2b76aa372dcff21d79e8"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9432&#34;</code></span>, <span id="dt-0434967cb0b9d7e605bd"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9442&#34;</code></span>, <span id="dt-7a26ac8bf7c1d12397b0"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9452&#34;</code></span>, <span id="dt-7110f94876a84a79b55d"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9462&#34;</code></span>, <span id="dt-4e102f85409957329aa6"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9472&#34;</code></span>, <span id="dt-0a2d2dfdc364c76dab6a"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9482&#34;</code></span>, <span id="dt-3279671b9d06d2c84a29"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9492&#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-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-b913167a56819d67f1a5"></a>

### <code>firmware&#45;name</code> — not listed as required here

<div id="dt-0b76b2c415d449884d95">
<p style="white-space: pre-wrap">specify the name of PHY firmware to load</p>
</div>

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

**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-158e3f6339df9dc0e448"></a>

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

> <a id="dt-0c7b6d12024f922c1b96"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-824fdc441f7c94ae56ca"></a>
>
> #### <code>compatible</code> — not listed as required here
>
> <a id="dt-8239149d6c8b0a5dabbe"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-0259836b095562054cc8"><code>&#34;ethernet&#45;phy&#45;id7500&#46;9410&#34;</code></span>

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

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

> **Required in this object (<code>required</code>):** <a id="dt-824165741bab07e919e7"></a> <span id="dt-0be16f81402541b26aff"><code>&#34;firmware&#45;name&#34;</code></span>

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

## When the condition does not match (<code>else</code>)

> <a id="dt-cf075a4b84ee9b101feb"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-fe764ae1bd55a1855efe"></a>
>
> #### <code>firmware&#45;name</code> — not listed as required here
>
> <code>false</code> — Not permitted by this property rule.

<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/leds/common.h&gt;

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

    ethernet-phy@1f {
        compatible = "ethernet-phy-id7500.9410",
                     "ethernet-phy-ieee802.3-c45";

        reg = &lt;31&gt;;
        firmware-name = "as21x1x_fw.bin";

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

            led@0 {
                reg = &lt;0&gt;;
                color = &lt;LED_COLOR_ID_GREEN&gt;;
                function = LED_FUNCTION_LAN;
                function-enumerator = &lt;0&gt;;
                default-state = "keep";
            };

            led@1 {
                reg = &lt;1&gt;;
                color = &lt;LED_COLOR_ID_GREEN&gt;;
                function = LED_FUNCTION_LAN;
                function-enumerator = &lt;1&gt;;
                default-state = "keep";
            };
        };
    };
};
</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>

</details>
