xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3568-evb1-dual-camera.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7&csi2_dphy_hw {
8	status = "okay";
9};
10
11/*
12 * csi2_dphy1 & csi2_dphy2 used for split mode,
13 * csi2_dphy0 used for full mode,
14 * full mode and split mode are mutually exclusive
15 */
16&csi2_dphy0 {
17	status = "disabled";
18	/delete-node/ ports;
19};
20
21&csi2_dphy1 {
22	status = "okay";
23	/*
24	 * dphy1 only used for split mode,
25	 * can be used  concurrently  with dphy2
26	 * full mode and split mode are mutually exclusive
27	 */
28	ports {
29		#address-cells = <1>;
30		#size-cells = <0>;
31
32		port@0 {
33			reg = <0>;
34			#address-cells = <1>;
35			#size-cells = <0>;
36
37			mipi_in_gc2093_rgb: endpoint@2 {
38				reg = <2>;
39				remote-endpoint = <&gc2093_out>;
40				data-lanes = <1 2>;
41			};
42		};
43
44		port@1 {
45			reg = <1>;
46			#address-cells = <1>;
47			#size-cells = <0>;
48
49			dphy1_out: endpoint@1 {
50				reg = <1>;
51				remote-endpoint = <&mipi_csi2_input>;
52			};
53		};
54	};
55};
56
57&csi2_dphy2 {
58	status = "okay";
59	/*
60	 * dphy2 only used for split mode,
61	 * can be used  concurrently  with dphy1
62	 * full mode and split mode are mutually exclusive
63	 */
64	ports {
65		#address-cells = <1>;
66		#size-cells = <0>;
67
68		port@0 {
69			reg = <0>;
70			#address-cells = <1>;
71			#size-cells = <0>;
72
73			mipi_in_gc2053_ir: endpoint@1 {
74				reg = <1>;
75				remote-endpoint = <&gc2053_out>;
76				data-lanes = <1 2>;
77			};
78		};
79
80		port@1 {
81			reg = <1>;
82			#address-cells = <1>;
83			#size-cells = <0>;
84
85			dphy2_out: endpoint@1 {
86				reg = <1>;
87				remote-endpoint = <&isp_in1>;
88			};
89		};
90	};
91};
92
93&mipi_csi2 {
94	status = "okay";
95
96	ports {
97		#address-cells = <1>;
98		#size-cells = <0>;
99
100		port@0 {
101			reg = <0>;
102			#address-cells = <1>;
103			#size-cells = <0>;
104
105			mipi_csi2_input: endpoint@1 {
106				reg = <1>;
107				remote-endpoint = <&dphy1_out>;
108				data-lanes = <1 2>;
109			};
110		};
111
112		port@1 {
113			reg = <1>;
114			#address-cells = <1>;
115			#size-cells = <0>;
116
117			mipi_csi2_output: endpoint@0 {
118				reg = <0>;
119				remote-endpoint = <&cif_mipi_in>;
120				data-lanes = <1 2>;
121			};
122		};
123	};
124};
125
126&i2c4 {
127	status = "okay";
128
129	/delete-node/ gc8034@37;
130	/delete-node/ os04a10@36;
131	/delete-node/ ov5695@36;
132
133	gc2053: gc2053@37 {
134		status = "okay";
135		compatible = "galaxycore,gc2053";
136		reg = <0x37>;
137		clocks = <&pmucru CLK_WIFI>;
138		clock-names = "xvclk";
139		power-domains = <&power RK3568_PD_VI>;
140		pinctrl-names = "default";
141		pinctrl-0 = <&refclk_pins>;
142		reset-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
143		pwdn-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
144		rockchip,camera-module-index = <1>;
145		rockchip,camera-module-facing = "front";
146		rockchip,camera-module-name = "DW-RV2093-V1.0";
147		rockchip,camera-module-lens-name = "JZ-7070AS-A3";
148		port {
149			gc2053_out: endpoint {
150				remote-endpoint = <&mipi_in_gc2053_ir>;
151				data-lanes = <1 2>;
152			};
153		};
154	};
155
156	gc2093: gc2093@7e {
157		status = "okay";
158		compatible = "galaxycore,gc2093";
159		reg = <0x7e>;
160		clocks = <&cru CLK_CIF_OUT>;
161		clock-names = "xvclk";
162		power-domains = <&power RK3568_PD_VI>;
163		pinctrl-names = "default";
164		pinctrl-0 = <&cif_clk>;
165		reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
166		pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
167		rockchip,camera-module-index = <0>;
168		rockchip,camera-module-facing = "front";
169		rockchip,camera-module-name = "DW-RV2093-V1.0";
170		rockchip,camera-module-lens-name = "JZ-7070AS-A1";
171		port {
172			gc2093_out: endpoint {
173				remote-endpoint = <&mipi_in_gc2093_rgb>;
174				data-lanes = <1 2>;
175			};
176		};
177	};
178};
179
180&rkcif {
181	status = "okay";
182};
183
184&rkcif_mipi_lvds {
185	status = "okay";
186
187	port {
188		cif_mipi_in: endpoint {
189			remote-endpoint = <&mipi_csi2_output>;
190			data-lanes = <1 2>;
191		};
192	};
193};
194
195&rkcif_mipi_lvds_sditf {
196	status = "okay";
197
198	port {
199		mipi_lvds_sditf: endpoint {
200			remote-endpoint = <&isp_in2>;
201			data-lanes = <1 2>;
202		 };
203	};
204};
205
206&rkcif_mmu {
207	status = "okay";
208};
209
210
211&rkisp {
212	status = "okay";
213	max-input = <3840 2160 30>;
214};
215
216&rkisp_mmu {
217	status = "okay";
218};
219
220&rkisp_vir0 {
221	status = "okay";
222	/* gc2053-ir->dphy2->isp_vir0 */
223	port {
224		#address-cells = <1>;
225		#size-cells = <0>;
226
227		isp_in1: endpoint@0 {
228			reg = <0>;
229			remote-endpoint = <&dphy2_out>;
230		};
231	};
232};
233
234&rkisp_vir1 {
235	status = "okay";
236	/* gc2093-rgb->dphy1->csi2->vicap */
237	/* vicap sditf->isp_vir1 */
238	port {
239		#address-cells = <1>;
240		#size-cells = <0>;
241
242		isp_in2: endpoint@0 {
243			reg = <0>;
244			remote-endpoint = <&mipi_lvds_sditf>;
245		};
246	};
247};
248