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