xref: /openbmc/linux/Documentation/devicetree/bindings/net/ethernet-controller.yaml (revision f019679ea5f2ab650c3348a79e7d9c3625f62899)
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  label:
17    $ref: /schemas/types.yaml#/definitions/string
18    description: Human readable label on a port of a box.
19
20  local-mac-address:
21    description:
22      Specifies the MAC address that was assigned to the network device.
23    $ref: /schemas/types.yaml#/definitions/uint8-array
24    minItems: 6
25    maxItems: 6
26
27  mac-address:
28    description:
29      Specifies the MAC address that was last used by the boot
30      program; should be used in cases where the MAC address assigned
31      to the device by the boot program is different from the
32      local-mac-address property.
33    $ref: /schemas/types.yaml#/definitions/uint8-array
34    minItems: 6
35    maxItems: 6
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-cell-names:
55    const: mac-address
56
57  phy-connection-type:
58    description:
59      Specifies interface type between the Ethernet device and a physical
60      layer (PHY) device.
61    enum:
62      # There is not a standard bus between the MAC and the PHY,
63      # something proprietary is being used to embed the PHY in the
64      # MAC.
65      - internal
66      - mii
67      - gmii
68      - sgmii
69      - qsgmii
70      - tbi
71      - rev-mii
72      - rmii
73      - rev-rmii
74      - moca
75
76      # RX and TX delays are added by the MAC when required
77      - rgmii
78
79      # RGMII with internal RX and TX delays provided by the PHY,
80      # the MAC should not add the RX or TX delays in this case
81      - rgmii-id
82
83      # RGMII with internal RX delay provided by the PHY, the MAC
84      # should not add an RX delay in this case
85      - rgmii-rxid
86
87      # RGMII with internal TX delay provided by the PHY, the MAC
88      # should not add an TX delay in this case
89      - rgmii-txid
90      - rtbi
91      - smii
92      - xgmii
93      - trgmii
94      - 1000base-x
95      - 2500base-x
96      - 5gbase-r
97      - rxaui
98      - xaui
99
100      # 10GBASE-KR, XFI, SFI
101      - 10gbase-kr
102      - usxgmii
103      - 10gbase-r
104      - 25gbase-r
105
106  phy-mode:
107    $ref: "#/properties/phy-connection-type"
108
109  pcs-handle:
110    $ref: /schemas/types.yaml#/definitions/phandle
111    description:
112      Specifies a reference to a node representing a PCS PHY device on a MDIO
113      bus to link with an external PHY (phy-handle) if exists.
114
115  phy-handle:
116    $ref: /schemas/types.yaml#/definitions/phandle
117    description:
118      Specifies a reference to a node representing a PHY device.
119
120  phy:
121    $ref: "#/properties/phy-handle"
122    deprecated: true
123
124  phy-device:
125    $ref: "#/properties/phy-handle"
126    deprecated: true
127
128  rx-fifo-depth:
129    $ref: /schemas/types.yaml#/definitions/uint32
130    description:
131      The size of the controller\'s receive fifo in bytes. This is used
132      for components that can have configurable receive fifo sizes,
133      and is useful for determining certain configuration settings
134      such as flow control thresholds.
135
136  sfp:
137    $ref: /schemas/types.yaml#/definitions/phandle
138    description:
139      Specifies a reference to a node representing a SFP cage.
140
141  tx-fifo-depth:
142    $ref: /schemas/types.yaml#/definitions/uint32
143    description:
144      The size of the controller\'s transmit fifo in bytes. This
145      is used for components that can have configurable fifo sizes.
146
147  managed:
148    description:
149      Specifies the PHY management type. If auto is set and fixed-link
150      is not specified, it uses MDIO for management.
151    $ref: /schemas/types.yaml#/definitions/string
152    default: auto
153    enum:
154      - auto
155      - in-band-status
156
157  fixed-link:
158    allOf:
159      - if:
160          type: array
161        then:
162          deprecated: true
163          items:
164            - minimum: 0
165              maximum: 31
166              description:
167                Emulated PHY ID, choose any but unique to the all
168                specified fixed-links
169
170            - enum: [0, 1]
171              description:
172                Duplex configuration. 0 for half duplex or 1 for
173                full duplex
174
175            - enum: [10, 100, 1000, 2500, 10000]
176              description:
177                Link speed in Mbits/sec.
178
179            - enum: [0, 1]
180              description:
181                Pause configuration. 0 for no pause, 1 for pause
182
183            - enum: [0, 1]
184              description:
185                Asymmetric pause configuration. 0 for no asymmetric
186                pause, 1 for asymmetric pause
187
188
189      - if:
190          type: object
191        then:
192          properties:
193            speed:
194              description:
195                Link speed.
196              $ref: /schemas/types.yaml#/definitions/uint32
197              enum: [10, 100, 1000, 2500, 10000]
198
199            full-duplex:
200              $ref: /schemas/types.yaml#/definitions/flag
201              description:
202                Indicates that full-duplex is used. When absent, half
203                duplex is assumed.
204
205            pause:
206              $ref: /schemas/types.yaml#definitions/flag
207              description:
208                Indicates that pause should be enabled.
209
210            asym-pause:
211              $ref: /schemas/types.yaml#/definitions/flag
212              description:
213                Indicates that asym_pause should be enabled.
214
215            link-gpios:
216              maxItems: 1
217              description:
218                GPIO to determine if the link is up
219
220          required:
221            - speed
222
223allOf:
224  - if:
225      properties:
226        phy-mode:
227          contains:
228            enum:
229              - rgmii
230              - rgmii-rxid
231              - rgmii-txid
232              - rgmii-id
233    then:
234      properties:
235        rx-internal-delay-ps:
236          description:
237            RGMII Receive Clock Delay defined in pico seconds.This is used for
238            controllers that have configurable RX internal delays. If this
239            property is present then the MAC applies the RX delay.
240        tx-internal-delay-ps:
241          description:
242            RGMII Transmit Clock Delay defined in pico seconds.This is used for
243            controllers that have configurable TX internal delays. If this
244            property is present then the MAC applies the TX delay.
245
246additionalProperties: true
247
248...
249