Documentation / devicetree / bindings / net / aeonsemi,as21xxx.yaml


Based on kernel version 6.16. Page generated on 2025-08-06 08:57 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/aeonsemi,as21xxx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Aeonsemi AS21XXX Ethernet PHY

maintainers:
  - Christian Marangi <ansuelsmth@gmail.com>

description: |
  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

allOf:
  - $ref: ethernet-phy.yaml#

select:
  properties:
    compatible:
      contains:
        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:
    - compatible

properties:
  reg:
    maxItems: 1

  firmware-name:
    description: specify the name of PHY firmware to load
    maxItems: 1

required:
  - compatible
  - reg

if:
  properties:
    compatible:
      contains:
        const: ethernet-phy-id7500.9410
then:
  required:
    - firmware-name
else:
  properties:
    firmware-name: false

unevaluatedProperties: false

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";
                };
            };
        };
    };