xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3588-toybrick-imx258.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 *
5 */
6&csi2_dphy0_hw {
7	status = "okay";
8};
9
10&csi2_dphy0 {
11	status = "okay";
12	ports {
13		#address-cells = <1>;
14		#size-cells = <0>;
15		port@0 {
16			reg = <0>;
17			#address-cells = <1>;
18			#size-cells = <0>;
19			mipi_in_ucam0: endpoint@1 {
20				reg = <1>;
21				remote-endpoint = <&ucam_out0>;
22				data-lanes = <1 2 3 4>;
23			};
24		};
25		port@1 {
26			reg = <1>;
27			#address-cells = <1>;
28			#size-cells = <0>;
29			csidphy0_out: endpoint@0 {
30				reg = <0>;
31				remote-endpoint = <&mipi2_csi2_input>;
32			};
33		};
34	};
35};
36
37&i2c3 {
38	status = "okay";
39	dw9714: dw9714@c {
40		compatible = "silicon touch,dw9714";
41		status = "okay";
42		reg = <0x0c>;
43		rockchip,camera-module-index = <0>;
44		rockchip,camera-module-facing = "back";
45		rockchip,vcm-start-current = <20>;
46		rockchip,vcm-rated-current = <120>;
47		rockchip,vcm-step-mode = <13>;
48	};
49
50	imx258_eeprom: imx258_eeprom@50 {
51		compatible = "otp,imx258_eeprom";
52		status = "okay";
53		reg = <0x50>;
54	};
55
56	imx258: imx258@10 {
57		compatible = "sony,imx258";
58		reg = <0x10>;
59		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
60		clock-names = "xvclk";
61		pinctrl-names = "default";
62		pinctrl-0 = <&mipim0_camera3_clk>;
63		power-domains = <&power RK3588_PD_VI>;
64		avdd-supply = <&vcc_mipicsi0>;
65		pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
66		reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
67		rockchip,camera-module-index = <0>;
68		rockchip,camera-module-facing = "back";
69		rockchip,camera-module-name = "GEIR180089";
70		rockchip,camera-module-lens-name = "LG500627G";
71		eeprom-ctrl = <&imx258_eeprom>;
72		lens-focus = <&dw9714>;
73		port {
74			ucam_out0: endpoint {
75				remote-endpoint = <&mipi_in_ucam0>;
76				data-lanes = <1 2 3 4>;
77			};
78		};
79	};
80};
81
82&mipi2_csi2 {
83	status = "okay";
84	ports {
85		#address-cells = <1>;
86		#size-cells = <0>;
87		port@0 {
88			reg = <0>;
89			#address-cells = <1>;
90			#size-cells = <0>;
91			mipi2_csi2_input: endpoint@1 {
92				reg = <1>;
93				remote-endpoint = <&csidphy0_out>;
94			};
95		};
96		port@1 {
97			reg = <1>;
98			#address-cells = <1>;
99			#size-cells = <0>;
100			mipi2_csi2_output: endpoint@0 {
101				reg = <0>;
102				remote-endpoint = <&cif_mipi_in2>;
103			};
104		};
105	};
106};
107
108&rkcif {
109	status = "okay";
110};
111
112&rkcif_mipi_lvds2 {
113	status = "okay";
114	port {
115		cif_mipi_in2: endpoint {
116			remote-endpoint = <&mipi2_csi2_output>;
117		};
118	};
119};
120
121&rkcif_mipi_lvds2_sditf {
122	status = "okay";
123	port {
124		mipi_lvds_sditf: endpoint {
125			remote-endpoint = <&isp0_vir0>;
126		};
127	};
128};
129
130&rkcif_mmu {
131	status = "okay";
132};
133
134&rkisp0 {
135	status = "okay";
136};
137
138&isp0_mmu {
139	status = "okay";
140};
141
142&rkisp0_vir0 {
143	status = "okay";
144	port {
145		#address-cells = <1>;
146		#size-cells = <0>;
147		isp0_vir0: endpoint@0 {
148			reg = <0>;
149			remote-endpoint = <&mipi_lvds_sditf>;
150		};
151	};
152};
153
154&csi2_dcphy0 {
155	status = "okay";
156	ports {
157		#address-cells = <1>;
158		#size-cells = <0>;
159		port@0 {
160			reg = <0>;
161			#address-cells = <1>;
162			#size-cells = <0>;
163			mipi_in_1_ucam0: endpoint@1 {
164				reg = <1>;
165				remote-endpoint = <&imx258_1_out0>;
166				data-lanes = <1 2 3 4>;
167			};
168		};
169		port@1 {
170			reg = <1>;
171			#address-cells = <1>;
172			#size-cells = <0>;
173			csidcphy0_out: endpoint@0 {
174				reg = <0>;
175				remote-endpoint = <&mipi0_csi2_input>;
176			};
177		};
178	};
179};
180
181&i2c5 {
182	status = "okay";
183	dw9714_1: dw9714_1@c {
184		compatible = "silicon touch,dw9714";
185		status = "okay";
186		reg = <0x0c>;
187		rockchip,camera-module-index = <0>;
188		rockchip,camera-module-facing = "back";
189		rockchip,vcm-start-current = <20>;
190		rockchip,vcm-rated-current = <120>;
191		rockchip,vcm-step-mode = <13>;
192	};
193
194	imx258_1_eeprom: imx258_1_eeprom@50 {
195		compatible = "otp,imx258_eeprom";
196		status = "okay";
197		reg = <0x50>;
198	};
199
200	imx258_1: imx258_1@1a {
201		compatible = "sony,imx258";
202		reg = <0x1a>;
203		clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
204		clock-names = "xvclk";
205		pinctrl-names = "default";
206		pinctrl-0 = <&mipim0_camera1_clk>;
207		power-domains = <&power RK3588_PD_VI>;
208		avdd-supply = <&vcc_mipidcphy0>;
209		pwdn-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
210		reset-gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_LOW>;
211		rockchip,camera-module-index = <0>;
212		rockchip,camera-module-facing = "back";
213		rockchip,camera-module-name = "GEIR180089";
214		rockchip,camera-module-lens-name = "LG500627G";
215		eeprom-ctrl = <&imx258_1_eeprom>;
216		lens-focus = <&dw9714_1>;
217		port {
218			imx258_1_out0: endpoint {
219				remote-endpoint = <&mipi_in_1_ucam0>;
220				data-lanes = <1 2 3 4>;
221			};
222		};
223	};
224};
225
226// use dcphy0 isp1
227&mipi_dcphy0 {
228	status = "okay";
229};
230
231&mipi0_csi2 {
232	status = "okay";
233	ports {
234		#address-cells = <1>;
235		#size-cells = <0>;
236		port@0 {
237			reg = <0>;
238			#address-cells = <1>;
239			#size-cells = <0>;
240			mipi0_csi2_input: endpoint@1 {
241				reg = <1>;
242				remote-endpoint = <&csidcphy0_out>;
243			};
244		};
245		port@1 {
246			reg = <1>;
247			#address-cells = <1>;
248			#size-cells = <0>;
249			mipi0_csi2_output: endpoint@0 {
250				reg = <0>;
251				remote-endpoint = <&cif_mipi_in0>;
252			};
253		};
254	};
255};
256
257&rkcif_mipi_lvds {
258	status = "okay";
259	port {
260		cif_mipi_in0: endpoint {
261			remote-endpoint = <&mipi0_csi2_output>;
262		};
263	};
264};
265
266#if 0
267
268&rkcif_mipi_lvds_sditf {
269	status = "okay";
270	port {
271		mipi_lvds_sditf_1: endpoint {
272			remote-endpoint = <&isp0_vir1>;
273		};
274	};
275};
276
277&rkisp0_vir1 {
278	status = "okay";
279
280	port {
281		#address-cells = <1>;
282		#size-cells = <0>;
283
284		isp0_vir1: endpoint@0 {
285			reg = <0>;
286			remote-endpoint = <&mipi_lvds_sditf_1>;
287		};
288	};
289};
290
291#endif
292
293&rkisp1 {
294	status = "okay";
295};
296
297&isp1_mmu {
298	status = "okay";
299};
300
301&rkcif_mipi_lvds_sditf {
302	status = "okay";
303
304	port {
305		mipi1_lvds_sditf: endpoint {
306			remote-endpoint = <&isp1_vir0>;
307		};
308	};
309};
310
311&rkisp1_vir0 {
312	status = "okay";
313
314	port {
315		#address-cells = <1>;
316		#size-cells = <0>;
317
318		isp1_vir0: endpoint@0 {
319			reg = <0>;
320			remote-endpoint = <&mipi1_lvds_sditf>;
321		};
322	};
323};
324