xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3326-evb-ai-va-v10.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
5 */
6
7/dts-v1/;
8#include <dt-bindings/display/drm_mipi_dsi.h>
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/pinctrl/rockchip.h>
12#include <dt-bindings/sensor-dev.h>
13#include "rk3326.dtsi"
14#include "rk3326-863-cif-sensor.dtsi"
15#include "px30-android.dtsi"
16
17/ {
18	model = "Rockchip rk3326 ai voice assistant evb board";
19	compatible = "rockchip,rk3326-evb-ai-va-v10", "rockchip,rk3326";
20
21	adc-keys {
22		compatible = "adc-keys";
23		io-channels = <&saradc 2>;
24		io-channel-names = "buttons";
25		poll-interval = <100>;
26		keyup-threshold-microvolt = <1800000>;
27
28		mute-key {
29			linux,code = <KEY_MUTE>;
30			label = "mute";
31			press-threshold-microvolt = <1119000>;
32		};
33
34		mode-key {
35			linux,code = <KEY_MODE>;
36			label = "mode";
37			press-threshold-microvolt = <892000>;
38		};
39
40		media-key {
41			linux,code = <KEY_MEDIA>;
42			label = "media";
43			press-threshold-microvolt = <616000>;
44		};
45
46		vol-down-key {
47			linux,code = <KEY_VOLUMEDOWN>;
48			label = "volume down";
49			press-threshold-microvolt = <300000>;
50		};
51
52		vol-up-key {
53			linux,code = <KEY_VOLUMEUP>;
54			label = "volume up";
55			press-threshold-microvolt = <15000>;
56		};
57	};
58
59	backlight: backlight {
60		compatible = "pwm-backlight";
61		pwms = <&pwm1 0 25000 0>;
62		brightness-levels = <
63			  0   1   2   3   4   5   6   7
64			  8   9  10  11  12  13  14  15
65			 16  17  18  19  20  21  22  23
66			 24  25  26  27  28  29  30  31
67			 32  33  34  35  36  37  38  39
68			 40  41  42  43  44  45  46  47
69			 48  49  50  51  52  53  54  55
70			 56  57  58  59  60  61  62  63
71			 64  65  66  67  68  69  70  71
72			 72  73  74  75  76  77  78  79
73			 80  81  82  83  84  85  86  87
74			 88  89  90  91  92  93  94  95
75			 96  97  98  99 100 101 102 103
76			104 105 106 107 108 109 110 111
77			112 113 114 115 116 117 118 119
78			120 121 122 123 124 125 126 127
79			128 129 130 131 132 133 134 135
80			136 137 138 139 140 141 142 143
81			144 145 146 147 148 149 150 151
82			152 153 154 155 156 157 158 159
83			160 161 162 163 164 165 166 167
84			168 169 170 171 172 173 174 175
85			176 177 178 179 180 181 182 183
86			184 185 186 187 188 189 190 191
87			192 193 194 195 196 197 198 199
88			200 201 202 203 204 205 206 207
89			208 209 210 211 212 213 214 215
90			216 217 218 219 220 221 222 223
91			224 225 226 227 228 229 230 231
92			232 233 234 235 236 237 238 239
93			240 241 242 243 244 245 246 247
94			248 249 250 251 252 253 254 255>;
95		default-brightness-level = <200>;
96	};
97
98	rk809-sound {
99		compatible = "simple-audio-card";
100		simple-audio-card,name = "rockchip,rk809-codec";
101		simple-audio-card,mclk-fs = <256>;
102		simple-audio-card,widgets =
103			"Microphone", "Mic Jack",
104			"Headphone", "Headphone Jack";
105		simple-audio-card,routing =
106			"Mic Jack", "MICBIAS1",
107			"IN1P", "Mic Jack",
108			"Headphone Jack", "HPOL",
109			"Headphone Jack", "HPOR";
110		simple-audio-card,dai-link@0 {
111			format = "i2s";
112			cpu {
113				sound-dai = <&i2s1_2ch>;
114			};
115			codec {
116				sound-dai = <&rk809_codec 0>;
117			};
118		};
119		simple-audio-card,dai-link@1 {
120			format = "pdm";
121			cpu {
122				sound-dai = <&pdm>;
123			};
124			codec {
125				sound-dai = <&rk809_codec 1>;
126			};
127		};
128	};
129
130	bt-sound {
131		compatible = "simple-audio-card";
132		simple-audio-card,format = "dsp_a";
133		simple-audio-card,bitclock-inversion = <1>;
134		simple-audio-card,mclk-fs = <256>;
135		simple-audio-card,name = "rockchip,bt";
136		simple-audio-card,cpu {
137			sound-dai = <&i2s2_2ch>;
138		};
139		simple-audio-card,codec {
140			sound-dai = <&bt_sco>;
141		};
142	};
143
144	bt_sco: bt-sco {
145		compatible = "delta,dfbmcs320";
146		#sound-dai-cells = <0>;
147		status = "okay";
148	};
149
150	rk_headset: rk-headset {
151		compatible = "rockchip_headset";
152		headset_gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
153		pinctrl-names = "default";
154		pinctrl-0 = <&hp_det>;
155		io-channels = <&saradc 1>;
156	};
157
158	sdio_pwrseq: sdio-pwrseq {
159		compatible = "mmc-pwrseq-simple";
160		clocks = <&rk809 1>;
161		clock-names = "ext_clock";
162		pinctrl-names = "default";
163		pinctrl-0 = <&wifi_enable_h>;
164
165		/*
166		 * On the module itself this is one of these (depending
167		 * on the actual card populated):
168		 * - SDIO_RESET_L_WL_REG_ON
169		 * - PDN (power down when low)
170		 */
171		reset-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
172	};
173
174	test-power {
175		status = "okay";
176	};
177
178	vcc5v0_sys: vccsys {
179		compatible = "regulator-fixed";
180		regulator-name = "vcc5v0_sys";
181		regulator-always-on;
182		regulator-boot-on;
183		regulator-min-microvolt = <5000000>;
184		regulator-max-microvolt = <5000000>;
185	};
186
187	wireless-wlan {
188		compatible = "wlan-platdata";
189		wifi_chip_type = "AP6210";
190		WIFI,host_wake_irq = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
191		status = "okay";
192	};
193
194	wireless-bluetooth {
195		compatible = "bluetooth-platdata";
196		clocks = <&rk809 1>;
197		clock-names = "ext_clock";
198		uart_rts_gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>;
199		pinctrl-names = "default","rts_gpio";
200		pinctrl-0 = <&uart1_rts>;
201		pinctrl-1 = <&uart1_rts_gpio>;
202		BT,reset_gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
203		BT,wake_gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
204		BT,wake_host_irq = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
205		status = "okay";
206	};
207};
208
209&bus_apll {
210	bus-supply = <&vdd_logic>;
211	status = "okay";
212};
213
214&cpu0 {
215	cpu-supply = <&vdd_arm>;
216};
217
218&dfi {
219	status = "okay";
220};
221
222&display_subsystem {
223	status = "okay";
224};
225
226&dmc {
227	center-supply = <&vdd_logic>;
228	status = "okay";
229};
230
231&dsi {
232	status = "okay";
233
234	panel@0 {
235		compatible = "sitronix,st7703", "simple-panel-dsi";
236		reg = <0>;
237		backlight = <&backlight>;
238		enable-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
239		prepare-delay-ms = <2>;
240		reset-delay-ms = <1>;
241		init-delay-ms = <20>;
242		enable-delay-ms = <120>;
243		disable-delay-ms = <50>;
244		unprepare-delay-ms = <40>;
245
246		width-mm = <68>;
247		height-mm = <121>;
248
249		dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
250			      MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
251		dsi,format = <MIPI_DSI_FMT_RGB888>;
252		dsi,lanes = <4>;
253
254		panel-init-sequence = [
255			05 fa 01 11
256			39 00 04 b9 f1 12 83
257			39 00 1c ba 33 81 05 f9 0e 0e 00 00 00
258				 00 00 00 00 00 44 25 00 91 0a
259				 00 00 02 4f 01 00 00 37
260			15 00 02 b8 25
261			39 00 04 bf 02 11 00
262			39 00 0b b3 0c 10 0a 50 03 ff 00 00 00
263				 00
264			39 00 0a c0 73 73 50 50 00 00 08 70 00
265			15 00 02 bc 46
266			15 00 02 cc 0b
267			15 00 02 b4 80
268			39 00 04 b2 c8 12 30
269			39 00 0f e3 07 07 0b 0b 03 0b 00 00 00
270				 00 ff 00 c0 10
271			39 00 0d c1 53 00 1e 1e 77 e1 cc dd 67
272				 77 33 33
273			39 00 07 c6 00 00 ff ff 01 ff
274			39 00 03 b5 09 09
275			39 00 03 b6 87 95
276			39 00 40 e9 c2 10 05 05 10 05 a0 12 31
277				 23 3f 81 0a a0 37 18 00 80 01
278				 00 00 00 00 80 01 00 00 00 48
279				 f8 86 42 08 88 88 80 88 88 88
280				 58 f8 87 53 18 88 88 81 88 88
281				 88 00 00 00 01 00 00 00 00 00
282				 00 00 00 00
283			39 00 3e ea 00 1a 00 00 00 00 02 00 00
284				 00 00 00 1f 88 81 35 78 88 88
285				 85 88 88 88 0f 88 80 24 68 88
286				 88 84 88 88 88 23 10 00 00 1c
287				 00 00 00 00 00 00 00 00 00 00
288				 00 00 00 00 00 30 05 a0 00 00
289				 00 00
290			39 00 23 e0 00 06 08 2a 31 3f 38 36 07
291				 0c 0d 11 13 12 13 11 18 00 06
292				 08 2a 31 3f 38 36 07 0c 0d 11
293				 13 12 13 11 18
294			05 32 01 29
295		];
296
297		panel-exit-sequence = [
298			05 00 01 28
299			05 00 01 10
300		];
301
302		display-timings {
303			native-mode = <&timing0>;
304
305			timing0: timing0 {
306				clock-frequency = <66000000>;
307				hactive = <720>;
308				vactive = <1280>;
309				hfront-porch = <40>;
310				hsync-len = <10>;
311				hback-porch = <40>;
312				vfront-porch = <22>;
313				vsync-len = <4>;
314				vback-porch = <11>;
315				hsync-active = <0>;
316				vsync-active = <0>;
317				de-active = <0>;
318				pixelclk-active = <0>;
319			};
320		};
321
322		ports {
323			#address-cells = <1>;
324			#size-cells = <0>;
325
326			port@0 {
327				reg = <0>;
328				panel_in_dsi: endpoint {
329					remote-endpoint = <&dsi_out_panel>;
330				};
331			};
332		};
333	};
334
335	ports {
336		#address-cells = <1>;
337		#size-cells = <0>;
338
339		port@1 {
340			reg = <1>;
341			dsi_out_panel: endpoint {
342				remote-endpoint = <&panel_in_dsi>;
343			};
344		};
345	};
346};
347
348&dsi_in_vopb {
349	status = "okay";
350};
351
352&dsi_in_vopl {
353	status = "disabled";
354};
355
356&route_dsi {
357	connect = <&vopb_out_dsi>;
358	status = "okay";
359};
360
361&emmc {
362	bus-width = <8>;
363	cap-mmc-highspeed;
364	mmc-hs200-1_8v;
365	no-sdio;
366	no-sd;
367	disable-wp;
368	non-removable;
369	num-slots = <1>;
370	status = "okay";
371};
372
373&gpu {
374	mali-supply = <&vdd_logic>;
375	status = "okay";
376};
377
378&i2c0 {
379	status = "okay";
380	clock-frequency = <400000>;
381	i2c-scl-rising-time-ns = <280>;
382	i2c-scl-falling-time-ns = <16>;
383
384	rk809: pmic@20 {
385		compatible = "rockchip,rk809";
386		reg = <0x20>;
387		interrupt-parent = <&gpio0>;
388		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
389		pinctrl-names = "default", "pmic-sleep",
390				"pmic-power-off", "pmic-reset";
391		pinctrl-0 = <&pmic_int>;
392		pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
393		pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
394		pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>;
395		rockchip,system-power-controller;
396		wakeup-source;
397		#clock-cells = <1>;
398		clock-output-names = "rk808-clkout1", "rk808-clkout2";
399		//fb-inner-reg-idxs = <2>;
400		/* 1: rst regs (default in codes), 0: rst the pmic */
401		pmic-reset-func = <1>;
402
403		vcc1-supply = <&vcc5v0_sys>;
404		vcc2-supply = <&vcc5v0_sys>;
405		vcc3-supply = <&vcc5v0_sys>;
406		vcc4-supply = <&vcc5v0_sys>;
407		vcc5-supply = <&vcc3v3_sys>;
408		vcc6-supply = <&vcc3v3_sys>;
409		vcc7-supply = <&vcc3v3_sys>;
410		vcc8-supply = <&vcc3v3_sys>;
411		vcc9-supply = <&vcc5v0_sys>;
412
413		pwrkey {
414			status = "okay";
415		};
416
417		pinctrl_rk8xx: pinctrl_rk8xx {
418			gpio-controller;
419			#gpio-cells = <2>;
420
421			rk817_slppin_null: rk817_slppin_null {
422				pins = "gpio_slp";
423				function = "pin_fun0";
424			};
425
426			rk817_slppin_slp: rk817_slppin_slp {
427				pins = "gpio_slp";
428				function = "pin_fun1";
429			};
430
431			rk817_slppin_pwrdn: rk817_slppin_pwrdn {
432				pins = "gpio_slp";
433				function = "pin_fun2";
434			};
435
436			rk817_slppin_rst: rk817_slppin_rst {
437				pins = "gpio_slp";
438				function = "pin_fun3";
439			};
440		};
441
442		regulators {
443			vdd_logic: DCDC_REG1 {
444				regulator-always-on;
445				regulator-boot-on;
446				regulator-min-microvolt = <850000>;
447				regulator-max-microvolt = <1350000>;
448				regulator-ramp-delay = <6001>;
449				regulator-initial-mode = <0x2>;
450				regulator-name = "vdd_logic";
451				regulator-state-mem {
452					regulator-on-in-suspend;
453					regulator-suspend-microvolt = <950000>;
454				};
455			};
456
457			vdd_arm: DCDC_REG2 {
458				regulator-always-on;
459				regulator-boot-on;
460				regulator-min-microvolt = <850000>;
461				regulator-max-microvolt = <1350000>;
462				regulator-ramp-delay = <6001>;
463				regulator-initial-mode = <0x2>;
464				regulator-name = "vdd_arm";
465				regulator-state-mem {
466					regulator-off-in-suspend;
467					regulator-suspend-microvolt = <950000>;
468				};
469			};
470
471			vcc_ddr: DCDC_REG3 {
472				regulator-always-on;
473				regulator-boot-on;
474				regulator-initial-mode = <0x2>;
475				regulator-name = "vcc_ddr";
476				regulator-state-mem {
477					regulator-on-in-suspend;
478				};
479			};
480
481			vcc_3v0: DCDC_REG4 {
482				regulator-always-on;
483				regulator-boot-on;
484				regulator-min-microvolt = <3000000>;
485				regulator-max-microvolt = <3000000>;
486				regulator-initial-mode = <0x2>;
487				regulator-name = "vcc_3v0";
488				regulator-state-mem {
489					regulator-off-in-suspend;
490					regulator-suspend-microvolt = <3000000>;
491				};
492			};
493
494			vcc_1v0: LDO_REG1 {
495				regulator-always-on;
496				regulator-boot-on;
497				regulator-min-microvolt = <1000000>;
498				regulator-max-microvolt = <1000000>;
499				regulator-name = "vcc_1v0";
500				regulator-state-mem {
501					regulator-on-in-suspend;
502					regulator-suspend-microvolt = <1000000>;
503				};
504			};
505
506			vcc1v8_soc: LDO_REG2 {
507				regulator-always-on;
508				regulator-boot-on;
509				regulator-min-microvolt = <1800000>;
510				regulator-max-microvolt = <1800000>;
511
512				regulator-name = "vcc1v8_soc";
513				regulator-state-mem {
514					regulator-on-in-suspend;
515					regulator-suspend-microvolt = <1800000>;
516				};
517			};
518
519			vdd1v0_soc: LDO_REG3 {
520				regulator-always-on;
521				regulator-boot-on;
522				regulator-min-microvolt = <1000000>;
523				regulator-max-microvolt = <1000000>;
524
525				regulator-name = "vcc1v0_soc";
526				regulator-state-mem {
527					regulator-on-in-suspend;
528					regulator-suspend-microvolt = <1000000>;
529				};
530			};
531
532			vcc3v0_pmu: LDO_REG4 {
533				regulator-always-on;
534				regulator-boot-on;
535				regulator-min-microvolt = <3000000>;
536				regulator-max-microvolt = <3000000>;
537
538				regulator-name = "vcc3v0_pmu";
539				regulator-state-mem {
540					regulator-on-in-suspend;
541					regulator-suspend-microvolt = <3000000>;
542
543				};
544			};
545
546			vccio_sd: LDO_REG5 {
547				regulator-always-on;
548				regulator-boot-on;
549				regulator-min-microvolt = <1800000>;
550				regulator-max-microvolt = <3300000>;
551
552				regulator-name = "vccio_sd";
553				regulator-state-mem {
554					regulator-on-in-suspend;
555					regulator-suspend-microvolt = <3300000>;
556				};
557			};
558
559			vcc_sd: LDO_REG6 {
560				regulator-min-microvolt = <3300000>;
561				regulator-max-microvolt = <3300000>;
562
563				regulator-name = "vcc_sd";
564				regulator-state-mem {
565					regulator-on-in-suspend;
566					regulator-suspend-microvolt = <3300000>;
567
568				};
569			};
570
571			vcc2v8_dvp: LDO_REG7 {
572				regulator-always-on;
573				regulator-boot-on;
574				regulator-min-microvolt = <2800000>;
575				regulator-max-microvolt = <2800000>;
576
577				regulator-name = "vcc2v8_dvp";
578				regulator-state-mem {
579					regulator-off-in-suspend;
580					regulator-suspend-microvolt = <2800000>;
581				};
582			};
583
584			vcc1v8_dvp: LDO_REG8 {
585				regulator-always-on;
586				regulator-boot-on;
587				regulator-min-microvolt = <1800000>;
588				regulator-max-microvolt = <1800000>;
589
590				regulator-name = "vcc1v8_dvp";
591				regulator-state-mem {
592					regulator-on-in-suspend;
593					regulator-suspend-microvolt = <1800000>;
594				};
595			};
596
597			vdd1v5_dvp: LDO_REG9 {
598				regulator-always-on;
599				regulator-boot-on;
600				regulator-min-microvolt = <1500000>;
601				regulator-max-microvolt = <1500000>;
602
603				regulator-name = "vdd1v5_dvp";
604				regulator-state-mem {
605					regulator-off-in-suspend;
606					regulator-suspend-microvolt = <1500000>;
607				};
608			};
609
610			vcc3v3_sys: DCDC_REG5 {
611				regulator-always-on;
612				regulator-boot-on;
613				regulator-min-microvolt = <3300000>;
614				regulator-max-microvolt = <3300000>;
615				regulator-name = "vcc3v3_sys";
616				regulator-state-mem {
617					regulator-on-in-suspend;
618					regulator-suspend-microvolt = <3300000>;
619				};
620			};
621
622
623			vcc5v0_host: SWITCH_REG1 {
624				regulator-name = "vcc5v0_host";
625			};
626
627			vcc3v3_lcd: SWITCH_REG2 {
628				regulator-boot-on;
629				regulator-name = "vcc3v3_lcd";
630			};
631		};
632
633		rk809_codec: codec {
634			#sound-dai-cells = <1>;
635			compatible = "rockchip,rk809-codec", "rockchip,rk817-codec";
636			clocks = <&cru SCLK_I2S1_OUT>;
637			clock-names = "mclk";
638			pinctrl-names = "default";
639			pinctrl-0 = <&i2s1_2ch_mclk>;
640			pdmdata-out-enable;
641			use-ext-amplifier;
642			adc-for-loopback;
643			spk-ctl-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
644			hp-volume = <20>;
645			spk-volume = <20>;
646		};
647	};
648};
649
650&i2c1 {
651	status = "okay";
652	clock-frequency = <400000>;
653	i2c-scl-rising-time-ns = <275>;
654	i2c-scl-falling-time-ns = <16>;
655
656	gt1x: gt1x@14 {
657	      compatible = "goodix,gt1x";
658	      reg = <0x14>;
659	      goodix,rst-gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
660	      goodix,irq-gpio = <&gpio0 RK_PA5 IRQ_TYPE_LEVEL_LOW>;
661	};
662
663	is31fl3236: led-controller@3c {
664		compatible = "issi,is31fl3236";
665		reg = <0x3c>;
666		#address-cells = <1>;
667		#size-cells = <0>;
668		reset-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
669		status = "okay";
670
671		led1: led@1 {
672			label = "led1";
673			reg = <1>;
674			led-max-microamp = <10000>;
675			linux,default-trigger = "timer";
676			linux,default-trigger-delay-ms = <0>;
677			linux,blink-delay-on-ms = <100>;
678			linux,blink-delay-off-ms = <1200>;
679		};
680
681		led2: led@2 {
682			label = "led2";
683			reg = <2>;
684			led-max-microamp = <10000>;
685			linux,default-trigger = "timer";
686			linux,default-trigger-delay-ms = <0>;
687			linux,blink-delay-on-ms = <100>;
688			linux,blink-delay-off-ms = <1200>;
689		};
690
691		led3: led@3 {
692			label = "led3";
693			reg = <3>;
694			led-max-microamp = <10000>;
695			linux,default-trigger = "default-on";
696		};
697
698		led4: led@4 {
699			label = "led4";
700			reg = <4>;
701			led-max-microamp = <10000>;
702			linux,default-trigger = "timer";
703			linux,default-trigger-delay-ms = <100>;
704			linux,blink-delay-on-ms = <100>;
705			linux,blink-delay-off-ms = <1200>;
706		};
707
708		led5: led@5 {
709			label = "led5";
710			reg = <5>;
711			led-max-microamp = <10000>;
712			linux,default-trigger = "timer";
713			linux,default-trigger-delay-ms = <100>;
714			linux,blink-delay-on-ms = <100>;
715			linux,blink-delay-off-ms = <1200>;
716		};
717
718		led6: led@6 {
719			label = "led6";
720			reg = <6>;
721			led-max-microamp = <10000>;
722			linux,default-trigger = "default-on";
723		};
724
725		led7: led@7 {
726			label = "led7";
727			reg = <7>;
728			led-max-microamp = <10000>;
729			linux,default-trigger = "timer";
730			linux,default-trigger-delay-ms = <200>;
731			linux,blink-delay-on-ms = <100>;
732			linux,blink-delay-off-ms = <1200>;
733		};
734
735		led8: led@8 {
736			label = "led8";
737			reg = <8>;
738			led-max-microamp = <10000>;
739			linux,default-trigger = "timer";
740			linux,default-trigger-delay-ms = <200>;
741			linux,blink-delay-on-ms = <100>;
742			linux,blink-delay-off-ms = <1200>;
743		};
744
745		led9: led@9 {
746			label = "led9";
747			reg = <9>;
748			led-max-microamp = <10000>;
749			linux,default-trigger = "default-on";
750		};
751
752		led10: led@10 {
753			label = "led10";
754			reg = <10>;
755			led-max-microamp = <10000>;
756			linux,default-trigger = "timer";
757			linux,default-trigger-delay-ms = <300>;
758			linux,blink-delay-on-ms = <100>;
759			linux,blink-delay-off-ms = <1200>;
760		};
761
762		led11: led@11 {
763			label = "led11";
764			reg = <11>;
765			led-max-microamp = <10000>;
766			linux,default-trigger = "timer";
767			linux,default-trigger-delay-ms = <300>;
768			linux,blink-delay-on-ms = <100>;
769			linux,blink-delay-off-ms = <1200>;
770		};
771
772		led12: led@12 {
773			label = "led12";
774			reg = <12>;
775			led-max-microamp = <10000>;
776			linux,default-trigger = "default-on";
777		};
778
779		led13: led@13 {
780			label = "led13";
781			reg = <13>;
782			led-max-microamp = <10000>;
783			linux,default-trigger = "timer";
784			linux,default-trigger-delay-ms = <400>;
785			linux,blink-delay-on-ms = <100>;
786			linux,blink-delay-off-ms = <1200>;
787		};
788
789		led14: led@14 {
790			label = "led14";
791			reg = <14>;
792			led-max-microamp = <10000>;
793			linux,default-trigger = "timer";
794			linux,default-trigger-delay-ms = <400>;
795			linux,blink-delay-on-ms = <100>;
796			linux,blink-delay-off-ms = <1200>;
797		};
798
799		led15: led@15 {
800			label = "led15";
801			reg = <15>;
802			led-max-microamp = <10000>;
803			linux,default-trigger = "default-on";
804		};
805
806		led16: led@16 {
807			label = "led16";
808			reg = <16>;
809			led-max-microamp = <10000>;
810			linux,default-trigger = "timer";
811			linux,default-trigger-delay-ms = <500>;
812			linux,blink-delay-on-ms = <100>;
813			linux,blink-delay-off-ms = <1200>;
814		};
815
816		led17: led@17 {
817			label = "led17";
818			reg = <17>;
819			led-max-microamp = <10000>;
820			linux,default-trigger = "timer";
821			linux,default-trigger-delay-ms = <500>;
822			linux,blink-delay-on-ms = <100>;
823			linux,blink-delay-off-ms = <1200>;
824		};
825
826		led18: led@18 {
827			label = "led18";
828			reg = <18>;
829			led-max-microamp = <10000>;
830			linux,default-trigger = "default-on";
831		};
832
833		led19: led@19 {
834			label = "led19";
835			reg = <19>;
836			led-max-microamp = <10000>;
837			linux,default-trigger = "timer";
838			linux,default-trigger-delay-ms = <600>;
839			linux,blink-delay-on-ms = <100>;
840			linux,blink-delay-off-ms = <1200>;
841		};
842
843		led20: led@20 {
844			label = "led20";
845			reg = <20>;
846			led-max-microamp = <10000>;
847			linux,default-trigger = "timer";
848			linux,default-trigger-delay-ms = <600>;
849			linux,blink-delay-on-ms = <100>;
850			linux,blink-delay-off-ms = <1200>;
851		};
852
853		led21: led@21 {
854			label = "led21";
855			reg = <21>;
856			led-max-microamp = <10000>;
857			linux,default-trigger = "default-on";
858		};
859
860		led22: led@22 {
861			label = "led22";
862			reg = <22>;
863			led-max-microamp = <10000>;
864			linux,default-trigger = "timer";
865			linux,default-trigger-delay-ms = <700>;
866			linux,blink-delay-on-ms = <100>;
867			linux,blink-delay-off-ms = <1200>;
868		};
869
870		led23: led@23 {
871			label = "led23";
872			reg = <23>;
873			led-max-microamp = <10000>;
874			linux,default-trigger = "timer";
875			linux,default-trigger-delay-ms = <700>;
876			linux,blink-delay-on-ms = <100>;
877			linux,blink-delay-off-ms = <1200>;
878		};
879
880		led124: led@24 {
881			label = "led24";
882			reg = <24>;
883			led-max-microamp = <10000>;
884			linux,default-trigger = "default-on";
885		};
886
887		led25: led@25 {
888			label = "led25";
889			reg = <25>;
890			led-max-microamp = <10000>;
891			linux,default-trigger = "timer";
892			linux,default-trigger-delay-ms = <800>;
893			linux,blink-delay-on-ms = <100>;
894			linux,blink-delay-off-ms = <1200>;
895		};
896
897		led26: led@26 {
898			label = "led26";
899			reg = <26>;
900			led-max-microamp = <10000>;
901			linux,default-trigger = "timer";
902			linux,default-trigger-delay-ms = <800>;
903			linux,blink-delay-on-ms = <100>;
904			linux,blink-delay-off-ms = <1200>;
905		};
906
907		led27: led@27 {
908			label = "led27";
909			reg = <27>;
910			led-max-microamp = <10000>;
911			linux,default-trigger = "default-on";
912		};
913
914		led28: led@28 {
915			label = "led28";
916			reg = <28>;
917			led-max-microamp = <10000>;
918			linux,default-trigger = "timer";
919			linux,default-trigger-delay-ms = <900>;
920			linux,blink-delay-on-ms = <100>;
921			linux,blink-delay-off-ms = <1200>;
922		};
923
924		led29: led@29 {
925			label = "led29";
926			reg = <29>;
927			led-max-microamp = <10000>;
928			linux,default-trigger = "timer";
929			linux,default-trigger-delay-ms = <900>;
930			linux,blink-delay-on-ms = <100>;
931			linux,blink-delay-off-ms = <1200>;
932		};
933
934		led30: led@30 {
935			label = "led30";
936			reg = <30>;
937			led-max-microamp = <10000>;
938			linux,default-trigger = "default-on";
939		};
940
941		led31: led@31 {
942			label = "led31";
943			reg = <31>;
944			led-max-microamp = <10000>;
945			linux,default-trigger = "timer";
946			linux,default-trigger-delay-ms = <1000>;
947			linux,blink-delay-on-ms = <100>;
948			linux,blink-delay-off-ms = <1200>;
949		};
950
951		led32: led@32 {
952			label = "led32";
953			reg = <32>;
954			led-max-microamp = <10000>;
955			linux,default-trigger = "timer";
956			linux,default-trigger-delay-ms = <1000>;
957			linux,blink-delay-on-ms = <100>;
958			linux,blink-delay-off-ms = <1200>;
959		};
960
961		led33: led@33 {
962			label = "led33";
963			reg = <33>;
964			led-max-microamp = <10000>;
965			linux,default-trigger = "default-on";
966		};
967
968		led34: led@34 {
969			label = "led34";
970			reg = <34>;
971			led-max-microamp = <10000>;
972			linux,default-trigger = "timer";
973			linux,default-trigger-delay-ms = <1100>;
974			linux,blink-delay-on-ms = <100>;
975			linux,blink-delay-off-ms = <1200>;
976		};
977
978		led35: led@35 {
979			label = "led35";
980			reg = <35>;
981			led-max-microamp = <10000>;
982			linux,default-trigger = "timer";
983			linux,default-trigger-delay-ms = <1100>;
984			linux,blink-delay-on-ms = <100>;
985			linux,blink-delay-off-ms = <1200>;
986		};
987
988		led36: led@36 {
989			label = "led36";
990			reg = <36>;
991			led-max-microamp = <10000>;
992			linux,default-trigger = "default-on";
993		};
994	};
995
996	ls_stk3410: light@48 {
997		compatible = "ls_stk3410";
998		status = "okay";
999		reg = <0x48>;
1000		type = <SENSOR_TYPE_LIGHT>;
1001		irq_enable = <0>;
1002		als_threshold_high = <100>;
1003		als_threshold_low = <10>;
1004		als_ctrl_gain = <2>; /* 0:x1 1:x4 2:x16 3:x64 */
1005		poll_delay_ms = <100>;
1006	};
1007
1008	ps_stk3410: proximity@48 {
1009		compatible = "ps_stk3410";
1010		status = "okay";
1011		reg = <0x48>;
1012		type = <SENSOR_TYPE_PROXIMITY>;
1013		//pinctrl-names = "default";
1014		//pinctrl-0 = <&gpio2_c3>;
1015		//irq-gpio = <&gpio0 RK_PB7 IRQ_TYPE_LEVEL_LOW>;
1016		//irq_enable = <1>;
1017		ps_threshold_high = <0x200>;
1018		ps_threshold_low = <0x100>;
1019		ps_ctrl_gain = <3>; /* 0:x1 1:x4 2:x16 3:x64 */
1020		ps_led_current = <3>; /* 0:12.5mA 1:25mA 2:50mA 3:100mA */
1021		poll_delay_ms = <100>;
1022	};
1023
1024};
1025
1026&i2c2 {
1027	status = "okay";
1028
1029	clock-frequency = <100000>;
1030
1031	/* These are relatively safe rise/fall times; TODO: measure */
1032	i2c-scl-falling-time-ns = <50>;
1033	i2c-scl-rising-time-ns = <300>;
1034
1035	ov5695: ov5695@36 {
1036		compatible = "ovti,ov5695";
1037		reg = <0x36>;
1038		clocks = <&cru SCLK_CIF_OUT>;
1039		clock-names = "xvclk";
1040		/*reset-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;*/
1041		pwdn-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
1042		//pinctrl-names = "default";
1043		//pinctrl-0 = <&cif_clkout_m0>;
1044		rockchip,camera-module-index = <0>;
1045		rockchip,camera-module-facing = "back";
1046		rockchip,camera-module-name = "TongJu";
1047		rockchip,camera-module-lens-name = "CHT842-MD";
1048		port {
1049			ov5695_out: endpoint {
1050				remote-endpoint = <&mipi_in>;
1051				data-lanes = <1 2>;
1052			};
1053		};
1054	};
1055};
1056
1057&i2s1_2ch {
1058	status = "okay";
1059	#sound-dai-cells = <0>;
1060	pinctrl-0 = <&i2s1_2ch_sclk
1061		     &i2s1_2ch_lrck
1062		     &i2s1_2ch_sdo>;
1063};
1064
1065&i2s2_2ch {
1066	status = "okay";
1067	rockchip,bclk-fs = <64>;
1068	#sound-dai-cells = <0>;
1069};
1070
1071&io_domains {
1072	status = "okay";
1073
1074	vccio1-supply = <&vcc1v8_soc>;
1075	vccio2-supply = <&vccio_sd>;
1076	vccio3-supply = <&vcc1v8_dvp>;
1077	vccio4-supply = <&vcc1v8_soc>;
1078	vccio5-supply = <&vcc_3v0>;
1079};
1080
1081&isp_mmu {
1082	status = "okay";
1083};
1084
1085&nandc0 {
1086	status = "okay";
1087};
1088
1089&pdm {
1090	status = "okay";
1091	#sound-dai-cells = <0>;
1092	pinctrl-names = "default";
1093	pinctrl-0 = <&pdm_clk0m1
1094		&pdm_clk1
1095		&pdm_sdi0m1
1096		&pdm_sdi1
1097		&pdm_sdi2
1098		&pdm_sdi3>;
1099};
1100
1101&pinctrl {
1102	headphone {
1103		hp_det: hp-det {
1104			rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
1105		};
1106	};
1107
1108	pmic {
1109		pmic_int: pmic_int {
1110			rockchip,pins =
1111				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
1112		};
1113
1114		soc_slppin_gpio: soc_slppin_gpio {
1115			rockchip,pins =
1116				<0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
1117		};
1118
1119		soc_slppin_slp: soc_slppin_slp {
1120			rockchip,pins =
1121				<0 RK_PA4 1 &pcfg_pull_none>;
1122		};
1123
1124		soc_slppin_rst: soc_slppin_rst {
1125			rockchip,pins =
1126				<0 RK_PA4 2 &pcfg_pull_none>;
1127		};
1128	};
1129
1130	sdio-pwrseq {
1131		wifi_enable_h: wifi-enable-h {
1132			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
1133		};
1134	};
1135};
1136
1137&pmu_io_domains {
1138	status = "okay";
1139
1140	pmuio1-supply = <&vcc3v0_pmu>;
1141	pmuio2-supply = <&vcc3v0_pmu>;
1142};
1143
1144&pwm1 {
1145	status = "okay";
1146};
1147
1148&rk_rga {
1149	status = "okay";
1150};
1151
1152&rockchip_suspend {
1153	status = "okay";
1154	rockchip,sleep-debug-en = <1>;
1155};
1156
1157&saradc {
1158	status = "okay";
1159	vref-supply = <&vcc1v8_soc>;
1160};
1161
1162&sdmmc {
1163	bus-width = <4>;
1164	cap-mmc-highspeed;
1165	cap-sd-highspeed;
1166	no-sdio;
1167	no-mmc;
1168	card-detect-delay = <800>;
1169	ignore-pm-notify;
1170	/*cd-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; [> CD GPIO <]*/
1171	sd-uhs-sdr12;
1172	sd-uhs-sdr25;
1173	sd-uhs-sdr50;
1174	sd-uhs-sdr104;
1175	vqmmc-supply = <&vccio_sd>;
1176	vmmc-supply = <&vcc_sd>;
1177	status = "okay";
1178};
1179
1180&sdio {
1181	bus-width = <4>;
1182	cap-sd-highspeed;
1183	no-sd;
1184	no-mmc;
1185	ignore-pm-notify;
1186	keep-power-in-suspend;
1187	non-removable;
1188	mmc-pwrseq = <&sdio_pwrseq>;
1189	sd-uhs-sdr104;
1190	status = "okay";
1191};
1192
1193&tsadc {
1194	pinctrl-names = "gpio", "otpout";
1195	pinctrl-0 = <&tsadc_otp_gpio>;
1196	pinctrl-1 = <&tsadc_otp_out>;
1197	status = "okay";
1198};
1199
1200&u2phy {
1201	status = "okay";
1202
1203	u2phy_host: host-port {
1204		status = "okay";
1205	};
1206
1207	u2phy_otg: otg-port {
1208		status = "okay";
1209	};
1210};
1211
1212&usb20_otg {
1213	status = "okay";
1214};
1215
1216&uart1 {
1217	pinctrl-names = "default";
1218	pinctrl-0 = <&uart1_xfer &uart1_cts>;
1219	status = "okay";
1220};
1221
1222&vopb {
1223	status = "okay";
1224};
1225
1226&vopb_mmu {
1227	status = "okay";
1228};
1229
1230&vopl {
1231	status = "okay";
1232};
1233
1234&vopl_mmu {
1235	status = "okay";
1236};
1237
1238&mpp_srv {
1239	status = "okay";
1240};
1241
1242&vdpu {
1243	status = "okay";
1244};
1245
1246&vepu {
1247	status = "okay";
1248};
1249
1250&vpu_mmu {
1251	status = "okay";
1252};
1253
1254&hevc {
1255	status = "okay";
1256};
1257
1258&hevc_mmu {
1259	status = "okay";
1260};
1261
1262&mipi_dphy_rx0 {
1263	status = "okay";
1264
1265	ports {
1266		#address-cells = <1>;
1267		#size-cells = <0>;
1268
1269		port@0 {
1270			reg = <0>;
1271			#address-cells = <1>;
1272			#size-cells = <0>;
1273
1274			mipi_in: endpoint@1 {
1275				reg = <1>;
1276				remote-endpoint = <&ov5695_out>;
1277				data-lanes = <1 2>;
1278			};
1279		};
1280
1281		port@1 {
1282			reg = <1>;
1283			#address-cells = <1>;
1284			#size-cells = <0>;
1285
1286			dphy_rx_out: endpoint@0 {
1287				reg = <0>;
1288				remote-endpoint = <&isp_mipi_in>;
1289			};
1290		};
1291	};
1292};
1293
1294&rkisp1 {
1295	status = "okay";
1296	pinctrl-names = "default";
1297	pinctrl-0 = <&cif_clkout_m0 &dvp_d0d1_m0 &dvp_d2d9_m0>;
1298	port {
1299		#address-cells = <1>;
1300		#size-cells = <0>;
1301
1302		isp_mipi_in: endpoint@0 {
1303			reg = <0>;
1304			remote-endpoint = <&dphy_rx_out>;
1305		};
1306
1307	};
1308};
1309