Debian Codegraph @

Documentation/devicetree/bindings/net/snps,dwmac.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Synopsys DesignWare MAC
8
9 maintainers:
10 - Alexandre Torgue <[email protected]>
11 - Giuseppe Cavallaro <[email protected]>
12 - Jose Abreu <[email protected]>
13
14 # Select every compatible, including the deprecated ones. This way, we
15 # will be able to report a warning when we have that compatible, since
16 # we will validate the node thanks to the select, but won't report it
17 # as a valid value in the compatible property description
18 select:
19 properties:
20 compatible:
21 contains:
22 enum:
23 - snps,dwmac
24 - snps,dwmac-3.40a
25 - snps,dwmac-3.50a
26 - snps,dwmac-3.610
27 - snps,dwmac-3.70a
28 - snps,dwmac-3.710
29 - snps,dwmac-3.72a
30 - snps,dwmac-4.00
31 - snps,dwmac-4.10a
32 - snps,dwmac-4.20a
33 - snps,dwmac-5.00a
34 - snps,dwmac-5.10a
35 - snps,dwmac-5.20
36 - snps,dwmac-5.30a
37 - snps,dwxgmac
38 - snps,dwxgmac-2.10
39
40 # Deprecated
41 - st,spear600-gmac
42
43 required:
44 - compatible
45
46 properties:
47
48 # We need to include all the compatibles from schemas that will
49 # include that schemas, otherwise compatible won't validate for
50 # those.
51 compatible:
52 contains:
53 enum:
54 - allwinner,sun7i-a20-gmac
55 - allwinner,sun8i-a83t-emac
56 - allwinner,sun8i-h3-emac
57 - allwinner,sun8i-r40-gmac
58 - allwinner,sun8i-v3s-emac
59 - allwinner,sun50i-a64-emac
60 - amlogic,meson6-dwmac
61 - amlogic,meson8b-dwmac
62 - amlogic,meson8m2-dwmac
63 - amlogic,meson-gxbb-dwmac
64 - amlogic,meson-axg-dwmac
65 - ingenic,jz4775-mac
66 - ingenic,x1000-mac
67 - ingenic,x1600-mac
68 - ingenic,x1830-mac
69 - ingenic,x2000-mac
70 - loongson,ls2k-dwmac
71 - loongson,ls7a-dwmac
72 - nxp,s32g2-dwmac
73 - qcom,qcs404-ethqos
74 - qcom,sa8775p-ethqos
75 - qcom,sc8280xp-ethqos
76 - qcom,sm8150-ethqos
77 - renesas,r9a06g032-gmac
78 - renesas,r9a08g046-gbeth
79 - renesas,r9a09g077-gbeth
80 - renesas,rzn1-gmac
81 - renesas,rzv2h-gbeth
82 - rockchip,px30-gmac
83 - rockchip,rk3128-gmac
84 - rockchip,rk3228-gmac
85 - rockchip,rk3288-gmac
86 - rockchip,rk3308-gmac
87 - rockchip,rk3328-gmac
88 - rockchip,rk3366-gmac
89 - rockchip,rk3368-gmac
90 - rockchip,rk3399-gmac
91 - rockchip,rk3506-gmac
92 - rockchip,rk3528-gmac
93 - rockchip,rk3568-gmac
94 - rockchip,rk3576-gmac
95 - rockchip,rk3588-gmac
96 - rockchip,rv1108-gmac
97 - rockchip,rv1126-gmac
98 - snps,dwmac
99 - snps,dwmac-3.40a
100 - snps,dwmac-3.50a
101 - snps,dwmac-3.610
102 - snps,dwmac-3.70a
103 - snps,dwmac-3.710
104 - snps,dwmac-3.72a
105 - snps,dwmac-4.00
106 - snps,dwmac-4.10a
107 - snps,dwmac-4.20a
108 - snps,dwmac-5.00a
109 - snps,dwmac-5.10a
110 - snps,dwmac-5.20
111 - snps,dwmac-5.30a
112 - snps,dwxgmac
113 - snps,dwxgmac-2.10
114 - sophgo,sg2042-dwmac
115 - sophgo,sg2044-dwmac
116 - starfive,jh7100-dwmac
117 - starfive,jh7110-dwmac
118 - tesla,fsd-ethqos
119 - thead,th1520-gmac
120
121 reg:
122 minItems: 1
123 maxItems: 2
124
125 interrupts:
126 minItems: 1
127 maxItems: 19
128
129 interrupt-names:
130 minItems: 1
131 maxItems: 19
132 items:
133 oneOf:
134 - description: Combined signal for various interrupt events
135 const: macirq
136 - description: The interrupt to manage the remote wake-up packet detection
137 const: eth_wake_irq
138 - description: The interrupt that occurs when Rx exits the LPI state
139 const: eth_lpi
140 - description: The interrupt that occurs when HW safety error triggered
141 const: sfty
142 - description: Per channel receive completion interrupt
143 pattern: '^rx-queue-[0-7]$'
144 - description: Per channel transmit completion interrupt
145 pattern: '^tx-queue-[0-7]$'
146 - description: PPS interrupt
147 pattern: '^ptp-pps-[0-3]$'
148
149 clocks:
150 minItems: 1
151 maxItems: 10
152 additionalItems: true
153 items:
154 - description: GMAC main clock
155 - description: Peripheral registers interface clock
156 - description:
157 PTP reference clock. This clock is used for programming the
158 Timestamp Addend Register. If not passed then the system
159 clock will be used and this is fine on some platforms.
160
161 clock-names:
162 minItems: 1
163 maxItems: 10
164 additionalItems: true
165 contains:
166 enum:
167 - stmmaceth
168 - pclk
169 - ptp_ref
170
171 resets:
172 minItems: 1
173 items:
174 - description: GMAC stmmaceth reset
175 - description: AHB reset
176
177 reset-names:
178 oneOf:
179 - items:
180 - enum: [stmmaceth, ahb]
181 - items:
182 - const: stmmaceth
183 - const: ahb
184
185 power-domains:
186 maxItems: 1
187
188 mac-mode:
189 $ref: ethernet-controller.yaml#/properties/phy-connection-type
190 description:
191 The property is identical to 'phy-mode', and assumes that there is mode
192 converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
193 can be passive (no SW requirement), and requires that the MAC operate
194 in a different mode than the PHY in order to function.
195
196 snps,axi-config:
197 $ref: /schemas/types.yaml#/definitions/phandle
198 description:
199 AXI BUS Mode parameters. Phandle to a node that can contain the
200 following properties
201 * snps,lpi_en, enable Low Power Interface
202 * snps,xit_frm, unlock on WoL
203 * snps,wr_osr_lmt, max write outstanding req. limit
204 * snps,rd_osr_lmt, max read outstanding req. limit
205 * snps,kbbe, do not cross 1KiB boundary.
206 * snps,blen, this is a vector of supported burst length.
207 * snps,fb, fixed-burst
208 * snps,mb, mixed-burst
209 * snps,rb, rebuild INCRx Burst
210
211 snps,mtl-rx-config:
212 $ref: /schemas/types.yaml#/definitions/phandle
213 description:
214 Multiple RX Queues parameters. Phandle to a node that
215 implements the 'rx-queues-config' object described in
216 this binding.
217
218 rx-queues-config:
219 type: object
220 properties:
221 snps,rx-queues-to-use:
222 $ref: /schemas/types.yaml#/definitions/uint32
223 description: number of RX queues to be used in the driver
224 snps,rx-sched-sp:
225 type: boolean
226 description: Strict priority
227 snps,rx-sched-wsp:
228 type: boolean
229 description: Weighted Strict priority
230 allOf:
231 - if:
232 required:
233 - snps,rx-sched-sp
234 then:
235 properties:
236 snps,rx-sched-wsp: false
237 - if:
238 required:
239 - snps,rx-sched-wsp
240 then:
241 properties:
242 snps,rx-sched-sp: false
243 patternProperties:
244 "^queue[0-9]$":
245 description: Each subnode represents a queue.
246 type: object
247 properties:
248 snps,dcb-algorithm:
249 type: boolean
250 description: Queue to be enabled as DCB
251 snps,avb-algorithm:
252 type: boolean
253 description: Queue to be enabled as AVB
254 snps,map-to-dma-channel:
255 $ref: /schemas/types.yaml#/definitions/uint32
256 description: DMA channel id to map
257 snps,route-avcp:
258 type: boolean
259 description: AV Untagged Control packets
260 snps,route-ptp:
261 type: boolean
262 description: PTP Packets
263 snps,route-dcbcp:
264 type: boolean
265 description: DCB Control Packets
266 snps,route-up:
267 type: boolean
268 description: Untagged Packets
269 snps,route-multi-broad:
270 type: boolean
271 description: Multicast & Broadcast Packets
272 snps,priority:
273 $ref: /schemas/types.yaml#/definitions/uint32-array
274 maxItems: 1
275 description: Bitmask of the tagged frames priorities assigned to the queue
276 allOf:
277 - if:
278 required:
279 - snps,dcb-algorithm
280 then:
281 properties:
282 snps,avb-algorithm: false
283 - if:
284 required:
285 - snps,avb-algorithm
286 then:
287 properties:
288 snps,dcb-algorithm: false
289 - if:
290 required:
291 - snps,route-avcp
292 then:
293 properties:
294 snps,route-ptp: false
295 snps,route-dcbcp: false
296 snps,route-up: false
297 snps,route-multi-broad: false
298 - if:
299 required:
300 - snps,route-ptp
301 then:
302 properties:
303 snps,route-avcp: false
304 snps,route-dcbcp: false
305 snps,route-up: false
306 snps,route-multi-broad: false
307 - if:
308 required:
309 - snps,route-dcbcp
310 then:
311 properties:
312 snps,route-avcp: false
313 snps,route-ptp: false
314 snps,route-up: false
315 snps,route-multi-broad: false
316 - if:
317 required:
318 - snps,route-up
319 then:
320 properties:
321 snps,route-avcp: false
322 snps,route-ptp: false
323 snps,route-dcbcp: false
324 snps,route-multi-broad: false
325 - if:
326 required:
327 - snps,route-multi-broad
328 then:
329 properties:
330 snps,route-avcp: false
331 snps,route-ptp: false
332 snps,route-dcbcp: false
333 snps,route-up: false
334 additionalProperties: false
335 additionalProperties: false
336
337 snps,mtl-tx-config:
338 $ref: /schemas/types.yaml#/definitions/phandle
339 description:
340 Multiple TX Queues parameters. Phandle to a node that
341 implements the 'tx-queues-config' object described in
342 this binding.
343
344 tx-queues-config:
345 type: object
346 properties:
347 snps,tx-queues-to-use:
348 $ref: /schemas/types.yaml#/definitions/uint32
349 description: number of TX queues to be used in the driver
350 snps,tx-sched-wrr:
351 type: boolean
352 description: Weighted Round Robin
353 snps,tx-sched-wfq:
354 type: boolean
355 description: Weighted Fair Queuing
356 snps,tx-sched-dwrr:
357 type: boolean
358 description: Deficit Weighted Round Robin
359 allOf:
360 - if:
361 required:
362 - snps,tx-sched-wrr
363 then:
364 properties:
365 snps,tx-sched-wfq: false
366 snps,tx-sched-dwrr: false
367 - if:
368 required:
369 - snps,tx-sched-wfq
370 then:
371 properties:
372 snps,tx-sched-wrr: false
373 snps,tx-sched-dwrr: false
374 - if:
375 required:
376 - snps,tx-sched-dwrr
377 then:
378 properties:
379 snps,tx-sched-wrr: false
380 snps,tx-sched-wfq: false
381 patternProperties:
382 "^queue[0-9]$":
383 description: Each subnode represents a queue.
384 type: object
385 properties:
386 snps,weight:
387 $ref: /schemas/types.yaml#/definitions/uint32
388 description: TX queue weight (if using a DCB weight algorithm)
389 snps,dcb-algorithm:
390 type: boolean
391 description: TX queue will be working in DCB
392 snps,avb-algorithm:
393 type: boolean
394 description:
395 TX queue will be working in AVB.
396 Queue 0 is reserved for legacy traffic and so no AVB is
397 available in this queue.
398 snps,send_slope:
399 $ref: /schemas/types.yaml#/definitions/uint32
400 description: enable Low Power Interface
401 snps,idle_slope:
402 $ref: /schemas/types.yaml#/definitions/uint32
403 description: unlock on WoL
404 snps,high_credit:
405 $ref: /schemas/types.yaml#/definitions/uint32
406 description: max write outstanding req. limit
407 snps,low_credit:
408 $ref: /schemas/types.yaml#/definitions/uint32
409 description: max read outstanding req. limit
410 snps,priority:
411 $ref: /schemas/types.yaml#/definitions/uint32-array
412 maxItems: 1
413 description:
414 Bitmask of the tagged frames priorities assigned to the queue.
415 When a PFC frame is received with priorities matching the bitmask,
416 the queue is blocked from transmitting for the pause time specified
417 in the PFC frame.
418
419 snps,coe-unsupported:
420 type: boolean
421 description: TX checksum offload is unsupported by the TX queue.
422
423 allOf:
424 - if:
425 required:
426 - snps,dcb-algorithm
427 then:
428 properties:
429 snps,avb-algorithm: false
430 - if:
431 required:
432 - snps,avb-algorithm
433 then:
434 properties:
435 snps,dcb-algorithm: false
436 snps,weight: false
437 additionalProperties: false
438 additionalProperties: false
439
440 snps,reset-gpio:
441 deprecated: true
442 maxItems: 1
443 description:
444 PHY Reset GPIO
445
446 snps,reset-active-low:
447 deprecated: true
448 $ref: /schemas/types.yaml#/definitions/flag
449 description:
450 Indicates that the PHY Reset is active low
451
452 snps,reset-delays-us:
453 deprecated: true
454 description:
455 Triplet of delays. The 1st cell is reset pre-delay in micro
456 seconds. The 2nd cell is reset pulse in micro seconds. The 3rd
457 cell is reset post-delay in micro seconds.
458 minItems: 3
459 maxItems: 3
460
461 snps,aal:
462 $ref: /schemas/types.yaml#/definitions/flag
463 description:
464 Use Address-Aligned Beats
465
466 snps,pbl:
467 description:
468 Programmable Burst Length (tx and rx)
469 $ref: /schemas/types.yaml#/definitions/uint32
470 enum: [1, 2, 4, 8, 16, 32]
471
472 snps,txpbl:
473 description:
474 Tx Programmable Burst Length. If set, DMA tx will use this
475 value rather than snps,pbl.
476 $ref: /schemas/types.yaml#/definitions/uint32
477 enum: [1, 2, 4, 8, 16, 32]
478
479 snps,rxpbl:
480 description:
481 Rx Programmable Burst Length. If set, DMA rx will use this
482 value rather than snps,pbl.
483 $ref: /schemas/types.yaml#/definitions/uint32
484 enum: [1, 2, 4, 8, 16, 32]
485
486 snps,no-pbl-x8:
487 $ref: /schemas/types.yaml#/definitions/flag
488 description:
489 Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core
490 rev < 3.50, don\'t multiply the values by 4.
491
492 snps,fixed-burst:
493 $ref: /schemas/types.yaml#/definitions/flag
494 description:
495 Program the DMA to use the fixed burst mode
496
497 snps,mixed-burst:
498 $ref: /schemas/types.yaml#/definitions/flag
499 description:
500 Program the DMA to use the mixed burst mode
501
502 snps,force_thresh_dma_mode:
503 $ref: /schemas/types.yaml#/definitions/flag
504 description:
505 Force DMA to use the threshold mode for both tx and rx
506
507 snps,force_sf_dma_mode:
508 $ref: /schemas/types.yaml#/definitions/flag
509 description:
510 Force DMA to use the Store and Forward mode for both tx and
511 rx. This flag is ignored if force_thresh_dma_mode is set.
512
513 snps,en-tx-lpi-clockgating:
514 $ref: /schemas/types.yaml#/definitions/flag
515 deprecated: true
516 description:
517 Enable gating of the MAC TX clock during TX low-power mode
518
519 snps,multicast-filter-bins:
520 $ref: /schemas/types.yaml#/definitions/uint32
521 description:
522 Number of multicast filter hash bins supported by this device
523 instance
524
525 snps,perfect-filter-entries:
526 $ref: /schemas/types.yaml#/definitions/uint32
527 description:
528 Number of perfect filter entries supported by this device
529 instance
530
531 snps,ps-speed:
532 $ref: /schemas/types.yaml#/definitions/uint32
533 description:
534 Port selection speed that can be passed to the core when PCS
535 is supported. For example, this is used in case of SGMII and
536 MAC2MAC connection.
537
538 snps,clk-csr:
539 $ref: /schemas/types.yaml#/definitions/uint32
540 description:
541 Frequency division factor for MDC clock.
542
543 snps,tso:
544 $ref: /schemas/types.yaml#/definitions/flag
545 description:
546 Enables the TSO feature otherwise it will be managed by MAC HW capability
547 register.
548
549 mdio:
550 $ref: mdio.yaml#
551 unevaluatedProperties: false
552 description:
553 Creates and registers an MDIO bus.
554
555 properties:
556 compatible:
557 const: snps,dwmac-mdio
558
559 required:
560 - compatible
561
562 stmmac-axi-config:
563 type: object
564 unevaluatedProperties: false
565 description:
566 AXI BUS Mode parameters.
567
568 properties:
569 snps,lpi_en:
570 $ref: /schemas/types.yaml#/definitions/flag
571 description:
572 enable Low Power Interface
573
574 snps,xit_frm:
575 $ref: /schemas/types.yaml#/definitions/flag
576 description:
577 unlock on WoL
578
579 snps,wr_osr_lmt:
580 $ref: /schemas/types.yaml#/definitions/uint32
581 description:
582 max write outstanding req. limit
583
584 snps,rd_osr_lmt:
585 $ref: /schemas/types.yaml#/definitions/uint32
586 description:
587 max read outstanding req. limit
588
589 snps,kbbe:
590 $ref: /schemas/types.yaml#/definitions/flag
591 description:
592 do not cross 1KiB boundary.
593
594 snps,blen:
595 $ref: /schemas/types.yaml#/definitions/uint32-array
596 description:
597 this is a vector of supported burst length.
598 minItems: 7
599 maxItems: 7
600
601 snps,fb:
602 $ref: /schemas/types.yaml#/definitions/flag
603 description:
604 fixed-burst
605
606 snps,mb:
607 $ref: /schemas/types.yaml#/definitions/flag
608 description:
609 mixed-burst
610
611 snps,rb:
612 $ref: /schemas/types.yaml#/definitions/flag
613 description:
614 rebuild INCRx Burst
615
616 required:
617 - compatible
618 - reg
619 - interrupts
620 - interrupt-names
621 - phy-mode
622
623 dependencies:
624 snps,reset-active-low: ["snps,reset-gpio"]
625 snps,reset-delays-us: ["snps,reset-gpio"]
626
627 allOf:
628 - $ref: ethernet-controller.yaml#
629 - if:
630 properties:
631 compatible:
632 not:
633 contains:
634 enum:
635 - allwinner,sun7i-a20-gmac
636 - allwinner,sun8i-a83t-emac
637 - allwinner,sun8i-h3-emac
638 - allwinner,sun8i-r40-gmac
639 - allwinner,sun8i-v3s-emac
640 - allwinner,sun50i-a64-emac
641 - loongson,ls2k-dwmac
642 - loongson,ls7a-dwmac
643 - ingenic,jz4775-mac
644 - ingenic,x1000-mac
645 - ingenic,x1600-mac
646 - ingenic,x1830-mac
647 - ingenic,x2000-mac
648 - qcom,qcs404-ethqos
649 - qcom,sa8775p-ethqos
650 - qcom,sc8280xp-ethqos
651 - qcom,sm8150-ethqos
652 - snps,dwmac-4.00
653 - snps,dwmac-4.10a
654 - snps,dwmac-4.20a
655 - snps,dwmac-5.00a
656 - snps,dwmac-5.10a
657 - snps,dwmac-5.20
658 - snps,dwmac-5.30a
659 - snps,dwxgmac
660 - snps,dwxgmac-2.10
661 - st,spear600-gmac
662
663 then:
664 properties:
665 snps,tso: false
666
667 additionalProperties: true
668
669 examples:
670 - |
671 gmac0: ethernet@e0800000 {
672 compatible = "snps,dwxgmac-2.10", "snps,dwxgmac";
673 reg = <0xe0800000 0x8000>;
674 interrupt-parent = <&vic1>;
675 interrupts = <24 23 22>;
676 interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
677 mac-address = [000000000000]; /* Filled in by U-Boot */
678 max-frame-size = <3800>;
679 phy-mode = "gmii";
680 snps,multicast-filter-bins = <256>;
681 snps,perfect-filter-entries = <128>;
682 rx-fifo-depth = <16384>;
683 tx-fifo-depth = <16384>;
684 clocks = <&clock>;
685 clock-names = "stmmaceth";
686 snps,axi-config = <&stmmac_axi_setup>;
687 snps,mtl-rx-config = <&mtl_rx_setup>;
688 snps,mtl-tx-config = <&mtl_tx_setup>;
689
690 stmmac_axi_setup: stmmac-axi-config {
691 snps,wr_osr_lmt = <0xf>;
692 snps,rd_osr_lmt = <0xf>;
693 snps,blen = <256 128 64 32 0 0 0>;
694 };
695
696 mtl_rx_setup: rx-queues-config {
697 snps,rx-queues-to-use = <1>;
698 snps,rx-sched-sp;
699 queue0 {
700 snps,dcb-algorithm;
701 snps,map-to-dma-channel = <0x0>;
702 snps,priority = <0x0>;
703 };
704 };
705
706 mtl_tx_setup: tx-queues-config {
707 snps,tx-queues-to-use = <2>;
708 snps,tx-sched-wrr;
709 queue0 {
710 snps,weight = <0x10>;
711 snps,dcb-algorithm;
712 snps,priority = <0x0>;
713 };
714
715 queue1 {
716 snps,avb-algorithm;
717 snps,send_slope = <0x1000>;
718 snps,idle_slope = <0x1000>;
719 snps,high_credit = <0x3E800>;
720 snps,low_credit = <0xFFC18000>;
721 snps,priority = <0x1>;
722 };
723 };
724
725 mdio {
726 #address-cells = <1>;
727 #size-cells = <0>;
728 compatible = "snps,dwmac-mdio";
729 phy1: ethernet-phy@0 {
730 reg = <0>;
731 };
732 };
733 };
734
735 # FIXME: We should set it, but it would report all the generic
736 # properties as additional properties.
737 # additionalProperties: false
738
739 ...