Aeonsemi AS21XXX Ethernet PHY

Schema identifier ($id): "http://devicetree.org/schemas/net/aeonsemi,as21xxx.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Christian Marangi <ansuelsmth@gmail.com>"

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.

A PHY with not firmware loaded will be exposed on the MDIO bus with ID 0x7500 0x7500 or 0x7500 0x9410 on C45 registers.

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.

Each PHY can support up to 5 LEDs.

AS2xxx PHY Name logic:

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

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): ethernet-phy.yaml#

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

Allowed values (enum): "ethernet-phy-id7500.9410", "ethernet-phy-id7500.9402", "ethernet-phy-id7500.9412", "ethernet-phy-id7500.9422", "ethernet-phy-id7500.9432", "ethernet-phy-id7500.9442", "ethernet-phy-id7500.9452", "ethernet-phy-id7500.9462", "ethernet-phy-id7500.9472", "ethernet-phy-id7500.9482", "ethernet-phy-id7500.9492"

Required in this object (required): "compatible"

Properties and child nodes (properties) #

reg — required here #

Maximum number of items (maxItems): 1

firmware-name — not listed as required here #

specify the name of PHY firmware to load

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg"

Condition (if) #

Properties and child nodes (properties) #

compatible — not listed as required here #

Rule for matching array elements (contains)

Exact value (const): "ethernet-phy-id7500.9410"

When the condition matches (then) #

Required in this object (required): "firmware-name"

When the condition does not match (else) #

Properties and child nodes (properties) #

firmware-name — not listed as required here #

false — Not permitted by this property rule.

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/leds/common.h>

mdio {
    #address-cells = <1>;
    #size-cells = <0>;

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

        reg = <31>;
        firmware-name = "as21x1x_fw.bin";

        leds {
            #address-cells = <1>;
            #size-cells = <0>;

            led@0 {
                reg = <0>;
                color = <LED_COLOR_ID_GREEN>;
                function = LED_FUNCTION_LAN;
                function-enumerator = <0>;
                default-state = "keep";
            };

            led@1 {
                reg = <1>;
                color = <LED_COLOR_ID_GREEN>;
                function = LED_FUNCTION_LAN;
                function-enumerator = <1>;
                default-state = "keep";
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page