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
8title: Renesas R-Car MIPI CSI-2 receiver
9
10maintainers:
11  - Niklas Söderlund <niklas.soderlund@ragnatech.se>
12
13description:
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
18properties:
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,r8a77961-csi2 # R-Car M3-W+
29          - renesas,r8a77965-csi2 # R-Car M3-N
30          - renesas,r8a77970-csi2 # R-Car V3M
31          - renesas,r8a77980-csi2 # R-Car V3H
32          - renesas,r8a77990-csi2 # R-Car E3
33          - renesas,r8a779a0-csi2 # R-Car V3U
34
35  reg:
36    maxItems: 1
37
38  interrupts:
39    maxItems: 1
40
41  clocks:
42    maxItems: 1
43
44  power-domains:
45    maxItems: 1
46
47  resets:
48    maxItems: 1
49
50  ports:
51    $ref: /schemas/graph.yaml#/properties/ports
52
53    properties:
54      port@0:
55        $ref: /schemas/graph.yaml#/$defs/port-base
56        unevaluatedProperties: false
57        description:
58          Input port node, single endpoint describing the CSI-2 transmitter.
59
60        properties:
61          endpoint:
62            $ref: video-interfaces.yaml#
63            unevaluatedProperties: false
64
65            properties:
66              clock-lanes:
67                maxItems: 1
68
69              data-lanes:
70                maxItems: 1
71
72            required:
73              - clock-lanes
74              - data-lanes
75
76      port@1:
77        $ref: /schemas/graph.yaml#/properties/port
78        description:
79          Output port node, multiple endpoints describing all the R-Car VIN
80          modules connected the CSI-2 receiver.
81
82    required:
83      - port@0
84      - port@1
85
86required:
87  - compatible
88  - reg
89  - interrupts
90  - clocks
91  - power-domains
92  - resets
93  - ports
94
95additionalProperties: false
96
97examples:
98  - |
99    #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
100    #include <dt-bindings/interrupt-controller/arm-gic.h>
101    #include <dt-bindings/power/r8a7796-sysc.h>
102
103    csi20: csi2@fea80000 {
104            compatible = "renesas,r8a7796-csi2";
105            reg = <0xfea80000 0x10000>;
106            interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
107            clocks = <&cpg CPG_MOD 714>;
108            power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
109            resets = <&cpg 714>;
110
111            ports {
112                    #address-cells = <1>;
113                    #size-cells = <0>;
114
115                    port@0 {
116                            reg = <0>;
117
118                            csi20_in: endpoint {
119                                    clock-lanes = <0>;
120                                    data-lanes = <1>;
121                                    remote-endpoint = <&adv7482_txb>;
122                            };
123                    };
124
125                    port@1 {
126                            #address-cells = <1>;
127                            #size-cells = <0>;
128
129                            reg = <1>;
130
131                            csi20vin0: endpoint@0 {
132                                    reg = <0>;
133                                    remote-endpoint = <&vin0csi20>;
134                            };
135                            csi20vin1: endpoint@1 {
136                                    reg = <1>;
137                                    remote-endpoint = <&vin1csi20>;
138                            };
139                            csi20vin2: endpoint@2 {
140                                    reg = <2>;
141                                    remote-endpoint = <&vin2csi20>;
142                            };
143                            csi20vin3: endpoint@3 {
144                                    reg = <3>;
145                                    remote-endpoint = <&vin3csi20>;
146                            };
147                            csi20vin4: endpoint@4 {
148                                    reg = <4>;
149                                    remote-endpoint = <&vin4csi20>;
150                            };
151                            csi20vin5: endpoint@5 {
152                                    reg = <5>;
153                                    remote-endpoint = <&vin5csi20>;
154                            };
155                            csi20vin6: endpoint@6 {
156                                    reg = <6>;
157                                    remote-endpoint = <&vin6csi20>;
158                            };
159                            csi20vin7: endpoint@7 {
160                                    reg = <7>;
161                                    remote-endpoint = <&vin7csi20>;
162                            };
163                    };
164            };
165    };
166