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