1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2e67e8565SEmmanuel Vadot%YAML 1.2 3e67e8565SEmmanuel Vadot--- 4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/net/cdns,macb.yaml# 5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6e67e8565SEmmanuel Vadot 7e67e8565SEmmanuel Vadottitle: Cadence MACB/GEM Ethernet controller 8e67e8565SEmmanuel Vadot 9e67e8565SEmmanuel Vadotmaintainers: 10e67e8565SEmmanuel Vadot - Nicolas Ferre <nicolas.ferre@microchip.com> 11e67e8565SEmmanuel Vadot - Claudiu Beznea <claudiu.beznea@microchip.com> 12e67e8565SEmmanuel Vadot 13e67e8565SEmmanuel Vadotproperties: 14e67e8565SEmmanuel Vadot compatible: 15e67e8565SEmmanuel Vadot oneOf: 16e67e8565SEmmanuel Vadot - items: 17e67e8565SEmmanuel Vadot - enum: 18e67e8565SEmmanuel Vadot - cdns,at91rm9200-emac # Atmel at91rm9200 SoC 19e67e8565SEmmanuel Vadot - const: cdns,emac # Generic 20e67e8565SEmmanuel Vadot 21e67e8565SEmmanuel Vadot - items: 22e67e8565SEmmanuel Vadot - enum: 23e67e8565SEmmanuel Vadot - cdns,zynq-gem # Xilinx Zynq-7xxx SoC 24e67e8565SEmmanuel Vadot - cdns,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC 25e67e8565SEmmanuel Vadot - const: cdns,gem # Generic 26b97ee269SEmmanuel Vadot deprecated: true 27b97ee269SEmmanuel Vadot 28b97ee269SEmmanuel Vadot - items: 29b97ee269SEmmanuel Vadot - enum: 30b97ee269SEmmanuel Vadot - xlnx,versal-gem # Xilinx Versal 31b97ee269SEmmanuel Vadot - xlnx,zynq-gem # Xilinx Zynq-7xxx SoC 32b97ee269SEmmanuel Vadot - xlnx,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC 33b97ee269SEmmanuel Vadot - const: cdns,gem # Generic 34e67e8565SEmmanuel Vadot 35e67e8565SEmmanuel Vadot - items: 36e67e8565SEmmanuel Vadot - enum: 37e67e8565SEmmanuel Vadot - cdns,at91sam9260-macb # Atmel at91sam9 SoCs 38e67e8565SEmmanuel Vadot - cdns,sam9x60-macb # Microchip sam9x60 SoC 39b97ee269SEmmanuel Vadot - microchip,mpfs-macb # Microchip PolarFire SoC 40e67e8565SEmmanuel Vadot - const: cdns,macb # Generic 41e67e8565SEmmanuel Vadot 42e67e8565SEmmanuel Vadot - items: 43e67e8565SEmmanuel Vadot - enum: 44e67e8565SEmmanuel Vadot - atmel,sama5d3-macb # 10/100Mbit IP on Atmel sama5d3 SoCs 45e67e8565SEmmanuel Vadot - enum: 46e67e8565SEmmanuel Vadot - cdns,at91sam9260-macb # Atmel at91sam9 SoCs. 47e67e8565SEmmanuel Vadot - const: cdns,macb # Generic 48e67e8565SEmmanuel Vadot 49e67e8565SEmmanuel Vadot - enum: 50e67e8565SEmmanuel Vadot - atmel,sama5d29-gem # GEM XL IP (10/100) on Atmel sama5d29 SoCs 51e67e8565SEmmanuel Vadot - atmel,sama5d2-gem # GEM IP (10/100) on Atmel sama5d2 SoCs 52e67e8565SEmmanuel Vadot - atmel,sama5d3-gem # Gigabit IP on Atmel sama5d3 SoCs 53e67e8565SEmmanuel Vadot - atmel,sama5d4-gem # GEM IP (10/100) on Atmel sama5d4 SoCs 54e67e8565SEmmanuel Vadot - cdns,np4-macb # NP4 SoC devices 55e67e8565SEmmanuel Vadot - microchip,sama7g5-emac # Microchip SAMA7G5 ethernet interface 56e67e8565SEmmanuel Vadot - microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface 57e67e8565SEmmanuel Vadot - sifive,fu540-c000-gem # SiFive FU540-C000 SoC 58e67e8565SEmmanuel Vadot - cdns,emac # Generic 59e67e8565SEmmanuel Vadot - cdns,gem # Generic 60e67e8565SEmmanuel Vadot - cdns,macb # Generic 61e67e8565SEmmanuel Vadot 6201950c46SEmmanuel Vadot - items: 6301950c46SEmmanuel Vadot - enum: 6401950c46SEmmanuel Vadot - microchip,sam9x7-gem # Microchip SAM9X7 gigabit ethernet interface 6501950c46SEmmanuel Vadot - const: microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface 6601950c46SEmmanuel Vadot 67e67e8565SEmmanuel Vadot reg: 68e67e8565SEmmanuel Vadot minItems: 1 69e67e8565SEmmanuel Vadot items: 70e67e8565SEmmanuel Vadot - description: Basic register set 71e67e8565SEmmanuel Vadot - description: GEMGXL Management block registers on SiFive FU540-C000 SoC 72e67e8565SEmmanuel Vadot 73e67e8565SEmmanuel Vadot interrupts: 74e67e8565SEmmanuel Vadot minItems: 1 75e67e8565SEmmanuel Vadot maxItems: 8 76e67e8565SEmmanuel Vadot description: One interrupt per available hardware queue 77e67e8565SEmmanuel Vadot 78e67e8565SEmmanuel Vadot clocks: 79e67e8565SEmmanuel Vadot minItems: 1 80e67e8565SEmmanuel Vadot maxItems: 5 81e67e8565SEmmanuel Vadot 82e67e8565SEmmanuel Vadot clock-names: 83e67e8565SEmmanuel Vadot minItems: 1 84e67e8565SEmmanuel Vadot items: 85e67e8565SEmmanuel Vadot - enum: [ ether_clk, hclk, pclk ] 86e67e8565SEmmanuel Vadot - enum: [ hclk, pclk ] 87e67e8565SEmmanuel Vadot - const: tx_clk 88e67e8565SEmmanuel Vadot - enum: [ rx_clk, tsu_clk ] 89e67e8565SEmmanuel Vadot - const: tsu_clk 90e67e8565SEmmanuel Vadot 91e67e8565SEmmanuel Vadot local-mac-address: true 92e67e8565SEmmanuel Vadot 93e67e8565SEmmanuel Vadot phy-mode: true 94e67e8565SEmmanuel Vadot 95e67e8565SEmmanuel Vadot phy-handle: true 96e67e8565SEmmanuel Vadot 97c9ccf3a3SEmmanuel Vadot phys: 98c9ccf3a3SEmmanuel Vadot maxItems: 1 99c9ccf3a3SEmmanuel Vadot 100c9ccf3a3SEmmanuel Vadot resets: 101c9ccf3a3SEmmanuel Vadot maxItems: 1 102c9ccf3a3SEmmanuel Vadot description: 103c9ccf3a3SEmmanuel Vadot Recommended with ZynqMP, specify reset control for this 104c9ccf3a3SEmmanuel Vadot controller instance with zynqmp-reset driver. 105c9ccf3a3SEmmanuel Vadot 106c9ccf3a3SEmmanuel Vadot reset-names: 107c9ccf3a3SEmmanuel Vadot maxItems: 1 108c9ccf3a3SEmmanuel Vadot 109e67e8565SEmmanuel Vadot fixed-link: true 110e67e8565SEmmanuel Vadot 111e67e8565SEmmanuel Vadot iommus: 112e67e8565SEmmanuel Vadot maxItems: 1 113e67e8565SEmmanuel Vadot 114e67e8565SEmmanuel Vadot power-domains: 115e67e8565SEmmanuel Vadot maxItems: 1 116e67e8565SEmmanuel Vadot 117f126890aSEmmanuel Vadot cdns,rx-watermark: 118f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 119f126890aSEmmanuel Vadot description: 120f126890aSEmmanuel Vadot When the receive partial store and forward mode is activated, 121f126890aSEmmanuel Vadot the receiver will only begin to forward the packet to the external 122f126890aSEmmanuel Vadot AHB or AXI slave when enough packet data is stored in the SRAM packet buffer. 123f126890aSEmmanuel Vadot rx-watermark corresponds to the number of SRAM buffer locations, 124f126890aSEmmanuel Vadot that need to be filled, before the forwarding process is activated. 125f126890aSEmmanuel Vadot Width of the SRAM is platform dependent, and can be 4, 8 or 16 bytes. 126f126890aSEmmanuel Vadot 127e67e8565SEmmanuel Vadot '#address-cells': 128e67e8565SEmmanuel Vadot const: 1 129e67e8565SEmmanuel Vadot 130e67e8565SEmmanuel Vadot '#size-cells': 131e67e8565SEmmanuel Vadot const: 0 132e67e8565SEmmanuel Vadot 133e67e8565SEmmanuel Vadot mdio: 134e67e8565SEmmanuel Vadot type: object 135e67e8565SEmmanuel Vadot description: 136e67e8565SEmmanuel Vadot Node containing PHY children. If this node is not present, then PHYs will 137e67e8565SEmmanuel Vadot be direct children. 138e67e8565SEmmanuel Vadot 139e67e8565SEmmanuel VadotpatternProperties: 140e67e8565SEmmanuel Vadot "^ethernet-phy@[0-9a-f]$": 141e67e8565SEmmanuel Vadot type: object 142e67e8565SEmmanuel Vadot $ref: ethernet-phy.yaml# 143e67e8565SEmmanuel Vadot 144e67e8565SEmmanuel Vadot properties: 145e67e8565SEmmanuel Vadot reset-gpios: true 146e67e8565SEmmanuel Vadot 147e67e8565SEmmanuel Vadot magic-packet: 148d5b0e70fSEmmanuel Vadot type: boolean 149*0e8011faSEmmanuel Vadot deprecated: true 150e67e8565SEmmanuel Vadot description: 151e67e8565SEmmanuel Vadot Indicates that the hardware supports waking up via magic packet. 152e67e8565SEmmanuel Vadot 153e67e8565SEmmanuel Vadot unevaluatedProperties: false 154e67e8565SEmmanuel Vadot 155e67e8565SEmmanuel Vadotrequired: 156e67e8565SEmmanuel Vadot - compatible 157e67e8565SEmmanuel Vadot - reg 158e67e8565SEmmanuel Vadot - interrupts 159e67e8565SEmmanuel Vadot - clocks 160e67e8565SEmmanuel Vadot - clock-names 161e67e8565SEmmanuel Vadot - phy-mode 162e67e8565SEmmanuel Vadot 163e67e8565SEmmanuel VadotallOf: 164e67e8565SEmmanuel Vadot - $ref: ethernet-controller.yaml# 165e67e8565SEmmanuel Vadot 166e67e8565SEmmanuel Vadot - if: 167e67e8565SEmmanuel Vadot not: 168e67e8565SEmmanuel Vadot properties: 169e67e8565SEmmanuel Vadot compatible: 170e67e8565SEmmanuel Vadot contains: 171e67e8565SEmmanuel Vadot const: sifive,fu540-c000-gem 172e67e8565SEmmanuel Vadot then: 173e67e8565SEmmanuel Vadot properties: 174e67e8565SEmmanuel Vadot reg: 175e67e8565SEmmanuel Vadot maxItems: 1 176e67e8565SEmmanuel Vadot 177e67e8565SEmmanuel VadotunevaluatedProperties: false 178e67e8565SEmmanuel Vadot 179e67e8565SEmmanuel Vadotexamples: 180e67e8565SEmmanuel Vadot - | 181e67e8565SEmmanuel Vadot macb0: ethernet@fffc4000 { 182b97ee269SEmmanuel Vadot compatible = "cdns,macb"; 183e67e8565SEmmanuel Vadot reg = <0xfffc4000 0x4000>; 184e67e8565SEmmanuel Vadot interrupts = <21>; 185f126890aSEmmanuel Vadot cdns,rx-watermark = <0x44>; 186e67e8565SEmmanuel Vadot phy-mode = "rmii"; 187e67e8565SEmmanuel Vadot local-mac-address = [3a 0e 03 04 05 06]; 188e67e8565SEmmanuel Vadot clock-names = "pclk", "hclk", "tx_clk"; 189e67e8565SEmmanuel Vadot clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>; 190e67e8565SEmmanuel Vadot #address-cells = <1>; 191e67e8565SEmmanuel Vadot #size-cells = <0>; 192e67e8565SEmmanuel Vadot 193e67e8565SEmmanuel Vadot ethernet-phy@1 { 194e67e8565SEmmanuel Vadot reg = <0x1>; 195e67e8565SEmmanuel Vadot reset-gpios = <&pioE 6 1>; 196e67e8565SEmmanuel Vadot }; 197e67e8565SEmmanuel Vadot }; 198c9ccf3a3SEmmanuel Vadot 199c9ccf3a3SEmmanuel Vadot - | 200c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/xlnx-zynqmp-clk.h> 201c9ccf3a3SEmmanuel Vadot #include <dt-bindings/power/xlnx-zynqmp-power.h> 202c9ccf3a3SEmmanuel Vadot #include <dt-bindings/reset/xlnx-zynqmp-resets.h> 203c9ccf3a3SEmmanuel Vadot #include <dt-bindings/phy/phy.h> 204c9ccf3a3SEmmanuel Vadot 205c9ccf3a3SEmmanuel Vadot bus { 206c9ccf3a3SEmmanuel Vadot #address-cells = <2>; 207c9ccf3a3SEmmanuel Vadot #size-cells = <2>; 208c9ccf3a3SEmmanuel Vadot gem1: ethernet@ff0c0000 { 209b97ee269SEmmanuel Vadot compatible = "xlnx,zynqmp-gem", "cdns,gem"; 210c9ccf3a3SEmmanuel Vadot interrupt-parent = <&gic>; 211c9ccf3a3SEmmanuel Vadot interrupts = <0 59 4>, <0 59 4>; 212c9ccf3a3SEmmanuel Vadot reg = <0x0 0xff0c0000 0x0 0x1000>; 213c9ccf3a3SEmmanuel Vadot clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_REF>, 214c9ccf3a3SEmmanuel Vadot <&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_RX>, 215c9ccf3a3SEmmanuel Vadot <&zynqmp_clk GEM_TSU>; 216c9ccf3a3SEmmanuel Vadot clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; 217c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 218c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 219c9ccf3a3SEmmanuel Vadot iommus = <&smmu 0x875>; 220c9ccf3a3SEmmanuel Vadot power-domains = <&zynqmp_firmware PD_ETH_1>; 221c9ccf3a3SEmmanuel Vadot resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>; 222c9ccf3a3SEmmanuel Vadot reset-names = "gem1_rst"; 223c9ccf3a3SEmmanuel Vadot phy-mode = "sgmii"; 224c9ccf3a3SEmmanuel Vadot phys = <&psgtr 1 PHY_TYPE_SGMII 1 1>; 225c9ccf3a3SEmmanuel Vadot fixed-link { 226c9ccf3a3SEmmanuel Vadot speed = <1000>; 227c9ccf3a3SEmmanuel Vadot full-duplex; 228c9ccf3a3SEmmanuel Vadot pause; 229c9ccf3a3SEmmanuel Vadot }; 230c9ccf3a3SEmmanuel Vadot }; 231c9ccf3a3SEmmanuel Vadot }; 232