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