xref: /netbsd-src/sys/arch/arm/dts/rk3399-pinebook-pro.dts (revision e670fd5c413e99c2f6a37901bb21c537fcd322d2)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
5 */
6
7/dts-v1/;
8#include <dt-bindings/input/linux-event-codes.h>
9#include <dt-bindings/pwm/pwm.h>
10#include <dt-bindings/usb/pd.h>
11//#include <dt-bindings/leds/common.h>
12#include <dt-bindings/pinctrl/rockchip.h>
13#include "rk3399.dtsi"
14#include "rk3399-opp.dtsi"
15#include "rk3399-crypto.dtsi"
16
17/ {
18	model = "Pine64 Pinebook Pro";
19	compatible = "pine64,pinebook-pro", "rockchip,rk3399";
20
21	edp_panel: edp-panel { /* "boe,nv140fhmn49" */
22		compatible = "boe,nv140fhmn49", "simple-panel";
23		backlight = <&backlight>;
24		power-supply = <&vcc3v3_s0>;
25//		pinctrl-names = "default";
26//		pinctrl-0 = <&panel_en>;
27		enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
28		prepare-delay-ms = <20>;
29		enable-delay-ms = <20>;
30		status = "okay";
31
32		ports {
33	                #address-cells = <0x01>;
34                        #size-cells = <0x00>;
35			port@0 {
36				panel_in_edp: endpoint@0 {
37					remote-endpoint = <&edp_out_panel>;
38				};
39			};
40		};
41	};
42
43	chosen {
44		bootargs = "earlycon=uart8250,mmio32,0xff1a0000";
45		stdout-path = "serial2:1500000n8";
46	};
47
48	leds {
49		compatible = "gpio-leds";
50		pinctrl-names = "default";
51		pinctrl-0 = <&pwrled &slpled>;
52
53		/* Hack using active_low as inversion. A real, inverted trigger would be nicer */
54		green-led {
55			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
56			label = "green:disk-activity";
57//			function = LED_FUNCTION_POWER;
58			linux,default-trigger = "disk-activity";
59			default-state = "off";
60//			color = <LED_COLOR_ID_GREEN>;
61		};
62
63		red-led {
64			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
65			label = "red:standby";
66//			function = LED_FUNCTION_STANDBY;
67			default-state = "off";
68			panic-indicator;
69			retain-state-suspended;
70//			color = <LED_COLOR_ID_RED>;
71		};
72	};
73
74	reserved-memory {
75		#address-cells = <2>;
76		#size-cells = <2>;
77		ranges;
78
79		drm_logo: drm-logo@00000000 {
80			compatible = "rockchip,drm-logo";
81			reg = <0x0 0x0 0x0 0x0>;
82		};
83	};
84
85	dc_12v: dc-12v {
86		compatible = "regulator-fixed";
87		regulator-name = "dc_12v";
88		regulator-always-on;
89		regulator-boot-on;
90		regulator-min-microvolt = <12000000>;
91		regulator-max-microvolt = <12000000>;
92	};
93
94	gpio-keys {
95		compatible = "gpio-keys";
96		autorepeat;
97		pinctrl-names = "default";
98		pinctrl-0 = <&pwrbtn &lidbtn>;
99
100		power {
101			debounce-interval = <20>;
102			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
103			label = "Power";
104			linux,code = <KEY_POWER>;
105			wakeup-source;
106		};
107
108		lid {
109			debounce-interval = <20>;
110			gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>;
111			label = "Lid";
112			linux,code = <SW_LID>;
113			linux,input-type = <EV_SW>;
114			wakeup-source;
115		};
116	};
117
118	backlight: edp-backlight {
119		compatible = "pwm-backlight";
120		pwms = <&pwm0 0 740740 0>;
121		power-supply = <&vcc3v3_s3>;
122		brightness-levels = <
123			  0   1   2   3   4   5   6   7
124			  8   9  10  11  12  13  14  15
125			 16  17  18  19  20  21  22  23
126			 24  25  26  27  28  29  30  31
127			 32  33  34  35  36  37  38  39
128			 40  41  42  43  44  45  46  47
129			 48  49  50  51  52  53  54  55
130			 56  57  58  59  60  61  62  63
131			 64  65  66  67  68  69  70  71
132			 72  73  74  75  76  77  78  79
133			 80  81  82  83  84  85  86  87
134			 88  89  90  91  92  93  94  95
135			 96  97  98  99 100 101 102 103
136			104 105 106 107 108 109 110 111
137			112 113 114 115 116 117 118 119
138			120 121 122 123 124 125 126 127
139			128 129 130 131 132 133 134 135
140			136 137 138 139 140 141 142 143
141			144 145 146 147 148 149 150 151
142			152 153 154 155 156 157 158 159
143			160 161 162 163 164 165 166 167
144			168 169 170 171 172 173 174 175
145			176 177 178 179 180 181 182 183
146			184 185 186 187 188 189 190 191
147			192 193 194 195 196 197 198 199
148			200 201 202 203 204 205 206 207
149			208 209 210 211 212 213 214 215
150			216 217 218 219 220 221 222 223
151			224 225 226 227 228 229 230 231
152			232 233 234 235 236 237 238 239
153			240 241 242 243 244 245 246 247
154			248 249 250 251 252 253 254 255>;
155		default-brightness-level = <200>;
156		status = "okay";
157	};
158
159	panel {
160		vcc_lcd_en_drv: vcc-lcd-en-drv {
161			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
162		};
163
164		panel_en: panel-en {
165			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
166		};
167	};
168
169	vcc_lcd_en: vcc-lcd-en-regulator {
170		compatible = "regulator-fixed";
171		enable-active-high;
172		gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
173//		pinctrl-names = "default";
174//		pinctrl-0 = <&vcc_lcd_en_drv>;
175		regulator-name = "vcc_lcd_en";
176		regulator-enable-ramp-delay = <100000>;
177		vin-supply = <&vcc3v3_sys>;
178		regulator-always-on;
179
180		regulator-state-mem {
181			regulator-off-in-suspend;
182		};
183	};
184
185	sdio_pwrseq: sdio-pwrseq {
186		compatible = "mmc-pwrseq-simple";
187		clocks = <&rk808 1>;
188		clock-names = "ext_clock";
189		pinctrl-names = "default";
190		pinctrl-0 = <&wifi_enable_h>;
191		power-off-delay-us = <500000>;
192		post-power-on-delay-ms = <100>;
193
194		/*
195		 * On the module itself this is one of these (depending
196		 * on the actual card populated):
197		 * - SDIO_RESET_L_WL_REG_ON
198		 * - PDN (power down when low)
199		 */
200		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
201	};
202
203	wireless-wlan {
204		compatible = "wlan-platdata";
205		rockchip,grf = <&grf>;
206		wifi_chip_type = "ap6354";
207		sdio_vref = <1800>;
208		WIFI,host_wake_irq = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
209		status = "okay";
210	};
211
212	es8316-sound {
213		status = "okay";
214		compatible = "simple-audio-card";
215		simple-audio-card,name = "rockchip,es8316-codec";
216		simple-audio-card,format = "i2s";
217		simple-audio-card,mclk-fs = <256>;
218
219		simple-audio-card,widgets =
220			"Microphone", "Mic Jack",
221			"Headphone", "Headphones",
222			"Speaker", "Speaker";
223		simple-audio-card,routing =
224			"MIC1", "Mic Jack",
225			"Headphones", "HPOL",
226			"Headphones", "HPOR",
227			"Speaker Amplifier INL", "HPOL",
228			"Speaker Amplifier INR", "HPOR",
229			"Speaker", "Speaker Amplifier OUTL",
230			"Speaker", "Speaker Amplifier OUTR";
231
232		simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
233		simple-audio-card,aux-devs = <&speaker_amp>;
234
235		simple-audio-card,cpu {
236			sound-dai = <&i2s1>;
237		};
238
239		simple-audio-card,codec {
240			sound-dai = <&es8316>;
241		};
242	};
243
244	speaker_amp: speaker-amplifier {
245		status = "okay";
246		compatible = "simple-audio-amplifier";
247		enable-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
248		VCC-supply = <&vcc5v0_host>;
249		sound-name-prefix = "Speaker Amplifier";
250	};
251
252	/* switched by pmic_sleep */
253	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
254		compatible = "regulator-fixed";
255		regulator-name = "vcc1v8_s3";
256		regulator-always-on;
257		regulator-boot-on;
258		regulator-min-microvolt = <1800000>;
259		regulator-max-microvolt = <1800000>;
260		vin-supply = <&vcc_1v8>;
261	};
262
263	vcc3v3_pcie: vcc3v3-pcie-regulator {
264		compatible = "regulator-fixed";
265		enable-active-high;
266		gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
267		pinctrl-names = "default";
268		pinctrl-0 = <&pcie_pwr_en>;
269		regulator-name = "vcc3v3_pcie";
270		regulator-min-microvolt = <3300000>;
271		regulator-max-microvolt = <3300000>;
272		vin-supply = <&dc_12v>;
273	};
274
275	vcc_phy: vcc-phy-regulator {
276		compatible = "regulator-fixed";
277		regulator-name = "vcc_phy";
278		regulator-always-on;
279		regulator-boot-on;
280	};
281
282	vcc3v3_sys: vcc3v3-sys {
283		compatible = "regulator-fixed";
284		regulator-name = "vcc3v3_sys";
285		regulator-always-on;
286		regulator-boot-on;
287		regulator-min-microvolt = <3300000>;
288		regulator-max-microvolt = <3300000>;
289		vin-supply = <&vcc_sys>;
290	};
291
292	/* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
293	vcc5v0_host: vcc5v0-host-regulator {
294		compatible = "regulator-fixed";
295		enable-active-high;
296		gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
297		pinctrl-names = "default";
298		pinctrl-0 = <&vcc5v0_host_en>;
299		regulator-name = "vcc5v0_host";
300		regulator-always-on;
301		vin-supply = <&vcc_sys>;
302	};
303
304	vcc5v0_typec: vcc5v0-typec-regulator {
305		compatible = "regulator-fixed";
306		enable-active-high;
307		gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
308		pinctrl-names = "default";
309		pinctrl-0 = <&vcc5v0_typec_en>;
310		regulator-name = "vcc5v0_typec";
311		vin-supply = <&vcc_sys>;
312	};
313
314	vcc_sys: vcc-sys {
315		compatible = "regulator-fixed";
316		regulator-name = "vcc_sys";
317		regulator-always-on;
318		regulator-boot-on;
319		regulator-min-microvolt = <5000000>;
320		regulator-max-microvolt = <5000000>;
321		vin-supply = <&dc_12v>;
322	};
323
324	vdd_log: vdd-log {
325		compatible = "pwm-regulator";
326		pwms = <&pwm2 0 25000 1>;
327		pwm-supply = <&vcc_sys>;
328		regulator-name = "vdd_log";
329		regulator-always-on;
330		regulator-boot-on;
331		regulator-min-microvolt = <800000>;
332		regulator-max-microvolt = <1400000>;
333	};
334
335	mains_charger: dc-charger {
336		compatible = "gpio-charger";
337		charger-type = "mains";
338		gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>;
339//		pinctrl-names = "default";
340//		pinctrl-0 = <&dc_det_gpio>;
341	};
342
343	usb_charger: usb-charger {
344		status = "okay";
345		compatible = "universal-charger";
346		extcon = <&fusb0>;
347	};
348};
349
350&edp {
351	status = "okay";
352	pinctrl-names = "default";
353	pinctrl-0 = <&edp_hpd>;
354	force-hpd;
355
356	ports {
357		edp_out: port@1 {
358			reg = <1>;
359			#address-cells = <1>;
360			#size-cells = <0>;
361
362			edp_out_panel: endpoint@0 {
363				reg = <0>;
364				remote-endpoint = <&panel_in_edp>;
365			};
366		};
367	};
368};
369
370&cdn_dp {
371	status = "okay";
372	extcon = <&fusb0>;
373};
374
375&cpu_l0 {
376	cpu-supply = <&vdd_cpu_l>;
377};
378
379&cpu_l1 {
380	cpu-supply = <&vdd_cpu_l>;
381};
382
383&cpu_l2 {
384	cpu-supply = <&vdd_cpu_l>;
385};
386
387&cpu_l3 {
388	cpu-supply = <&vdd_cpu_l>;
389};
390
391&cpu_b0 {
392	cpu-supply = <&vdd_cpu_b>;
393};
394
395&cpu_b1 {
396	cpu-supply = <&vdd_cpu_b>;
397};
398
399&cpu_alert0 {
400	temperature = <80000>;
401};
402
403&cpu_alert1 {
404	temperature = <95000>;
405};
406
407&cpu_crit {
408	temperature = <100000>;
409};
410
411&emmc_phy {
412	status = "okay";
413};
414
415&hdmi_sound {
416	status = "okay";
417};
418
419&hdmi {
420	ddc-i2c-bus = <&i2c3>;
421	pinctrl-names = "default";
422	pinctrl-0 = <&hdmi_cec>;
423	status = "disabled";
424};
425
426&gpu {
427	mali-supply = <&vdd_gpu>;
428	status = "okay";
429};
430
431&i2c0 {
432	clock-frequency = <400000>;
433	i2c-scl-rising-time-ns = <168>;
434	i2c-scl-falling-time-ns = <4>;
435	status = "okay";
436
437	rk808: pmic@1b {
438		compatible = "rockchip,rk808";
439		reg = <0x1b>;
440		interrupt-parent = <&gpio3>;
441		interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
442		#clock-cells = <1>;
443		clock-output-names = "xin32k", "rk808-clkout2";
444		pinctrl-names = "default";
445		pinctrl-0 = <&pmic_int_l>;
446		rockchip,system-power-controller;
447		wakeup-source;
448
449		vcc1-supply = <&vcc_sys>;
450		vcc2-supply = <&vcc_sys>;
451		vcc3-supply = <&vcc_sys>;
452		vcc4-supply = <&vcc_sys>;
453		vcc6-supply = <&vcc_sys>;
454		vcc7-supply = <&vcc_sys>;
455		vcc8-supply = <&vcc3v3_sys>;
456		vcc9-supply = <&vcc_sys>;
457		vcc10-supply = <&vcc_sys>;
458		vcc11-supply = <&vcc_sys>;
459		vcc12-supply = <&vcc3v3_sys>;
460		vddio-supply = <&vcc1v8_pmu>;
461
462		regulators {
463			vdd_center: DCDC_REG1 {
464				regulator-name = "vdd_center";
465				regulator-always-on;
466				regulator-boot-on;
467				regulator-min-microvolt = <750000>;
468				regulator-max-microvolt = <1350000>;
469				regulator-ramp-delay = <6001>;
470				regulator-state-mem {
471					regulator-off-in-suspend;
472				};
473			};
474
475			vdd_cpu_l: DCDC_REG2 {
476				regulator-name = "vdd_cpu_l";
477				regulator-always-on;
478				regulator-boot-on;
479				regulator-min-microvolt = <750000>;
480				regulator-max-microvolt = <1350000>;
481				regulator-ramp-delay = <6001>;
482				regulator-state-mem {
483					regulator-off-in-suspend;
484				};
485			};
486
487			vcc_ddr: DCDC_REG3 {
488				regulator-name = "vcc_ddr";
489				regulator-always-on;
490				regulator-boot-on;
491				regulator-state-mem {
492					regulator-on-in-suspend;
493				};
494			};
495
496			vcc_1v8: DCDC_REG4 {
497				regulator-name = "vcc_1v8";
498				regulator-always-on;
499				regulator-boot-on;
500				regulator-min-microvolt = <1800000>;
501				regulator-max-microvolt = <1800000>;
502				regulator-state-mem {
503					regulator-on-in-suspend;
504					regulator-suspend-microvolt = <1800000>;
505				};
506			};
507
508			vcc1v8_dvp: LDO_REG1 {
509				regulator-name = "vcc1v8_dvp";
510				regulator-always-on;
511				regulator-boot-on;
512				regulator-min-microvolt = <1800000>;
513				regulator-max-microvolt = <1800000>;
514				regulator-state-mem {
515					regulator-off-in-suspend;
516				};
517			};
518
519			vcc3v0_touch: LDO_REG2 {
520				regulator-name = "vcc3v0_touch";
521				regulator-always-on;
522				regulator-boot-on;
523				regulator-min-microvolt = <3000000>;
524				regulator-max-microvolt = <3000000>;
525				regulator-state-mem {
526					regulator-off-in-suspend;
527				};
528			};
529
530			vcc1v8_pmu: LDO_REG3 {
531				regulator-name = "vcc1v8_pmu";
532				regulator-always-on;
533				regulator-boot-on;
534				regulator-min-microvolt = <1800000>;
535				regulator-max-microvolt = <1800000>;
536				regulator-state-mem {
537					regulator-on-in-suspend;
538					regulator-suspend-microvolt = <1800000>;
539				};
540			};
541
542			vcc_sdio: LDO_REG4 {
543				regulator-name = "vcc_sdio";
544				regulator-always-on;
545				regulator-boot-on;
546				regulator-min-microvolt = <1800000>;
547				regulator-max-microvolt = <3000000>;
548				regulator-state-mem {
549					regulator-on-in-suspend;
550					regulator-suspend-microvolt = <3000000>;
551				};
552			};
553
554			vcca3v0_codec: LDO_REG5 {
555				regulator-name = "vcca3v0_codec";
556				regulator-always-on;
557				regulator-boot-on;
558				regulator-min-microvolt = <3000000>;
559				regulator-max-microvolt = <3000000>;
560				regulator-state-mem {
561					regulator-off-in-suspend;
562				};
563			};
564
565			vcc_1v5: LDO_REG6 {
566				regulator-name = "vcc_1v5";
567				regulator-always-on;
568				regulator-boot-on;
569				regulator-min-microvolt = <1500000>;
570				regulator-max-microvolt = <1500000>;
571				regulator-state-mem {
572					regulator-on-in-suspend;
573					regulator-suspend-microvolt = <1500000>;
574				};
575			};
576
577			vcca1v8_codec: LDO_REG7 {
578				regulator-name = "vcca1v8_codec";
579				regulator-always-on;
580				regulator-boot-on;
581				regulator-min-microvolt = <1800000>;
582				regulator-max-microvolt = <1800000>;
583				regulator-state-mem {
584					regulator-off-in-suspend;
585				};
586			};
587
588			vcc_3v0: LDO_REG8 {
589				regulator-name = "vcc_3v0";
590				regulator-always-on;
591				regulator-boot-on;
592				regulator-min-microvolt = <3000000>;
593				regulator-max-microvolt = <3000000>;
594				regulator-state-mem {
595					regulator-on-in-suspend;
596					regulator-suspend-microvolt = <3000000>;
597				};
598			};
599
600			vcc3v3_s3: vcc_lan: SWITCH_REG1 {
601				regulator-name = "vcc3v3_s3";
602				regulator-always-on;
603				regulator-boot-on;
604				regulator-state-mem {
605					regulator-off-in-suspend;
606				};
607			};
608
609			vcc3v3_s0: SWITCH_REG2 {
610				regulator-name = "vcc3v3_s0";
611				regulator-always-on;
612				regulator-boot-on;
613				regulator-state-mem {
614					regulator-off-in-suspend;
615				};
616			};
617		};
618	};
619
620	vdd_cpu_b: regulator@40 {
621		compatible = "silergy,syr827";
622		reg = <0x40>;
623		fcs,suspend-voltage-selector = <1>;
624		pinctrl-names = "default";
625		pinctrl-0 = <&vsel1_gpio>;
626		vsel-gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
627		regulator-compatible = "fan53555-reg";
628		regulator-name = "vdd_cpu_b";
629		regulator-min-microvolt = <712500>;
630		regulator-max-microvolt = <1500000>;
631		regulator-ramp-delay = <1000>;
632		regulator-always-on;
633		regulator-boot-on;
634		vin-supply = <&vcc_sys>;
635
636		regulator-state-mem {
637			regulator-off-in-suspend;
638		};
639	};
640
641	vdd_gpu: regulator@41 {
642		compatible = "silergy,syr828";
643		reg = <0x41>;
644		fcs,suspend-voltage-selector = <1>;
645		pinctrl-names = "default";
646		pinctrl-0 = <&vsel2_gpio>;
647		vsel-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
648		regulator-compatible = "fan53555-reg";
649		regulator-name = "vdd_gpu";
650		regulator-min-microvolt = <712500>;
651		regulator-max-microvolt = <1500000>;
652		regulator-ramp-delay = <1000>;
653		regulator-always-on;
654		regulator-boot-on;
655		vin-supply = <&vcc_sys>;
656
657		regulator-state-mem {
658			regulator-off-in-suspend;
659		};
660	};
661};
662
663&i2c1 {
664	i2c-scl-rising-time-ns = <168>;
665	i2c-scl-falling-time-ns = <4>;
666	status = "okay";
667
668	clock-frequency = <100000>;
669
670	es8316: es8316@11 {
671		#sound-dai-cells = <0>;
672		compatible = "everest,es8316";
673		reg = <0x11>;
674		clocks = <&cru SCLK_I2S_8CH_OUT>;
675		clock-names = "mclk";
676	};
677};
678
679&i2c3 {
680	i2c-scl-rising-time-ns = <450>;
681	i2c-scl-falling-time-ns = <15>;
682	status = "okay";
683};
684
685
686
687&i2c4 {
688	i2c-scl-rising-time-ns = <600>;
689	i2c-scl-falling-time-ns = <20>;
690	status = "okay";
691
692	fusb0: fusb30x@22 {
693		compatible = "fcs,fusb302";
694		reg = <0x22>;
695		pinctrl-names = "default";
696		pinctrl-0 = <&fusb0_int>;
697		fcs,int_n = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
698		vbus-supply = <&vcc5v0_typec>;
699		status = "okay";
700		connector {
701			compatible = "usb-c-connector";
702			label = "USB-C";
703			power-role = "dual";
704			try-power-role = "sink";
705			source-pdos = <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
706			sink-pdos = <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
707			op-sink-microwatt = <1000000>;
708			extcon-cables = <1 2 5 6 9 10 12 44>;
709			typec-altmodes = <0xff01 1 0x001c0000 1>;
710		};
711	};
712
713	cw2015@62 {
714		status = "okay";
715		compatible = "cellwise,cw201x";
716		reg = <0x62>;
717		cellwise,bat-config-info = <
718			0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63
719			0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36
720			0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69
721			0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59
722			0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17
723			0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D
724			0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB
725			0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11
726		>;
727		cellwise,monitor-interval = <5>;
728		cellwise,virtual-power = <0>;
729		cellwise,design-capacity = <9800>;
730		power-supplies = <&mains_charger>, <&fusb0>;
731	};
732};
733
734&i2s0 {
735	status = "disabled";
736};
737
738&i2s1 {
739	rockchip,i2s-broken-burst-len;
740	rockchip,playback-channels = <8>;
741	rockchip,capture-channels = <8>;
742	#sound-dai-cells = <0>;
743	pinctrl-names = "default";
744	pinctrl-0 = <&i2s_8ch_mclk>, <&i2s1_2ch_bus>;
745	status = "okay";
746};
747
748&i2s2 {
749	#sound-dai-cells = <0>;
750	status = "disabled";
751};
752
753&io_domains {
754	status = "okay";
755
756	bt656-supply = <&vcc1v8_dvp>;
757	audio-supply = <&vcca1v8_codec>;
758	sdmmc-supply = <&vcc_sdio>;
759	gpio1830-supply = <&vcc_3v0>;
760};
761
762&pcie_phy {
763	status = "okay";
764};
765
766&pcie0 {
767	ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
768	num-lanes = <4>;
769	max-link-speed = <2>;
770	pinctrl-names = "default";
771	pinctrl-0 = <&pcie_clkreqn_cpm>;
772	vpcie3v3-supply = <&vcc3v3_pcie>;
773	bus-scan-delay-ms = <1000>;
774	status = "okay";
775};
776
777&pmu_io_domains {
778	pmu1830-supply = <&vcc_3v0>;
779	status = "okay";
780};
781
782&cluster1_opp {
783	opp08 {
784		opp-hz = /bits/ 64 <2000000000>;
785		opp-microvolt = <1300000>;
786	};
787};
788
789&pinctrl {
790	buttons {
791		pwrbtn: pwrbtn {
792			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
793		};
794		lidbtn: lidbtn {
795			rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
796		};
797	};
798
799	dc-charger {
800		dc_det_gpio: dc-det-gpio {
801			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
802		};
803	};
804
805	fusb302x {
806		fusb0_int: fusb0-int {
807			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
808		};
809	};
810
811	leds {
812		pwrled: pwrled {
813			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
814		};
815
816		slpled: slpled {
817			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
818		};
819	};
820
821	lcd-panel {
822		lcd_panel_reset: lcd-panel-reset {
823			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
824		};
825	};
826
827	pcie {
828		pcie_pwr_en: pcie-pwr-en {
829			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
830		};
831	};
832
833	pmic {
834		pmic_int_l: pmic-int-l {
835			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
836		};
837
838		vsel1_gpio: vsel1-gpio {
839			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
840		};
841
842		vsel2_gpio: vsel2-gpio {
843			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
844		};
845	};
846
847	sdio-pwrseq {
848		wifi_enable_h: wifi-enable-h {
849			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
850		};
851	};
852
853	usb-typec {
854		vcc5v0_typec_en: vcc5v0_typec_en {
855			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
856		};
857	};
858
859	usb2 {
860		vcc5v0_host_en: vcc5v0-host-en {
861			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
862		};
863	};
864
865	i2s1 {
866		i2s_8ch_mclk: i2s-8ch-mclk {
867			rockchip,pins = <4 0 RK_FUNC_1 &pcfg_pull_none>;
868		};
869	};
870
871	wireless-bluetooth {
872		bt_wake_gpio: bt-wake {
873			rockchip,pins =
874				<2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
875		};
876		bt_host_wake_gpio: bt-host-wake {
877			rockchip,pins =
878				<0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
879		};
880
881		bt_reset_gpio: bt-reset {
882			rockchip,pins =
883				<0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
884		};
885	};
886};
887
888&pwm0 {
889	status = "okay";
890};
891
892&pwm2 {
893	status = "okay";
894};
895
896&saradc {
897	vref-supply = <&vcca1v8_s3>;
898	status = "okay";
899};
900
901&sdmmc {
902	bus-width = <4>;
903	cap-mmc-highspeed;
904	cap-sd-highspeed;
905	cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
906	disable-wp;
907	sd-uhs-sdr104;
908	max-frequency = <150000000>;
909	vqmmc-supply = <&vcc_sdio>;
910	pinctrl-names = "default";
911	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
912	status = "okay";
913};
914
915&sdio0 {
916	supports-sdio;
917	bus-width = <4>;
918	disable-wp;
919	cap-sd-highspeed;
920	cap-sdio-irq;
921	keep-power-in-suspend;
922	mmc-pwrseq = <&sdio_pwrseq>;
923	non-removable;
924	num-slots = <1>;
925	pinctrl-names = "default";
926	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
927	sd-uhs-sdr104;
928	status = "okay";
929	defer_pcie = <2000>;
930};
931
932&sdhci {
933	bus-width = <8>;
934	//mmc-hs400-1_8v;
935	mmc-hs200-1_8v;
936	//mmc-hs400-enhanced-strobe;
937	non-removable;
938	status = "okay";
939};
940
941&tcphy0 {
942	extcon = <&fusb0>;
943	status = "okay";
944};
945
946&tcphy1 {
947	status = "okay";
948};
949
950&tsadc {
951	/* tshut mode 0:CRU 1:GPIO */
952	rockchip,hw-tshut-mode = <1>;
953	/* tshut polarity 0:LOW 1:HIGH */
954	rockchip,hw-tshut-polarity = <1>;
955	status = "okay";
956};
957
958&u2phy0 {
959	status = "okay";
960
961	u2phy0_otg: otg-port {
962		status = "okay";
963	};
964
965	u2phy0_host: host-port {
966		phy-supply = <&vcc5v0_host>;
967		status = "okay";
968	};
969};
970
971&u2phy1 {
972	status = "okay";
973
974	u2phy1_otg: otg-port {
975		status = "okay";
976	};
977
978	u2phy1_host: host-port {
979		phy-supply = <&vcc5v0_host>;
980		status = "okay";
981	};
982};
983
984
985&uart0 {
986	pinctrl-names = "default";
987	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
988	uart-has-rtscts;
989	status = "okay";
990
991	bluetooth {
992		compatible = "brcm,bcm4345c5";
993		clocks = <&rk808 1>;
994		clock-names = "lpo";
995		pinctrl-names = "default";
996		pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>;
997		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
998		device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
999		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
1000		max-speed = <1500000>;
1001		vbat-supply = <&vcc3v3_sys>;
1002		vddio-supply = <&vcc_1v8>;
1003	};
1004};
1005
1006&uart2 {
1007	status = "okay";
1008};
1009
1010&usb_host0_ehci {
1011	status = "okay";
1012};
1013
1014&usb_host0_ohci {
1015	status = "okay";
1016};
1017
1018&usb_host1_ehci {
1019	status = "okay";
1020};
1021
1022&usb_host1_ohci {
1023	status = "okay";
1024};
1025
1026&usbdrd3_0 {
1027	status = "okay";
1028};
1029
1030&usbdrd_dwc3_0 {
1031	status = "okay";
1032	dr_mode = "host";
1033};
1034
1035&usbdrd3_1 {
1036	status = "okay";
1037};
1038
1039&usbdrd_dwc3_1 {
1040	status = "okay";
1041	dr_mode = "host";
1042};
1043
1044&vopb {
1045	status = "okay";
1046};
1047
1048&vopb_mmu {
1049	status = "okay";
1050};
1051
1052&vopl {
1053	status = "okay";
1054};
1055
1056&vopl_mmu {
1057	status = "okay";
1058};
1059
1060&spi1 {
1061	// XXXJDM disable until rkspi issues are sorted out
1062	status = "disabled";
1063	max-freq = <10000000>;
1064
1065	spiflash: spi-flash@0 {
1066		#address-cells = <0x1>;
1067		#size-cells = <1>;
1068		compatible = "jedec,spi-nor";
1069		reg = <0x0>;
1070		spi-max-frequency = <10000000>;
1071		status = "okay";
1072		m25p,fast-read;
1073
1074		partitions {
1075			compatible = "fixed-partitions";
1076			#address-cells = <1>;
1077			#size-cells = <1>;
1078
1079			loader@8000 {
1080				label = "loader";
1081				reg = <0x0 0x3F8000>;
1082			};
1083
1084			env@3f8000 {
1085				label = "env";
1086				reg = <0x3F8000 0x8000>;
1087			};
1088
1089			vendor@7c0000 {
1090				label = "vendor";
1091				reg = <0x7C0000 0x40000>;
1092			};
1093		};
1094	};
1095};
1096