xref: /linux/Documentation/devicetree/bindings/net/cdns,macb.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
14e5b6de1SGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
24e5b6de1SGeert Uytterhoeven%YAML 1.2
34e5b6de1SGeert Uytterhoeven---
44e5b6de1SGeert Uytterhoeven$id: http://devicetree.org/schemas/net/cdns,macb.yaml#
54e5b6de1SGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml#
64e5b6de1SGeert Uytterhoeven
74e5b6de1SGeert Uytterhoeventitle: Cadence MACB/GEM Ethernet controller
84e5b6de1SGeert Uytterhoeven
94e5b6de1SGeert Uytterhoevenmaintainers:
104e5b6de1SGeert Uytterhoeven  - Nicolas Ferre <nicolas.ferre@microchip.com>
114e5b6de1SGeert Uytterhoeven  - Claudiu Beznea <claudiu.beznea@microchip.com>
124e5b6de1SGeert Uytterhoeven
134e5b6de1SGeert Uytterhoevenproperties:
144e5b6de1SGeert Uytterhoeven  compatible:
154e5b6de1SGeert Uytterhoeven    oneOf:
164e5b6de1SGeert Uytterhoeven      - items:
174e5b6de1SGeert Uytterhoeven          - enum:
184e5b6de1SGeert Uytterhoeven              - cdns,at91rm9200-emac  # Atmel at91rm9200 SoC
194e5b6de1SGeert Uytterhoeven          - const: cdns,emac          # Generic
204e5b6de1SGeert Uytterhoeven
214e5b6de1SGeert Uytterhoeven      - items:
224e5b6de1SGeert Uytterhoeven          - enum:
234e5b6de1SGeert Uytterhoeven              - cdns,zynq-gem         # Xilinx Zynq-7xxx SoC
244e5b6de1SGeert Uytterhoeven              - cdns,zynqmp-gem       # Xilinx Zynq Ultrascale+ MPSoC
254e5b6de1SGeert Uytterhoeven          - const: cdns,gem           # Generic
26afa950b8SKrzysztof Kozlowski        deprecated: true
27afa950b8SKrzysztof Kozlowski
28afa950b8SKrzysztof Kozlowski      - items:
29afa950b8SKrzysztof Kozlowski          - enum:
30afa950b8SKrzysztof Kozlowski              - xlnx,versal-gem       # Xilinx Versal
31afa950b8SKrzysztof Kozlowski              - xlnx,zynq-gem         # Xilinx Zynq-7xxx SoC
32afa950b8SKrzysztof Kozlowski              - xlnx,zynqmp-gem       # Xilinx Zynq Ultrascale+ MPSoC
33afa950b8SKrzysztof Kozlowski          - const: cdns,gem           # Generic
344e5b6de1SGeert Uytterhoeven
354e5b6de1SGeert Uytterhoeven      - items:
364e5b6de1SGeert Uytterhoeven          - enum:
374e5b6de1SGeert Uytterhoeven              - cdns,at91sam9260-macb # Atmel at91sam9 SoCs
384e5b6de1SGeert Uytterhoeven              - cdns,sam9x60-macb     # Microchip sam9x60 SoC
39b09c6f8fSConor Dooley              - microchip,mpfs-macb   # Microchip PolarFire SoC
404e5b6de1SGeert Uytterhoeven          - const: cdns,macb          # Generic
414e5b6de1SGeert Uytterhoeven
424e5b6de1SGeert Uytterhoeven      - items:
434e5b6de1SGeert Uytterhoeven          - enum:
444e5b6de1SGeert Uytterhoeven              - atmel,sama5d3-macb    # 10/100Mbit IP on Atmel sama5d3 SoCs
454e5b6de1SGeert Uytterhoeven          - enum:
464e5b6de1SGeert Uytterhoeven              - cdns,at91sam9260-macb # Atmel at91sam9 SoCs.
474e5b6de1SGeert Uytterhoeven          - const: cdns,macb          # Generic
484e5b6de1SGeert Uytterhoeven
494e5b6de1SGeert Uytterhoeven      - enum:
504e5b6de1SGeert Uytterhoeven          - atmel,sama5d29-gem        # GEM XL IP (10/100) on Atmel sama5d29 SoCs
514e5b6de1SGeert Uytterhoeven          - atmel,sama5d2-gem         # GEM IP (10/100) on Atmel sama5d2 SoCs
524e5b6de1SGeert Uytterhoeven          - atmel,sama5d3-gem         # Gigabit IP on Atmel sama5d3 SoCs
534e5b6de1SGeert Uytterhoeven          - atmel,sama5d4-gem         # GEM IP (10/100) on Atmel sama5d4 SoCs
544e5b6de1SGeert Uytterhoeven          - cdns,np4-macb             # NP4 SoC devices
554e5b6de1SGeert Uytterhoeven          - microchip,sama7g5-emac    # Microchip SAMA7G5 ethernet interface
564e5b6de1SGeert Uytterhoeven          - microchip,sama7g5-gem     # Microchip SAMA7G5 gigabit ethernet interface
574e5b6de1SGeert Uytterhoeven          - sifive,fu540-c000-gem     # SiFive FU540-C000 SoC
584e5b6de1SGeert Uytterhoeven          - cdns,emac                 # Generic
594e5b6de1SGeert Uytterhoeven          - cdns,gem                  # Generic
604e5b6de1SGeert Uytterhoeven          - cdns,macb                 # Generic
614e5b6de1SGeert Uytterhoeven
625c237967SVarshini Rajendran      - items:
635c237967SVarshini Rajendran          - enum:
645c237967SVarshini Rajendran              - microchip,sam9x7-gem     # Microchip SAM9X7 gigabit ethernet interface
655c237967SVarshini Rajendran          - const: microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface
665c237967SVarshini Rajendran
674e5b6de1SGeert Uytterhoeven  reg:
684e5b6de1SGeert Uytterhoeven    minItems: 1
694e5b6de1SGeert Uytterhoeven    items:
704e5b6de1SGeert Uytterhoeven      - description: Basic register set
714e5b6de1SGeert Uytterhoeven      - description: GEMGXL Management block registers on SiFive FU540-C000 SoC
724e5b6de1SGeert Uytterhoeven
734e5b6de1SGeert Uytterhoeven  interrupts:
744e5b6de1SGeert Uytterhoeven    minItems: 1
754e5b6de1SGeert Uytterhoeven    maxItems: 8
764e5b6de1SGeert Uytterhoeven    description: One interrupt per available hardware queue
774e5b6de1SGeert Uytterhoeven
784e5b6de1SGeert Uytterhoeven  clocks:
794e5b6de1SGeert Uytterhoeven    minItems: 1
804e5b6de1SGeert Uytterhoeven    maxItems: 5
814e5b6de1SGeert Uytterhoeven
824e5b6de1SGeert Uytterhoeven  clock-names:
834e5b6de1SGeert Uytterhoeven    minItems: 1
844e5b6de1SGeert Uytterhoeven    items:
854e5b6de1SGeert Uytterhoeven      - enum: [ ether_clk, hclk, pclk ]
864e5b6de1SGeert Uytterhoeven      - enum: [ hclk, pclk ]
874e5b6de1SGeert Uytterhoeven      - const: tx_clk
884e5b6de1SGeert Uytterhoeven      - enum: [ rx_clk, tsu_clk ]
894e5b6de1SGeert Uytterhoeven      - const: tsu_clk
904e5b6de1SGeert Uytterhoeven
914e5b6de1SGeert Uytterhoeven  local-mac-address: true
924e5b6de1SGeert Uytterhoeven
934e5b6de1SGeert Uytterhoeven  phy-mode: true
944e5b6de1SGeert Uytterhoeven
954e5b6de1SGeert Uytterhoeven  phy-handle: true
964e5b6de1SGeert Uytterhoeven
97f4ea385aSRobert Hancock  phys:
98f4ea385aSRobert Hancock    maxItems: 1
99f4ea385aSRobert Hancock
100f4ea385aSRobert Hancock  resets:
101f4ea385aSRobert Hancock    maxItems: 1
102f4ea385aSRobert Hancock    description:
103f4ea385aSRobert Hancock      Recommended with ZynqMP, specify reset control for this
104f4ea385aSRobert Hancock      controller instance with zynqmp-reset driver.
105f4ea385aSRobert Hancock
106f4ea385aSRobert Hancock  reset-names:
107f4ea385aSRobert Hancock    maxItems: 1
108f4ea385aSRobert Hancock
1094e5b6de1SGeert Uytterhoeven  fixed-link: true
1104e5b6de1SGeert Uytterhoeven
1114e5b6de1SGeert Uytterhoeven  iommus:
1124e5b6de1SGeert Uytterhoeven    maxItems: 1
1134e5b6de1SGeert Uytterhoeven
1144e5b6de1SGeert Uytterhoeven  power-domains:
1154e5b6de1SGeert Uytterhoeven    maxItems: 1
1164e5b6de1SGeert Uytterhoeven
1175b32c61aSPranavi Somisetty  cdns,rx-watermark:
1185b32c61aSPranavi Somisetty    $ref: /schemas/types.yaml#/definitions/uint32
1195b32c61aSPranavi Somisetty    description:
1205b32c61aSPranavi Somisetty      When the receive partial store and forward mode is activated,
1215b32c61aSPranavi Somisetty      the receiver will only begin to forward the packet to the external
1225b32c61aSPranavi Somisetty      AHB or AXI slave when enough packet data is stored in the SRAM packet buffer.
1235b32c61aSPranavi Somisetty      rx-watermark corresponds to the number of SRAM buffer locations,
1245b32c61aSPranavi Somisetty      that need to be filled, before the forwarding process is activated.
1255b32c61aSPranavi Somisetty      Width of the SRAM is platform dependent, and can be 4, 8 or 16 bytes.
1265b32c61aSPranavi Somisetty
1274e5b6de1SGeert Uytterhoeven  '#address-cells':
1284e5b6de1SGeert Uytterhoeven    const: 1
1294e5b6de1SGeert Uytterhoeven
1304e5b6de1SGeert Uytterhoeven  '#size-cells':
1314e5b6de1SGeert Uytterhoeven    const: 0
1324e5b6de1SGeert Uytterhoeven
1334e5b6de1SGeert Uytterhoeven  mdio:
1344e5b6de1SGeert Uytterhoeven    type: object
1354e5b6de1SGeert Uytterhoeven    description:
1364e5b6de1SGeert Uytterhoeven      Node containing PHY children. If this node is not present, then PHYs will
1374e5b6de1SGeert Uytterhoeven      be direct children.
1384e5b6de1SGeert Uytterhoeven
1394e5b6de1SGeert UytterhoevenpatternProperties:
1404e5b6de1SGeert Uytterhoeven  "^ethernet-phy@[0-9a-f]$":
1414e5b6de1SGeert Uytterhoeven    type: object
1424e5b6de1SGeert Uytterhoeven    $ref: ethernet-phy.yaml#
1434e5b6de1SGeert Uytterhoeven
1444e5b6de1SGeert Uytterhoeven    properties:
1454e5b6de1SGeert Uytterhoeven      reset-gpios: true
1464e5b6de1SGeert Uytterhoeven
1474e5b6de1SGeert Uytterhoeven      magic-packet:
1484e71ed98SRob Herring        type: boolean
149*783bfe27SVineeth Karumanchi        deprecated: true
1504e5b6de1SGeert Uytterhoeven        description:
1514e5b6de1SGeert Uytterhoeven          Indicates that the hardware supports waking up via magic packet.
1524e5b6de1SGeert Uytterhoeven
1534e5b6de1SGeert Uytterhoeven    unevaluatedProperties: false
1544e5b6de1SGeert Uytterhoeven
1554e5b6de1SGeert Uytterhoevenrequired:
1564e5b6de1SGeert Uytterhoeven  - compatible
1574e5b6de1SGeert Uytterhoeven  - reg
1584e5b6de1SGeert Uytterhoeven  - interrupts
1594e5b6de1SGeert Uytterhoeven  - clocks
1604e5b6de1SGeert Uytterhoeven  - clock-names
1614e5b6de1SGeert Uytterhoeven  - phy-mode
1624e5b6de1SGeert Uytterhoeven
1634e5b6de1SGeert UytterhoevenallOf:
1644e5b6de1SGeert Uytterhoeven  - $ref: ethernet-controller.yaml#
1654e5b6de1SGeert Uytterhoeven
1664e5b6de1SGeert Uytterhoeven  - if:
1674e5b6de1SGeert Uytterhoeven      not:
1684e5b6de1SGeert Uytterhoeven        properties:
1694e5b6de1SGeert Uytterhoeven          compatible:
1704e5b6de1SGeert Uytterhoeven            contains:
1714e5b6de1SGeert Uytterhoeven              const: sifive,fu540-c000-gem
1724e5b6de1SGeert Uytterhoeven    then:
1734e5b6de1SGeert Uytterhoeven      properties:
1744e5b6de1SGeert Uytterhoeven        reg:
1754e5b6de1SGeert Uytterhoeven          maxItems: 1
1764e5b6de1SGeert Uytterhoeven
1774e5b6de1SGeert UytterhoevenunevaluatedProperties: false
1784e5b6de1SGeert Uytterhoeven
1794e5b6de1SGeert Uytterhoevenexamples:
1804e5b6de1SGeert Uytterhoeven  - |
1814e5b6de1SGeert Uytterhoeven    macb0: ethernet@fffc4000 {
1828bfdfbb2SHans-Christian Noren Egtvedt            compatible = "cdns,macb";
1834e5b6de1SGeert Uytterhoeven            reg = <0xfffc4000 0x4000>;
1844e5b6de1SGeert Uytterhoeven            interrupts = <21>;
1855b32c61aSPranavi Somisetty            cdns,rx-watermark = <0x44>;
1864e5b6de1SGeert Uytterhoeven            phy-mode = "rmii";
1874e5b6de1SGeert Uytterhoeven            local-mac-address = [3a 0e 03 04 05 06];
1884e5b6de1SGeert Uytterhoeven            clock-names = "pclk", "hclk", "tx_clk";
1894e5b6de1SGeert Uytterhoeven            clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
1904e5b6de1SGeert Uytterhoeven            #address-cells = <1>;
1914e5b6de1SGeert Uytterhoeven            #size-cells = <0>;
1924e5b6de1SGeert Uytterhoeven
1934e5b6de1SGeert Uytterhoeven            ethernet-phy@1 {
1944e5b6de1SGeert Uytterhoeven                    reg = <0x1>;
1954e5b6de1SGeert Uytterhoeven                    reset-gpios = <&pioE 6 1>;
1964e5b6de1SGeert Uytterhoeven            };
1974e5b6de1SGeert Uytterhoeven    };
198f4ea385aSRobert Hancock
199f4ea385aSRobert Hancock  - |
200f4ea385aSRobert Hancock    #include <dt-bindings/clock/xlnx-zynqmp-clk.h>
201f4ea385aSRobert Hancock    #include <dt-bindings/power/xlnx-zynqmp-power.h>
202f4ea385aSRobert Hancock    #include <dt-bindings/reset/xlnx-zynqmp-resets.h>
203f4ea385aSRobert Hancock    #include <dt-bindings/phy/phy.h>
204f4ea385aSRobert Hancock
205f4ea385aSRobert Hancock    bus {
206f4ea385aSRobert Hancock            #address-cells = <2>;
207f4ea385aSRobert Hancock            #size-cells = <2>;
208f4ea385aSRobert Hancock            gem1: ethernet@ff0c0000 {
209afa950b8SKrzysztof Kozlowski                    compatible = "xlnx,zynqmp-gem", "cdns,gem";
210f4ea385aSRobert Hancock                    interrupt-parent = <&gic>;
211f4ea385aSRobert Hancock                    interrupts = <0 59 4>, <0 59 4>;
212f4ea385aSRobert Hancock                    reg = <0x0 0xff0c0000 0x0 0x1000>;
213f4ea385aSRobert Hancock                    clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_REF>,
214f4ea385aSRobert Hancock                             <&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_RX>,
215f4ea385aSRobert Hancock                             <&zynqmp_clk GEM_TSU>;
216f4ea385aSRobert Hancock                    clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
217f4ea385aSRobert Hancock                    #address-cells = <1>;
218f4ea385aSRobert Hancock                    #size-cells = <0>;
219f4ea385aSRobert Hancock                    iommus = <&smmu 0x875>;
220f4ea385aSRobert Hancock                    power-domains = <&zynqmp_firmware PD_ETH_1>;
221f4ea385aSRobert Hancock                    resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
222f4ea385aSRobert Hancock                    reset-names = "gem1_rst";
223f4ea385aSRobert Hancock                    phy-mode = "sgmii";
224f4ea385aSRobert Hancock                    phys = <&psgtr 1 PHY_TYPE_SGMII 1 1>;
225f4ea385aSRobert Hancock                    fixed-link {
226f4ea385aSRobert Hancock                            speed = <1000>;
227f4ea385aSRobert Hancock                            full-duplex;
228f4ea385aSRobert Hancock                            pause;
229f4ea385aSRobert Hancock                    };
230f4ea385aSRobert Hancock            };
231f4ea385aSRobert Hancock    };
232