1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/ethernet-controller.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ethernet Controller Generic Binding
8
9maintainers:
10  - David S. Miller <davem@davemloft.net>
11
12properties:
13  $nodename:
14    pattern: "^ethernet(@.*)?$"
15
16  local-mac-address:
17    description:
18      Specifies the MAC address that was assigned to the network device.
19    $ref: /schemas/types.yaml#/definitions/uint8-array
20    items:
21      - minItems: 6
22        maxItems: 6
23
24  mac-address:
25    description:
26      Specifies the MAC address that was last used by the boot
27      program; should be used in cases where the MAC address assigned
28      to the device by the boot program is different from the
29      local-mac-address property.
30    $ref: /schemas/types.yaml#/definitions/uint8-array
31    items:
32      - minItems: 6
33        maxItems: 6
34
35  max-frame-size:
36    $ref: /schemas/types.yaml#/definitions/uint32
37    description:
38      Maximum transfer unit (IEEE defined MTU), rather than the
39      maximum frame size (there\'s contradiction in the Devicetree
40      Specification).
41
42  max-speed:
43    $ref: /schemas/types.yaml#/definitions/uint32
44    description:
45      Specifies maximum speed in Mbit/s supported by the device.
46
47  nvmem-cells:
48    maxItems: 1
49    description:
50      Reference to an nvmem node for the MAC address
51
52  nvmem-cell-names:
53    const: mac-address
54
55  phy-connection-type:
56    description:
57      Specifies interface type between the Ethernet device and a physical
58      layer (PHY) device.
59    enum:
60      # There is not a standard bus between the MAC and the PHY,
61      # something proprietary is being used to embed the PHY in the
62      # MAC.
63      - internal
64      - mii
65      - gmii
66      - sgmii
67      - qsgmii
68      - tbi
69      - rev-mii
70      - rmii
71      - rev-rmii
72      - moca
73
74      # RX and TX delays are added by the MAC when required
75      - rgmii
76
77      # RGMII with internal RX and TX delays provided by the PHY,
78      # the MAC should not add the RX or TX delays in this case
79      - rgmii-id
80
81      # RGMII with internal RX delay provided by the PHY, the MAC
82      # should not add an RX delay in this case
83      - rgmii-rxid
84
85      # RGMII with internal TX delay provided by the PHY, the MAC
86      # should not add an TX delay in this case
87      - rgmii-txid
88      - rtbi
89      - smii
90      - xgmii
91      - trgmii
92      - 1000base-x
93      - 2500base-x
94      - 5gbase-r
95      - rxaui
96      - xaui
97
98      # 10GBASE-KR, XFI, SFI
99      - 10gbase-kr
100      - usxgmii
101      - 10gbase-r
102      - 25gbase-r
103
104  phy-mode:
105    $ref: "#/properties/phy-connection-type"
106
107  phy-handle:
108    $ref: /schemas/types.yaml#/definitions/phandle
109    description:
110      Specifies a reference to a node representing a PHY device.
111
112  phy:
113    $ref: "#/properties/phy-handle"
114    deprecated: true
115
116  phy-device:
117    $ref: "#/properties/phy-handle"
118    deprecated: true
119
120  rx-fifo-depth:
121    $ref: /schemas/types.yaml#/definitions/uint32
122    description:
123      The size of the controller\'s receive fifo in bytes. This is used
124      for components that can have configurable receive fifo sizes,
125      and is useful for determining certain configuration settings
126      such as flow control thresholds.
127
128  rx-internal-delay-ps:
129    description: |
130      RGMII Receive Clock Delay defined in pico seconds.
131      This is used for controllers that have configurable RX internal delays.
132      If this property is present then the MAC applies the RX delay.
133
134  sfp:
135    $ref: /schemas/types.yaml#/definitions/phandle
136    description:
137      Specifies a reference to a node representing a SFP cage.
138
139  tx-fifo-depth:
140    $ref: /schemas/types.yaml#/definitions/uint32
141    description:
142      The size of the controller\'s transmit fifo in bytes. This
143      is used for components that can have configurable fifo sizes.
144
145  tx-internal-delay-ps:
146    description: |
147      RGMII Transmit Clock Delay defined in pico seconds.
148      This is used for controllers that have configurable TX internal delays.
149      If this property is present then the MAC applies the TX delay.
150
151  managed:
152    description:
153      Specifies the PHY management type. If auto is set and fixed-link
154      is not specified, it uses MDIO for management.
155    $ref: /schemas/types.yaml#/definitions/string
156    default: auto
157    enum:
158      - auto
159      - in-band-status
160
161  fixed-link:
162    allOf:
163      - if:
164          type: array
165        then:
166          deprecated: true
167          minItems: 1
168          maxItems: 1
169          items:
170            items:
171              - minimum: 0
172                maximum: 31
173                description:
174                  Emulated PHY ID, choose any but unique to the all
175                  specified fixed-links
176
177              - enum: [0, 1]
178                description:
179                  Duplex configuration. 0 for half duplex or 1 for
180                  full duplex
181
182              - enum: [10, 100, 1000, 2500, 10000]
183                description:
184                  Link speed in Mbits/sec.
185
186              - enum: [0, 1]
187                description:
188                  Pause configuration. 0 for no pause, 1 for pause
189
190              - enum: [0, 1]
191                description:
192                  Asymmetric pause configuration. 0 for no asymmetric
193                  pause, 1 for asymmetric pause
194
195
196      - if:
197          type: object
198        then:
199          properties:
200            speed:
201              description:
202                Link speed.
203              $ref: /schemas/types.yaml#/definitions/uint32
204              enum: [10, 100, 1000, 2500, 10000]
205
206            full-duplex:
207              $ref: /schemas/types.yaml#/definitions/flag
208              description:
209                Indicates that full-duplex is used. When absent, half
210                duplex is assumed.
211
212            pause:
213              $ref: /schemas/types.yaml#definitions/flag
214              description:
215                Indicates that pause should be enabled.
216
217            asym-pause:
218              $ref: /schemas/types.yaml#/definitions/flag
219              description:
220                Indicates that asym_pause should be enabled.
221
222            link-gpios:
223              maxItems: 1
224              description:
225                GPIO to determine if the link is up
226
227          required:
228            - speed
229
230additionalProperties: true
231
232...
233