brintos

brintos / linux-shallow public Read only

0
0
Text · 20.3 KiB · 4e2ba1b Raw
711 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/net/snps,dwmac.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Synopsys DesignWare MAC8 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, we15# will be able to report a warning when we have that compatible, since16# we will validate the node thanks to the select, but won't report it17# as a valid value in the compatible property description18select:19  properties:20    compatible:21      contains:22        enum:23          - snps,dwmac24          - snps,dwmac-3.40a25          - snps,dwmac-3.50a26          - snps,dwmac-3.61027          - snps,dwmac-3.70a28          - snps,dwmac-3.71029          - snps,dwmac-4.0030          - snps,dwmac-4.10a31          - snps,dwmac-4.20a32          - snps,dwmac-5.10a33          - snps,dwmac-5.2034          - snps,dwxgmac35          - snps,dwxgmac-2.1036 37          # Deprecated38          - st,spear600-gmac39 40  required:41    - compatible42 43properties:44 45  # We need to include all the compatibles from schemas that will46  # include that schemas, otherwise compatible won't validate for47  # those.48  compatible:49    contains:50      enum:51        - allwinner,sun7i-a20-gmac52        - allwinner,sun8i-a83t-emac53        - allwinner,sun8i-h3-emac54        - allwinner,sun8i-r40-gmac55        - allwinner,sun8i-v3s-emac56        - allwinner,sun50i-a64-emac57        - amlogic,meson6-dwmac58        - amlogic,meson8b-dwmac59        - amlogic,meson8m2-dwmac60        - amlogic,meson-gxbb-dwmac61        - amlogic,meson-axg-dwmac62        - ingenic,jz4775-mac63        - ingenic,x1000-mac64        - ingenic,x1600-mac65        - ingenic,x1830-mac66        - ingenic,x2000-mac67        - loongson,ls2k-dwmac68        - loongson,ls7a-dwmac69        - qcom,qcs404-ethqos70        - qcom,sa8775p-ethqos71        - qcom,sc8280xp-ethqos72        - qcom,sm8150-ethqos73        - renesas,r9a06g032-gmac74        - renesas,rzn1-gmac75        - rockchip,px30-gmac76        - rockchip,rk3128-gmac77        - rockchip,rk3228-gmac78        - rockchip,rk3288-gmac79        - rockchip,rk3308-gmac80        - rockchip,rk3328-gmac81        - rockchip,rk3366-gmac82        - rockchip,rk3368-gmac83        - rockchip,rk3576-gmac84        - rockchip,rk3588-gmac85        - rockchip,rk3399-gmac86        - rockchip,rv1108-gmac87        - snps,dwmac88        - snps,dwmac-3.40a89        - snps,dwmac-3.50a90        - snps,dwmac-3.61091        - snps,dwmac-3.70a92        - snps,dwmac-3.71093        - snps,dwmac-4.0094        - snps,dwmac-4.10a95        - snps,dwmac-4.20a96        - snps,dwmac-5.10a97        - snps,dwmac-5.2098        - snps,dwxgmac99        - snps,dwxgmac-2.10100        - starfive,jh7100-dwmac101        - starfive,jh7110-dwmac102 103  reg:104    minItems: 1105    maxItems: 2106 107  interrupts:108    minItems: 1109    items:110      - description: Combined signal for various interrupt events111      - description: The interrupt to manage the remote wake-up packet detection112      - description: The interrupt that occurs when Rx exits the LPI state113      - description: The interrupt that occurs when HW safety error triggered114 115  interrupt-names:116    minItems: 1117    items:118      - const: macirq119      - enum: [eth_wake_irq, eth_lpi, sfty]120      - enum: [eth_wake_irq, eth_lpi, sfty]121      - enum: [eth_wake_irq, eth_lpi, sfty]122 123  clocks:124    minItems: 1125    maxItems: 8126    additionalItems: true127    items:128      - description: GMAC main clock129      - description: Peripheral registers interface clock130      - description:131          PTP reference clock. This clock is used for programming the132          Timestamp Addend Register. If not passed then the system133          clock will be used and this is fine on some platforms.134 135  clock-names:136    minItems: 1137    maxItems: 8138    additionalItems: true139    contains:140      enum:141        - stmmaceth142        - pclk143        - ptp_ref144 145  resets:146    minItems: 1147    items:148      - description: GMAC stmmaceth reset149      - description: AHB reset150 151  reset-names:152    oneOf:153      - items:154          - enum: [stmmaceth, ahb]155      - items:156          - const: stmmaceth157          - const: ahb158 159  power-domains:160    maxItems: 1161 162  mac-mode:163    $ref: ethernet-controller.yaml#/properties/phy-connection-type164    description:165      The property is identical to 'phy-mode', and assumes that there is mode166      converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter167      can be passive (no SW requirement), and requires that the MAC operate168      in a different mode than the PHY in order to function.169 170  snps,axi-config:171    $ref: /schemas/types.yaml#/definitions/phandle172    description:173      AXI BUS Mode parameters. Phandle to a node that can contain the174      following properties175        * snps,lpi_en, enable Low Power Interface176        * snps,xit_frm, unlock on WoL177        * snps,wr_osr_lmt, max write outstanding req. limit178        * snps,rd_osr_lmt, max read outstanding req. limit179        * snps,kbbe, do not cross 1KiB boundary.180        * snps,blen, this is a vector of supported burst length.181        * snps,fb, fixed-burst182        * snps,mb, mixed-burst183        * snps,rb, rebuild INCRx Burst184 185  snps,mtl-rx-config:186    $ref: /schemas/types.yaml#/definitions/phandle187    description:188      Multiple RX Queues parameters. Phandle to a node that189      implements the 'rx-queues-config' object described in190      this binding.191 192  rx-queues-config:193    type: object194    properties:195      snps,rx-queues-to-use:196        $ref: /schemas/types.yaml#/definitions/uint32197        description: number of RX queues to be used in the driver198      snps,rx-sched-sp:199        type: boolean200        description: Strict priority201      snps,rx-sched-wsp:202        type: boolean203        description: Weighted Strict priority204    allOf:205      - if:206          required:207            - snps,rx-sched-sp208        then:209          properties:210            snps,rx-sched-wsp: false211      - if:212          required:213            - snps,rx-sched-wsp214        then:215          properties:216            snps,rx-sched-sp: false217    patternProperties:218      "^queue[0-9]$":219        description: Each subnode represents a queue.220        type: object221        properties:222          snps,dcb-algorithm:223            type: boolean224            description: Queue to be enabled as DCB225          snps,avb-algorithm:226            type: boolean227            description: Queue to be enabled as AVB228          snps,map-to-dma-channel:229            $ref: /schemas/types.yaml#/definitions/uint32230            description: DMA channel id to map231          snps,route-avcp:232            type: boolean233            description: AV Untagged Control packets234          snps,route-ptp:235            type: boolean236            description: PTP Packets237          snps,route-dcbcp:238            type: boolean239            description: DCB Control Packets240          snps,route-up:241            type: boolean242            description: Untagged Packets243          snps,route-multi-broad:244            type: boolean245            description: Multicast & Broadcast Packets246          snps,priority:247            $ref: /schemas/types.yaml#/definitions/uint32-array248            maxItems: 1249            description: Bitmask of the tagged frames priorities assigned to the queue250        allOf:251          - if:252              required:253                - snps,dcb-algorithm254            then:255              properties:256                snps,avb-algorithm: false257          - if:258              required:259                - snps,avb-algorithm260            then:261              properties:262                snps,dcb-algorithm: false263          - if:264              required:265                - snps,route-avcp266            then:267              properties:268                snps,route-ptp: false269                snps,route-dcbcp: false270                snps,route-up: false271                snps,route-multi-broad: false272          - if:273              required:274                - snps,route-ptp275            then:276              properties:277                snps,route-avcp: false278                snps,route-dcbcp: false279                snps,route-up: false280                snps,route-multi-broad: false281          - if:282              required:283                - snps,route-dcbcp284            then:285              properties:286                snps,route-avcp: false287                snps,route-ptp: false288                snps,route-up: false289                snps,route-multi-broad: false290          - if:291              required:292                - snps,route-up293            then:294              properties:295                snps,route-avcp: false296                snps,route-ptp: false297                snps,route-dcbcp: false298                snps,route-multi-broad: false299          - if:300              required:301                - snps,route-multi-broad302            then:303              properties:304                snps,route-avcp: false305                snps,route-ptp: false306                snps,route-dcbcp: false307                snps,route-up: false308        additionalProperties: false309    additionalProperties: false310 311  snps,mtl-tx-config:312    $ref: /schemas/types.yaml#/definitions/phandle313    description:314      Multiple TX Queues parameters. Phandle to a node that315      implements the 'tx-queues-config' object described in316      this binding.317 318  tx-queues-config:319    type: object320    properties:321      snps,tx-queues-to-use:322        $ref: /schemas/types.yaml#/definitions/uint32323        description: number of TX queues to be used in the driver324      snps,tx-sched-wrr:325        type: boolean326        description: Weighted Round Robin327      snps,tx-sched-wfq:328        type: boolean329        description: Weighted Fair Queuing330      snps,tx-sched-dwrr:331        type: boolean332        description: Deficit Weighted Round Robin333    allOf:334      - if:335          required:336            - snps,tx-sched-wrr337        then:338          properties:339            snps,tx-sched-wfq: false340            snps,tx-sched-dwrr: false341      - if:342          required:343            - snps,tx-sched-wfq344        then:345          properties:346            snps,tx-sched-wrr: false347            snps,tx-sched-dwrr: false348      - if:349          required:350            - snps,tx-sched-dwrr351        then:352          properties:353            snps,tx-sched-wrr: false354            snps,tx-sched-wfq: false355    patternProperties:356      "^queue[0-9]$":357        description: Each subnode represents a queue.358        type: object359        properties:360          snps,weight:361            $ref: /schemas/types.yaml#/definitions/uint32362            description: TX queue weight (if using a DCB weight algorithm)363          snps,dcb-algorithm:364            type: boolean365            description: TX queue will be working in DCB366          snps,avb-algorithm:367            type: boolean368            description:369              TX queue will be working in AVB.370              Queue 0 is reserved for legacy traffic and so no AVB is371              available in this queue.372          snps,send_slope:373            $ref: /schemas/types.yaml#/definitions/uint32374            description: enable Low Power Interface375          snps,idle_slope:376            $ref: /schemas/types.yaml#/definitions/uint32377            description: unlock on WoL378          snps,high_credit:379            $ref: /schemas/types.yaml#/definitions/uint32380            description: max write outstanding req. limit381          snps,low_credit:382            $ref: /schemas/types.yaml#/definitions/uint32383            description: max read outstanding req. limit384          snps,priority:385            $ref: /schemas/types.yaml#/definitions/uint32-array386            maxItems: 1387            description:388              Bitmask of the tagged frames priorities assigned to the queue.389              When a PFC frame is received with priorities matching the bitmask,390              the queue is blocked from transmitting for the pause time specified391              in the PFC frame.392 393          snps,coe-unsupported:394            type: boolean395            description: TX checksum offload is unsupported by the TX queue.396 397        allOf:398          - if:399              required:400                - snps,dcb-algorithm401            then:402              properties:403                snps,avb-algorithm: false404          - if:405              required:406                - snps,avb-algorithm407            then:408              properties:409                snps,dcb-algorithm: false410                snps,weight: false411        additionalProperties: false412    additionalProperties: false413 414  snps,reset-gpio:415    deprecated: true416    maxItems: 1417    description:418      PHY Reset GPIO419 420  snps,reset-active-low:421    deprecated: true422    $ref: /schemas/types.yaml#/definitions/flag423    description:424      Indicates that the PHY Reset is active low425 426  snps,reset-delays-us:427    deprecated: true428    description:429      Triplet of delays. The 1st cell is reset pre-delay in micro430      seconds. The 2nd cell is reset pulse in micro seconds. The 3rd431      cell is reset post-delay in micro seconds.432    minItems: 3433    maxItems: 3434 435  snps,aal:436    $ref: /schemas/types.yaml#/definitions/flag437    description:438      Use Address-Aligned Beats439 440  snps,pbl:441    description:442      Programmable Burst Length (tx and rx)443    $ref: /schemas/types.yaml#/definitions/uint32444    enum: [1, 2, 4, 8, 16, 32]445 446  snps,txpbl:447    description:448      Tx Programmable Burst Length. If set, DMA tx will use this449      value rather than snps,pbl.450    $ref: /schemas/types.yaml#/definitions/uint32451    enum: [1, 2, 4, 8, 16, 32]452 453  snps,rxpbl:454    description:455      Rx Programmable Burst Length. If set, DMA rx will use this456      value rather than snps,pbl.457    $ref: /schemas/types.yaml#/definitions/uint32458    enum: [1, 2, 4, 8, 16, 32]459 460  snps,no-pbl-x8:461    $ref: /schemas/types.yaml#/definitions/flag462    description:463      Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core464      rev < 3.50, don\'t multiply the values by 4.465 466  snps,fixed-burst:467    $ref: /schemas/types.yaml#/definitions/flag468    description:469      Program the DMA to use the fixed burst mode470 471  snps,mixed-burst:472    $ref: /schemas/types.yaml#/definitions/flag473    description:474      Program the DMA to use the mixed burst mode475 476  snps,force_thresh_dma_mode:477    $ref: /schemas/types.yaml#/definitions/flag478    description:479      Force DMA to use the threshold mode for both tx and rx480 481  snps,force_sf_dma_mode:482    $ref: /schemas/types.yaml#/definitions/flag483    description:484      Force DMA to use the Store and Forward mode for both tx and485      rx. This flag is ignored if force_thresh_dma_mode is set.486 487  snps,en-tx-lpi-clockgating:488    $ref: /schemas/types.yaml#/definitions/flag489    description:490      Enable gating of the MAC TX clock during TX low-power mode491 492  snps,multicast-filter-bins:493    $ref: /schemas/types.yaml#/definitions/uint32494    description:495      Number of multicast filter hash bins supported by this device496      instance497 498  snps,perfect-filter-entries:499    $ref: /schemas/types.yaml#/definitions/uint32500    description:501      Number of perfect filter entries supported by this device502      instance503 504  snps,ps-speed:505    $ref: /schemas/types.yaml#/definitions/uint32506    description:507      Port selection speed that can be passed to the core when PCS508      is supported. For example, this is used in case of SGMII and509      MAC2MAC connection.510 511  snps,clk-csr:512    $ref: /schemas/types.yaml#/definitions/uint32513    description:514      Frequency division factor for MDC clock.515 516  snps,tso:517    $ref: /schemas/types.yaml#/definitions/flag518    description:519      Enables the TSO feature otherwise it will be managed by MAC HW capability520      register.521 522  mdio:523    $ref: mdio.yaml#524    unevaluatedProperties: false525    description:526      Creates and registers an MDIO bus.527 528    properties:529      compatible:530        const: snps,dwmac-mdio531 532    required:533      - compatible534 535  stmmac-axi-config:536    type: object537    unevaluatedProperties: false538    description:539      AXI BUS Mode parameters.540 541    properties:542      snps,lpi_en:543        $ref: /schemas/types.yaml#/definitions/flag544        description:545          enable Low Power Interface546 547      snps,xit_frm:548        $ref: /schemas/types.yaml#/definitions/flag549        description:550          unlock on WoL551 552      snps,wr_osr_lmt:553        $ref: /schemas/types.yaml#/definitions/uint32554        description:555          max write outstanding req. limit556 557      snps,rd_osr_lmt:558        $ref: /schemas/types.yaml#/definitions/uint32559        description:560          max read outstanding req. limit561 562      snps,kbbe:563        $ref: /schemas/types.yaml#/definitions/uint32564        description:565          do not cross 1KiB boundary.566 567      snps,blen:568        $ref: /schemas/types.yaml#/definitions/uint32-array569        description:570          this is a vector of supported burst length.571        minItems: 7572        maxItems: 7573 574      snps,fb:575        $ref: /schemas/types.yaml#/definitions/flag576        description:577          fixed-burst578 579      snps,mb:580        $ref: /schemas/types.yaml#/definitions/flag581        description:582          mixed-burst583 584      snps,rb:585        $ref: /schemas/types.yaml#/definitions/flag586        description:587          rebuild INCRx Burst588 589required:590  - compatible591  - reg592  - interrupts593  - interrupt-names594  - phy-mode595 596dependencies:597  snps,reset-active-low: ["snps,reset-gpio"]598  snps,reset-delays-us: ["snps,reset-gpio"]599 600allOf:601  - $ref: ethernet-controller.yaml#602  - if:603      properties:604        compatible:605          not:606            contains:607              enum:608                - allwinner,sun7i-a20-gmac609                - allwinner,sun8i-a83t-emac610                - allwinner,sun8i-h3-emac611                - allwinner,sun8i-r40-gmac612                - allwinner,sun8i-v3s-emac613                - allwinner,sun50i-a64-emac614                - loongson,ls2k-dwmac615                - loongson,ls7a-dwmac616                - ingenic,jz4775-mac617                - ingenic,x1000-mac618                - ingenic,x1600-mac619                - ingenic,x1830-mac620                - ingenic,x2000-mac621                - qcom,qcs404-ethqos622                - qcom,sa8775p-ethqos623                - qcom,sc8280xp-ethqos624                - qcom,sm8150-ethqos625                - snps,dwmac-4.00626                - snps,dwmac-4.10a627                - snps,dwmac-4.20a628                - snps,dwmac-5.10a629                - snps,dwmac-5.20630                - snps,dwxgmac631                - snps,dwxgmac-2.10632                - st,spear600-gmac633 634    then:635      properties:636        snps,tso: false637 638additionalProperties: true639 640examples:641  - |642    gmac0: ethernet@e0800000 {643        compatible = "snps,dwxgmac-2.10", "snps,dwxgmac";644        reg = <0xe0800000 0x8000>;645        interrupt-parent = <&vic1>;646        interrupts = <24 23 22>;647        interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";648        mac-address = [000000000000]; /* Filled in by U-Boot */649        max-frame-size = <3800>;650        phy-mode = "gmii";651        snps,multicast-filter-bins = <256>;652        snps,perfect-filter-entries = <128>;653        rx-fifo-depth = <16384>;654        tx-fifo-depth = <16384>;655        clocks = <&clock>;656        clock-names = "stmmaceth";657        snps,axi-config = <&stmmac_axi_setup>;658        snps,mtl-rx-config = <&mtl_rx_setup>;659        snps,mtl-tx-config = <&mtl_tx_setup>;660 661        stmmac_axi_setup: stmmac-axi-config {662            snps,wr_osr_lmt = <0xf>;663            snps,rd_osr_lmt = <0xf>;664            snps,blen = <256 128 64 32 0 0 0>;665        };666 667        mtl_rx_setup: rx-queues-config {668            snps,rx-queues-to-use = <1>;669            snps,rx-sched-sp;670            queue0 {671                snps,dcb-algorithm;672                snps,map-to-dma-channel = <0x0>;673                snps,priority = <0x0>;674            };675        };676 677        mtl_tx_setup: tx-queues-config {678            snps,tx-queues-to-use = <2>;679            snps,tx-sched-wrr;680            queue0 {681                snps,weight = <0x10>;682                snps,dcb-algorithm;683                snps,priority = <0x0>;684            };685 686            queue1 {687                snps,avb-algorithm;688                snps,send_slope = <0x1000>;689                snps,idle_slope = <0x1000>;690                snps,high_credit = <0x3E800>;691                snps,low_credit = <0xFFC18000>;692                snps,priority = <0x1>;693            };694        };695 696        mdio0 {697            #address-cells = <1>;698            #size-cells = <0>;699            compatible = "snps,dwmac-mdio";700            phy1: ethernet-phy@0 {701                reg = <0>;702            };703        };704    };705 706# FIXME: We should set it, but it would report all the generic707# properties as additional properties.708# additionalProperties: false709 710...711