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