summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/net/airoha,an8801.yaml
blob: d6e5a60a6b20cd6a074422f1b02027bbdcab34fe (plain)
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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/airoha,an8801.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Airoha AN8801R Series PHY

maintainers:
  - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

description:
  The Airoha AN8801R is a low power single-port Ethernet PHY Transceiver
  with Single-port serdes interface for 1000Base-X/RGMII; this chip is
  compliant with 10Base-T, 100Base-TX and 1000Base-T IEEE 802.3(u,ab)
  and supports Energy Efficient Ethernet (802.3az), Full Duplex Control
  Flow (802.3x), auto-negotiation, crossover detect and autocorrection,
  Wake-on-LAN with Magic Packet, and Jumbo Frame up to 9 Kilobytes.
  This PHY also supports up to three user-configurable LEDs, which are
  usually used for LAN Activity, 100M, 1000M indication.

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

properties:
  compatible:
    enum:
      - ethernet-phy-idc0ff.0421

  reg:
    maxItems: 1

  leds:
    type: object
    description:
      Describes the LEDs associated to the PHY

    properties:
      "#address-cells":
        const: 1

      "#size-cells":
        const: 0

    patternProperties:
      "^led@[0-2]$":
        type: object
        description: PHY LEDs
        $ref: /schemas/leds/common.yaml#

        properties:
          reg:
            enum: [0, 1, 2]

          function-enumerator:
            enum: [0, 1, 2]
            description: |
              Specifies a function for offloading LED functionality to the PHY:
              0 - No offloading
              1 - Link Availability
              2 - Network Activity

        required:
          - reg

        unevaluatedProperties: false

    additionalProperties: false

  wakeup-source:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      Enable Wake-on-LAN support

required:
  - reg

unevaluatedProperties: false

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

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

        ethernet-phy@0 {
            compatible = "ethernet-phy-idc0ff.0421";
            reg = <0>;

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

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

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

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