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
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      - 5gbase-r
94      - rxaui
95      - xaui
96
97      # 10GBASE-KR, XFI, SFI
98      - 10gbase-kr
99      - usxgmii
100      - 10gbase-r
101      - 25gbase-r
102
103  phy-mode:
104    $ref: "#/properties/phy-connection-type"
105
106  phy-handle:
107    $ref: /schemas/types.yaml#/definitions/phandle
108    description:
109      Specifies a reference to a node representing a PHY device.
110
111  phy:
112    $ref: "#/properties/phy-handle"
113    deprecated: true
114
115  phy-device:
116    $ref: "#/properties/phy-handle"
117    deprecated: true
118
119  rx-fifo-depth:
120    $ref: /schemas/types.yaml#/definitions/uint32
121    description:
122      The size of the controller\'s receive fifo in bytes. This is used
123      for components that can have configurable receive fifo sizes,
124      and is useful for determining certain configuration settings
125      such as flow control thresholds.
126
127  rx-internal-delay-ps:
128    description: |
129      RGMII Receive Clock Delay defined in pico seconds.
130      This is used for controllers that have configurable RX internal delays.
131      If this property is present then the MAC applies the RX delay.
132
133  sfp:
134    $ref: /schemas/types.yaml#/definitions/phandle
135    description:
136      Specifies a reference to a node representing a SFP cage.
137
138  tx-fifo-depth:
139    $ref: /schemas/types.yaml#/definitions/uint32
140    description:
141      The size of the controller\'s transmit fifo in bytes. This
142      is used for components that can have configurable fifo sizes.
143
144  tx-internal-delay-ps:
145    description: |
146      RGMII Transmit Clock Delay defined in pico seconds.
147      This is used for controllers that have configurable TX internal delays.
148      If this property is present then the MAC applies the TX delay.
149
150  managed:
151    description:
152      Specifies the PHY management type. If auto is set and fixed-link
153      is not specified, it uses MDIO for management.
154    $ref: /schemas/types.yaml#/definitions/string
155    default: auto
156    enum:
157      - auto
158      - in-band-status
159
160  fixed-link:
161    allOf:
162      - if:
163          type: array
164        then:
165          deprecated: true
166          minItems: 1
167          maxItems: 1
168          items:
169            items:
170              - minimum: 0
171                maximum: 31
172                description:
173                  Emulated PHY ID, choose any but unique to the all
174                  specified fixed-links
175
176              - enum: [0, 1]
177                description:
178                  Duplex configuration. 0 for half duplex or 1 for
179                  full duplex
180
181              - enum: [10, 100, 1000]
182                description:
183                  Link speed in Mbits/sec.
184
185              - enum: [0, 1]
186                description:
187                  Pause configuration. 0 for no pause, 1 for pause
188
189              - enum: [0, 1]
190                description:
191                  Asymmetric pause configuration. 0 for no asymmetric
192                  pause, 1 for asymmetric pause
193
194
195      - if:
196          type: object
197        then:
198          properties:
199            speed:
200              description:
201                Link speed.
202              $ref: /schemas/types.yaml#/definitions/uint32
203              enum: [10, 100, 1000]
204
205            full-duplex:
206              $ref: /schemas/types.yaml#/definitions/flag
207              description:
208                Indicates that full-duplex is used. When absent, half
209                duplex is assumed.
210
211            pause:
212              $ref: /schemas/types.yaml#definitions/flag
213              description:
214                Indicates that pause should be enabled.
215
216            asym-pause:
217              $ref: /schemas/types.yaml#/definitions/flag
218              description:
219                Indicates that asym_pause should be enabled.
220
221            link-gpios:
222              maxItems: 1
223              description:
224                GPIO to determine if the link is up
225
226          required:
227            - speed
228
229additionalProperties: true
230
231...
232