xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rv1106-evb-cvr-dual-cam.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
4 *
5 * Version  Sensor  I2C_ADDR   Lanes
6 * v1.0.0   sc530ai   0x30    lane0~1(dphy1)
7 *          tp2855    0x44    lane2~3(dphy2)
8 */
9
10&csi2_dphy_hw {
11	status = "okay";
12};
13
14&csi2_dphy1 {
15	status = "okay";
16
17	ports {
18		#address-cells = <1>;
19		#size-cells = <0>;
20
21		port@0 {
22			reg = <0>;
23			#address-cells = <1>;
24			#size-cells = <0>;
25
26			csi_dphy_input1: endpoint@1 {
27				reg = <1>;
28				remote-endpoint = <&os04a10_out>;
29				data-lanes = <1 2>;
30			};
31			csi_dphy_input2: endpoint@2 {
32				reg = <2>;
33				remote-endpoint = <&sc530ai_out>;
34				data-lanes = <1 2>;
35			};
36		};
37
38		port@1 {
39			reg = <1>;
40			#address-cells = <1>;
41			#size-cells = <0>;
42
43			csi_dphy_output: endpoint@0 {
44				reg = <0>;
45				remote-endpoint = <&mipi_csi2_input>;
46			};
47		};
48	};
49};
50
51&csi2_dphy2 {
52	status = "okay";
53
54	ports {
55		#address-cells = <1>;
56		#size-cells = <0>;
57
58		port@0 {
59			reg = <0>;
60			#address-cells = <1>;
61			#size-cells = <0>;
62
63			csi_dphy_input3: endpoint@3 {
64				reg = <3>;
65				remote-endpoint = <&sc4336_out>;
66				data-lanes = <1 2>;
67			};
68			csi_dphy_input4: endpoint@4 {
69				reg = <4>;
70				remote-endpoint = <&tp2855_out>;
71				data-lanes = <1 2>;
72			};
73		};
74
75		port@1 {
76			reg = <1>;
77			#address-cells = <1>;
78			#size-cells = <0>;
79
80			csi_dphy_output1: endpoint@0 {
81				reg = <0>;
82				remote-endpoint = <&mipi1_csi2_input>;
83			};
84		};
85	};
86};
87
88&i2c4 {
89	status = "okay";
90	clock-frequency = <400000>;
91	pinctrl-names = "default";
92	pinctrl-0 = <&i2c4m2_xfer>;
93
94	os04a10: os04a10@36 {
95		compatible = "ovti,os04a10";
96		status = "okay";
97		reg = <0x36>;
98		clocks = <&cru MCLK_REF_MIPI0>;
99		clock-names = "xvclk";
100		reset-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>;
101		pwdn-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>;
102		pinctrl-names = "default";
103		pinctrl-0 = <&mipi_refclk_out0>;
104		rockchip,camera-module-index = <0>;
105		rockchip,camera-module-facing = "back";
106		rockchip,camera-module-name = "CMK-OT1607-PV1";
107		rockchip,camera-module-lens-name = "50IRC-F16";
108		port {
109			os04a10_out: endpoint {
110				remote-endpoint = <&csi_dphy_input1>;
111				data-lanes = <1 2>;
112			};
113		};
114	};
115
116	sc4336: sc4336@30 {
117		compatible = "smartsens,sc4336";
118		status = "okay";
119		reg = <0x30>;
120		clocks = <&cru MCLK_REF_MIPI1>;
121		clock-names = "xvclk";
122		reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
123		pwdn-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
124		pinctrl-names = "default";
125		pinctrl-0 = <&mipi_refclk_out1>;
126		rockchip,camera-module-index = <1>;
127		rockchip,camera-module-facing = "back";
128		rockchip,camera-module-name = "OT01";
129		rockchip,camera-module-lens-name = "40IRC_F16";
130		port {
131			sc4336_out: endpoint {
132				remote-endpoint = <&csi_dphy_input3>;
133				data-lanes = <1 2>;
134			};
135		};
136	};
137
138	sc530ai: sc530ai@30 {
139		compatible = "smartsense,sc530ai";
140		status = "okay";
141		reg = <0x30>;
142		clocks = <&cru MCLK_REF_MIPI0>;
143		clock-names = "xvclk";
144		reset-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
145		pwdn-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>;
146		pinctrl-names = "default";
147		pinctrl-0 = <&mipi_refclk_out0>;
148		rockchip,camera-module-index = <0>;
149		rockchip,camera-module-facing = "back";
150		rockchip,camera-module-name = "CMK-OT1607-PV1";
151		rockchip,camera-module-lens-name = "50IRC-F16";
152		port {
153			sc530ai_out: endpoint {
154				remote-endpoint = <&csi_dphy_input2>;
155				data-lanes = <1 2>;
156			};
157		};
158	};
159
160	tp2855_00: tp2855_00@44 {
161		compatible = "techpoint,tp2855";
162		status = "okay";
163		reg = <0x44>;
164		clocks = <&cru MCLK_REF_MIPI1>;
165		clock-names = "xvclk";
166		reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>;
167		pinctrl-names = "default";
168		pinctrl-0 = <&mipi_refclk_out1>;
169		rockchip,camera-module-index = <1>;
170		rockchip,camera-module-facing = "front";
171		rockchip,camera-module-name = "tp2855";
172		rockchip,camera-module-lens-name = "tp2855";
173		port {
174			tp2855_out: endpoint {
175				remote-endpoint = <&csi_dphy_input4>;
176				data-lanes = <1 2>;
177			};
178		};
179	};
180};
181
182&mipi0_csi2 {
183	status = "okay";
184
185	ports {
186		#address-cells = <1>;
187		#size-cells = <0>;
188
189		port@0 {
190			reg = <0>;
191			#address-cells = <1>;
192			#size-cells = <0>;
193
194			mipi_csi2_input: endpoint@1 {
195				reg = <1>;
196				remote-endpoint = <&csi_dphy_output>;
197			};
198		};
199
200		port@1 {
201			reg = <1>;
202			#address-cells = <1>;
203			#size-cells = <0>;
204
205			mipi_csi2_output: endpoint@0 {
206				reg = <0>;
207				remote-endpoint = <&cif_mipi_in>;
208			};
209		};
210	};
211};
212
213&mipi1_csi2 {
214	status = "okay";
215
216	ports {
217		#address-cells = <1>;
218		#size-cells = <0>;
219
220		port@0 {
221			reg = <0>;
222			#address-cells = <1>;
223			#size-cells = <0>;
224
225			mipi1_csi2_input: endpoint@1 {
226				reg = <1>;
227				remote-endpoint = <&csi_dphy_output1>;
228			};
229		};
230
231		port@1 {
232			reg = <1>;
233			#address-cells = <1>;
234			#size-cells = <0>;
235
236			mipi1_csi2_output: endpoint@0 {
237				reg = <0>;
238				remote-endpoint = <&cif_mipi_in1>;
239			};
240		};
241	};
242};
243
244&rkcif {
245	status = "okay";
246	pinctrl-names = "default";
247	pinctrl-0 = <&mipi_pins>;
248};
249
250&rkcif_mipi_lvds {
251	status = "okay";
252
253	port {
254		/* MIPI CSI-2 endpoint */
255		cif_mipi_in: endpoint {
256			remote-endpoint = <&mipi_csi2_output>;
257		};
258	};
259};
260
261&rkcif_mipi_lvds_sditf {
262	status = "okay";
263
264	port {
265		/* MIPI CSI-2 endpoint */
266		mipi_lvds_sditf: endpoint {
267			remote-endpoint = <&isp_in>;
268		};
269	};
270};
271
272&rkcif_mipi_lvds1 {
273	status = "okay";
274
275	port {
276		/* MIPI CSI-2 endpoint */
277		cif_mipi_in1: endpoint {
278			remote-endpoint = <&mipi1_csi2_output>;
279		};
280	};
281};
282
283&rkisp {
284	status = "okay";
285};
286
287&rkisp_vir0 {
288	status = "okay";
289
290	port@0 {
291		isp_in: endpoint {
292			remote-endpoint = <&mipi_lvds_sditf>;
293		};
294	};
295};
296
297