Merge tag 'efi_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / rockchip-isp1.yaml
1 # SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/rockchip-isp1.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Rockchip SoC Image Signal Processing unit v1
8
9 maintainers:
10   - Helen Koike <helen.koike@collabora.com>
11
12 description: |
13   Rockchip ISP1 is the Camera interface for the Rockchip series of SoCs
14   which contains image processing, scaling, and compression functions.
15
16 properties:
17   compatible:
18     const: rockchip,rk3399-cif-isp
19
20   reg:
21     maxItems: 1
22
23   interrupts:
24     maxItems: 1
25
26   clocks:
27     minItems: 3
28     items:
29       # isp0 and isp1
30       - description: ISP clock
31       - description: ISP AXI clock
32       - description: ISP AHB clock
33       # only for isp1
34       - description: ISP Pixel clock
35
36   clock-names:
37     minItems: 3
38     items:
39       # isp0 and isp1
40       - const: isp
41       - const: aclk
42       - const: hclk
43       # only for isp1
44       - const: pclk_isp
45
46   iommus:
47     maxItems: 1
48
49   phys:
50     maxItems: 1
51     description: phandle for the PHY port
52
53   phy-names:
54     const: dphy
55
56   power-domains:
57     maxItems: 1
58
59   # See ./video-interfaces.txt for details
60   ports:
61     type: object
62     additionalProperties: false
63
64     properties:
65       "#address-cells":
66         const: 1
67
68       "#size-cells":
69         const: 0
70
71       port@0:
72         type: object
73         description: connection point for sensors at MIPI-DPHY RX0
74         additionalProperties: false
75
76         properties:
77           "#address-cells":
78             const: 1
79
80           "#size-cells":
81             const: 0
82
83           reg:
84             const: 0
85
86         patternProperties:
87           endpoint:
88             type: object
89             additionalProperties: false
90
91             properties:
92               reg:
93                 maxItems: 1
94
95               data-lanes:
96                 minItems: 1
97                 maxItems: 4
98
99               remote-endpoint: true
100
101         required:
102           - reg
103           - "#address-cells"
104           - "#size-cells"
105
106     required:
107       - "#address-cells"
108       - "#size-cells"
109       - port@0
110
111 required:
112   - compatible
113   - reg
114   - interrupts
115   - clocks
116   - clock-names
117   - iommus
118   - phys
119   - phy-names
120   - power-domains
121   - ports
122
123 if:
124   properties:
125     compatible:
126       contains:
127         const: rockchip,rk3399-cif-isp
128 then:
129   properties:
130     clocks:
131       minItems: 3
132       maxItems: 4
133     clock-names:
134       minItems: 3
135       maxItems: 4
136
137 additionalProperties: false
138
139 examples:
140   - |
141
142     #include <dt-bindings/clock/rk3399-cru.h>
143     #include <dt-bindings/interrupt-controller/arm-gic.h>
144     #include <dt-bindings/power/rk3399-power.h>
145
146     parent0: parent {
147         #address-cells = <2>;
148         #size-cells = <2>;
149
150         isp0: isp0@ff910000 {
151             compatible = "rockchip,rk3399-cif-isp";
152             reg = <0x0 0xff910000 0x0 0x4000>;
153             interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
154             clocks = <&cru SCLK_ISP0>,
155                      <&cru ACLK_ISP0_WRAPPER>,
156                      <&cru HCLK_ISP0_WRAPPER>;
157             clock-names = "isp", "aclk", "hclk";
158             iommus = <&isp0_mmu>;
159             phys = <&dphy>;
160             phy-names = "dphy";
161             power-domains = <&power RK3399_PD_ISP0>;
162
163             ports {
164                 #address-cells = <1>;
165                 #size-cells = <0>;
166
167                 port@0 {
168                     reg = <0>;
169                     #address-cells = <1>;
170                     #size-cells = <0>;
171
172                     mipi_in_wcam: endpoint@0 {
173                         reg = <0>;
174                         remote-endpoint = <&wcam_out>;
175                         data-lanes = <1 2>;
176                     };
177
178                     mipi_in_ucam: endpoint@1 {
179                         reg = <1>;
180                         remote-endpoint = <&ucam_out>;
181                         data-lanes = <1>;
182                     };
183                 };
184             };
185         };
186
187         i2c7: i2c {
188             #address-cells = <1>;
189             #size-cells = <0>;
190
191             wcam: camera@36 {
192                 compatible = "ovti,ov5695";
193                 reg = <0x36>;
194
195                 port {
196                     wcam_out: endpoint {
197                         remote-endpoint = <&mipi_in_wcam>;
198                         data-lanes = <1 2>;
199                     };
200                 };
201             };
202
203             ucam: camera@3c {
204                 compatible = "ovti,ov2685";
205                 reg = <0x3c>;
206
207                   port {
208                       ucam_out: endpoint {
209                           remote-endpoint = <&mipi_in_ucam>;
210                           data-lanes = <1>;
211                       };
212                   };
213             };
214         };
215     };