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