| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/net/renesas,rzv2h-gbeth.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: GBETH glue layer for Renesas RZ/V2H(P) (and similar SoCs) |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Lad Prabhakar <[email protected]> |
| 11 |
|
| 12 |
select: |
| 13 |
properties: |
| 14 |
compatible: |
| 15 |
contains: |
| 16 |
enum: |
| 17 |
- renesas,r9a09g047-gbeth |
| 18 |
- renesas,r9a09g056-gbeth |
| 19 |
- renesas,r9a09g057-gbeth |
| 20 |
- renesas,r9a09g077-gbeth |
| 21 |
- renesas,r9a09g087-gbeth |
| 22 |
- renesas,rzv2h-gbeth |
| 23 |
required: |
| 24 |
- compatible |
| 25 |
|
| 26 |
properties: |
| 27 |
compatible: |
| 28 |
oneOf: |
| 29 |
- items: |
| 30 |
- const: renesas,r9a08g046-gbeth # RZ/G3L |
| 31 |
- const: snps,dwmac-5.30a |
| 32 |
- items: |
| 33 |
- enum: |
| 34 |
- renesas,r9a09g047-gbeth # RZ/G3E |
| 35 |
- renesas,r9a09g056-gbeth # RZ/V2N |
| 36 |
- renesas,r9a09g057-gbeth # RZ/V2H(P) |
| 37 |
- const: renesas,rzv2h-gbeth |
| 38 |
- const: snps,dwmac-5.20 |
| 39 |
- items: |
| 40 |
- const: renesas,r9a09g077-gbeth # RZ/T2H |
| 41 |
- const: snps,dwmac-5.20 |
| 42 |
- items: |
| 43 |
- const: renesas,r9a09g087-gbeth # RZ/N2H |
| 44 |
- const: renesas,r9a09g077-gbeth |
| 45 |
- const: snps,dwmac-5.20 |
| 46 |
|
| 47 |
reg: |
| 48 |
maxItems: 1 |
| 49 |
|
| 50 |
clocks: |
| 51 |
oneOf: |
| 52 |
- items: |
| 53 |
- description: CSR/Register access clock |
| 54 |
- description: AXI system/Main clock |
| 55 |
- description: PTP clock |
| 56 |
- description: TX clock |
| 57 |
- description: RX clock |
| 58 |
- description: TX clock phase-shifted by 180 degrees |
| 59 |
- description: RX clock phase-shifted by 180 degrees |
| 60 |
- description: RMII clock |
| 61 |
- description: RMII TX clock |
| 62 |
- description: RMII RX clock |
| 63 |
|
| 64 |
minItems: 7 |
| 65 |
|
| 66 |
- items: |
| 67 |
- description: CSR clock |
| 68 |
- description: AXI system clock |
| 69 |
- description: TX clock |
| 70 |
|
| 71 |
clock-names: |
| 72 |
oneOf: |
| 73 |
- items: |
| 74 |
- const: stmmaceth |
| 75 |
- const: pclk |
| 76 |
- const: ptp_ref |
| 77 |
- const: tx |
| 78 |
- const: rx |
| 79 |
- const: tx-180 |
| 80 |
- const: rx-180 |
| 81 |
- const: rmii |
| 82 |
- const: rmii_tx |
| 83 |
- const: rmii_rx |
| 84 |
|
| 85 |
minItems: 7 |
| 86 |
|
| 87 |
- items: |
| 88 |
- const: stmmaceth |
| 89 |
- const: pclk |
| 90 |
- const: tx |
| 91 |
|
| 92 |
interrupt-names: |
| 93 |
oneOf: |
| 94 |
- items: |
| 95 |
- const: macirq |
| 96 |
- const: eth_wake_irq |
| 97 |
- const: eth_lpi |
| 98 |
- const: rx-queue-0 |
| 99 |
- const: rx-queue-1 |
| 100 |
- const: rx-queue-2 |
| 101 |
- const: rx-queue-3 |
| 102 |
- const: tx-queue-0 |
| 103 |
- const: tx-queue-1 |
| 104 |
- const: tx-queue-2 |
| 105 |
- const: tx-queue-3 |
| 106 |
- items: |
| 107 |
- const: macirq |
| 108 |
- const: eth_wake_irq |
| 109 |
- const: eth_lpi |
| 110 |
- const: rx-queue-0 |
| 111 |
- const: rx-queue-1 |
| 112 |
- const: rx-queue-2 |
| 113 |
- const: rx-queue-3 |
| 114 |
- const: tx-queue-0 |
| 115 |
- const: tx-queue-1 |
| 116 |
- const: tx-queue-2 |
| 117 |
- const: tx-queue-3 |
| 118 |
- const: ptp-pps-0 |
| 119 |
- const: ptp-pps-1 |
| 120 |
- const: ptp-pps-2 |
| 121 |
- const: ptp-pps-3 |
| 122 |
- items: |
| 123 |
- const: macirq |
| 124 |
- const: eth_wake_irq |
| 125 |
- const: eth_lpi |
| 126 |
- const: rx-queue-0 |
| 127 |
- const: rx-queue-1 |
| 128 |
- const: rx-queue-2 |
| 129 |
- const: rx-queue-3 |
| 130 |
- const: rx-queue-4 |
| 131 |
- const: rx-queue-5 |
| 132 |
- const: rx-queue-6 |
| 133 |
- const: rx-queue-7 |
| 134 |
- const: tx-queue-0 |
| 135 |
- const: tx-queue-1 |
| 136 |
- const: tx-queue-2 |
| 137 |
- const: tx-queue-3 |
| 138 |
- const: tx-queue-4 |
| 139 |
- const: tx-queue-5 |
| 140 |
- const: tx-queue-6 |
| 141 |
- const: tx-queue-7 |
| 142 |
|
| 143 |
resets: |
| 144 |
oneOf: |
| 145 |
- items: |
| 146 |
- description: AXI power-on system reset |
| 147 |
- items: |
| 148 |
- description: AXI power-on system reset |
| 149 |
- description: AHB reset |
| 150 |
|
| 151 |
pcs-handle: |
| 152 |
description: |
| 153 |
phandle pointing to a PCS sub-node compatible with |
| 154 |
Documentation/devicetree/bindings/net/pcs/renesas,rzn1-miic.yaml# |
| 155 |
(Refer RZ/T2H portion in the DT-binding file) |
| 156 |
|
| 157 |
required: |
| 158 |
- compatible |
| 159 |
- reg |
| 160 |
- clocks |
| 161 |
- clock-names |
| 162 |
- interrupts |
| 163 |
- interrupt-names |
| 164 |
- resets |
| 165 |
|
| 166 |
allOf: |
| 167 |
- $ref: snps,dwmac.yaml# |
| 168 |
|
| 169 |
- if: |
| 170 |
properties: |
| 171 |
compatible: |
| 172 |
contains: |
| 173 |
const: renesas,r9a08g046-gbeth |
| 174 |
then: |
| 175 |
properties: |
| 176 |
clocks: |
| 177 |
minItems: 10 |
| 178 |
|
| 179 |
clock-names: |
| 180 |
minItems: 10 |
| 181 |
|
| 182 |
interrupts: |
| 183 |
minItems: 15 |
| 184 |
maxItems: 15 |
| 185 |
|
| 186 |
interrupt-names: |
| 187 |
minItems: 15 |
| 188 |
maxItems: 15 |
| 189 |
|
| 190 |
- if: |
| 191 |
properties: |
| 192 |
compatible: |
| 193 |
contains: |
| 194 |
const: renesas,r9a09g077-gbeth |
| 195 |
then: |
| 196 |
properties: |
| 197 |
clocks: |
| 198 |
maxItems: 3 |
| 199 |
|
| 200 |
clock-names: |
| 201 |
maxItems: 3 |
| 202 |
|
| 203 |
interrupts: |
| 204 |
minItems: 19 |
| 205 |
|
| 206 |
interrupt-names: |
| 207 |
minItems: 19 |
| 208 |
|
| 209 |
resets: |
| 210 |
minItems: 2 |
| 211 |
|
| 212 |
reset-names: |
| 213 |
minItems: 2 |
| 214 |
|
| 215 |
required: |
| 216 |
- reset-names |
| 217 |
else: |
| 218 |
properties: |
| 219 |
resets: |
| 220 |
maxItems: 1 |
| 221 |
|
| 222 |
pcs-handle: false |
| 223 |
|
| 224 |
reset-names: false |
| 225 |
|
| 226 |
- if: |
| 227 |
properties: |
| 228 |
compatible: |
| 229 |
contains: |
| 230 |
const: renesas,rzv2h-gbeth |
| 231 |
then: |
| 232 |
properties: |
| 233 |
clocks: |
| 234 |
maxItems: 7 |
| 235 |
|
| 236 |
clock-names: |
| 237 |
maxItems: 7 |
| 238 |
|
| 239 |
interrupts: |
| 240 |
minItems: 11 |
| 241 |
maxItems: 11 |
| 242 |
|
| 243 |
interrupt-names: |
| 244 |
minItems: 11 |
| 245 |
maxItems: 11 |
| 246 |
|
| 247 |
unevaluatedProperties: false |
| 248 |
|
| 249 |
examples: |
| 250 |
- | |
| 251 |
#include <dt-bindings/clock/renesas-cpg-mssr.h> |
| 252 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 253 |
|
| 254 |
ethernet@15c30000 { |
| 255 |
compatible = "renesas,r9a09g057-gbeth", "renesas,rzv2h-gbeth", "snps,dwmac-5.20"; |
| 256 |
reg = <0x15c30000 0x10000>; |
| 257 |
clocks = <&cpg CPG_MOD 0xbd>, <&cpg CPG_MOD 0xbc>, |
| 258 |
<&ptp_clock>, <&cpg CPG_MOD 0xb8>, |
| 259 |
<&cpg CPG_MOD 0xb9>, <&cpg CPG_MOD 0xba>, |
| 260 |
<&cpg CPG_MOD 0xbb>; |
| 261 |
clock-names = "stmmaceth", "pclk", "ptp_ref", |
| 262 |
"tx", "rx", "tx-180", "rx-180"; |
| 263 |
resets = <&cpg 0xb0>; |
| 264 |
interrupts = <GIC_SPI 765 IRQ_TYPE_LEVEL_HIGH>, |
| 265 |
<GIC_SPI 767 IRQ_TYPE_LEVEL_HIGH>, |
| 266 |
<GIC_SPI 766 IRQ_TYPE_LEVEL_HIGH>, |
| 267 |
<GIC_SPI 772 IRQ_TYPE_LEVEL_HIGH>, |
| 268 |
<GIC_SPI 773 IRQ_TYPE_LEVEL_HIGH>, |
| 269 |
<GIC_SPI 774 IRQ_TYPE_LEVEL_HIGH>, |
| 270 |
<GIC_SPI 745 IRQ_TYPE_LEVEL_HIGH>, |
| 271 |
<GIC_SPI 768 IRQ_TYPE_LEVEL_HIGH>, |
| 272 |
<GIC_SPI 769 IRQ_TYPE_LEVEL_HIGH>, |
| 273 |
<GIC_SPI 770 IRQ_TYPE_LEVEL_HIGH>, |
| 274 |
<GIC_SPI 771 IRQ_TYPE_LEVEL_HIGH>; |
| 275 |
interrupt-names = "macirq", "eth_wake_irq", "eth_lpi", |
| 276 |
"rx-queue-0", "rx-queue-1", "rx-queue-2", |
| 277 |
"rx-queue-3", "tx-queue-0", "tx-queue-1", |
| 278 |
"tx-queue-2", "tx-queue-3"; |
| 279 |
phy-mode = "rgmii-id"; |
| 280 |
snps,multicast-filter-bins = <256>; |
| 281 |
snps,perfect-filter-entries = <128>; |
| 282 |
rx-fifo-depth = <8192>; |
| 283 |
tx-fifo-depth = <8192>; |
| 284 |
snps,fixed-burst; |
| 285 |
snps,force_thresh_dma_mode; |
| 286 |
snps,axi-config = <&stmmac_axi_setup>; |
| 287 |
snps,mtl-rx-config = <&mtl_rx_setup>; |
| 288 |
snps,mtl-tx-config = <&mtl_tx_setup>; |
| 289 |
snps,txpbl = <32>; |
| 290 |
snps,rxpbl = <32>; |
| 291 |
phy-handle = <&phy0>; |
| 292 |
|
| 293 |
stmmac_axi_setup: stmmac-axi-config { |
| 294 |
snps,lpi_en; |
| 295 |
snps,wr_osr_lmt = <0xf>; |
| 296 |
snps,rd_osr_lmt = <0xf>; |
| 297 |
snps,blen = <16 8 4 0 0 0 0>; |
| 298 |
}; |
| 299 |
|
| 300 |
mtl_rx_setup: rx-queues-config { |
| 301 |
snps,rx-queues-to-use = <4>; |
| 302 |
snps,rx-sched-sp; |
| 303 |
|
| 304 |
queue0 { |
| 305 |
snps,dcb-algorithm; |
| 306 |
snps,priority = <0x1>; |
| 307 |
snps,map-to-dma-channel = <0>; |
| 308 |
}; |
| 309 |
|
| 310 |
queue1 { |
| 311 |
snps,dcb-algorithm; |
| 312 |
snps,priority = <0x2>; |
| 313 |
snps,map-to-dma-channel = <1>; |
| 314 |
}; |
| 315 |
|
| 316 |
queue2 { |
| 317 |
snps,dcb-algorithm; |
| 318 |
snps,priority = <0x4>; |
| 319 |
snps,map-to-dma-channel = <2>; |
| 320 |
}; |
| 321 |
|
| 322 |
queue3 { |
| 323 |
snps,dcb-algorithm; |
| 324 |
snps,priority = <0x8>; |
| 325 |
snps,map-to-dma-channel = <3>; |
| 326 |
}; |
| 327 |
}; |
| 328 |
|
| 329 |
mtl_tx_setup: tx-queues-config { |
| 330 |
snps,tx-queues-to-use = <4>; |
| 331 |
|
| 332 |
queue0 { |
| 333 |
snps,dcb-algorithm; |
| 334 |
snps,priority = <0x1>; |
| 335 |
}; |
| 336 |
|
| 337 |
queue1 { |
| 338 |
snps,dcb-algorithm; |
| 339 |
snps,priority = <0x2>; |
| 340 |
}; |
| 341 |
|
| 342 |
queue2 { |
| 343 |
snps,dcb-algorithm; |
| 344 |
snps,priority = <0x4>; |
| 345 |
}; |
| 346 |
|
| 347 |
queue3 { |
| 348 |
snps,dcb-algorithm; |
| 349 |
snps,priority = <0x1>; |
| 350 |
}; |
| 351 |
}; |
| 352 |
|
| 353 |
mdio { |
| 354 |
#address-cells = <1>; |
| 355 |
#size-cells = <0>; |
| 356 |
compatible = "snps,dwmac-mdio"; |
| 357 |
|
| 358 |
phy0: ethernet-phy@0 { |
| 359 |
reg = <0>; |
| 360 |
}; |
| 361 |
}; |
| 362 |
}; |