xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rv1103g-scaner-v10.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
4 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rv1103.dtsi"
9#include "rv1103-evb-v10.dtsi"
10
11/ {
12	model = "Rockchip RV1103G SCANER V10 Board";
13	compatible = "rockchip,rv1103g-scaner-v10", "rockchip,rv1103";
14
15	buzzer {
16		compatible = "regulator-gpio";
17		gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
18		pinctrl-names = "default";
19		pinctrl-0 = <&gpio_buzzer>;
20	};
21
22	gpio-keys {
23		compatible = "gpio-keys";
24		autorepeat;
25
26		key {
27			gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
28			linux,code = <KEY_1>;
29			label = "GPIO Key";
30			linux,input-type = <1>;
31			wakeup-source;
32			debounce-interval = <100>;
33		};
34	};
35
36	leds: gpio-leds {
37		compatible = "gpio-leds";
38		pinctrl-names = "default";
39		pinctrl-0 = <&gpio_leds>;
40
41		led_light {
42			gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
43			label = "led_light";
44		};
45
46		led_red {
47			gpios = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
48			label = "led_red";
49		};
50
51		work_led {
52			gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
53			label = "work_led";
54		};
55	};
56
57	vcc_1v8: vcc-1v8 {
58		compatible = "regulator-fixed";
59		regulator-name = "vcc_1v8";
60		regulator-always-on;
61		regulator-boot-on;
62		regulator-min-microvolt = <1800000>;
63		regulator-max-microvolt = <1800000>;
64	};
65
66	vcc_3v3: vcc-3v3 {
67		compatible = "regulator-fixed";
68		regulator-name = "vcc_3v3";
69		regulator-always-on;
70		regulator-boot-on;
71		regulator-min-microvolt = <3300000>;
72		regulator-max-microvolt = <3300000>;
73	};
74
75	vcc3v3_sd: vcc3v3-sd {
76		compatible = "regulator-fixed";
77		regulator-name = "vcc3v3_sd";
78		regulator-always-on;
79		regulator-boot-on;
80		regulator-min-microvolt = <3300000>;
81		regulator-max-microvolt = <3300000>;
82	};
83};
84
85&acodec {
86	status = "disabled";
87};
88
89&csi2_dphy_hw {
90	status = "okay";
91};
92
93&csi2_dphy0 {
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			csi_dphy_input1: endpoint@0 {
106				reg = <0>;
107				remote-endpoint = <&sc031gs_out>;
108				data-lanes = <1>;
109			};
110		};
111
112		port@1 {
113			reg = <1>;
114			#address-cells = <1>;
115			#size-cells = <0>;
116
117			csi_dphy_output: endpoint@0 {
118				reg = <0>;
119				remote-endpoint = <&mipi_csi2_input>;
120			};
121		};
122	};
123};
124
125&i2c4 {
126	status = "okay";
127	clock-frequency = <400000>;
128	pinctrl-names = "default";
129	pinctrl-0 = <&i2c4m2_xfer>;
130
131	sc031gs: sc031gs@30 {
132		compatible = "smartsens,sc031gs";
133		status = "okay";
134		reg = <0x30>;
135		clocks = <&cru MCLK_REF_MIPI0>;
136		clock-names = "xvclk";
137		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
138		pinctrl-names = "default";
139		pinctrl-0 = <&mipi_refclk_out0>;
140		rockchip,camera-module-index = <0>;
141		rockchip,camera-module-facing = "back";
142		rockchip,camera-module-name = "CMK-HRG537A5-H211";
143		rockchip,camera-module-lens-name = "12IR-F24";
144		port {
145			sc031gs_out: endpoint {
146				remote-endpoint = <&csi_dphy_input1>;
147				data-lanes = <1>;
148			};
149		};
150	};
151};
152
153&mipi0_csi2 {
154	status = "okay";
155
156	ports {
157		#address-cells = <1>;
158		#size-cells = <0>;
159
160		port@0 {
161			reg = <0>;
162			#address-cells = <1>;
163			#size-cells = <0>;
164
165			mipi_csi2_input: endpoint@1 {
166				reg = <1>;
167				remote-endpoint = <&csi_dphy_output>;
168			};
169		};
170
171		port@1 {
172			reg = <1>;
173			#address-cells = <1>;
174			#size-cells = <0>;
175
176			mipi_csi2_output: endpoint@0 {
177				reg = <0>;
178				remote-endpoint = <&cif_mipi_in>;
179			};
180		};
181	};
182};
183
184&pinctrl {
185	buzzer {
186		gpio_buzzer: gpio-buzzer {
187			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
188		};
189	};
190
191	gpio-leds {
192		gpio_leds: gpio-leds {
193			rockchip,pins =
194			<1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
195			<1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
196			<1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
197		};
198	};
199};
200
201&rkcif {
202	status = "okay";
203};
204
205&rkcif_mipi_lvds {
206	status = "okay";
207
208	pinctrl-names = "default";
209	pinctrl-0 = <&mipi_pins>;
210	port {
211		/* MIPI CSI-2 endpoint */
212		cif_mipi_in: endpoint {
213			remote-endpoint = <&mipi_csi2_output>;
214		};
215	};
216};
217
218&rkcif_mipi_lvds_sditf {
219	status = "okay";
220
221	port {
222		/* MIPI CSI-2 endpoint */
223		mipi_lvds_sditf: endpoint {
224			remote-endpoint = <&isp_in>;
225		};
226	};
227};
228
229&rkisp {
230	status = "okay";
231};
232
233&rkisp_vir0 {
234	status = "okay";
235
236	port@0 {
237		isp_in: endpoint {
238			remote-endpoint = <&mipi_lvds_sditf>;
239		};
240	};
241};
242
243