xref: /openbmc/linux/Documentation/devicetree/bindings/media/renesas,vin.yaml (revision 5e5558f5c9d8caa58a57427cd32f870aec3a69fb)
1905fc6b1SNiklas Söderlund# SPDX-License-Identifier: GPL-2.0-only
2905fc6b1SNiklas Söderlund# Copyright (C) 2020 Renesas Electronics Corp.
3905fc6b1SNiklas Söderlund%YAML 1.2
4905fc6b1SNiklas Söderlund---
5905fc6b1SNiklas Söderlund$id: http://devicetree.org/schemas/media/renesas,vin.yaml#
6905fc6b1SNiklas Söderlund$schema: http://devicetree.org/meta-schemas/core.yaml#
7905fc6b1SNiklas Söderlund
8905fc6b1SNiklas Söderlundtitle: Renesas R-Car Video Input (VIN)
9905fc6b1SNiklas Söderlund
10905fc6b1SNiklas Söderlundmaintainers:
11905fc6b1SNiklas Söderlund  - Niklas Söderlund <niklas.soderlund@ragnatech.se>
12905fc6b1SNiklas Söderlund
13905fc6b1SNiklas Söderlunddescription:
14905fc6b1SNiklas Söderlund  The R-Car Video Input (VIN) device provides video input capabilities for the
15905fc6b1SNiklas Söderlund  Renesas R-Car family of devices.
16905fc6b1SNiklas Söderlund
17905fc6b1SNiklas Söderlund  Each VIN instance has a single parallel input that supports RGB and YUV video,
18905fc6b1SNiklas Söderlund  with both external synchronization and BT.656 synchronization for the latter.
19905fc6b1SNiklas Söderlund  Depending on the instance the VIN input is connected to external SoC pins, or
20905fc6b1SNiklas Söderlund  on Gen3 and RZ/G2 platforms to a CSI-2 receiver.
21905fc6b1SNiklas Söderlund
22905fc6b1SNiklas Söderlundproperties:
23905fc6b1SNiklas Söderlund  compatible:
24905fc6b1SNiklas Söderlund    oneOf:
25905fc6b1SNiklas Söderlund      - items:
26905fc6b1SNiklas Söderlund          - enum:
2777fd2ca6SLad Prabhakar              - renesas,vin-r8a7742  # RZ/G1H
28905fc6b1SNiklas Söderlund              - renesas,vin-r8a7743  # RZ/G1M
29905fc6b1SNiklas Söderlund              - renesas,vin-r8a7744  # RZ/G1N
30905fc6b1SNiklas Söderlund              - renesas,vin-r8a7745  # RZ/G1E
31905fc6b1SNiklas Söderlund              - renesas,vin-r8a77470 # RZ/G1C
32905fc6b1SNiklas Söderlund              - renesas,vin-r8a7790  # R-Car H2
33905fc6b1SNiklas Söderlund              - renesas,vin-r8a7791  # R-Car M2-W
34905fc6b1SNiklas Söderlund              - renesas,vin-r8a7792  # R-Car V2H
35905fc6b1SNiklas Söderlund              - renesas,vin-r8a7793  # R-Car M2-N
36905fc6b1SNiklas Söderlund              - renesas,vin-r8a7794  # R-Car E2
37905fc6b1SNiklas Söderlund          - const: renesas,rcar-gen2-vin # Generic R-Car Gen2 or RZ/G1
38905fc6b1SNiklas Söderlund
39905fc6b1SNiklas Söderlund      - items:
40905fc6b1SNiklas Söderlund          - enum:
41905fc6b1SNiklas Söderlund              - renesas,vin-r8a774a1 # RZ/G2M
42905fc6b1SNiklas Söderlund              - renesas,vin-r8a774b1 # RZ/G2N
43905fc6b1SNiklas Söderlund              - renesas,vin-r8a774c0 # RZ/G2E
44200b0d9aSLad Prabhakar              - renesas,vin-r8a774e1 # RZ/G2H
45905fc6b1SNiklas Söderlund              - renesas,vin-r8a7778  # R-Car M1
46905fc6b1SNiklas Söderlund              - renesas,vin-r8a7779  # R-Car H1
47905fc6b1SNiklas Söderlund              - renesas,vin-r8a7795  # R-Car H3
48905fc6b1SNiklas Söderlund              - renesas,vin-r8a7796  # R-Car M3-W
4990c3493eSNiklas Söderlund              - renesas,vin-r8a77961 # R-Car M3-W+
50905fc6b1SNiklas Söderlund              - renesas,vin-r8a77965 # R-Car M3-N
51905fc6b1SNiklas Söderlund              - renesas,vin-r8a77970 # R-Car V3M
52905fc6b1SNiklas Söderlund              - renesas,vin-r8a77980 # R-Car V3H
53905fc6b1SNiklas Söderlund              - renesas,vin-r8a77990 # R-Car E3
54905fc6b1SNiklas Söderlund              - renesas,vin-r8a77995 # R-Car D3
558f6a0eabSNiklas Söderlund              - renesas,vin-r8a779a0 # R-Car V3U
56e8f27ebbSNiklas Söderlund              - renesas,vin-r8a779g0 # R-Car V4H
57905fc6b1SNiklas Söderlund
58905fc6b1SNiklas Söderlund  reg:
59905fc6b1SNiklas Söderlund    maxItems: 1
60905fc6b1SNiklas Söderlund
61905fc6b1SNiklas Söderlund  interrupts:
62905fc6b1SNiklas Söderlund    maxItems: 1
63905fc6b1SNiklas Söderlund
64905fc6b1SNiklas Söderlund  clocks:
65905fc6b1SNiklas Söderlund    maxItems: 1
66905fc6b1SNiklas Söderlund
67905fc6b1SNiklas Söderlund  power-domains:
68905fc6b1SNiklas Söderlund    maxItems: 1
69905fc6b1SNiklas Söderlund
70905fc6b1SNiklas Söderlund  resets:
71905fc6b1SNiklas Söderlund    maxItems: 1
72905fc6b1SNiklas Söderlund
73905fc6b1SNiklas Söderlund  # The per-board settings for Gen2 and RZ/G1 platforms:
74905fc6b1SNiklas Söderlund  port:
75066a94e2SRob Herring    $ref: /schemas/graph.yaml#/$defs/port-base
76066a94e2SRob Herring    unevaluatedProperties: false
77905fc6b1SNiklas Söderlund    description:
78066a94e2SRob Herring      A node containing a parallel input
79905fc6b1SNiklas Söderlund
80905fc6b1SNiklas Söderlund    properties:
81905fc6b1SNiklas Söderlund      endpoint:
82066a94e2SRob Herring        $ref: video-interfaces.yaml#
83066a94e2SRob Herring        unevaluatedProperties: false
84905fc6b1SNiklas Söderlund
85905fc6b1SNiklas Söderlund        properties:
86905fc6b1SNiklas Söderlund          hsync-active:
87905fc6b1SNiklas Söderlund            description:
88905fc6b1SNiklas Söderlund              If both HSYNC and VSYNC polarities are not specified, embedded
89905fc6b1SNiklas Söderlund              synchronization is selected.
90905fc6b1SNiklas Söderlund            default: 1
91905fc6b1SNiklas Söderlund
92905fc6b1SNiklas Söderlund          vsync-active:
93905fc6b1SNiklas Söderlund            description:
94905fc6b1SNiklas Söderlund              If both HSYNC and VSYNC polarities are not specified, embedded
95905fc6b1SNiklas Söderlund              synchronization is selected.
96905fc6b1SNiklas Söderlund            default: 1
97905fc6b1SNiklas Söderlund
98*cee66375SGeert Uytterhoeven          field-even-active: true
99905fc6b1SNiklas Söderlund
100905fc6b1SNiklas Söderlund          bus-width: true
101905fc6b1SNiklas Söderlund
102905fc6b1SNiklas Söderlund          data-shift: true
103905fc6b1SNiklas Söderlund
104905fc6b1SNiklas Söderlund          data-enable-active:
105905fc6b1SNiklas Söderlund            description: Polarity of CLKENB signal
106905fc6b1SNiklas Söderlund            default: 1
107905fc6b1SNiklas Söderlund
108905fc6b1SNiklas Söderlund          pclk-sample: true
109905fc6b1SNiklas Söderlund
110905fc6b1SNiklas Söderlund          data-active: true
111905fc6b1SNiklas Söderlund
112905fc6b1SNiklas Söderlund  # The per-board settings for Gen3 and RZ/G2 platforms:
113905fc6b1SNiklas Söderlund  renesas,id:
114905fc6b1SNiklas Söderlund    description: VIN channel number
1153d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
1163d21a460SRob Herring    minimum: 0
1178f6a0eabSNiklas Söderlund    maximum: 31
118905fc6b1SNiklas Söderlund
119905fc6b1SNiklas Söderlund  ports:
120066a94e2SRob Herring    $ref: /schemas/graph.yaml#/properties/ports
121905fc6b1SNiklas Söderlund
122905fc6b1SNiklas Söderlund    properties:
123905fc6b1SNiklas Söderlund      port@0:
1246a9a930dSRob Herring        $ref: /schemas/graph.yaml#/$defs/port-base
1256a9a930dSRob Herring        unevaluatedProperties: false
126905fc6b1SNiklas Söderlund        description:
127905fc6b1SNiklas Söderlund          Input port node, single endpoint describing a parallel input source.
128905fc6b1SNiklas Söderlund
129905fc6b1SNiklas Söderlund        properties:
130905fc6b1SNiklas Söderlund          endpoint:
131066a94e2SRob Herring            $ref: video-interfaces.yaml#
132066a94e2SRob Herring            unevaluatedProperties: false
133905fc6b1SNiklas Söderlund
134905fc6b1SNiklas Söderlund            properties:
135905fc6b1SNiklas Söderlund              hsync-active:
136905fc6b1SNiklas Söderlund                description:
137905fc6b1SNiklas Söderlund                  If both HSYNC and VSYNC polarities are not specified, embedded
138905fc6b1SNiklas Söderlund                  synchronization is selected.
139905fc6b1SNiklas Söderlund                default: 1
140905fc6b1SNiklas Söderlund
141905fc6b1SNiklas Söderlund              vsync-active:
142905fc6b1SNiklas Söderlund                description:
143905fc6b1SNiklas Söderlund                  If both HSYNC and VSYNC polarities are not specified, embedded
144905fc6b1SNiklas Söderlund                  synchronization is selected.
145905fc6b1SNiklas Söderlund                default: 1
146905fc6b1SNiklas Söderlund
147*cee66375SGeert Uytterhoeven              field-even-active: true
148905fc6b1SNiklas Söderlund
149905fc6b1SNiklas Söderlund              bus-width: true
150905fc6b1SNiklas Söderlund
151905fc6b1SNiklas Söderlund              data-shift: true
152905fc6b1SNiklas Söderlund
153905fc6b1SNiklas Söderlund              data-enable-active:
154905fc6b1SNiklas Söderlund                description: Polarity of CLKENB signal
155905fc6b1SNiklas Söderlund                default: 1
156905fc6b1SNiklas Söderlund
157905fc6b1SNiklas Söderlund              pclk-sample: true
158905fc6b1SNiklas Söderlund
159905fc6b1SNiklas Söderlund              data-active: true
160905fc6b1SNiklas Söderlund
161905fc6b1SNiklas Söderlund      port@1:
162066a94e2SRob Herring        $ref: /schemas/graph.yaml#/properties/port
163905fc6b1SNiklas Söderlund        description:
164905fc6b1SNiklas Söderlund          Input port node, multiple endpoints describing all the R-Car CSI-2
165905fc6b1SNiklas Söderlund          modules connected the VIN.
166905fc6b1SNiklas Söderlund
167905fc6b1SNiklas Söderlund        properties:
168905fc6b1SNiklas Söderlund          endpoint@0:
169066a94e2SRob Herring            $ref: /schemas/graph.yaml#/properties/endpoint
170905fc6b1SNiklas Söderlund            description: Endpoint connected to CSI20.
171905fc6b1SNiklas Söderlund
172905fc6b1SNiklas Söderlund          endpoint@1:
173066a94e2SRob Herring            $ref: /schemas/graph.yaml#/properties/endpoint
174905fc6b1SNiklas Söderlund            description: Endpoint connected to CSI21.
175905fc6b1SNiklas Söderlund
176905fc6b1SNiklas Söderlund          endpoint@2:
177066a94e2SRob Herring            $ref: /schemas/graph.yaml#/properties/endpoint
178905fc6b1SNiklas Söderlund            description: Endpoint connected to CSI40.
179905fc6b1SNiklas Söderlund
180905fc6b1SNiklas Söderlund          endpoint@3:
181066a94e2SRob Herring            $ref: /schemas/graph.yaml#/properties/endpoint
182905fc6b1SNiklas Söderlund            description: Endpoint connected to CSI41.
183905fc6b1SNiklas Söderlund
184905fc6b1SNiklas Söderlund        anyOf:
185905fc6b1SNiklas Söderlund          - required:
186905fc6b1SNiklas Söderlund              - endpoint@0
187905fc6b1SNiklas Söderlund          - required:
188905fc6b1SNiklas Söderlund              - endpoint@1
189905fc6b1SNiklas Söderlund          - required:
190905fc6b1SNiklas Söderlund              - endpoint@2
191905fc6b1SNiklas Söderlund          - required:
192905fc6b1SNiklas Söderlund              - endpoint@3
193905fc6b1SNiklas Söderlund
1948f6a0eabSNiklas Söderlund      port@2:
1958f6a0eabSNiklas Söderlund        $ref: /schemas/graph.yaml#/properties/port
1968f6a0eabSNiklas Söderlund        description:
1978f6a0eabSNiklas Söderlund          Input port node, multiple endpoints describing all the R-Car ISP
1988f6a0eabSNiklas Söderlund          modules connected the VIN.
1998f6a0eabSNiklas Söderlund
2008f6a0eabSNiklas Söderlund        properties:
2018f6a0eabSNiklas Söderlund          endpoint@0:
2028f6a0eabSNiklas Söderlund            $ref: /schemas/graph.yaml#/properties/endpoint
2038f6a0eabSNiklas Söderlund            description: Endpoint connected to ISP0.
2048f6a0eabSNiklas Söderlund
2058f6a0eabSNiklas Söderlund          endpoint@1:
2068f6a0eabSNiklas Söderlund            $ref: /schemas/graph.yaml#/properties/endpoint
2078f6a0eabSNiklas Söderlund            description: Endpoint connected to ISP1.
2088f6a0eabSNiklas Söderlund
2098f6a0eabSNiklas Söderlund          endpoint@2:
2108f6a0eabSNiklas Söderlund            $ref: /schemas/graph.yaml#/properties/endpoint
2118f6a0eabSNiklas Söderlund            description: Endpoint connected to ISP2.
2128f6a0eabSNiklas Söderlund
2138f6a0eabSNiklas Söderlund          endpoint@3:
2148f6a0eabSNiklas Söderlund            $ref: /schemas/graph.yaml#/properties/endpoint
2158f6a0eabSNiklas Söderlund            description: Endpoint connected to ISP3.
2168f6a0eabSNiklas Söderlund
217905fc6b1SNiklas Söderlundrequired:
218905fc6b1SNiklas Söderlund  - compatible
219905fc6b1SNiklas Söderlund  - reg
220905fc6b1SNiklas Söderlund  - interrupts
221905fc6b1SNiklas Söderlund  - clocks
222905fc6b1SNiklas Söderlund  - power-domains
2237935bb56SGeert Uytterhoeven
2247935bb56SGeert UytterhoevenallOf:
2257935bb56SGeert Uytterhoeven  - if:
2267935bb56SGeert Uytterhoeven      not:
2277935bb56SGeert Uytterhoeven        properties:
2287935bb56SGeert Uytterhoeven          compatible:
2297935bb56SGeert Uytterhoeven            contains:
2307935bb56SGeert Uytterhoeven              enum:
2317935bb56SGeert Uytterhoeven                - renesas,vin-r8a7778
2327935bb56SGeert Uytterhoeven                - renesas,vin-r8a7779
2337935bb56SGeert Uytterhoeven    then:
2347935bb56SGeert Uytterhoeven      required:
235905fc6b1SNiklas Söderlund        - resets
236905fc6b1SNiklas Söderlund
2377935bb56SGeert Uytterhoeven  - if:
238905fc6b1SNiklas Söderlund      properties:
239905fc6b1SNiklas Söderlund        compatible:
240905fc6b1SNiklas Söderlund          contains:
241905fc6b1SNiklas Söderlund            enum:
242905fc6b1SNiklas Söderlund              - renesas,vin-r8a7778
243905fc6b1SNiklas Söderlund              - renesas,vin-r8a7779
244905fc6b1SNiklas Söderlund              - renesas,rcar-gen2-vin
245905fc6b1SNiklas Söderlund    then:
246905fc6b1SNiklas Söderlund      required:
247905fc6b1SNiklas Söderlund        - port
248905fc6b1SNiklas Söderlund    else:
249905fc6b1SNiklas Söderlund      required:
250905fc6b1SNiklas Söderlund        - renesas,id
251905fc6b1SNiklas Söderlund        - ports
252905fc6b1SNiklas Söderlund
253905fc6b1SNiklas SöderlundadditionalProperties: false
254905fc6b1SNiklas Söderlund
255905fc6b1SNiklas Söderlundexamples:
256905fc6b1SNiklas Söderlund  # Device node example for Gen2 platform
257905fc6b1SNiklas Söderlund  - |
258905fc6b1SNiklas Söderlund    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
259905fc6b1SNiklas Söderlund    #include <dt-bindings/interrupt-controller/arm-gic.h>
260905fc6b1SNiklas Söderlund    #include <dt-bindings/power/r8a7790-sysc.h>
261905fc6b1SNiklas Söderlund
262905fc6b1SNiklas Söderlund    vin1: vin@e6ef1000 {
263905fc6b1SNiklas Söderlund            compatible = "renesas,vin-r8a7790",
264905fc6b1SNiklas Söderlund                         "renesas,rcar-gen2-vin";
265fba56184SRob Herring            reg = <0xe6ef1000 0x1000>;
266905fc6b1SNiklas Söderlund            interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
267905fc6b1SNiklas Söderlund            clocks = <&cpg CPG_MOD 810>;
268905fc6b1SNiklas Söderlund            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
269905fc6b1SNiklas Söderlund            resets = <&cpg 810>;
270905fc6b1SNiklas Söderlund
271905fc6b1SNiklas Söderlund            port {
272905fc6b1SNiklas Söderlund                    vin1ep0: endpoint {
273905fc6b1SNiklas Söderlund                            remote-endpoint = <&adv7180>;
274905fc6b1SNiklas Söderlund                            bus-width = <8>;
275905fc6b1SNiklas Söderlund                    };
276905fc6b1SNiklas Söderlund            };
277905fc6b1SNiklas Söderlund    };
278905fc6b1SNiklas Söderlund
279905fc6b1SNiklas Söderlund  # Device node example for Gen3 platform with only CSI-2
280905fc6b1SNiklas Söderlund  - |
281905fc6b1SNiklas Söderlund    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
282905fc6b1SNiklas Söderlund    #include <dt-bindings/interrupt-controller/arm-gic.h>
283905fc6b1SNiklas Söderlund    #include <dt-bindings/power/r8a7795-sysc.h>
284905fc6b1SNiklas Söderlund
285905fc6b1SNiklas Söderlund    vin0: video@e6ef0000 {
286905fc6b1SNiklas Söderlund            compatible = "renesas,vin-r8a7795";
287fba56184SRob Herring            reg = <0xe6ef0000 0x1000>;
288905fc6b1SNiklas Söderlund            interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
289905fc6b1SNiklas Söderlund            clocks = <&cpg CPG_MOD 811>;
290905fc6b1SNiklas Söderlund            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
291905fc6b1SNiklas Söderlund            resets = <&cpg 811>;
292905fc6b1SNiklas Söderlund            renesas,id = <0>;
293905fc6b1SNiklas Söderlund
294905fc6b1SNiklas Söderlund            ports {
295905fc6b1SNiklas Söderlund                    #address-cells = <1>;
296905fc6b1SNiklas Söderlund                    #size-cells = <0>;
297905fc6b1SNiklas Söderlund
298905fc6b1SNiklas Söderlund                    port@1 {
299905fc6b1SNiklas Söderlund                            #address-cells = <1>;
300905fc6b1SNiklas Söderlund                            #size-cells = <0>;
301905fc6b1SNiklas Söderlund
302905fc6b1SNiklas Söderlund                            reg = <1>;
303905fc6b1SNiklas Söderlund
304905fc6b1SNiklas Söderlund                            vin0csi20: endpoint@0 {
305905fc6b1SNiklas Söderlund                                    reg = <0>;
306905fc6b1SNiklas Söderlund                                    remote-endpoint = <&csi20vin0>;
307905fc6b1SNiklas Söderlund                            };
308905fc6b1SNiklas Söderlund                            vin0csi40: endpoint@2 {
309905fc6b1SNiklas Söderlund                                    reg = <2>;
310905fc6b1SNiklas Söderlund                                    remote-endpoint = <&csi40vin0>;
311905fc6b1SNiklas Söderlund                            };
312905fc6b1SNiklas Söderlund                    };
313905fc6b1SNiklas Söderlund            };
314905fc6b1SNiklas Söderlund    };
315905fc6b1SNiklas Söderlund
316905fc6b1SNiklas Söderlund  # Device node example for Gen3 platform with CSI-2 and parallel
317905fc6b1SNiklas Söderlund  - |
318905fc6b1SNiklas Söderlund    #include <dt-bindings/clock/r8a77970-cpg-mssr.h>
319905fc6b1SNiklas Söderlund    #include <dt-bindings/interrupt-controller/arm-gic.h>
320905fc6b1SNiklas Söderlund    #include <dt-bindings/power/r8a77970-sysc.h>
321905fc6b1SNiklas Söderlund
322905fc6b1SNiklas Söderlund    vin2: video@e6ef2000 {
323905fc6b1SNiklas Söderlund            compatible = "renesas,vin-r8a77970";
324fba56184SRob Herring            reg = <0xe6ef2000 0x1000>;
325905fc6b1SNiklas Söderlund            interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
326905fc6b1SNiklas Söderlund            clocks = <&cpg CPG_MOD 809>;
327905fc6b1SNiklas Söderlund            power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
328905fc6b1SNiklas Söderlund            resets = <&cpg 809>;
329905fc6b1SNiklas Söderlund            renesas,id = <2>;
330905fc6b1SNiklas Söderlund
331905fc6b1SNiklas Söderlund            ports {
332905fc6b1SNiklas Söderlund                    #address-cells = <1>;
333905fc6b1SNiklas Söderlund                    #size-cells = <0>;
334905fc6b1SNiklas Söderlund
335905fc6b1SNiklas Söderlund                    port@0 {
336905fc6b1SNiklas Söderlund                            reg = <0>;
337905fc6b1SNiklas Söderlund
338905fc6b1SNiklas Söderlund                            vin2_in: endpoint {
339905fc6b1SNiklas Söderlund                                    remote-endpoint = <&adv7612_out>;
340905fc6b1SNiklas Söderlund                                    hsync-active = <0>;
341905fc6b1SNiklas Söderlund                                    vsync-active = <0>;
342905fc6b1SNiklas Söderlund                            };
343905fc6b1SNiklas Söderlund                    };
344905fc6b1SNiklas Söderlund
345905fc6b1SNiklas Söderlund                    port@1 {
346905fc6b1SNiklas Söderlund                            #address-cells = <1>;
347905fc6b1SNiklas Söderlund                            #size-cells = <0>;
348905fc6b1SNiklas Söderlund
349905fc6b1SNiklas Söderlund                            reg = <1>;
350905fc6b1SNiklas Söderlund
351905fc6b1SNiklas Söderlund                            vin2csi40: endpoint@2 {
352905fc6b1SNiklas Söderlund                                    reg = <2>;
353905fc6b1SNiklas Söderlund                                    remote-endpoint = <&csi40vin2>;
354905fc6b1SNiklas Söderlund                            };
355905fc6b1SNiklas Söderlund                    };
356905fc6b1SNiklas Söderlund            };
357905fc6b1SNiklas Söderlund    };
358