1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/net/renesas 4 $id: http://devicetree.org/schemas/net/renesas,etheravb.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Renesas Ethernet AVB 7 title: Renesas Ethernet AVB 8 8 9 maintainers: 9 maintainers: 10 - Sergei Shtylyov <sergei.shtylyov@gmail.com> 10 - Sergei Shtylyov <sergei.shtylyov@gmail.com> 11 11 12 properties: 12 properties: 13 compatible: 13 compatible: 14 oneOf: 14 oneOf: 15 - items: 15 - items: 16 - enum: 16 - enum: 17 - renesas,etheravb-r8a7742 17 - renesas,etheravb-r8a7742 # RZ/G1H 18 - renesas,etheravb-r8a7743 18 - renesas,etheravb-r8a7743 # RZ/G1M 19 - renesas,etheravb-r8a7744 19 - renesas,etheravb-r8a7744 # RZ/G1N 20 - renesas,etheravb-r8a7745 20 - renesas,etheravb-r8a7745 # RZ/G1E 21 - renesas,etheravb-r8a77470 21 - renesas,etheravb-r8a77470 # RZ/G1C 22 - renesas,etheravb-r8a7790 22 - renesas,etheravb-r8a7790 # R-Car H2 23 - renesas,etheravb-r8a7791 23 - renesas,etheravb-r8a7791 # R-Car M2-W 24 - renesas,etheravb-r8a7792 24 - renesas,etheravb-r8a7792 # R-Car V2H 25 - renesas,etheravb-r8a7793 25 - renesas,etheravb-r8a7793 # R-Car M2-N 26 - renesas,etheravb-r8a7794 26 - renesas,etheravb-r8a7794 # R-Car E2 27 - const: renesas,etheravb-rcar-gen2 27 - const: renesas,etheravb-rcar-gen2 # R-Car Gen2 and RZ/G1 28 28 29 - items: 29 - items: 30 - enum: 30 - enum: 31 - renesas,etheravb-r8a774a1 31 - renesas,etheravb-r8a774a1 # RZ/G2M 32 - renesas,etheravb-r8a774b1 32 - renesas,etheravb-r8a774b1 # RZ/G2N 33 - renesas,etheravb-r8a774c0 33 - renesas,etheravb-r8a774c0 # RZ/G2E 34 - renesas,etheravb-r8a774e1 34 - renesas,etheravb-r8a774e1 # RZ/G2H 35 - renesas,etheravb-r8a7795 35 - renesas,etheravb-r8a7795 # R-Car H3 36 - renesas,etheravb-r8a7796 36 - renesas,etheravb-r8a7796 # R-Car M3-W 37 - renesas,etheravb-r8a77961 37 - renesas,etheravb-r8a77961 # R-Car M3-W+ 38 - renesas,etheravb-r8a77965 38 - renesas,etheravb-r8a77965 # R-Car M3-N 39 - renesas,etheravb-r8a77970 39 - renesas,etheravb-r8a77970 # R-Car V3M 40 - renesas,etheravb-r8a77980 40 - renesas,etheravb-r8a77980 # R-Car V3H 41 - renesas,etheravb-r8a77990 41 - renesas,etheravb-r8a77990 # R-Car E3 42 - renesas,etheravb-r8a77995 42 - renesas,etheravb-r8a77995 # R-Car D3 >> 43 - renesas,etheravb-r8a779a0 # R-Car V3U 43 - const: renesas,etheravb-rcar-gen3 44 - const: renesas,etheravb-rcar-gen3 # R-Car Gen3 and RZ/G2 44 45 45 - items: 46 - items: 46 - enum: 47 - enum: 47 - renesas,etheravb-r8a779a0 !! 48 - renesas,r9a07g044-gbeth # RZ/G2{L,LC} 48 - renesas,etheravb-r8a779g0 !! 49 - const: renesas,rzg2l-gbeth # RZ/G2L 49 - renesas,etheravb-r8a779h0 << 50 - const: renesas,etheravb-rcar-gen4 << 51 50 52 - items: !! 51 reg: true 53 - enum: << 54 - renesas,etheravb-r9a09g011 # R << 55 - const: renesas,etheravb-rzv2m # R << 56 52 57 - items: !! 53 interrupts: true 58 - enum: !! 54 59 - renesas,r9a07g043-gbeth # RZ/G !! 55 interrupt-names: true 60 - renesas,r9a07g044-gbeth # RZ/G !! 56 61 - renesas,r9a07g054-gbeth # RZ/V !! 57 clocks: true 62 - renesas,r9a08g045-gbeth # RZ/G !! 58 63 - const: renesas,rzg2l-gbeth # RZ/{ !! 59 clock-names: true 64 << 65 reg: << 66 minItems: 1 << 67 items: << 68 - description: MAC register block << 69 - description: Stream buffer << 70 << 71 interrupts: << 72 minItems: 1 << 73 maxItems: 29 << 74 << 75 interrupt-names: << 76 minItems: 1 << 77 maxItems: 29 << 78 << 79 clocks: << 80 minItems: 1 << 81 maxItems: 3 << 82 << 83 clock-names: << 84 minItems: 1 << 85 maxItems: 3 << 86 60 87 iommus: 61 iommus: 88 maxItems: 1 62 maxItems: 1 89 63 90 power-domains: 64 power-domains: 91 maxItems: 1 65 maxItems: 1 92 66 93 resets: 67 resets: 94 maxItems: 1 68 maxItems: 1 95 69 96 phy-mode: true 70 phy-mode: true 97 71 98 phy-handle: true 72 phy-handle: true 99 73 100 '#address-cells': 74 '#address-cells': 101 description: Number of address cells for t 75 description: Number of address cells for the MDIO bus. 102 const: 1 76 const: 1 103 deprecated: true << 104 77 105 '#size-cells': 78 '#size-cells': 106 description: Number of size cells on the M 79 description: Number of size cells on the MDIO bus. 107 const: 0 80 const: 0 108 deprecated: true << 109 << 110 mdio: << 111 $ref: /schemas/net/mdio.yaml# << 112 unevaluatedProperties: false << 113 81 114 renesas,no-ether-link: 82 renesas,no-ether-link: 115 type: boolean 83 type: boolean 116 description: 84 description: 117 Specify when a board does not provide a 85 Specify when a board does not provide a proper AVB_LINK signal. 118 86 119 renesas,ether-link-active-low: 87 renesas,ether-link-active-low: 120 type: boolean 88 type: boolean 121 description: 89 description: 122 Specify when the AVB_LINK signal is acti 90 Specify when the AVB_LINK signal is active-low instead of normal 123 active-high. 91 active-high. 124 92 125 rx-internal-delay-ps: 93 rx-internal-delay-ps: 126 enum: [0, 1800] 94 enum: [0, 1800] 127 95 128 tx-internal-delay-ps: 96 tx-internal-delay-ps: 129 enum: [0, 2000] 97 enum: [0, 2000] 130 98 131 # In older bindings there where no mdio child- << 132 # and the PHY. To not fail older bindings acce << 133 # users should describe the PHY inside the mdi << 134 patternProperties: 99 patternProperties: 135 "@[0-9a-f]$": !! 100 "^ethernet-phy@[0-9a-f]$": 136 type: object 101 type: object 137 deprecated: true !! 102 $ref: ethernet-phy.yaml# 138 103 139 required: 104 required: 140 - compatible 105 - compatible 141 - reg 106 - reg 142 - interrupts 107 - interrupts 143 - clocks 108 - clocks 144 - power-domains 109 - power-domains 145 - resets 110 - resets 146 - phy-mode 111 - phy-mode 147 - phy-handle 112 - phy-handle >> 113 - '#address-cells' >> 114 - '#size-cells' 148 115 149 allOf: 116 allOf: 150 - $ref: ethernet-controller.yaml# 117 - $ref: ethernet-controller.yaml# 151 118 152 - if: 119 - if: 153 properties: 120 properties: 154 compatible: 121 compatible: 155 contains: 122 contains: 156 enum: 123 enum: 157 - renesas,etheravb-rcar-gen2 124 - renesas,etheravb-rcar-gen2 158 - renesas,etheravb-r8a7795 125 - renesas,etheravb-r8a7795 159 - renesas,etheravb-r8a7796 126 - renesas,etheravb-r8a7796 160 - renesas,etheravb-r8a77961 127 - renesas,etheravb-r8a77961 161 - renesas,etheravb-r8a77965 128 - renesas,etheravb-r8a77965 162 then: 129 then: 163 properties: 130 properties: 164 reg: 131 reg: 165 minItems: 2 !! 132 items: >> 133 - description: MAC register block >> 134 - description: Stream buffer 166 else: 135 else: 167 properties: 136 properties: 168 reg: 137 reg: 169 maxItems: 1 !! 138 items: >> 139 - description: MAC register block 170 140 171 - if: 141 - if: 172 properties: 142 properties: 173 compatible: 143 compatible: 174 contains: 144 contains: 175 enum: 145 enum: 176 - renesas,etheravb-rcar-gen2 146 - renesas,etheravb-rcar-gen2 177 - renesas,rzg2l-gbeth 147 - renesas,rzg2l-gbeth 178 then: 148 then: 179 properties: 149 properties: 180 interrupts: 150 interrupts: 181 minItems: 1 151 minItems: 1 182 maxItems: 3 152 maxItems: 3 183 interrupt-names: 153 interrupt-names: 184 minItems: 1 154 minItems: 1 185 items: 155 items: 186 - const: mux 156 - const: mux 187 - const: fil 157 - const: fil 188 - const: arp_ns 158 - const: arp_ns 189 rx-internal-delay-ps: false 159 rx-internal-delay-ps: false 190 else: 160 else: 191 if: !! 161 properties: 192 properties: !! 162 interrupts: 193 compatible: !! 163 minItems: 25 194 contains: !! 164 maxItems: 25 195 const: renesas,etheravb-rzv2m !! 165 interrupt-names: 196 then: !! 166 items: 197 properties: !! 167 pattern: '^ch[0-9]+$' 198 interrupts: !! 168 required: 199 minItems: 29 !! 169 - interrupt-names 200 maxItems: 29 !! 170 - rx-internal-delay-ps 201 interrupt-names: << 202 items: << 203 pattern: '^(ch(1?)[0-9])|ch20|ch << 204 rx-internal-delay-ps: false << 205 required: << 206 - interrupt-names << 207 else: << 208 properties: << 209 interrupts: << 210 minItems: 25 << 211 maxItems: 25 << 212 interrupt-names: << 213 items: << 214 pattern: '^ch[0-9]+$' << 215 required: << 216 - interrupt-names << 217 - rx-internal-delay-ps << 218 171 219 - if: 172 - if: 220 properties: 173 properties: 221 compatible: 174 compatible: 222 contains: 175 contains: 223 enum: 176 enum: 224 - renesas,etheravb-r8a774a1 177 - renesas,etheravb-r8a774a1 225 - renesas,etheravb-r8a774b1 178 - renesas,etheravb-r8a774b1 226 - renesas,etheravb-r8a774e1 179 - renesas,etheravb-r8a774e1 227 - renesas,etheravb-r8a7795 180 - renesas,etheravb-r8a7795 228 - renesas,etheravb-r8a7796 181 - renesas,etheravb-r8a7796 229 - renesas,etheravb-r8a77961 182 - renesas,etheravb-r8a77961 230 - renesas,etheravb-r8a77965 183 - renesas,etheravb-r8a77965 231 - renesas,etheravb-r8a77970 184 - renesas,etheravb-r8a77970 232 - renesas,etheravb-r8a77980 185 - renesas,etheravb-r8a77980 233 - renesas,etheravb-rcar-gen4 !! 186 - renesas,etheravb-r8a779a0 234 then: 187 then: 235 required: 188 required: 236 - tx-internal-delay-ps 189 - tx-internal-delay-ps 237 else: 190 else: 238 properties: 191 properties: 239 tx-internal-delay-ps: false 192 tx-internal-delay-ps: false 240 193 241 - if: 194 - if: 242 properties: 195 properties: 243 compatible: 196 compatible: 244 contains: 197 contains: 245 const: renesas,etheravb-r8a77995 198 const: renesas,etheravb-r8a77995 246 then: 199 then: 247 properties: 200 properties: 248 rx-internal-delay-ps: 201 rx-internal-delay-ps: 249 const: 1800 202 const: 1800 250 203 251 - if: 204 - if: 252 properties: 205 properties: 253 compatible: 206 compatible: 254 contains: 207 contains: 255 const: renesas,etheravb-r8a77980 208 const: renesas,etheravb-r8a77980 256 then: 209 then: 257 properties: 210 properties: 258 tx-internal-delay-ps: 211 tx-internal-delay-ps: 259 const: 2000 212 const: 2000 260 213 261 - if: 214 - if: 262 properties: 215 properties: 263 compatible: 216 compatible: 264 contains: 217 contains: 265 const: renesas,rzg2l-gbeth 218 const: renesas,rzg2l-gbeth 266 then: 219 then: 267 properties: 220 properties: 268 clocks: 221 clocks: 269 items: 222 items: 270 - description: Main clock 223 - description: Main clock 271 - description: Register access clo 224 - description: Register access clock 272 - description: Reference clock for 225 - description: Reference clock for RGMII 273 clock-names: 226 clock-names: 274 items: 227 items: 275 - const: axi 228 - const: axi 276 - const: chi 229 - const: chi 277 - const: refclk 230 - const: refclk 278 else: 231 else: 279 if: !! 232 properties: 280 properties: !! 233 clocks: 281 compatible: !! 234 minItems: 1 282 contains: !! 235 items: 283 const: renesas,etheravb-rzv2m !! 236 - description: AVB functional clock 284 then: !! 237 - description: Optional TXC reference clock 285 properties: !! 238 clock-names: 286 clocks: !! 239 minItems: 1 287 items: !! 240 items: 288 - description: Main clock !! 241 - const: fck 289 - description: Coherent Hub Inte !! 242 - const: refclk 290 - description: gPTP reference cl << 291 clock-names: << 292 items: << 293 - const: axi << 294 - const: chi << 295 - const: gptp << 296 else: << 297 properties: << 298 clocks: << 299 minItems: 1 << 300 items: << 301 - description: AVB functional cl << 302 - description: Optional TXC refe << 303 clock-names: << 304 minItems: 1 << 305 items: << 306 - const: fck << 307 - const: refclk << 308 243 309 additionalProperties: false 244 additionalProperties: false 310 245 311 examples: 246 examples: 312 - | 247 - | 313 #include <dt-bindings/clock/r8a7795-cpg-ms 248 #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 314 #include <dt-bindings/interrupt-controller 249 #include <dt-bindings/interrupt-controller/arm-gic.h> 315 #include <dt-bindings/power/r8a7795-sysc.h 250 #include <dt-bindings/power/r8a7795-sysc.h> 316 #include <dt-bindings/gpio/gpio.h> 251 #include <dt-bindings/gpio/gpio.h> 317 aliases { 252 aliases { 318 ethernet0 = &avb; 253 ethernet0 = &avb; 319 }; 254 }; 320 255 321 avb: ethernet@e6800000 { 256 avb: ethernet@e6800000 { 322 compatible = "renesas,etheravb-r8a 257 compatible = "renesas,etheravb-r8a7795", 323 "renesas,etheravb-rca 258 "renesas,etheravb-rcar-gen3"; 324 reg = <0xe6800000 0x800>, <0xe6a00 259 reg = <0xe6800000 0x800>, <0xe6a00000 0x10000>; 325 interrupts = <GIC_SPI 39 IRQ_TYPE_ 260 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 326 <GIC_SPI 40 IRQ_TYPE_ 261 <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 327 <GIC_SPI 41 IRQ_TYPE_ 262 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, 328 <GIC_SPI 42 IRQ_TYPE_ 263 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 329 <GIC_SPI 43 IRQ_TYPE_ 264 <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, 330 <GIC_SPI 44 IRQ_TYPE_ 265 <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, 331 <GIC_SPI 45 IRQ_TYPE_ 266 <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>, 332 <GIC_SPI 46 IRQ_TYPE_ 267 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>, 333 <GIC_SPI 47 IRQ_TYPE_ 268 <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>, 334 <GIC_SPI 48 IRQ_TYPE_ 269 <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, 335 <GIC_SPI 49 IRQ_TYPE_ 270 <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, 336 <GIC_SPI 50 IRQ_TYPE_ 271 <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>, 337 <GIC_SPI 51 IRQ_TYPE_ 272 <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, 338 <GIC_SPI 52 IRQ_TYPE_ 273 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, 339 <GIC_SPI 53 IRQ_TYPE_ 274 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, 340 <GIC_SPI 54 IRQ_TYPE_ 275 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, 341 <GIC_SPI 55 IRQ_TYPE_ 276 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>, 342 <GIC_SPI 56 IRQ_TYPE_ 277 <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, 343 <GIC_SPI 57 IRQ_TYPE_ 278 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 344 <GIC_SPI 58 IRQ_TYPE_ 279 <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, 345 <GIC_SPI 59 IRQ_TYPE_ 280 <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, 346 <GIC_SPI 60 IRQ_TYPE_ 281 <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, 347 <GIC_SPI 61 IRQ_TYPE_ 282 <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, 348 <GIC_SPI 62 IRQ_TYPE_ 283 <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, 349 <GIC_SPI 63 IRQ_TYPE_ 284 <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 350 interrupt-names = "ch0", "ch1", "c 285 interrupt-names = "ch0", "ch1", "ch2", "ch3", "ch4", "ch5", "ch6", 351 "ch7", "ch8", "c 286 "ch7", "ch8", "ch9", "ch10", "ch11", "ch12", 352 "ch13", "ch14", 287 "ch13", "ch14", "ch15", "ch16", "ch17", "ch18", 353 "ch19", "ch20", 288 "ch19", "ch20", "ch21", "ch22", "ch23", "ch24"; 354 clocks = <&cpg CPG_MOD 812>; 289 clocks = <&cpg CPG_MOD 812>; 355 clock-names = "fck"; 290 clock-names = "fck"; 356 iommus = <&ipmmu_ds0 16>; 291 iommus = <&ipmmu_ds0 16>; 357 power-domains = <&sysc R8A7795_PD_ 292 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 358 resets = <&cpg 812>; 293 resets = <&cpg 812>; 359 phy-mode = "rgmii"; 294 phy-mode = "rgmii"; 360 phy-handle = <&phy0>; 295 phy-handle = <&phy0>; 361 rx-internal-delay-ps = <0>; 296 rx-internal-delay-ps = <0>; 362 tx-internal-delay-ps = <2000>; 297 tx-internal-delay-ps = <2000>; 363 #address-cells = <1>; 298 #address-cells = <1>; 364 #size-cells = <0>; 299 #size-cells = <0>; 365 300 366 phy0: ethernet-phy@0 { 301 phy0: ethernet-phy@0 { 367 compatible = "ethernet-phy 302 compatible = "ethernet-phy-id0022.1622", 368 "ethernet-phy 303 "ethernet-phy-ieee802.3-c22"; 369 rxc-skew-ps = <1500>; 304 rxc-skew-ps = <1500>; 370 reg = <0>; 305 reg = <0>; 371 interrupt-parent = <&gpio2 306 interrupt-parent = <&gpio2>; 372 interrupts = <11 IRQ_TYPE_ 307 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 373 reset-gpios = <&gpio2 10 G 308 reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; 374 }; 309 }; 375 }; 310 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.