dt-bindings: Fix incorrect 'reg' property sizes
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / renesas,csi2.yaml
1 # SPDX-License-Identifier: GPL-2.0-only
2 # Copyright (C) 2020 Renesas Electronics Corp.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/media/renesas,csi2.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Renesas R-Car MIPI CSI-2 receiver
9
10 maintainers:
11   - Niklas Söderlund <niklas.soderlund@ragnatech.se>
12
13 description:
14   The R-Car CSI-2 receiver device provides MIPI CSI-2 capabilities for the
15   Renesas R-Car and RZ/G2 family of devices. It is used in conjunction with the
16   R-Car VIN module, which provides the video capture capabilities.
17
18 properties:
19   compatible:
20     items:
21       - enum:
22         - renesas,r8a774a1-csi2 # RZ/G2M
23         - renesas,r8a774b1-csi2 # RZ/G2N
24         - renesas,r8a774c0-csi2 # RZ/G2E
25         - renesas,r8a7795-csi2  # R-Car H3
26         - renesas,r8a7796-csi2  # R-Car M3-W
27         - renesas,r8a77965-csi2 # R-Car M3-N
28         - renesas,r8a77970-csi2 # R-Car V3M
29         - renesas,r8a77980-csi2 # R-Car V3H
30         - renesas,r8a77990-csi2 # R-Car E3
31
32   reg:
33     maxItems: 1
34
35   interrupts:
36     maxItems: 1
37
38   clocks:
39     maxItems: 1
40
41   power-domains:
42     maxItems: 1
43
44   resets:
45     maxItems: 1
46
47   ports:
48     type: object
49     description:
50       A node containing input and output port nodes with endpoint definitions
51       as documented in
52       Documentation/devicetree/bindings/media/video-interfaces.txt
53
54     properties:
55       port@0:
56         type: object
57         description:
58           Input port node, single endpoint describing the CSI-2 transmitter.
59
60         properties:
61           reg:
62             const: 0
63
64           endpoint:
65             type: object
66
67             properties:
68               clock-lanes:
69                 maxItems: 1
70
71               data-lanes:
72                 maxItems: 1
73
74               remote-endpoint: true
75
76             required:
77               - clock-lanes
78               - data-lanes
79               - remote-endpoint
80
81             additionalProperties: false
82
83         additionalProperties: false
84
85       port@1:
86         type: object
87         description:
88           Output port node, multiple endpoints describing all the R-Car VIN
89           modules connected the CSI-2 receiver.
90
91         properties:
92           '#address-cells':
93             const: 1
94
95           '#size-cells':
96             const: 0
97
98           reg:
99             const: 1
100
101         patternProperties:
102           "^endpoint@[0-9a-f]$":
103             type: object
104
105             properties:
106               reg:
107                 maxItems: 1
108
109               remote-endpoint: true
110
111             required:
112               - reg
113               - remote-endpoint
114
115             additionalProperties: false
116
117         additionalProperties: false
118
119 required:
120   - compatible
121   - reg
122   - interrupts
123   - clocks
124   - power-domains
125   - resets
126   - ports
127
128 additionalProperties: false
129
130 examples:
131   - |
132     #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
133     #include <dt-bindings/interrupt-controller/arm-gic.h>
134     #include <dt-bindings/power/r8a7796-sysc.h>
135
136     csi20: csi2@fea80000 {
137             compatible = "renesas,r8a7796-csi2";
138             reg = <0xfea80000 0x10000>;
139             interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
140             clocks = <&cpg CPG_MOD 714>;
141             power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
142             resets = <&cpg 714>;
143
144             ports {
145                     #address-cells = <1>;
146                     #size-cells = <0>;
147
148                     port@0 {
149                             reg = <0>;
150
151                             csi20_in: endpoint {
152                                     clock-lanes = <0>;
153                                     data-lanes = <1>;
154                                     remote-endpoint = <&adv7482_txb>;
155                             };
156                     };
157
158                     port@1 {
159                             #address-cells = <1>;
160                             #size-cells = <0>;
161
162                             reg = <1>;
163
164                             csi20vin0: endpoint@0 {
165                                     reg = <0>;
166                                     remote-endpoint = <&vin0csi20>;
167                             };
168                             csi20vin1: endpoint@1 {
169                                     reg = <1>;
170                                     remote-endpoint = <&vin1csi20>;
171                             };
172                             csi20vin2: endpoint@2 {
173                                     reg = <2>;
174                                     remote-endpoint = <&vin2csi20>;
175                             };
176                             csi20vin3: endpoint@3 {
177                                     reg = <3>;
178                                     remote-endpoint = <&vin3csi20>;
179                             };
180                             csi20vin4: endpoint@4 {
181                                     reg = <4>;
182                                     remote-endpoint = <&vin4csi20>;
183                             };
184                             csi20vin5: endpoint@5 {
185                                     reg = <5>;
186                                     remote-endpoint = <&vin5csi20>;
187                             };
188                             csi20vin6: endpoint@6 {
189                                     reg = <6>;
190                                     remote-endpoint = <&vin6csi20>;
191                             };
192                             csi20vin7: endpoint@7 {
193                                     reg = <7>;
194                                     remote-endpoint = <&vin7csi20>;
195                             };
196                     };
197             };
198     };