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