summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
blob: 21a92f179093d9959fb51f263c7b0dd8e25605bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/renesas,etheravb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas Ethernet AVB

maintainers:
  - Sergei Shtylyov <sergei.shtylyov@gmail.com>

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - renesas,etheravb-r8a7742      # RZ/G1H
              - renesas,etheravb-r8a7743      # RZ/G1M
              - renesas,etheravb-r8a7744      # RZ/G1N
              - renesas,etheravb-r8a7745      # RZ/G1E
              - renesas,etheravb-r8a77470     # RZ/G1C
              - renesas,etheravb-r8a7790      # R-Car H2
              - renesas,etheravb-r8a7791      # R-Car M2-W
              - renesas,etheravb-r8a7792      # R-Car V2H
              - renesas,etheravb-r8a7793      # R-Car M2-N
              - renesas,etheravb-r8a7794      # R-Car E2
          - const: renesas,etheravb-rcar-gen2 # R-Car Gen2 and RZ/G1

      - items:
          - enum:
              - renesas,etheravb-r8a774a1     # RZ/G2M
              - renesas,etheravb-r8a774b1     # RZ/G2N
              - renesas,etheravb-r8a774c0     # RZ/G2E
              - renesas,etheravb-r8a774e1     # RZ/G2H
              - renesas,etheravb-r8a7795      # R-Car H3
              - renesas,etheravb-r8a7796      # R-Car M3-W
              - renesas,etheravb-r8a77961     # R-Car M3-W+
              - renesas,etheravb-r8a77965     # R-Car M3-N
              - renesas,etheravb-r8a77970     # R-Car V3M
              - renesas,etheravb-r8a77980     # R-Car V3H
              - renesas,etheravb-r8a77990     # R-Car E3
              - renesas,etheravb-r8a77995     # R-Car D3
          - const: renesas,etheravb-rcar-gen3 # R-Car Gen3 and RZ/G2

      - items:
          - enum:
              - renesas,etheravb-r8a779a0     # R-Car V3U
              - renesas,etheravb-r8a779g0     # R-Car V4H
              - renesas,etheravb-r8a779h0     # R-Car V4M
          - const: renesas,etheravb-rcar-gen4 # R-Car Gen4

      - items:
          - enum:
              - renesas,etheravb-r9a09g011 # RZ/V2M
          - const: renesas,etheravb-rzv2m  # RZ/V2M compatible

      - items:
          - enum:
              - renesas,r9a07g043-gbeth # RZ/G2UL and RZ/Five
              - renesas,r9a07g044-gbeth # RZ/G2{L,LC}
              - renesas,r9a07g054-gbeth # RZ/V2L
              - renesas,r9a08g045-gbeth # RZ/G3S
          - const: renesas,rzg2l-gbeth  # RZ/{G2L,G2UL,V2L} family

  reg: true

  interrupts: true

  interrupt-names: true

  clocks: true

  clock-names: true

  iommus:
    maxItems: 1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  phy-mode: true

  phy-handle: true

  '#address-cells':
    description: Number of address cells for the MDIO bus.
    const: 1
    deprecated: true

  '#size-cells':
    description: Number of size cells on the MDIO bus.
    const: 0
    deprecated: true

  mdio:
    $ref: /schemas/net/mdio.yaml#
    unevaluatedProperties: false

  renesas,no-ether-link:
    type: boolean
    description:
      Specify when a board does not provide a proper AVB_LINK signal.

  renesas,ether-link-active-low:
    type: boolean
    description:
      Specify when the AVB_LINK signal is active-low instead of normal
      active-high.

  rx-internal-delay-ps:
    enum: [0, 1800]

  tx-internal-delay-ps:
    enum: [0, 2000]

# In older bindings there where no mdio child-node to describe the MDIO bus
# and the PHY. To not fail older bindings accept any node with an address. New
# users should describe the PHY inside the mdio child-node.
patternProperties:
  "@[0-9a-f]$":
    type: object
    deprecated: true

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - power-domains
  - resets
  - phy-mode
  - phy-handle

