WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / media / renesas,csi2.yaml
blob533c2f181db7ff0893712cc933c52643244083a9
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#
8 title: Renesas R-Car MIPI CSI-2 receiver
10 maintainers:
11   - Niklas Söderlund <niklas.soderlund@ragnatech.se>
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.
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,r8a774e1-csi2 # RZ/G2H
26           - renesas,r8a7795-csi2  # R-Car H3
27           - renesas,r8a7796-csi2  # R-Car M3-W
28           - renesas,r8a77965-csi2 # R-Car M3-N
29           - renesas,r8a77970-csi2 # R-Car V3M
30           - renesas,r8a77980-csi2 # R-Car V3H
31           - renesas,r8a77990-csi2 # R-Car E3
33   reg:
34     maxItems: 1
36   interrupts:
37     maxItems: 1
39   clocks:
40     maxItems: 1
42   power-domains:
43     maxItems: 1
45   resets:
46     maxItems: 1
48   ports:
49     type: object
50     description:
51       A node containing input and output port nodes with endpoint definitions
52       as documented in
53       Documentation/devicetree/bindings/media/video-interfaces.txt
55     properties:
56       port@0:
57         type: object
58         description:
59           Input port node, single endpoint describing the CSI-2 transmitter.
61         properties:
62           reg:
63             const: 0
65           endpoint:
66             type: object
68             properties:
69               clock-lanes:
70                 maxItems: 1
72               data-lanes:
73                 maxItems: 1
75               remote-endpoint: true
77             required:
78               - clock-lanes
79               - data-lanes
80               - remote-endpoint
82             additionalProperties: false
84         additionalProperties: false
86       port@1:
87         type: object
88         description:
89           Output port node, multiple endpoints describing all the R-Car VIN
90           modules connected the CSI-2 receiver.
92         properties:
93           '#address-cells':
94             const: 1
96           '#size-cells':
97             const: 0
99           reg:
100             const: 1
102         patternProperties:
103           "^endpoint@[0-9a-f]$":
104             type: object
106             properties:
107               reg:
108                 maxItems: 1
110               remote-endpoint: true
112             required:
113               - reg
114               - remote-endpoint
116             additionalProperties: false
118         additionalProperties: false
120 required:
121   - compatible
122   - reg
123   - interrupts
124   - clocks
125   - power-domains
126   - resets
127   - ports
129 additionalProperties: false
131 examples:
132   - |
133     #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
134     #include <dt-bindings/interrupt-controller/arm-gic.h>
135     #include <dt-bindings/power/r8a7796-sysc.h>
137     csi20: csi2@fea80000 {
138             compatible = "renesas,r8a7796-csi2";
139             reg = <0xfea80000 0x10000>;
140             interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
141             clocks = <&cpg CPG_MOD 714>;
142             power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
143             resets = <&cpg 714>;
145             ports {
146                     #address-cells = <1>;
147                     #size-cells = <0>;
149                     port@0 {
150                             reg = <0>;
152                             csi20_in: endpoint {
153                                     clock-lanes = <0>;
154                                     data-lanes = <1>;
155                                     remote-endpoint = <&adv7482_txb>;
156                             };
157                     };
159                     port@1 {
160                             #address-cells = <1>;
161                             #size-cells = <0>;
163                             reg = <1>;
165                             csi20vin0: endpoint@0 {
166                                     reg = <0>;
167                                     remote-endpoint = <&vin0csi20>;
168                             };
169                             csi20vin1: endpoint@1 {
170                                     reg = <1>;
171                                     remote-endpoint = <&vin1csi20>;
172                             };
173                             csi20vin2: endpoint@2 {
174                                     reg = <2>;
175                                     remote-endpoint = <&vin2csi20>;
176                             };
177                             csi20vin3: endpoint@3 {
178                                     reg = <3>;
179                                     remote-endpoint = <&vin3csi20>;
180                             };
181                             csi20vin4: endpoint@4 {
182                                     reg = <4>;
183                                     remote-endpoint = <&vin4csi20>;
184                             };
185                             csi20vin5: endpoint@5 {
186                                     reg = <5>;
187                                     remote-endpoint = <&vin5csi20>;
188                             };
189                             csi20vin6: endpoint@6 {
190                                     reg = <6>;
191                                     remote-endpoint = <&vin6csi20>;
192                             };
193                             csi20vin7: endpoint@7 {
194                                     reg = <7>;
195                                     remote-endpoint = <&vin7csi20>;
196                             };
197                     };
198             };
199     };