Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / Documentation / devicetree / bindings / net / renesas,etheravb.yaml
blob244befb6402aa8b4cd28641e9dc8236547bf1b62
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,etheravb.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Renesas Ethernet AVB
9 maintainers:
10   - Sergei Shtylyov <sergei.shtylyov@gmail.com>
12 properties:
13   compatible:
14     oneOf:
15       - items:
16           - enum:
17               - renesas,etheravb-r8a7742      # RZ/G1H
18               - renesas,etheravb-r8a7743      # RZ/G1M
19               - renesas,etheravb-r8a7744      # RZ/G1N
20               - renesas,etheravb-r8a7745      # RZ/G1E
21               - renesas,etheravb-r8a77470     # RZ/G1C
22               - renesas,etheravb-r8a7790      # R-Car H2
23               - renesas,etheravb-r8a7791      # R-Car M2-W
24               - renesas,etheravb-r8a7792      # R-Car V2H
25               - renesas,etheravb-r8a7793      # R-Car M2-N
26               - renesas,etheravb-r8a7794      # R-Car E2
27           - const: renesas,etheravb-rcar-gen2 # R-Car Gen2 and RZ/G1
29       - items:
30           - enum:
31               - renesas,etheravb-r8a774a1     # RZ/G2M
32               - renesas,etheravb-r8a774b1     # RZ/G2N
33               - renesas,etheravb-r8a774c0     # RZ/G2E
34               - renesas,etheravb-r8a774e1     # RZ/G2H
35               - renesas,etheravb-r8a7795      # R-Car H3
36               - renesas,etheravb-r8a7796      # R-Car M3-W
37               - renesas,etheravb-r8a77961     # R-Car M3-W+
38               - renesas,etheravb-r8a77965     # R-Car M3-N
39               - renesas,etheravb-r8a77970     # R-Car V3M
40               - renesas,etheravb-r8a77980     # R-Car V3H
41               - renesas,etheravb-r8a77990     # R-Car E3
42               - renesas,etheravb-r8a77995     # R-Car D3
43           - const: renesas,etheravb-rcar-gen3 # R-Car Gen3 and RZ/G2
45   reg: true
47   interrupts: true
49   interrupt-names: true
51   clocks:
52     maxItems: 1
54   iommus:
55     maxItems: 1
57   power-domains:
58     maxItems: 1
60   resets:
61     maxItems: 1
63   phy-mode: true
65   phy-handle: true
67   '#address-cells':
68     description: Number of address cells for the MDIO bus.
69     const: 1
71   '#size-cells':
72     description: Number of size cells on the MDIO bus.
73     const: 0
75   renesas,no-ether-link:
76     type: boolean
77     description:
78       Specify when a board does not provide a proper AVB_LINK signal.
80   renesas,ether-link-active-low:
81     type: boolean
82     description:
83       Specify when the AVB_LINK signal is active-low instead of normal
84       active-high.
86   rx-internal-delay-ps:
87     enum: [0, 1800]
89   tx-internal-delay-ps:
90     enum: [0, 2000]
92 patternProperties:
93   "^ethernet-phy@[0-9a-f]$":
94     type: object
95     $ref: ethernet-phy.yaml#
97 required:
98   - compatible
99   - reg
100   - interrupts
101   - clocks
102   - power-domains
103   - resets
104   - phy-mode
105   - phy-handle
106   - '#address-cells'
107   - '#size-cells'
109 allOf:
110   - $ref: ethernet-controller.yaml#
112   - if:
113       properties:
114         compatible:
115           contains:
116             enum:
117               - renesas,etheravb-rcar-gen2
118               - renesas,etheravb-r8a7795
119               - renesas,etheravb-r8a7796
120               - renesas,etheravb-r8a77961
121               - renesas,etheravb-r8a77965
122     then:
123       properties:
124         reg:
125           items:
126             - description: MAC register block
127             - description: Stream buffer
128     else:
129       properties:
130         reg:
131           items:
132             - description: MAC register block
134   - if:
135       properties:
136         compatible:
137           contains:
138             const: renesas,etheravb-rcar-gen2
139     then:
140       properties:
141         interrupts:
142           maxItems: 1
143         interrupt-names:
144           items:
145             - const: mux
146         rx-internal-delay-ps: false
147     else:
148       properties:
149         interrupts:
150           minItems: 25
151           maxItems: 25
152         interrupt-names:
153           items:
154             pattern: '^ch[0-9]+$'
155       required:
156         - interrupt-names
157         - rx-internal-delay-ps
159   - if:
160       properties:
161         compatible:
162           contains:
163             enum:
164               - renesas,etheravb-r8a774a1
165               - renesas,etheravb-r8a774b1
166               - renesas,etheravb-r8a7795
167               - renesas,etheravb-r8a7796
168               - renesas,etheravb-r8a77961
169               - renesas,etheravb-r8a77965
170               - renesas,etheravb-r8a77970
171               - renesas,etheravb-r8a77980
172     then:
173       required:
174         - tx-internal-delay-ps
175     else:
176       properties:
177         tx-internal-delay-ps: false
179   - if:
180       properties:
181         compatible:
182           contains:
183             const: renesas,etheravb-r8a77995
184     then:
185       properties:
186         rx-internal-delay-ps:
187           const: 1800
189   - if:
190       properties:
191         compatible:
192           contains:
193             const: renesas,etheravb-r8a77980
194     then:
195       properties:
196         tx-internal-delay-ps:
197           const: 2000
199 additionalProperties: false
201 examples:
202   - |
203     #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
204     #include <dt-bindings/interrupt-controller/arm-gic.h>
205     #include <dt-bindings/power/r8a7795-sysc.h>
206     #include <dt-bindings/gpio/gpio.h>
207     aliases {
208             ethernet0 = &avb;
209     };
211     avb: ethernet@e6800000 {
212             compatible = "renesas,etheravb-r8a7795",
213                          "renesas,etheravb-rcar-gen3";
214             reg = <0xe6800000 0x800>, <0xe6a00000 0x10000>;
215             interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
216                          <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
217                          <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
218                          <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
219                          <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
220                          <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
221                          <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
222                          <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
223                          <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
224                          <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
225                          <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
226                          <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
227                          <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
228                          <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
229                          <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
230                          <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
231                          <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
232                          <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
233                          <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
234                          <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
235                          <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
236                          <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
237                          <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
238                          <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
239                          <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
240             interrupt-names = "ch0", "ch1", "ch2", "ch3", "ch4", "ch5", "ch6",
241                               "ch7", "ch8", "ch9", "ch10", "ch11", "ch12",
242                               "ch13", "ch14", "ch15", "ch16", "ch17", "ch18",
243                               "ch19", "ch20", "ch21", "ch22", "ch23", "ch24";
244             clocks = <&cpg CPG_MOD 812>;
245             iommus = <&ipmmu_ds0 16>;
246             power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
247             resets = <&cpg 812>;
248             phy-mode = "rgmii";
249             phy-handle = <&phy0>;
250             rx-internal-delay-ps = <0>;
251             tx-internal-delay-ps = <2000>;
252             #address-cells = <1>;
253             #size-cells = <0>;
255             phy0: ethernet-phy@0 {
256                     rxc-skew-ps = <1500>;
257                     reg = <0>;
258                     interrupt-parent = <&gpio2>;
259                     interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
260                     reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
261             };
262     };