xref: /freebsd/sys/contrib/device-tree/Bindings/net/mediatek,net.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/mediatek,net.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: MediaTek Frame Engine Ethernet controller
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Lorenzo Bianconi <lorenzo@kernel.org>
11d5b0e70fSEmmanuel Vadot  - Felix Fietkau <nbd@nbd.name>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotdescription:
14d5b0e70fSEmmanuel Vadot  The frame engine ethernet controller can be found on MediaTek SoCs. These SoCs
15d5b0e70fSEmmanuel Vadot  have dual GMAC ports.
16d5b0e70fSEmmanuel Vadot
17d5b0e70fSEmmanuel Vadotproperties:
18d5b0e70fSEmmanuel Vadot  compatible:
19d5b0e70fSEmmanuel Vadot    enum:
20d5b0e70fSEmmanuel Vadot      - mediatek,mt2701-eth
21d5b0e70fSEmmanuel Vadot      - mediatek,mt7623-eth
22aa1a8ff2SEmmanuel Vadot      - mediatek,mt7621-eth
23d5b0e70fSEmmanuel Vadot      - mediatek,mt7622-eth
24d5b0e70fSEmmanuel Vadot      - mediatek,mt7629-eth
25fac71e4eSEmmanuel Vadot      - mediatek,mt7981-eth
26d5b0e70fSEmmanuel Vadot      - mediatek,mt7986-eth
27aa1a8ff2SEmmanuel Vadot      - mediatek,mt7988-eth
28d5b0e70fSEmmanuel Vadot      - ralink,rt5350-eth
29d5b0e70fSEmmanuel Vadot
30d5b0e70fSEmmanuel Vadot  reg:
31d5b0e70fSEmmanuel Vadot    maxItems: 1
32d5b0e70fSEmmanuel Vadot
33*b2d2a78aSEmmanuel Vadot  clocks:
34*b2d2a78aSEmmanuel Vadot    minItems: 2
35*b2d2a78aSEmmanuel Vadot    maxItems: 24
36*b2d2a78aSEmmanuel Vadot
37*b2d2a78aSEmmanuel Vadot  clock-names:
38*b2d2a78aSEmmanuel Vadot    minItems: 2
39*b2d2a78aSEmmanuel Vadot    maxItems: 24
40d5b0e70fSEmmanuel Vadot
41d5b0e70fSEmmanuel Vadot  interrupts:
42aa1a8ff2SEmmanuel Vadot    minItems: 1
43d5b0e70fSEmmanuel Vadot    maxItems: 4
44d5b0e70fSEmmanuel Vadot
45d5b0e70fSEmmanuel Vadot  power-domains:
46d5b0e70fSEmmanuel Vadot    maxItems: 1
47d5b0e70fSEmmanuel Vadot
48d5b0e70fSEmmanuel Vadot  resets:
49d5b0e70fSEmmanuel Vadot    maxItems: 3
50d5b0e70fSEmmanuel Vadot
51d5b0e70fSEmmanuel Vadot  reset-names:
52d5b0e70fSEmmanuel Vadot    items:
53d5b0e70fSEmmanuel Vadot      - const: fe
54d5b0e70fSEmmanuel Vadot      - const: gmac
55d5b0e70fSEmmanuel Vadot      - const: ppe
56d5b0e70fSEmmanuel Vadot
57d5b0e70fSEmmanuel Vadot  mediatek,ethsys:
58d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
59d5b0e70fSEmmanuel Vadot    description:
60d5b0e70fSEmmanuel Vadot      Phandle to the syscon node that handles the port setup.
61d5b0e70fSEmmanuel Vadot
62d5b0e70fSEmmanuel Vadot  cci-control-port: true
63d5b0e70fSEmmanuel Vadot
64d5b0e70fSEmmanuel Vadot  mediatek,hifsys:
65d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
66d5b0e70fSEmmanuel Vadot    description:
67d5b0e70fSEmmanuel Vadot      Phandle to the mediatek hifsys controller used to provide various clocks
68d5b0e70fSEmmanuel Vadot      and reset to the system.
69d5b0e70fSEmmanuel Vadot
70aa1a8ff2SEmmanuel Vadot  mediatek,infracfg:
71aa1a8ff2SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
72aa1a8ff2SEmmanuel Vadot    description:
73aa1a8ff2SEmmanuel Vadot      Phandle to the syscon node that handles the path from GMAC to
74aa1a8ff2SEmmanuel Vadot      PHY variants.
75aa1a8ff2SEmmanuel Vadot
760e8011faSEmmanuel Vadot  mediatek,pcie-mirror:
770e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
780e8011faSEmmanuel Vadot    description:
790e8011faSEmmanuel Vadot      Phandle to the mediatek pcie-mirror controller.
800e8011faSEmmanuel Vadot
810e8011faSEmmanuel Vadot  mediatek,pctl:
820e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
830e8011faSEmmanuel Vadot    description:
840e8011faSEmmanuel Vadot      Phandle to the syscon node that handles the ports slew rate and
850e8011faSEmmanuel Vadot      driver current.
860e8011faSEmmanuel Vadot
87d5b0e70fSEmmanuel Vadot  mediatek,sgmiisys:
88d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
89d5b0e70fSEmmanuel Vadot    minItems: 1
90d5b0e70fSEmmanuel Vadot    maxItems: 2
91d5b0e70fSEmmanuel Vadot    items:
92d5b0e70fSEmmanuel Vadot      maxItems: 1
93d5b0e70fSEmmanuel Vadot    description:
94d5b0e70fSEmmanuel Vadot      A list of phandle to the syscon node that handles the SGMII setup which is required for
95d5b0e70fSEmmanuel Vadot      those SoCs equipped with SGMII.
96d5b0e70fSEmmanuel Vadot
977ef62cebSEmmanuel Vadot  mediatek,wed:
987ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
997ef62cebSEmmanuel Vadot    minItems: 2
1007ef62cebSEmmanuel Vadot    maxItems: 2
1017ef62cebSEmmanuel Vadot    items:
1027ef62cebSEmmanuel Vadot      maxItems: 1
1037ef62cebSEmmanuel Vadot    description:
1047ef62cebSEmmanuel Vadot      List of phandles to wireless ethernet dispatch nodes.
1057ef62cebSEmmanuel Vadot
106fac71e4eSEmmanuel Vadot  mediatek,wed-pcie:
107fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
108fac71e4eSEmmanuel Vadot    description:
109fac71e4eSEmmanuel Vadot      Phandle to the mediatek wed-pcie controller.
110fac71e4eSEmmanuel Vadot
111d5b0e70fSEmmanuel Vadot  dma-coherent: true
112d5b0e70fSEmmanuel Vadot
113d5b0e70fSEmmanuel Vadot  mdio-bus:
114d5b0e70fSEmmanuel Vadot    $ref: mdio.yaml#
115d5b0e70fSEmmanuel Vadot    unevaluatedProperties: false
116d5b0e70fSEmmanuel Vadot
117d5b0e70fSEmmanuel Vadot  "#address-cells":
118d5b0e70fSEmmanuel Vadot    const: 1
119d5b0e70fSEmmanuel Vadot
120d5b0e70fSEmmanuel Vadot  "#size-cells":
121d5b0e70fSEmmanuel Vadot    const: 0
122d5b0e70fSEmmanuel Vadot
123d5b0e70fSEmmanuel VadotallOf:
124fac71e4eSEmmanuel Vadot  - $ref: ethernet-controller.yaml#
125d5b0e70fSEmmanuel Vadot  - if:
126d5b0e70fSEmmanuel Vadot      properties:
127d5b0e70fSEmmanuel Vadot        compatible:
128d5b0e70fSEmmanuel Vadot          contains:
129d5b0e70fSEmmanuel Vadot            enum:
130d5b0e70fSEmmanuel Vadot              - mediatek,mt2701-eth
131d5b0e70fSEmmanuel Vadot              - mediatek,mt7623-eth
132d5b0e70fSEmmanuel Vadot    then:
133d5b0e70fSEmmanuel Vadot      properties:
134d5b0e70fSEmmanuel Vadot        interrupts:
135*b2d2a78aSEmmanuel Vadot          minItems: 3
136d5b0e70fSEmmanuel Vadot          maxItems: 3
137d5b0e70fSEmmanuel Vadot
138d5b0e70fSEmmanuel Vadot        clocks:
139d5b0e70fSEmmanuel Vadot          minItems: 4
140d5b0e70fSEmmanuel Vadot          maxItems: 4
141d5b0e70fSEmmanuel Vadot
142d5b0e70fSEmmanuel Vadot        clock-names:
143d5b0e70fSEmmanuel Vadot          items:
144d5b0e70fSEmmanuel Vadot            - const: ethif
145d5b0e70fSEmmanuel Vadot            - const: esw
146d5b0e70fSEmmanuel Vadot            - const: gp1
147d5b0e70fSEmmanuel Vadot            - const: gp2
148d5b0e70fSEmmanuel Vadot
149aa1a8ff2SEmmanuel Vadot        mediatek,infracfg: false
150aa1a8ff2SEmmanuel Vadot
1517ef62cebSEmmanuel Vadot        mediatek,wed: false
1527ef62cebSEmmanuel Vadot
153fac71e4eSEmmanuel Vadot        mediatek,wed-pcie: false
1540e8011faSEmmanuel Vadot    else:
1550e8011faSEmmanuel Vadot      properties:
1560e8011faSEmmanuel Vadot        mediatek,pctl: false
157fac71e4eSEmmanuel Vadot
158d5b0e70fSEmmanuel Vadot  - if:
159d5b0e70fSEmmanuel Vadot      properties:
160d5b0e70fSEmmanuel Vadot        compatible:
161d5b0e70fSEmmanuel Vadot          contains:
162aa1a8ff2SEmmanuel Vadot            enum:
163aa1a8ff2SEmmanuel Vadot              - mediatek,mt7621-eth
164aa1a8ff2SEmmanuel Vadot    then:
165aa1a8ff2SEmmanuel Vadot      properties:
166aa1a8ff2SEmmanuel Vadot        interrupts:
167aa1a8ff2SEmmanuel Vadot          maxItems: 1
168aa1a8ff2SEmmanuel Vadot
169aa1a8ff2SEmmanuel Vadot        clocks:
170aa1a8ff2SEmmanuel Vadot          minItems: 2
171aa1a8ff2SEmmanuel Vadot          maxItems: 2
172aa1a8ff2SEmmanuel Vadot
173aa1a8ff2SEmmanuel Vadot        clock-names:
174aa1a8ff2SEmmanuel Vadot          items:
175aa1a8ff2SEmmanuel Vadot            - const: ethif
176aa1a8ff2SEmmanuel Vadot            - const: fe
177aa1a8ff2SEmmanuel Vadot
178aa1a8ff2SEmmanuel Vadot        mediatek,infracfg: false
179aa1a8ff2SEmmanuel Vadot
180aa1a8ff2SEmmanuel Vadot        mediatek,wed: false
181aa1a8ff2SEmmanuel Vadot
182aa1a8ff2SEmmanuel Vadot        mediatek,wed-pcie: false
183aa1a8ff2SEmmanuel Vadot
184aa1a8ff2SEmmanuel Vadot  - if:
185aa1a8ff2SEmmanuel Vadot      properties:
186aa1a8ff2SEmmanuel Vadot        compatible:
187aa1a8ff2SEmmanuel Vadot          contains:
188d5b0e70fSEmmanuel Vadot            const: mediatek,mt7622-eth
189d5b0e70fSEmmanuel Vadot    then:
190d5b0e70fSEmmanuel Vadot      properties:
191d5b0e70fSEmmanuel Vadot        interrupts:
192*b2d2a78aSEmmanuel Vadot          minItems: 3
193d5b0e70fSEmmanuel Vadot          maxItems: 3
194d5b0e70fSEmmanuel Vadot
195d5b0e70fSEmmanuel Vadot        clocks:
196d5b0e70fSEmmanuel Vadot          minItems: 11
197d5b0e70fSEmmanuel Vadot          maxItems: 11
198d5b0e70fSEmmanuel Vadot
199d5b0e70fSEmmanuel Vadot        clock-names:
200d5b0e70fSEmmanuel Vadot          items:
201d5b0e70fSEmmanuel Vadot            - const: ethif
202d5b0e70fSEmmanuel Vadot            - const: esw
203d5b0e70fSEmmanuel Vadot            - const: gp0
204d5b0e70fSEmmanuel Vadot            - const: gp1
205d5b0e70fSEmmanuel Vadot            - const: gp2
206d5b0e70fSEmmanuel Vadot            - const: sgmii_tx250m
207d5b0e70fSEmmanuel Vadot            - const: sgmii_rx250m
208d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_ref
209d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_fb
210d5b0e70fSEmmanuel Vadot            - const: sgmii_ck
211d5b0e70fSEmmanuel Vadot            - const: eth2pll
212d5b0e70fSEmmanuel Vadot
213aa1a8ff2SEmmanuel Vadot        mediatek,infracfg: false
214aa1a8ff2SEmmanuel Vadot
215d5b0e70fSEmmanuel Vadot        mediatek,sgmiisys:
216d5b0e70fSEmmanuel Vadot          minItems: 1
217d5b0e70fSEmmanuel Vadot          maxItems: 1
218d5b0e70fSEmmanuel Vadot
219fac71e4eSEmmanuel Vadot        mediatek,wed-pcie: false
2200e8011faSEmmanuel Vadot    else:
2210e8011faSEmmanuel Vadot      properties:
2220e8011faSEmmanuel Vadot        mediatek,pcie-mirror: false
223fac71e4eSEmmanuel Vadot
224d5b0e70fSEmmanuel Vadot  - if:
225d5b0e70fSEmmanuel Vadot      properties:
226d5b0e70fSEmmanuel Vadot        compatible:
227d5b0e70fSEmmanuel Vadot          contains:
228d5b0e70fSEmmanuel Vadot            const: mediatek,mt7629-eth
229d5b0e70fSEmmanuel Vadot    then:
230d5b0e70fSEmmanuel Vadot      properties:
231d5b0e70fSEmmanuel Vadot        interrupts:
232*b2d2a78aSEmmanuel Vadot          minItems: 3
233d5b0e70fSEmmanuel Vadot          maxItems: 3
234d5b0e70fSEmmanuel Vadot
235d5b0e70fSEmmanuel Vadot        clocks:
236d5b0e70fSEmmanuel Vadot          minItems: 17
237d5b0e70fSEmmanuel Vadot          maxItems: 17
238d5b0e70fSEmmanuel Vadot
239d5b0e70fSEmmanuel Vadot        clock-names:
240d5b0e70fSEmmanuel Vadot          items:
241d5b0e70fSEmmanuel Vadot            - const: ethif
242d5b0e70fSEmmanuel Vadot            - const: sgmiitop
243d5b0e70fSEmmanuel Vadot            - const: esw
244d5b0e70fSEmmanuel Vadot            - const: gp0
245d5b0e70fSEmmanuel Vadot            - const: gp1
246d5b0e70fSEmmanuel Vadot            - const: gp2
247d5b0e70fSEmmanuel Vadot            - const: fe
248d5b0e70fSEmmanuel Vadot            - const: sgmii_tx250m
249d5b0e70fSEmmanuel Vadot            - const: sgmii_rx250m
250d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_ref
251d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_fb
252d5b0e70fSEmmanuel Vadot            - const: sgmii2_tx250m
253d5b0e70fSEmmanuel Vadot            - const: sgmii2_rx250m
254d5b0e70fSEmmanuel Vadot            - const: sgmii2_cdr_ref
255d5b0e70fSEmmanuel Vadot            - const: sgmii2_cdr_fb
256d5b0e70fSEmmanuel Vadot            - const: sgmii_ck
257d5b0e70fSEmmanuel Vadot            - const: eth2pll
258d5b0e70fSEmmanuel Vadot
259d5b0e70fSEmmanuel Vadot        mediatek,sgmiisys:
260d5b0e70fSEmmanuel Vadot          minItems: 2
261d5b0e70fSEmmanuel Vadot          maxItems: 2
262d5b0e70fSEmmanuel Vadot
2637ef62cebSEmmanuel Vadot        mediatek,wed: false
2647ef62cebSEmmanuel Vadot
265fac71e4eSEmmanuel Vadot        mediatek,wed-pcie: false
266fac71e4eSEmmanuel Vadot
267fac71e4eSEmmanuel Vadot  - if:
268fac71e4eSEmmanuel Vadot      properties:
269fac71e4eSEmmanuel Vadot        compatible:
270fac71e4eSEmmanuel Vadot          contains:
271fac71e4eSEmmanuel Vadot            const: mediatek,mt7981-eth
272fac71e4eSEmmanuel Vadot    then:
273fac71e4eSEmmanuel Vadot      properties:
274fac71e4eSEmmanuel Vadot        interrupts:
275fac71e4eSEmmanuel Vadot          minItems: 4
276fac71e4eSEmmanuel Vadot
277fac71e4eSEmmanuel Vadot        clocks:
278fac71e4eSEmmanuel Vadot          minItems: 15
279fac71e4eSEmmanuel Vadot          maxItems: 15
280fac71e4eSEmmanuel Vadot
281fac71e4eSEmmanuel Vadot        clock-names:
282fac71e4eSEmmanuel Vadot          items:
283fac71e4eSEmmanuel Vadot            - const: fe
284fac71e4eSEmmanuel Vadot            - const: gp2
285fac71e4eSEmmanuel Vadot            - const: gp1
286fac71e4eSEmmanuel Vadot            - const: wocpu0
287fac71e4eSEmmanuel Vadot            - const: sgmii_ck
288fac71e4eSEmmanuel Vadot            - const: sgmii_tx250m
289fac71e4eSEmmanuel Vadot            - const: sgmii_rx250m
290fac71e4eSEmmanuel Vadot            - const: sgmii_cdr_ref
291fac71e4eSEmmanuel Vadot            - const: sgmii_cdr_fb
292fac71e4eSEmmanuel Vadot            - const: sgmii2_tx250m
293fac71e4eSEmmanuel Vadot            - const: sgmii2_rx250m
294fac71e4eSEmmanuel Vadot            - const: sgmii2_cdr_ref
295fac71e4eSEmmanuel Vadot            - const: sgmii2_cdr_fb
296fac71e4eSEmmanuel Vadot            - const: netsys0
297fac71e4eSEmmanuel Vadot            - const: netsys1
298fac71e4eSEmmanuel Vadot
299aa1a8ff2SEmmanuel Vadot        mediatek,infracfg: false
300aa1a8ff2SEmmanuel Vadot
301fac71e4eSEmmanuel Vadot        mediatek,sgmiisys:
302fac71e4eSEmmanuel Vadot          minItems: 2
303fac71e4eSEmmanuel Vadot          maxItems: 2
304fac71e4eSEmmanuel Vadot
305d5b0e70fSEmmanuel Vadot  - if:
306d5b0e70fSEmmanuel Vadot      properties:
307d5b0e70fSEmmanuel Vadot        compatible:
308d5b0e70fSEmmanuel Vadot          contains:
309d5b0e70fSEmmanuel Vadot            const: mediatek,mt7986-eth
310d5b0e70fSEmmanuel Vadot    then:
311d5b0e70fSEmmanuel Vadot      properties:
312d5b0e70fSEmmanuel Vadot        interrupts:
313d5b0e70fSEmmanuel Vadot          minItems: 4
314d5b0e70fSEmmanuel Vadot
315d5b0e70fSEmmanuel Vadot        clocks:
316d5b0e70fSEmmanuel Vadot          minItems: 15
317d5b0e70fSEmmanuel Vadot          maxItems: 15
318d5b0e70fSEmmanuel Vadot
319d5b0e70fSEmmanuel Vadot        clock-names:
320d5b0e70fSEmmanuel Vadot          items:
321d5b0e70fSEmmanuel Vadot            - const: fe
322d5b0e70fSEmmanuel Vadot            - const: gp2
323d5b0e70fSEmmanuel Vadot            - const: gp1
324d5b0e70fSEmmanuel Vadot            - const: wocpu1
325d5b0e70fSEmmanuel Vadot            - const: wocpu0
326d5b0e70fSEmmanuel Vadot            - const: sgmii_tx250m
327d5b0e70fSEmmanuel Vadot            - const: sgmii_rx250m
328d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_ref
329d5b0e70fSEmmanuel Vadot            - const: sgmii_cdr_fb
330d5b0e70fSEmmanuel Vadot            - const: sgmii2_tx250m
331d5b0e70fSEmmanuel Vadot            - const: sgmii2_rx250m
332d5b0e70fSEmmanuel Vadot            - const: sgmii2_cdr_ref
333d5b0e70fSEmmanuel Vadot            - const: sgmii2_cdr_fb
334d5b0e70fSEmmanuel Vadot            - const: netsys0
335d5b0e70fSEmmanuel Vadot            - const: netsys1
336d5b0e70fSEmmanuel Vadot
337aa1a8ff2SEmmanuel Vadot        mediatek,infracfg: false
338aa1a8ff2SEmmanuel Vadot
339aa1a8ff2SEmmanuel Vadot        mediatek,sgmiisys:
340aa1a8ff2SEmmanuel Vadot          minItems: 2
341aa1a8ff2SEmmanuel Vadot          maxItems: 2
342aa1a8ff2SEmmanuel Vadot
343aa1a8ff2SEmmanuel Vadot  - if:
344aa1a8ff2SEmmanuel Vadot      properties:
345aa1a8ff2SEmmanuel Vadot        compatible:
346aa1a8ff2SEmmanuel Vadot          contains:
347aa1a8ff2SEmmanuel Vadot            const: mediatek,mt7988-eth
348aa1a8ff2SEmmanuel Vadot    then:
349aa1a8ff2SEmmanuel Vadot      properties:
350aa1a8ff2SEmmanuel Vadot        interrupts:
351aa1a8ff2SEmmanuel Vadot          minItems: 4
352aa1a8ff2SEmmanuel Vadot
353aa1a8ff2SEmmanuel Vadot        clocks:
35401950c46SEmmanuel Vadot          minItems: 24
35501950c46SEmmanuel Vadot          maxItems: 24
356aa1a8ff2SEmmanuel Vadot
357aa1a8ff2SEmmanuel Vadot        clock-names:
358aa1a8ff2SEmmanuel Vadot          items:
359aa1a8ff2SEmmanuel Vadot            - const: crypto
360aa1a8ff2SEmmanuel Vadot            - const: fe
361aa1a8ff2SEmmanuel Vadot            - const: gp2
362aa1a8ff2SEmmanuel Vadot            - const: gp1
363aa1a8ff2SEmmanuel Vadot            - const: gp3
364aa1a8ff2SEmmanuel Vadot            - const: ethwarp_wocpu2
365aa1a8ff2SEmmanuel Vadot            - const: ethwarp_wocpu1
366aa1a8ff2SEmmanuel Vadot            - const: ethwarp_wocpu0
367aa1a8ff2SEmmanuel Vadot            - const: esw
368aa1a8ff2SEmmanuel Vadot            - const: top_eth_gmii_sel
369aa1a8ff2SEmmanuel Vadot            - const: top_eth_refck_50m_sel
370aa1a8ff2SEmmanuel Vadot            - const: top_eth_sys_200m_sel
371aa1a8ff2SEmmanuel Vadot            - const: top_eth_sys_sel
372aa1a8ff2SEmmanuel Vadot            - const: top_eth_xgmii_sel
373aa1a8ff2SEmmanuel Vadot            - const: top_eth_mii_sel
374aa1a8ff2SEmmanuel Vadot            - const: top_netsys_sel
375aa1a8ff2SEmmanuel Vadot            - const: top_netsys_500m_sel
376aa1a8ff2SEmmanuel Vadot            - const: top_netsys_pao_2x_sel
377aa1a8ff2SEmmanuel Vadot            - const: top_netsys_sync_250m_sel
378aa1a8ff2SEmmanuel Vadot            - const: top_netsys_ppefb_250m_sel
379aa1a8ff2SEmmanuel Vadot            - const: top_netsys_warp_sel
380aa1a8ff2SEmmanuel Vadot            - const: xgp1
381aa1a8ff2SEmmanuel Vadot            - const: xgp2
382aa1a8ff2SEmmanuel Vadot            - const: xgp3
383aa1a8ff2SEmmanuel Vadot
384d5b0e70fSEmmanuel VadotpatternProperties:
385d5b0e70fSEmmanuel Vadot  "^mac@[0-1]$":
386d5b0e70fSEmmanuel Vadot    type: object
387f126890aSEmmanuel Vadot    unevaluatedProperties: false
388d5b0e70fSEmmanuel Vadot    allOf:
389d5b0e70fSEmmanuel Vadot      - $ref: ethernet-controller.yaml#
390d5b0e70fSEmmanuel Vadot    description:
391d5b0e70fSEmmanuel Vadot      Ethernet MAC node
392d5b0e70fSEmmanuel Vadot    properties:
393d5b0e70fSEmmanuel Vadot      compatible:
394d5b0e70fSEmmanuel Vadot        const: mediatek,eth-mac
395d5b0e70fSEmmanuel Vadot
396d5b0e70fSEmmanuel Vadot      reg:
397d5b0e70fSEmmanuel Vadot        maxItems: 1
398d5b0e70fSEmmanuel Vadot
399d5b0e70fSEmmanuel Vadot    required:
400d5b0e70fSEmmanuel Vadot      - reg
401d5b0e70fSEmmanuel Vadot      - compatible
402d5b0e70fSEmmanuel Vadot
403d5b0e70fSEmmanuel Vadotrequired:
404d5b0e70fSEmmanuel Vadot  - compatible
405d5b0e70fSEmmanuel Vadot  - reg
406d5b0e70fSEmmanuel Vadot  - interrupts
407d5b0e70fSEmmanuel Vadot  - clocks
408d5b0e70fSEmmanuel Vadot  - clock-names
409d5b0e70fSEmmanuel Vadot  - mediatek,ethsys
410d5b0e70fSEmmanuel Vadot
411d5b0e70fSEmmanuel VadotunevaluatedProperties: false
412d5b0e70fSEmmanuel Vadot
413d5b0e70fSEmmanuel Vadotexamples:
414d5b0e70fSEmmanuel Vadot  - |
415d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
416d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
417d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/mt7622-clk.h>
418d5b0e70fSEmmanuel Vadot    #include <dt-bindings/power/mt7622-power.h>
419d5b0e70fSEmmanuel Vadot
420d5b0e70fSEmmanuel Vadot    soc {
421d5b0e70fSEmmanuel Vadot      #address-cells = <2>;
422d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
423d5b0e70fSEmmanuel Vadot
424d5b0e70fSEmmanuel Vadot      ethernet: ethernet@1b100000 {
425d5b0e70fSEmmanuel Vadot        compatible = "mediatek,mt7622-eth";
426d5b0e70fSEmmanuel Vadot        reg = <0 0x1b100000 0 0x20000>;
427d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>,
428d5b0e70fSEmmanuel Vadot                     <GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>,
429d5b0e70fSEmmanuel Vadot                     <GIC_SPI 225 IRQ_TYPE_LEVEL_LOW>;
430d5b0e70fSEmmanuel Vadot        clocks = <&topckgen CLK_TOP_ETH_SEL>,
431d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_ESW_EN>,
432d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_GP0_EN>,
433d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_GP1_EN>,
434d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_GP2_EN>,
435d5b0e70fSEmmanuel Vadot                 <&sgmiisys CLK_SGMII_TX250M_EN>,
436d5b0e70fSEmmanuel Vadot                 <&sgmiisys CLK_SGMII_RX250M_EN>,
437d5b0e70fSEmmanuel Vadot                 <&sgmiisys CLK_SGMII_CDR_REF>,
438d5b0e70fSEmmanuel Vadot                 <&sgmiisys CLK_SGMII_CDR_FB>,
439d5b0e70fSEmmanuel Vadot                 <&topckgen CLK_TOP_SGMIIPLL>,
440d5b0e70fSEmmanuel Vadot                 <&apmixedsys CLK_APMIXED_ETH2PLL>;
441d5b0e70fSEmmanuel Vadot        clock-names = "ethif", "esw", "gp0", "gp1", "gp2",
442d5b0e70fSEmmanuel Vadot                      "sgmii_tx250m", "sgmii_rx250m",
443d5b0e70fSEmmanuel Vadot                      "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck",
444d5b0e70fSEmmanuel Vadot                      "eth2pll";
445d5b0e70fSEmmanuel Vadot        power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
446d5b0e70fSEmmanuel Vadot        mediatek,ethsys = <&ethsys>;
447d5b0e70fSEmmanuel Vadot        mediatek,sgmiisys = <&sgmiisys>;
448d5b0e70fSEmmanuel Vadot        cci-control-port = <&cci_control2>;
449d5b0e70fSEmmanuel Vadot        mediatek,pcie-mirror = <&pcie_mirror>;
450d5b0e70fSEmmanuel Vadot        mediatek,hifsys = <&hifsys>;
451d5b0e70fSEmmanuel Vadot        dma-coherent;
452d5b0e70fSEmmanuel Vadot
453d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
454d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
455d5b0e70fSEmmanuel Vadot
456d5b0e70fSEmmanuel Vadot        mdio0: mdio-bus {
457d5b0e70fSEmmanuel Vadot          #address-cells = <1>;
458d5b0e70fSEmmanuel Vadot          #size-cells = <0>;
459d5b0e70fSEmmanuel Vadot
460d5b0e70fSEmmanuel Vadot          phy0: ethernet-phy@0 {
461d5b0e70fSEmmanuel Vadot            reg = <0>;
462d5b0e70fSEmmanuel Vadot          };
463d5b0e70fSEmmanuel Vadot
464d5b0e70fSEmmanuel Vadot          phy1: ethernet-phy@1 {
465d5b0e70fSEmmanuel Vadot            reg = <1>;
466d5b0e70fSEmmanuel Vadot          };
467d5b0e70fSEmmanuel Vadot        };
468d5b0e70fSEmmanuel Vadot
469d5b0e70fSEmmanuel Vadot        gmac0: mac@0 {
470d5b0e70fSEmmanuel Vadot          compatible = "mediatek,eth-mac";
471d5b0e70fSEmmanuel Vadot          phy-mode = "rgmii";
472d5b0e70fSEmmanuel Vadot          phy-handle = <&phy0>;
473d5b0e70fSEmmanuel Vadot          reg = <0>;
474d5b0e70fSEmmanuel Vadot        };
475d5b0e70fSEmmanuel Vadot
476d5b0e70fSEmmanuel Vadot        gmac1: mac@1 {
477d5b0e70fSEmmanuel Vadot          compatible = "mediatek,eth-mac";
478d5b0e70fSEmmanuel Vadot          phy-mode = "rgmii";
479d5b0e70fSEmmanuel Vadot          phy-handle = <&phy1>;
480d5b0e70fSEmmanuel Vadot          reg = <1>;
481d5b0e70fSEmmanuel Vadot        };
482d5b0e70fSEmmanuel Vadot      };
483d5b0e70fSEmmanuel Vadot    };
484d5b0e70fSEmmanuel Vadot
485d5b0e70fSEmmanuel Vadot  - |
486d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
487d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
488d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/mt7622-clk.h>
489d5b0e70fSEmmanuel Vadot
490d5b0e70fSEmmanuel Vadot    soc {
491d5b0e70fSEmmanuel Vadot      #address-cells = <2>;
492d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
493d5b0e70fSEmmanuel Vadot
494d5b0e70fSEmmanuel Vadot      eth: ethernet@15100000 {
495d5b0e70fSEmmanuel Vadot        #define CLK_ETH_FE_EN               0
496d5b0e70fSEmmanuel Vadot        #define CLK_ETH_WOCPU1_EN           3
497d5b0e70fSEmmanuel Vadot        #define CLK_ETH_WOCPU0_EN           4
498d5b0e70fSEmmanuel Vadot        #define CLK_TOP_NETSYS_SEL          43
499d5b0e70fSEmmanuel Vadot        #define CLK_TOP_NETSYS_500M_SEL     44
500d5b0e70fSEmmanuel Vadot        #define CLK_TOP_NETSYS_2X_SEL       46
501d5b0e70fSEmmanuel Vadot        #define CLK_TOP_SGM_325M_SEL        47
502d5b0e70fSEmmanuel Vadot        #define CLK_APMIXED_NET2PLL         1
503d5b0e70fSEmmanuel Vadot        #define CLK_APMIXED_SGMPLL          3
504d5b0e70fSEmmanuel Vadot
505d5b0e70fSEmmanuel Vadot        compatible = "mediatek,mt7986-eth";
506d5b0e70fSEmmanuel Vadot        reg = <0 0x15100000 0 0x80000>;
507d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
508d5b0e70fSEmmanuel Vadot                     <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
509d5b0e70fSEmmanuel Vadot                     <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
510d5b0e70fSEmmanuel Vadot                     <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
511d5b0e70fSEmmanuel Vadot        clocks = <&ethsys CLK_ETH_FE_EN>,
512d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_GP2_EN>,
513d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_GP1_EN>,
514d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_WOCPU1_EN>,
515d5b0e70fSEmmanuel Vadot                 <&ethsys CLK_ETH_WOCPU0_EN>,
516d5b0e70fSEmmanuel Vadot                 <&sgmiisys0 CLK_SGMII_TX250M_EN>,
517d5b0e70fSEmmanuel Vadot                 <&sgmiisys0 CLK_SGMII_RX250M_EN>,
518d5b0e70fSEmmanuel Vadot                 <&sgmiisys0 CLK_SGMII_CDR_REF>,
519d5b0e70fSEmmanuel Vadot                 <&sgmiisys0 CLK_SGMII_CDR_FB>,
520d5b0e70fSEmmanuel Vadot                 <&sgmiisys1 CLK_SGMII_TX250M_EN>,
521d5b0e70fSEmmanuel Vadot                 <&sgmiisys1 CLK_SGMII_RX250M_EN>,
522d5b0e70fSEmmanuel Vadot                 <&sgmiisys1 CLK_SGMII_CDR_REF>,
523d5b0e70fSEmmanuel Vadot                 <&sgmiisys1 CLK_SGMII_CDR_FB>,
524d5b0e70fSEmmanuel Vadot                 <&topckgen CLK_TOP_NETSYS_SEL>,
525d5b0e70fSEmmanuel Vadot                 <&topckgen CLK_TOP_NETSYS_SEL>;
526d5b0e70fSEmmanuel Vadot        clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
527d5b0e70fSEmmanuel Vadot                      "sgmii_tx250m", "sgmii_rx250m",
528d5b0e70fSEmmanuel Vadot                      "sgmii_cdr_ref", "sgmii_cdr_fb",
529d5b0e70fSEmmanuel Vadot                      "sgmii2_tx250m", "sgmii2_rx250m",
530d5b0e70fSEmmanuel Vadot                      "sgmii2_cdr_ref", "sgmii2_cdr_fb",
531d5b0e70fSEmmanuel Vadot                      "netsys0", "netsys1";
532d5b0e70fSEmmanuel Vadot        mediatek,ethsys = <&ethsys>;
533d5b0e70fSEmmanuel Vadot        mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
534d5b0e70fSEmmanuel Vadot        assigned-clocks = <&topckgen CLK_TOP_NETSYS_2X_SEL>,
535d5b0e70fSEmmanuel Vadot                          <&topckgen CLK_TOP_SGM_325M_SEL>;
536d5b0e70fSEmmanuel Vadot        assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>,
537d5b0e70fSEmmanuel Vadot                                 <&apmixedsys CLK_APMIXED_SGMPLL>;
538d5b0e70fSEmmanuel Vadot
539d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
540d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
541d5b0e70fSEmmanuel Vadot
542d5b0e70fSEmmanuel Vadot        mdio: mdio-bus {
543d5b0e70fSEmmanuel Vadot          #address-cells = <1>;
544d5b0e70fSEmmanuel Vadot          #size-cells = <0>;
545d5b0e70fSEmmanuel Vadot
546d5b0e70fSEmmanuel Vadot          phy5: ethernet-phy@0 {
547d5b0e70fSEmmanuel Vadot            compatible = "ethernet-phy-id67c9.de0a";
548d5b0e70fSEmmanuel Vadot            phy-mode = "2500base-x";
549d5b0e70fSEmmanuel Vadot            reset-gpios = <&pio 6 1>;
550d5b0e70fSEmmanuel Vadot            reset-deassert-us = <20000>;
551d5b0e70fSEmmanuel Vadot            reg = <5>;
552d5b0e70fSEmmanuel Vadot          };
553d5b0e70fSEmmanuel Vadot
554d5b0e70fSEmmanuel Vadot          phy6: ethernet-phy@1 {
555d5b0e70fSEmmanuel Vadot            compatible = "ethernet-phy-id67c9.de0a";
556d5b0e70fSEmmanuel Vadot            phy-mode = "2500base-x";
557d5b0e70fSEmmanuel Vadot            reg = <6>;
558d5b0e70fSEmmanuel Vadot          };
559d5b0e70fSEmmanuel Vadot        };
560d5b0e70fSEmmanuel Vadot
561d5b0e70fSEmmanuel Vadot        mac0: mac@0 {
562d5b0e70fSEmmanuel Vadot          compatible = "mediatek,eth-mac";
563d5b0e70fSEmmanuel Vadot          phy-mode = "2500base-x";
564d5b0e70fSEmmanuel Vadot          phy-handle = <&phy5>;
565d5b0e70fSEmmanuel Vadot          reg = <0>;
566d5b0e70fSEmmanuel Vadot        };
567d5b0e70fSEmmanuel Vadot
568d5b0e70fSEmmanuel Vadot        mac1: mac@1 {
569d5b0e70fSEmmanuel Vadot          compatible = "mediatek,eth-mac";
570d5b0e70fSEmmanuel Vadot          phy-mode = "2500base-x";
571d5b0e70fSEmmanuel Vadot          phy-handle = <&phy6>;
572d5b0e70fSEmmanuel Vadot          reg = <1>;
573d5b0e70fSEmmanuel Vadot        };
574d5b0e70fSEmmanuel Vadot      };
575d5b0e70fSEmmanuel Vadot    };
576