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