allOf:
  - $ref: ethernet-controller.yaml#

  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,etheravb-rcar-gen2
              - renesas,etheravb-r8a7795
              - renesas,etheravb-r8a7796
              - renesas,etheravb-r8a77961
              - renesas,etheravb-r8a77965
    then:
      properties:
        reg:
          items:
            - description: MAC register block
            - description: Stream buffer
    else:
      properties:
        reg:
          items:
            - description: MAC register block

  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,etheravb-rcar-gen2
              - renesas,rzg2l-gbeth
    then:
      properties:
        interrupts:
          minItems: 1
          maxItems: 3
        interrupt-names:
          minItems: 1
          items:
            - const: mux
            - const: fil
            - const: arp_ns
        rx-internal-delay-ps: false
    else:
      if:
        properties:
          compatible:
            contains:
              const: renesas,etheravb-rzv2m
      then:
        properties:
          interrupts:
            minItems: 29
            maxItems: 29
          interrupt-names:
            items:
              pattern: '^(ch(1?)[0-9])|ch20|ch21|dia|dib|err_a|err_b|mgmt_a|mgmt_b|line3$'
          rx-internal-delay-ps: false
        required:
          - interrupt-names
      else:
        properties:
          interrupts:
            minItems: 25
            maxItems: 25
          interrupt-names:
            items:
              pattern: '^ch[0-9]+$'
        required:
          - interrupt-names
          - rx-internal-delay-ps

  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,etheravb-r8a774a1
              - renesas,etheravb-r8a774b1
              - renesas,etheravb-r8a774e1
              - renesas,etheravb-r8a7795
              - renesas,etheravb-r8a7796
              - renesas,etheravb-r8a77961
              - renesas,etheravb-r8a77965
              - renesas,etheravb-r8a77970
              - renesas,etheravb-r8a77980
              - renesas,etheravb-rcar-gen4
    then:
      required:
        - tx-internal-delay-ps
    else:
      properties:
        tx-internal-delay-ps: false

  - if:
      properties:
        compatible:
          contains:
            const: renesas,etheravb-r8a77995
    then:
      properties:
        rx-internal-delay-ps:
          const: 1800

  - if:
      properties:
        compatible:
          contains:
            const: renesas,etheravb-r8a77980
    then:
      properties:
        tx-internal-delay-ps:
          const: 2000

  - if:
      properties:
        compatible:
          contains:
            const: renesas,rzg2l-gbeth
    then:
      properties:
        clocks:
          items:
            - description: Main clock
            - description: Register access clock
            - description: Reference clock for RGMII
        clock-names:
          items:
            - const: axi
            - const: chi
            - const: refclk
    else:
      if:
        properties:
          compatible:
            contains:
              const: renesas,etheravb-rzv2m
      then:
        properties:
          clocks:
            items:
              - description: Main clock
              - description: Coherent Hub Interface clock
              - description: gPTP reference clock
          clock-names:
            items:
              - const: axi
              - const: chi
              - const: gptp
      else:
        properties:
          clocks:
            minItems: 1
            items:
              - description: AVB functional clock
              - description: Optional TXC reference clock
          clock-names:
            minItems: 1
            items:
              - const: fck
              - const: refclk

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a7795-sysc.h>
    #include <dt-bindings/gpio/gpio.h>
    aliases {
            ethernet0 = &avb;
    };

    avb: ethernet@e6800000 {
            compatible = "renesas,etheravb-r8a7795",
                         "renesas,etheravb-rcar-gen3";
            reg = <0xe6800000 0x800>, <0xe6a00000 0x10000>;
            interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "ch0", "ch1", "ch2", "ch3", "ch4", "ch5", "ch6",
                              "ch7", "ch8", "ch9", "ch10", "ch11", "ch12",
                              "ch13", "ch14", "ch15", "ch16", "ch17", "ch18",
                              "ch19", "ch20", "ch21", "ch22", "ch23", "ch24";
            clocks = <&cpg CPG_MOD 812>;
            clock-names = "fck";
            iommus = <&ipmmu_ds0 16>;
            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
            resets = <&cpg 812>;
            phy-mode = "rgmii";
            phy-handle = <&phy0>;
            rx-internal-delay-ps = <0>;
            tx-internal-delay-ps = <2000>;
            #address-cells = <1>;
            #size-cells = <0>;

            phy0: ethernet-phy@0 {
                    compatible = "ethernet-phy-id0022.1622",
                                 "ethernet-phy-ieee802.3-c22";
                    rxc-skew-ps = <1500>;
                    reg = <0>;
                    interrupt-parent = <&gpio2>;
                    interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
                    reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
            };
    };