xref: /freebsd/sys/contrib/device-tree/Bindings/media/renesas,csi2.yaml (revision e32fecd0c2c3ee37c47ee100f169e7eb0282a873)
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                minItems: 1
71                maxItems: 4
72                items:
73                  maximum: 4
74
75            required:
76              - clock-lanes
77              - data-lanes
78
79      port@1:
80        $ref: /schemas/graph.yaml#/properties/port
81        description:
82          Output port node, multiple endpoints describing all the R-Car VIN
83          modules connected the CSI-2 receiver.
84
85    required:
86      - port@0
87      - port@1
88
89required:
90  - compatible
91  - reg
92  - interrupts
93  - clocks
94  - power-domains
95  - resets
96  - ports
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
103    #include <dt-bindings/interrupt-controller/arm-gic.h>
104    #include <dt-bindings/power/r8a7796-sysc.h>
105
106    csi20: csi2@fea80000 {
107            compatible = "renesas,r8a7796-csi2";
108            reg = <0xfea80000 0x10000>;
109            interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
110            clocks = <&cpg CPG_MOD 714>;
111            power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
112            resets = <&cpg 714>;
113
114            ports {
115                    #address-cells = <1>;
116                    #size-cells = <0>;
117
118                    port@0 {
119                            reg = <0>;
120
121                            csi20_in: endpoint {
122                                    clock-lanes = <0>;
123                                    data-lanes = <1>;
124                                    remote-endpoint = <&adv7482_txb>;
125                            };
126                    };
127
128                    port@1 {
129                            #address-cells = <1>;
130                            #size-cells = <0>;
131
132                            reg = <1>;
133
134                            csi20vin0: endpoint@0 {
135                                    reg = <0>;
136                                    remote-endpoint = <&vin0csi20>;
137                            };
138                            csi20vin1: endpoint@1 {
139                                    reg = <1>;
140                                    remote-endpoint = <&vin1csi20>;
141                            };
142                            csi20vin2: endpoint@2 {
143                                    reg = <2>;
144                                    remote-endpoint = <&vin2csi20>;
145                            };
146                            csi20vin3: endpoint@3 {
147                                    reg = <3>;
148                                    remote-endpoint = <&vin3csi20>;
149                            };
150                            csi20vin4: endpoint@4 {
151                                    reg = <4>;
152                                    remote-endpoint = <&vin4csi20>;
153                            };
154                            csi20vin5: endpoint@5 {
155                                    reg = <5>;
156                                    remote-endpoint = <&vin5csi20>;
157                            };
158                            csi20vin6: endpoint@6 {
159                                    reg = <6>;
160                                    remote-endpoint = <&vin6csi20>;
161                            };
162                            csi20vin7: endpoint@7 {
163                                    reg = <7>;
164                                    remote-endpoint = <&vin7csi20>;
165                            };
166                    };
167            };
168    };
169