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 26e67e8565SEmmanuel Vadot 27e67e8565SEmmanuel Vadot - items: 28e67e8565SEmmanuel Vadot - enum: 29e67e8565SEmmanuel Vadot - cdns,at91sam9260-macb # Atmel at91sam9 SoCs 30e67e8565SEmmanuel Vadot - cdns,sam9x60-macb # Microchip sam9x60 SoC 31e67e8565SEmmanuel Vadot - const: cdns,macb # Generic 32e67e8565SEmmanuel Vadot 33e67e8565SEmmanuel Vadot - items: 34e67e8565SEmmanuel Vadot - enum: 35e67e8565SEmmanuel Vadot - atmel,sama5d3-macb # 10/100Mbit IP on Atmel sama5d3 SoCs 36e67e8565SEmmanuel Vadot - enum: 37e67e8565SEmmanuel Vadot - cdns,at91sam9260-macb # Atmel at91sam9 SoCs. 38e67e8565SEmmanuel Vadot - const: cdns,macb # Generic 39e67e8565SEmmanuel Vadot 40e67e8565SEmmanuel Vadot - enum: 41e67e8565SEmmanuel Vadot - atmel,sama5d29-gem # GEM XL IP (10/100) on Atmel sama5d29 SoCs 42e67e8565SEmmanuel Vadot - atmel,sama5d2-gem # GEM IP (10/100) on Atmel sama5d2 SoCs 43e67e8565SEmmanuel Vadot - atmel,sama5d3-gem # Gigabit IP on Atmel sama5d3 SoCs 44e67e8565SEmmanuel Vadot - atmel,sama5d4-gem # GEM IP (10/100) on Atmel sama5d4 SoCs 45e67e8565SEmmanuel Vadot - cdns,at32ap7000-macb # Other 10/100 usage or use the generic form 46e67e8565SEmmanuel Vadot - cdns,np4-macb # NP4 SoC devices 47e67e8565SEmmanuel Vadot - microchip,sama7g5-emac # Microchip SAMA7G5 ethernet interface 48e67e8565SEmmanuel Vadot - microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface 49e67e8565SEmmanuel Vadot - sifive,fu540-c000-gem # SiFive FU540-C000 SoC 50e67e8565SEmmanuel Vadot - cdns,emac # Generic 51e67e8565SEmmanuel Vadot - cdns,gem # Generic 52e67e8565SEmmanuel Vadot - cdns,macb # Generic 53e67e8565SEmmanuel Vadot 54e67e8565SEmmanuel Vadot reg: 55e67e8565SEmmanuel Vadot minItems: 1 56e67e8565SEmmanuel Vadot items: 57e67e8565SEmmanuel Vadot - description: Basic register set 58e67e8565SEmmanuel Vadot - description: GEMGXL Management block registers on SiFive FU540-C000 SoC 59e67e8565SEmmanuel Vadot 60e67e8565SEmmanuel Vadot interrupts: 61e67e8565SEmmanuel Vadot minItems: 1 62e67e8565SEmmanuel Vadot maxItems: 8 63e67e8565SEmmanuel Vadot description: One interrupt per available hardware queue 64e67e8565SEmmanuel Vadot 65e67e8565SEmmanuel Vadot clocks: 66e67e8565SEmmanuel Vadot minItems: 1 67e67e8565SEmmanuel Vadot maxItems: 5 68e67e8565SEmmanuel Vadot 69e67e8565SEmmanuel Vadot clock-names: 70e67e8565SEmmanuel Vadot minItems: 1 71e67e8565SEmmanuel Vadot items: 72e67e8565SEmmanuel Vadot - enum: [ ether_clk, hclk, pclk ] 73e67e8565SEmmanuel Vadot - enum: [ hclk, pclk ] 74e67e8565SEmmanuel Vadot - const: tx_clk 75e67e8565SEmmanuel Vadot - enum: [ rx_clk, tsu_clk ] 76e67e8565SEmmanuel Vadot - const: tsu_clk 77e67e8565SEmmanuel Vadot 78e67e8565SEmmanuel Vadot local-mac-address: true 79e67e8565SEmmanuel Vadot 80e67e8565SEmmanuel Vadot phy-mode: true 81e67e8565SEmmanuel Vadot 82e67e8565SEmmanuel Vadot phy-handle: true 83e67e8565SEmmanuel Vadot 84c9ccf3a3SEmmanuel Vadot phys: 85c9ccf3a3SEmmanuel Vadot maxItems: 1 86c9ccf3a3SEmmanuel Vadot 87c9ccf3a3SEmmanuel Vadot resets: 88c9ccf3a3SEmmanuel Vadot maxItems: 1 89c9ccf3a3SEmmanuel Vadot description: 90c9ccf3a3SEmmanuel Vadot Recommended with ZynqMP, specify reset control for this 91c9ccf3a3SEmmanuel Vadot controller instance with zynqmp-reset driver. 92c9ccf3a3SEmmanuel Vadot 93c9ccf3a3SEmmanuel Vadot reset-names: 94c9ccf3a3SEmmanuel Vadot maxItems: 1 95c9ccf3a3SEmmanuel Vadot 96e67e8565SEmmanuel Vadot fixed-link: true 97e67e8565SEmmanuel Vadot 98e67e8565SEmmanuel Vadot iommus: 99e67e8565SEmmanuel Vadot maxItems: 1 100e67e8565SEmmanuel Vadot 101e67e8565SEmmanuel Vadot power-domains: 102e67e8565SEmmanuel Vadot maxItems: 1 103e67e8565SEmmanuel Vadot 104e67e8565SEmmanuel Vadot '#address-cells': 105e67e8565SEmmanuel Vadot const: 1 106e67e8565SEmmanuel Vadot 107e67e8565SEmmanuel Vadot '#size-cells': 108e67e8565SEmmanuel Vadot const: 0 109e67e8565SEmmanuel Vadot 110e67e8565SEmmanuel Vadot mdio: 111e67e8565SEmmanuel Vadot type: object 112e67e8565SEmmanuel Vadot description: 113e67e8565SEmmanuel Vadot Node containing PHY children. If this node is not present, then PHYs will 114e67e8565SEmmanuel Vadot be direct children. 115e67e8565SEmmanuel Vadot 116e67e8565SEmmanuel VadotpatternProperties: 117e67e8565SEmmanuel Vadot "^ethernet-phy@[0-9a-f]$": 118e67e8565SEmmanuel Vadot type: object 119e67e8565SEmmanuel Vadot $ref: ethernet-phy.yaml# 120e67e8565SEmmanuel Vadot 121e67e8565SEmmanuel Vadot properties: 122e67e8565SEmmanuel Vadot reset-gpios: true 123e67e8565SEmmanuel Vadot 124e67e8565SEmmanuel Vadot magic-packet: 125*d5b0e70fSEmmanuel Vadot type: boolean 126e67e8565SEmmanuel Vadot description: 127e67e8565SEmmanuel Vadot Indicates that the hardware supports waking up via magic packet. 128e67e8565SEmmanuel Vadot 129e67e8565SEmmanuel Vadot unevaluatedProperties: false 130e67e8565SEmmanuel Vadot 131e67e8565SEmmanuel Vadotrequired: 132e67e8565SEmmanuel Vadot - compatible 133e67e8565SEmmanuel Vadot - reg 134e67e8565SEmmanuel Vadot - interrupts 135e67e8565SEmmanuel Vadot - clocks 136e67e8565SEmmanuel Vadot - clock-names 137e67e8565SEmmanuel Vadot - phy-mode 138e67e8565SEmmanuel Vadot 139e67e8565SEmmanuel VadotallOf: 140e67e8565SEmmanuel Vadot - $ref: ethernet-controller.yaml# 141e67e8565SEmmanuel Vadot 142e67e8565SEmmanuel Vadot - if: 143e67e8565SEmmanuel Vadot not: 144e67e8565SEmmanuel Vadot properties: 145e67e8565SEmmanuel Vadot compatible: 146e67e8565SEmmanuel Vadot contains: 147e67e8565SEmmanuel Vadot const: sifive,fu540-c000-gem 148e67e8565SEmmanuel Vadot then: 149e67e8565SEmmanuel Vadot properties: 150e67e8565SEmmanuel Vadot reg: 151e67e8565SEmmanuel Vadot maxItems: 1 152e67e8565SEmmanuel Vadot 153e67e8565SEmmanuel VadotunevaluatedProperties: false 154e67e8565SEmmanuel Vadot 155e67e8565SEmmanuel Vadotexamples: 156e67e8565SEmmanuel Vadot - | 157e67e8565SEmmanuel Vadot macb0: ethernet@fffc4000 { 158e67e8565SEmmanuel Vadot compatible = "cdns,at32ap7000-macb"; 159e67e8565SEmmanuel Vadot reg = <0xfffc4000 0x4000>; 160e67e8565SEmmanuel Vadot interrupts = <21>; 161e67e8565SEmmanuel Vadot phy-mode = "rmii"; 162e67e8565SEmmanuel Vadot local-mac-address = [3a 0e 03 04 05 06]; 163e67e8565SEmmanuel Vadot clock-names = "pclk", "hclk", "tx_clk"; 164e67e8565SEmmanuel Vadot clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>; 165e67e8565SEmmanuel Vadot #address-cells = <1>; 166e67e8565SEmmanuel Vadot #size-cells = <0>; 167e67e8565SEmmanuel Vadot 168e67e8565SEmmanuel Vadot ethernet-phy@1 { 169e67e8565SEmmanuel Vadot reg = <0x1>; 170e67e8565SEmmanuel Vadot reset-gpios = <&pioE 6 1>; 171e67e8565SEmmanuel Vadot }; 172e67e8565SEmmanuel Vadot }; 173c9ccf3a3SEmmanuel Vadot 174c9ccf3a3SEmmanuel Vadot - | 175c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/xlnx-zynqmp-clk.h> 176c9ccf3a3SEmmanuel Vadot #include <dt-bindings/power/xlnx-zynqmp-power.h> 177c9ccf3a3SEmmanuel Vadot #include <dt-bindings/reset/xlnx-zynqmp-resets.h> 178c9ccf3a3SEmmanuel Vadot #include <dt-bindings/phy/phy.h> 179c9ccf3a3SEmmanuel Vadot 180c9ccf3a3SEmmanuel Vadot bus { 181c9ccf3a3SEmmanuel Vadot #address-cells = <2>; 182c9ccf3a3SEmmanuel Vadot #size-cells = <2>; 183c9ccf3a3SEmmanuel Vadot gem1: ethernet@ff0c0000 { 184c9ccf3a3SEmmanuel Vadot compatible = "cdns,zynqmp-gem", "cdns,gem"; 185c9ccf3a3SEmmanuel Vadot interrupt-parent = <&gic>; 186c9ccf3a3SEmmanuel Vadot interrupts = <0 59 4>, <0 59 4>; 187c9ccf3a3SEmmanuel Vadot reg = <0x0 0xff0c0000 0x0 0x1000>; 188c9ccf3a3SEmmanuel Vadot clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_REF>, 189c9ccf3a3SEmmanuel Vadot <&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_RX>, 190c9ccf3a3SEmmanuel Vadot <&zynqmp_clk GEM_TSU>; 191c9ccf3a3SEmmanuel Vadot clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; 192c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 193c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 194c9ccf3a3SEmmanuel Vadot iommus = <&smmu 0x875>; 195c9ccf3a3SEmmanuel Vadot power-domains = <&zynqmp_firmware PD_ETH_1>; 196c9ccf3a3SEmmanuel Vadot resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>; 197c9ccf3a3SEmmanuel Vadot reset-names = "gem1_rst"; 198c9ccf3a3SEmmanuel Vadot status = "okay"; 199c9ccf3a3SEmmanuel Vadot phy-mode = "sgmii"; 200c9ccf3a3SEmmanuel Vadot phys = <&psgtr 1 PHY_TYPE_SGMII 1 1>; 201c9ccf3a3SEmmanuel Vadot fixed-link { 202c9ccf3a3SEmmanuel Vadot speed = <1000>; 203c9ccf3a3SEmmanuel Vadot full-duplex; 204c9ccf3a3SEmmanuel Vadot pause; 205c9ccf3a3SEmmanuel Vadot }; 206c9ccf3a3SEmmanuel Vadot }; 207c9ccf3a3SEmmanuel Vadot }; 208