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