xref: /linux/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts (revision fab183d632628381b466a41479489541ac0e29a0)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Linaro Limited
5 *
6 * Copyright (c) 2024, Tianyu Gao <gty0622@gmail.com>
7 * Copyright (c) 2024, Xuecong Chen <chenxuecong2009@outlook.com>
8 *
9 * Copyright (c) 2024, Pengyu Luo <mitltlatltl@gmail.com>
10 */
11
12/dts-v1/;
13
14#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
15#include <dt-bindings/gpio/gpio.h>
16#include <dt-bindings/input/gpio-keys.h>
17#include <dt-bindings/input/input.h>
18#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
19#include <dt-bindings/phy/phy.h>
20
21#include "sc8280xp.dtsi"
22#include "sc8280xp-pmics.dtsi"
23
24/ {
25	chassis-type = "tablet";
26	model = "Matebook E Go";
27	compatible = "huawei,gaokun3", "qcom,sc8280xp";
28
29	aliases {
30		i2c4 = &i2c4;
31		i2c15 = &i2c15;
32		serial1 = &uart2;
33	};
34
35	chosen {
36		#address-cells = <2>;
37		#size-cells = <2>;
38		ranges;
39
40		framebuffer0: framebuffer@c6200000 {
41			compatible = "simple-framebuffer";
42			reg = <0x0 0xc6200000 0x0 0x02400000>;
43			width = <1600>;
44			height = <2560>;
45			stride = <(1600 * 4)>;
46			format = "a8r8g8b8";
47		};
48	};
49
50	wcd938x: audio-codec {
51		compatible = "qcom,wcd9380-codec";
52
53		pinctrl-0 = <&wcd_default>;
54		pinctrl-names = "default";
55
56		reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
57
58		vdd-buck-supply = <&vreg_s10b>;
59		vdd-rxtx-supply = <&vreg_s10b>;
60		vdd-io-supply = <&vreg_s10b>;
61		vdd-mic-bias-supply = <&vreg_bob>;
62
63		qcom,micbias1-microvolt = <1800000>;
64		qcom,micbias2-microvolt = <1800000>;
65		qcom,micbias3-microvolt = <1800000>;
66		qcom,micbias4-microvolt = <1800000>;
67		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
68		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
69		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
70		qcom,rx-device = <&wcd_rx>;
71		qcom,tx-device = <&wcd_tx>;
72
73		#sound-dai-cells = <1>;
74	};
75
76	gpio-keys {
77		compatible = "gpio-keys";
78
79		pinctrl-0 = <&mode_pin_active>, <&vol_up_n>;
80		pinctrl-names = "default";
81
82		key-vol-up {
83			label = "Volume Up";
84			gpios = <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
85			linux,code = <KEY_VOLUMEUP>;
86			debounce-interval = <15>;
87			linux,can-disable;
88			wakeup-source;
89		};
90
91		switch-mode {
92			label = "Tablet Mode Switch";
93			gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
94			linux,input-type = <EV_SW>;
95			linux,code = <SW_TABLET_MODE>;
96			debounce-interval = <10>;
97			wakeup-source;
98		};
99	};
100
101	vreg_misc_3p3: regulator-misc-3p3 {
102		compatible = "regulator-fixed";
103
104		regulator-name = "VCC3B";
105		regulator-min-microvolt = <3300000>;
106		regulator-max-microvolt = <3300000>;
107
108		gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>;
109		enable-active-high;
110
111		pinctrl-0 = <&misc_3p3_reg_en>;
112		pinctrl-names = "default";
113
114		regulator-boot-on;
115		regulator-always-on;
116	};
117
118	vreg_nvme: regulator-nvme {
119		compatible = "regulator-fixed";
120
121		regulator-name = "VCC3_SSD";
122		regulator-min-microvolt = <3300000>;
123		regulator-max-microvolt = <3300000>;
124
125		gpio = <&tlmm 135 GPIO_ACTIVE_HIGH>;
126		enable-active-high;
127
128		pinctrl-0 = <&nvme_reg_en>;
129		pinctrl-names = "default";
130
131		regulator-boot-on;
132	};
133
134	vreg_vph_pwr: regulator-vph-pwr {
135		compatible = "regulator-fixed";
136
137		regulator-name = "VPH_VCC3R9";
138		regulator-min-microvolt = <3900000>;
139		regulator-max-microvolt = <3900000>;
140
141		regulator-always-on;
142	};
143
144	vreg_wlan: regulator-wlan {
145		compatible = "regulator-fixed";
146
147		regulator-name = "VCC_WLAN_3R9";
148		regulator-min-microvolt = <3900000>;
149		regulator-max-microvolt = <3900000>;
150
151		gpio = <&pmr735a_gpios 1 GPIO_ACTIVE_HIGH>;
152		enable-active-high;
153
154		pinctrl-0 = <&hastings_reg_en>;
155		pinctrl-names = "default";
156
157		regulator-boot-on;
158	};
159
160	reserved-memory {
161		linux,cma {
162			compatible = "shared-dma-pool";
163			size = <0x0 0x8000000>;
164			reusable;
165			linux,cma-default;
166		};
167	};
168
169	thermal-zones {
170		skin-temp-thermal {
171			polling-delay-passive = <250>;
172
173			thermal-sensors = <&pmk8280_adc_tm 5>;
174
175			trips {
176				skin_temp_alert0: trip-point0 {
177					temperature = <55000>;
178					hysteresis = <1000>;
179					type = "passive";
180				};
181
182				skin_temp_alert1: trip-point1 {
183					temperature = <58000>;
184					hysteresis = <1000>;
185					type = "passive";
186				};
187
188				skin-temp-crit {
189					temperature = <73000>;
190					hysteresis = <1000>;
191					type = "critical";
192				};
193			};
194
195			cooling-maps {
196				map0 {
197					trip = <&skin_temp_alert0>;
198					cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
199							 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
200							 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
201							 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
202				};
203
204				map1 {
205					trip = <&skin_temp_alert1>;
206					cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
207							 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
208							 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
209							 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
210				};
211			};
212		};
213	};
214
215	usb0-sbu-mux {
216		compatible = "pericom,pi3usb102", "gpio-sbu-mux";
217
218		select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
219
220		pinctrl-0 = <&usb0_sbu_default>;
221		pinctrl-names = "default";
222
223		orientation-switch;
224
225		port {
226			usb0_sbu_mux: endpoint {
227				remote-endpoint = <&ucsi0_sbu>;
228			};
229		};
230	};
231
232	usb1-sbu-mux {
233		compatible = "pericom,pi3usb102", "gpio-sbu-mux";
234
235		select-gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
236
237		pinctrl-0 = <&usb1_sbu_default>;
238		pinctrl-names = "default";
239
240		orientation-switch;
241
242		port {
243			usb1_sbu_mux: endpoint {
244				remote-endpoint = <&ucsi1_sbu>;
245			};
246		};
247	};
248
249	wcn6855-pmu {
250		compatible = "qcom,wcn6855-pmu";
251
252		pinctrl-names = "default";
253		pinctrl-0 = <&bt_default>, <&wlan_en>;
254
255		wlan-enable-gpios = <&tlmm 134 GPIO_ACTIVE_HIGH>;
256		bt-enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>;
257		swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>;
258
259		vddio-supply = <&vreg_s10b>;
260		vddaon-supply = <&vreg_s12b>;
261		vddpmu-supply = <&vreg_s12b>;
262		vddpmumx-supply = <&vreg_s12b>;
263		vddpmucx-supply = <&vreg_s12b>;
264		vddrfa0p95-supply = <&vreg_s12b>;
265		vddrfa1p3-supply = <&vreg_s11b>;
266		vddrfa1p9-supply = <&vreg_s1c>;
267		vddpcie1p3-supply = <&vreg_s11b>;
268		vddpcie1p9-supply = <&vreg_s1c>;
269
270		regulators {
271			vreg_pmu_rfa_cmn_0p8: ldo0 {
272				regulator-name = "vreg_pmu_rfa_cmn_0p8";
273			};
274
275			vreg_pmu_aon_0p8: ldo1 {
276				regulator-name = "vreg_pmu_aon_0p8";
277			};
278
279			vreg_pmu_wlcx_0p8: ldo2 {
280				regulator-name = "vreg_pmu_wlcx_0p8";
281			};
282
283			vreg_pmu_wlmx_0p8: ldo3 {
284				regulator-name = "vreg_pmu_wlmx_0p8";
285			};
286
287			vreg_pmu_btcmx_0p8: ldo4 {
288				regulator-name = "vreg_pmu_btcmx_0p8";
289			};
290
291			vreg_pmu_pcie_1p8: ldo5 {
292				regulator-name = "vreg_pmu_pcie_1p8";
293			};
294
295			vreg_pmu_pcie_0p9: ldo6 {
296				regulator-name = "vreg_pmu_pcie_0p9";
297			};
298
299			vreg_pmu_rfa_0p8: ldo7 {
300				regulator-name = "vreg_pmu_rfa_0p8";
301			};
302
303			vreg_pmu_rfa_1p2: ldo8 {
304				regulator-name = "vreg_pmu_rfa_1p2";
305			};
306
307			vreg_pmu_rfa_1p7: ldo9 {
308				regulator-name = "vreg_pmu_rfa_1p7";
309			};
310		};
311	};
312};
313
314&apps_rsc {
315	regulators-0 {
316		compatible = "qcom,pm8350-rpmh-regulators";
317		qcom,pmic-id = "b";
318
319		vdd-l1-l4-supply = <&vreg_s12b>;
320		vdd-l2-l7-supply = <&vreg_bob>;
321		vdd-l3-l5-supply = <&vreg_s11b>;
322		vdd-l6-l9-l10-supply = <&vreg_s12b>;
323		vdd-l8-supply = <&vreg_s12b>;
324
325		vreg_s10b: smps10 {
326			regulator-name = "vreg_s10b";
327			regulator-min-microvolt = <1800000>;
328			regulator-max-microvolt = <1800000>;
329			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
330			regulator-always-on;
331		};
332
333		vreg_s11b: smps11 {
334			regulator-name = "vreg_s11b";
335			regulator-min-microvolt = <1272000>;
336			regulator-max-microvolt = <1272000>;
337			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
338		};
339
340		vreg_s12b: smps12 {
341			regulator-name = "vreg_s12b";
342			regulator-min-microvolt = <984000>;
343			regulator-max-microvolt = <984000>;
344			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
345		};
346
347		vreg_l1b: ldo1 {
348			regulator-name = "vreg_l1b";
349			regulator-min-microvolt = <912000>;
350			regulator-max-microvolt = <912000>;
351			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
352			regulator-allow-set-load;
353			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
354						   RPMH_REGULATOR_MODE_HPM>;
355		};
356
357		vreg_l2b: ldo2 {
358			regulator-name = "vreg_l2b";
359			regulator-min-microvolt = <1904000>;
360			regulator-max-microvolt = <1904000>;
361			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
362		};
363
364		vreg_l3b: ldo3 {
365			regulator-name = "vreg_l3b";
366			regulator-min-microvolt = <1200000>;
367			regulator-max-microvolt = <1200000>;
368			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
369			regulator-boot-on;
370			regulator-allow-set-load;
371			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
372						   RPMH_REGULATOR_MODE_HPM>;
373		};
374
375		vreg_l4b: ldo4 {
376			regulator-name = "vreg_l4b";
377			regulator-min-microvolt = <912000>;
378			regulator-max-microvolt = <912000>;
379			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
380			regulator-allow-set-load;
381			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
382						   RPMH_REGULATOR_MODE_HPM>;
383		};
384
385		vreg_l5b: ldo5 {
386			regulator-name = "vreg_l5b";
387			regulator-min-microvolt = <1200000>;
388			regulator-max-microvolt = <1200000>;
389			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
390		};
391
392		vreg_l6b: ldo6 {
393			regulator-name = "vreg_l6b";
394			regulator-min-microvolt = <880000>;
395			regulator-max-microvolt = <880000>;
396			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
397			regulator-boot-on;
398			regulator-allow-set-load;
399			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
400						   RPMH_REGULATOR_MODE_HPM>;
401		};
402
403		vreg_l7b: ldo7 {
404			regulator-name = "vreg_l7b";
405			regulator-min-microvolt = <1800000>;
406			regulator-max-microvolt = <1800000>;
407			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
408			regulator-boot-on;
409		};
410
411		vreg_l9b: ldo9 {
412			regulator-name = "vreg_l9b";
413			regulator-min-microvolt = <912000>;
414			regulator-max-microvolt = <912000>;
415			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
416		};
417	};
418
419	regulators-1 {
420		compatible = "qcom,pm8350c-rpmh-regulators";
421		qcom,pmic-id = "c";
422
423		vdd-bob-supply = <&vreg_vph_pwr>;
424		vdd-l1-l12-supply = <&vreg_s1c>;
425		vdd-l2-l8-supply = <&vreg_s1c>;
426		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
427		vdd-l6-l9-l11-supply = <&vreg_bob>;
428		vdd-l10-supply = <&vreg_s11b>;
429
430		vreg_s1c: smps1 {
431			regulator-name = "vreg_s1c";
432			regulator-min-microvolt = <1880000>;
433			regulator-max-microvolt = <1900000>;
434			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
435			regulator-always-on;
436		};
437
438		vreg_l1c: ldo1 {
439			regulator-name = "vreg_l1c";
440			regulator-min-microvolt = <1800000>;
441			regulator-max-microvolt = <1800000>;
442			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
443			regulator-allow-set-load;
444			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
445						   RPMH_REGULATOR_MODE_HPM>;
446		};
447
448		vreg_l2c: ldo2 {
449			regulator-name = "vreg_l2c";
450			regulator-min-microvolt = <1800000>;
451			regulator-max-microvolt = <1800000>;
452			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
453		};
454
455		vreg_l8c: ldo8 {
456			regulator-name = "vreg_l8c";
457			regulator-min-microvolt = <1800000>;
458			regulator-max-microvolt = <1800000>;
459			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
460			regulator-allow-set-load;
461			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
462						   RPMH_REGULATOR_MODE_HPM>;
463		};
464
465		vreg_l12c: ldo12 {
466			regulator-name = "vreg_l12c";
467			regulator-min-microvolt = <1800000>;
468			regulator-max-microvolt = <1800000>;
469			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
470		};
471
472		vreg_l13c: ldo13 {
473			regulator-name = "vreg_l13c";
474			regulator-min-microvolt = <3072000>;
475			regulator-max-microvolt = <3072000>;
476			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
477			regulator-allow-set-load;
478			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
479						   RPMH_REGULATOR_MODE_HPM>;
480		};
481
482		vreg_bob: bob {
483			regulator-name = "vreg_bob";
484			regulator-min-microvolt = <3008000>;
485			regulator-max-microvolt = <3960000>;
486			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
487			regulator-always-on;
488		};
489	};
490
491	regulators-2 {
492		compatible = "qcom,pm8350-rpmh-regulators";
493		qcom,pmic-id = "d";
494
495		vdd-l1-l4-supply = <&vreg_s11b>;
496		vdd-l2-l7-supply = <&vreg_bob>;
497		vdd-l3-l5-supply = <&vreg_s11b>;
498		vdd-l6-l9-l10-supply = <&vreg_s12b>;
499		vdd-l8-supply = <&vreg_s12b>;
500
501		vreg_l2d: ldo2 {
502			regulator-name = "vreg_l2d";
503			regulator-min-microvolt = <3072000>;
504			regulator-max-microvolt = <3072000>;
505			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
506			regulator-allow-set-load;
507			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
508						   RPMH_REGULATOR_MODE_HPM>;
509		};
510
511		vreg_l3d: ldo3 {
512			regulator-name = "vreg_l3d";
513			regulator-min-microvolt = <1200000>;
514			regulator-max-microvolt = <1200000>;
515			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
516		};
517
518		vreg_l4d: ldo4 {
519			regulator-name = "vreg_l4d";
520			regulator-min-microvolt = <1200000>;
521			regulator-max-microvolt = <1200000>;
522			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
523			regulator-allow-set-load;
524			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
525						   RPMH_REGULATOR_MODE_HPM>;
526		};
527
528		vreg_l6d: ldo6 {
529			regulator-name = "vreg_l6d";
530			regulator-min-microvolt = <880000>;
531			regulator-max-microvolt = <880000>;
532			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
533			regulator-allow-set-load;
534			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
535						   RPMH_REGULATOR_MODE_HPM>;
536		};
537
538		vreg_l7d: ldo7 {
539			regulator-name = "vreg_l7d";
540			regulator-min-microvolt = <3072000>;
541			regulator-max-microvolt = <3072000>;
542			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
543			regulator-allow-set-load;
544			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
545						   RPMH_REGULATOR_MODE_HPM>;
546		};
547
548		vreg_l8d: ldo8 {
549			regulator-name = "vreg_l8d";
550			regulator-min-microvolt = <912000>;
551			regulator-max-microvolt = <912000>;
552			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
553			regulator-allow-set-load;
554			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
555						   RPMH_REGULATOR_MODE_HPM>;
556		};
557
558		vreg_l9d: ldo9 {
559			regulator-name = "vreg_l9d";
560			regulator-min-microvolt = <912000>;
561			regulator-max-microvolt = <912000>;
562			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
563			regulator-allow-set-load;
564			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
565						   RPMH_REGULATOR_MODE_HPM>;
566		};
567
568		vreg_l10d: ldo10 {
569			regulator-name = "vreg_l10d";
570			regulator-min-microvolt = <912000>;
571			regulator-max-microvolt = <912000>;
572			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
573			regulator-allow-set-load;
574			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
575						   RPMH_REGULATOR_MODE_HPM>;
576		};
577	};
578};
579
580&dispcc0 {
581	status = "okay";
582};
583
584&gpi_dma0 {
585	status = "okay";
586};
587
588&gpi_dma1 {
589	status = "okay";
590};
591
592&gpi_dma2 {
593	status = "okay";
594};
595
596&gpu {
597	status = "okay";
598};
599
600&gpu_zap_shader {
601	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qcdxkmsuc8280.mbn";
602};
603
604&i2c4 {
605	clock-frequency = <400000>;
606
607	pinctrl-0 = <&i2c4_default>;
608	pinctrl-names = "default";
609
610	status = "okay";
611
612	touchscreen@4f {
613		compatible = "hid-over-i2c";
614		reg = <0x4f>;
615
616		hid-descr-addr = <0x1>;
617		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
618
619		vdd-supply = <&vreg_misc_3p3>;
620		vddl-supply = <&vreg_s10b>;
621
622		pinctrl-0 = <&ts0_default>;
623		pinctrl-names = "default";
624	};
625
626};
627
628&i2c15 {
629	clock-frequency = <400000>;
630
631	pinctrl-0 = <&i2c15_default>;
632	pinctrl-names = "default";
633
634	status = "okay";
635
636	embedded-controller@38 {
637		compatible = "huawei,gaokun3-ec";
638		reg = <0x38>;
639
640		interrupts-extended = <&tlmm 103 IRQ_TYPE_LEVEL_LOW>;
641
642		#address-cells = <1>;
643		#size-cells = <0>;
644
645		connector@0 {
646			compatible = "usb-c-connector";
647			reg = <0>;
648			power-role = "dual";
649			data-role = "dual";
650
651			ports {
652				#address-cells = <1>;
653				#size-cells = <0>;
654
655				port@0 {
656					reg = <0>;
657
658					ucsi0_hs_in: endpoint {
659						remote-endpoint = <&usb_0_dwc3_hs>;
660					};
661				};
662
663				port@1 {
664					reg = <1>;
665
666					ucsi0_ss_in: endpoint {
667						remote-endpoint = <&usb_0_qmpphy_out>;
668					};
669				};
670
671				port@2 {
672					reg = <2>;
673
674					ucsi0_sbu: endpoint {
675						remote-endpoint = <&usb0_sbu_mux>;
676					};
677				};
678			};
679		};
680
681		connector@1 {
682			compatible = "usb-c-connector";
683			reg = <1>;
684			power-role = "dual";
685			data-role = "dual";
686
687			ports {
688				#address-cells = <1>;
689				#size-cells = <0>;
690
691				port@0 {
692					reg = <0>;
693
694					ucsi1_hs_in: endpoint {
695						remote-endpoint = <&usb_1_dwc3_hs>;
696					};
697				};
698
699				port@1 {
700					reg = <1>;
701
702					ucsi1_ss_in: endpoint {
703						remote-endpoint = <&usb_1_qmpphy_out>;
704					};
705				};
706
707				port@2 {
708					reg = <2>;
709
710					ucsi1_sbu: endpoint {
711						remote-endpoint = <&usb1_sbu_mux>;
712					};
713				};
714			};
715		};
716	};
717};
718
719&mdss0 {
720	status = "okay";
721};
722
723&mdss0_dp0 {
724	status = "okay";
725};
726
727&mdss0_dp0_out {
728	data-lanes = <0 1>;
729	remote-endpoint = <&usb_0_qmpphy_dp_in>;
730};
731
732&mdss0_dp1 {
733	status = "okay";
734};
735
736&mdss0_dp1_out {
737	data-lanes = <0 1>;
738	remote-endpoint = <&usb_1_qmpphy_dp_in>;
739};
740
741&pcie2a {
742	vddpe-3v3-supply = <&vreg_nvme>;
743
744	pinctrl-0 = <&pcie2a_default>;
745	pinctrl-names = "default";
746
747	status = "okay";
748};
749
750&pcie2a_phy {
751	vdda-phy-supply = <&vreg_l6d>;
752	vdda-pll-supply = <&vreg_l4d>;
753
754	status = "okay";
755};
756
757&pcie2a_port0 {
758	reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>;
759	wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>;
760};
761
762&pcie4 {
763	max-link-speed = <2>;
764
765	vddpe-3v3-supply = <&vreg_wlan>;
766
767	pinctrl-0 = <&pcie4_default>;
768	pinctrl-names = "default";
769
770	status = "okay";
771};
772
773&pcie4_port0 {
774	reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
775	wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
776
777	wifi@0 {
778		compatible = "pci17cb,1103";
779		reg = <0x10000 0x0 0x0 0x0 0x0>;
780
781		vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
782		vddaon-supply = <&vreg_pmu_aon_0p8>;
783		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
784		vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
785		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
786		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
787		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
788		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
789		vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
790	};
791};
792
793&pcie4_phy {
794	vdda-phy-supply = <&vreg_l6d>;
795	vdda-pll-supply = <&vreg_l4d>;
796
797	status = "okay";
798};
799
800&pmk8280_adc_tm {
801	status = "okay";
802
803	sys-therm@0 {
804		reg = <0>;
805		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
806		qcom,hw-settle-time-us = <200>;
807		qcom,avg-samples = <2>;
808		qcom,ratiometric;
809	};
810
811	sys-therm@1 {
812		reg = <1>;
813		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
814		qcom,hw-settle-time-us = <200>;
815		qcom,avg-samples = <2>;
816		qcom,ratiometric;
817	};
818
819	sys-therm@2 {
820		reg = <2>;
821		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
822		qcom,hw-settle-time-us = <200>;
823		qcom,avg-samples = <2>;
824		qcom,ratiometric;
825	};
826
827	sys-therm@3 {
828		reg = <3>;
829		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
830		qcom,hw-settle-time-us = <200>;
831		qcom,avg-samples = <2>;
832		qcom,ratiometric;
833	};
834
835	sys-therm@4 {
836		reg = <4>;
837		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
838		qcom,hw-settle-time-us = <200>;
839		qcom,avg-samples = <2>;
840		qcom,ratiometric;
841	};
842
843	sys-therm@5 {
844		reg = <5>;
845		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
846		qcom,hw-settle-time-us = <200>;
847		qcom,avg-samples = <2>;
848		qcom,ratiometric;
849	};
850
851	sys-therm@6 {
852		reg = <6>;
853		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
854		qcom,hw-settle-time-us = <200>;
855		qcom,avg-samples = <2>;
856		qcom,ratiometric;
857	};
858
859	sys-therm@7 {
860		reg = <7>;
861		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
862		qcom,hw-settle-time-us = <200>;
863		qcom,avg-samples = <2>;
864		qcom,ratiometric;
865	};
866};
867
868&pmk8280_pon_pwrkey {
869	status = "okay";
870};
871
872&pmk8280_pon_resin {
873	status = "okay";
874	linux,code = <KEY_VOLUMEDOWN>;
875};
876
877&pmk8280_rtc {
878	nvmem-cells = <&rtc_offset>;
879	nvmem-cell-names = "offset";
880
881	status = "okay";
882};
883
884&pmk8280_sdam_6 {
885	status = "okay";
886
887	rtc_offset: rtc-offset@bc {
888		reg = <0xbc 0x4>;
889	};
890};
891
892&pmk8280_vadc {
893	channel@144 {
894		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
895		qcom,hw-settle-time = <200>;
896		qcom,ratiometric;
897		label = "sys_therm1";
898	};
899
900	channel@145 {
901		reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
902		qcom,hw-settle-time = <200>;
903		qcom,ratiometric;
904		label = "sys_therm2";
905	};
906
907	channel@146 {
908		reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
909		qcom,hw-settle-time = <200>;
910		qcom,ratiometric;
911		label = "sys_therm3";
912	};
913
914	channel@147 {
915		reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
916		qcom,hw-settle-time = <200>;
917		qcom,ratiometric;
918		label = "sys_therm4";
919	};
920
921	channel@344 {
922		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
923		qcom,hw-settle-time = <200>;
924		qcom,ratiometric;
925		label = "sys_therm5";
926	};
927
928	channel@345 {
929		reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
930		qcom,hw-settle-time = <200>;
931		qcom,ratiometric;
932		label = "sys_therm6";
933	};
934
935	channel@346 {
936		reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
937		qcom,hw-settle-time = <200>;
938		qcom,ratiometric;
939		label = "sys_therm7";
940	};
941
942	channel@347 {
943		reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
944		qcom,hw-settle-time = <200>;
945		qcom,ratiometric;
946		label = "sys_therm8";
947	};
948};
949
950&qup0 {
951	status = "okay";
952};
953
954&qup1 {
955	status = "okay";
956};
957
958&qup2 {
959	status = "okay";
960};
961
962&remoteproc_adsp {
963	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qcadsp8280.mbn";
964
965	status = "okay";
966};
967
968&remoteproc_nsp0 {
969	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qccdsp8280.mbn";
970
971	status = "okay";
972};
973
974&rxmacro {
975	status = "okay";
976};
977
978&sound {
979	compatible = "qcom,sc8280xp-sndcard";
980	model = "SC8280XP-HUAWEI-MATEBOOKEGO";
981	audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
982			"SpkrRight IN", "WSA_SPK2 OUT",
983			"IN1_HPHL", "HPHL_OUT",
984			"IN2_HPHR", "HPHR_OUT",
985			"AMIC2", "MIC BIAS2",
986			"VA DMIC0", "MIC BIAS1",
987			"VA DMIC1", "MIC BIAS1",
988			"VA DMIC2", "MIC BIAS3",
989			"VA DMIC0", "VA MIC BIAS1",
990			"VA DMIC1", "VA MIC BIAS1",
991			"VA DMIC2", "VA MIC BIAS3",
992			"TX SWR_ADC1", "ADC2_OUTPUT";
993
994	wcd-playback-dai-link {
995		link-name = "WCD Playback";
996
997		cpu {
998			sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
999		};
1000
1001		codec {
1002			sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
1003		};
1004
1005		platform {
1006			sound-dai = <&q6apm>;
1007		};
1008	};
1009
1010	wcd-capture-dai-link {
1011		link-name = "WCD Capture";
1012
1013		cpu {
1014			sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
1015		};
1016
1017		codec {
1018			sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>;
1019		};
1020
1021		platform {
1022			sound-dai = <&q6apm>;
1023		};
1024	};
1025
1026	wsa-dai-link {
1027		link-name = "WSA Playback";
1028
1029		cpu {
1030			sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
1031		};
1032
1033		codec {
1034			sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
1035		};
1036
1037		platform {
1038			sound-dai = <&q6apm>;
1039		};
1040	};
1041
1042	va-dai-link {
1043		link-name = "VA Capture";
1044
1045		cpu {
1046			sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
1047		};
1048
1049		platform {
1050			sound-dai = <&q6apm>;
1051		};
1052
1053		codec {
1054			sound-dai = <&vamacro 0>;
1055		};
1056	};
1057};
1058
1059&swr0 {
1060	status = "okay";
1061
1062	left_spkr: wsa8830-left@0,1 {
1063		compatible = "sdw10217020200";
1064		reg = <0 1>;
1065		pinctrl-0 = <&spkr_1_sd_n_default>;
1066		pinctrl-names = "default";
1067		powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>;
1068		#thermal-sensor-cells = <0>;
1069		sound-name-prefix = "SpkrLeft";
1070		#sound-dai-cells = <0>;
1071		vdd-supply = <&vreg_s10b>;
1072	};
1073
1074	right_spkr: wsa8830-right@0,2 {
1075		compatible = "sdw10217020200";
1076		reg = <0 2>;
1077		pinctrl-0 = <&spkr_2_sd_n_default>;
1078		pinctrl-names = "default";
1079		powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_LOW>;
1080		#thermal-sensor-cells = <0>;
1081		sound-name-prefix = "SpkrRight";
1082		#sound-dai-cells = <0>;
1083		vdd-supply = <&vreg_s10b>;
1084	};
1085};
1086
1087&swr1 {
1088	status = "okay";
1089
1090	wcd_rx: wcd9380-rx@0,4 {
1091		compatible = "sdw20217010d00";
1092		reg = <0 4>;
1093		qcom,rx-port-mapping = <1 2 3 4 5>;
1094	};
1095};
1096
1097&swr2 {
1098	status = "okay";
1099
1100	wcd_tx: wcd9380-tx@0,3 {
1101		compatible = "sdw20217010d00";
1102		reg = <0 3>;
1103		qcom,tx-port-mapping = <1 1 2 3>;
1104	};
1105};
1106
1107&txmacro {
1108	status = "okay";
1109};
1110
1111&uart2 {
1112	pinctrl-0 = <&uart2_default>;
1113	pinctrl-names = "default";
1114
1115	status = "okay";
1116
1117	bluetooth {
1118		compatible = "qcom,wcn6855-bt";
1119
1120		vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
1121		vddaon-supply = <&vreg_pmu_aon_0p8>;
1122		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
1123		vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
1124		vddbtcmx-supply = <&vreg_pmu_btcmx_0p8>;
1125		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
1126		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
1127		vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>;
1128
1129		max-speed = <3200000>;
1130	};
1131};
1132
1133&usb_0 {
1134	status = "okay";
1135};
1136
1137&usb_0_dwc3 {
1138	dr_mode = "host";
1139};
1140
1141&usb_0_dwc3_hs {
1142	remote-endpoint = <&ucsi0_hs_in>;
1143};
1144
1145&usb_0_hsphy {
1146	vdda-pll-supply = <&vreg_l9d>;
1147	vdda18-supply = <&vreg_l1c>;
1148	vdda33-supply = <&vreg_l7d>;
1149
1150	status = "okay";
1151};
1152
1153&usb_0_qmpphy {
1154	vdda-phy-supply = <&vreg_l9d>;
1155	vdda-pll-supply = <&vreg_l4d>;
1156
1157	orientation-switch;
1158
1159	status = "okay";
1160};
1161
1162&usb_0_qmpphy_dp_in {
1163	remote-endpoint = <&mdss0_dp0_out>;
1164};
1165
1166&usb_0_qmpphy_out {
1167	remote-endpoint = <&ucsi0_ss_in>;
1168};
1169
1170&usb_1 {
1171	status = "okay";
1172};
1173
1174&usb_1_dwc3 {
1175	dr_mode = "host";
1176};
1177
1178&usb_1_dwc3_hs {
1179	remote-endpoint = <&ucsi1_hs_in>;
1180};
1181
1182&usb_1_hsphy {
1183	vdda-pll-supply = <&vreg_l4b>;
1184	vdda18-supply = <&vreg_l1c>;
1185	vdda33-supply = <&vreg_l13c>;
1186
1187	status = "okay";
1188};
1189
1190&usb_1_qmpphy {
1191	vdda-phy-supply = <&vreg_l4b>;
1192	vdda-pll-supply = <&vreg_l3b>;
1193
1194	orientation-switch;
1195
1196	status = "okay";
1197};
1198
1199&usb_1_qmpphy_dp_in {
1200	remote-endpoint = <&mdss0_dp1_out>;
1201};
1202
1203&usb_1_qmpphy_out {
1204	remote-endpoint = <&ucsi1_ss_in>;
1205};
1206
1207&usb_2 {
1208	status = "okay";
1209};
1210
1211&usb_2_hsphy0 {
1212	vdda-pll-supply = <&vreg_l1b>;
1213	vdda18-supply = <&vreg_l1c>;
1214	vdda33-supply = <&vreg_l7d>;
1215
1216	status = "okay";
1217};
1218
1219&usb_2_hsphy1 {
1220	vdda-pll-supply = <&vreg_l8d>;
1221	vdda18-supply = <&vreg_l1c>;
1222	vdda33-supply = <&vreg_l7d>;
1223
1224	status = "okay";
1225};
1226
1227&usb_2_hsphy2 {
1228	vdda-pll-supply = <&vreg_l10d>;
1229	vdda18-supply = <&vreg_l8c>;
1230	vdda33-supply = <&vreg_l2d>;
1231
1232	status = "okay";
1233};
1234
1235&usb_2_hsphy3 {
1236	vdda-pll-supply = <&vreg_l10d>;
1237	vdda18-supply = <&vreg_l8c>;
1238	vdda33-supply = <&vreg_l2d>;
1239
1240	status = "okay";
1241};
1242
1243&usb_2_qmpphy0 {
1244	vdda-phy-supply = <&vreg_l1b>;
1245	vdda-pll-supply = <&vreg_l4d>;
1246
1247	status = "okay";
1248};
1249
1250&usb_2_qmpphy1 {
1251	vdda-phy-supply = <&vreg_l8d>;
1252	vdda-pll-supply = <&vreg_l4d>;
1253
1254	status = "okay";
1255};
1256
1257&vamacro {
1258	pinctrl-0 = <&dmic01_default>, <&dmic23_default>;
1259	pinctrl-names = "default";
1260
1261	vdd-micb-supply = <&vreg_s10b>;
1262
1263	qcom,dmic-sample-rate = <4800000>;
1264
1265	status = "okay";
1266};
1267
1268&wsamacro {
1269	status = "okay";
1270};
1271
1272&xo_board_clk {
1273	clock-frequency = <38400000>;
1274};
1275
1276/* PINCTRL */
1277
1278&lpass_tlmm {
1279	status = "okay";
1280};
1281
1282&pmc8280_1_gpios {
1283	misc_3p3_reg_en: misc-3p3-reg-en-state {
1284		pins = "gpio1";
1285		function = "normal";
1286	};
1287
1288	vol_up_n: vol-up-n-state {
1289		pins = "gpio6";
1290		function = "normal";
1291		power-source = <1>;
1292		input-enable;
1293		bias-pull-up;
1294	};
1295};
1296
1297&pmr735a_gpios {
1298	hastings_reg_en: hastings-reg-en-state {
1299		pins = "gpio1";
1300		function = "normal";
1301	};
1302};
1303
1304&tlmm {
1305
1306	gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 4>;
1307
1308	bt_default: bt-default-state {
1309		hstp-bt-en-pins {
1310			pins = "gpio133";
1311			function = "gpio";
1312			drive-strength = <16>;
1313			bias-disable;
1314		};
1315
1316		hstp-sw-ctrl-pins {
1317			pins = "gpio132";
1318			function = "gpio";
1319			bias-pull-down;
1320		};
1321	};
1322
1323	i2c4_default: i2c4-default-state {
1324		pins = "gpio171", "gpio172";
1325		function = "qup4";
1326		drive-strength = <16>;
1327		bias-disable;
1328	};
1329
1330	i2c15_default: i2c15-default-state {
1331		pins = "gpio36", "gpio37";
1332		function = "qup15";
1333		drive-strength = <2>;
1334		bias-pull-up;
1335	};
1336
1337	mode_pin_active: mode-pin-state {
1338		pins = "gpio26";
1339		function = "gpio";
1340		bias-disable;
1341	};
1342
1343	nvme_reg_en: nvme-reg-en-state {
1344		pins = "gpio135";
1345		function = "gpio";
1346		drive-strength = <2>;
1347		bias-disable;
1348	};
1349
1350	pcie2a_default: pcie2a-default-state {
1351		clkreq-n-pins {
1352			pins = "gpio142";
1353			function = "pcie2a_clkreq";
1354			drive-strength = <2>;
1355			bias-pull-up;
1356		};
1357
1358		perst-n-pins {
1359			pins = "gpio143";
1360			function = "gpio";
1361			drive-strength = <2>;
1362			bias-disable;
1363		};
1364
1365		wake-n-pins {
1366		       pins = "gpio145";
1367		       function = "gpio";
1368		       drive-strength = <2>;
1369		       bias-pull-up;
1370	       };
1371	};
1372
1373	pcie4_default: pcie4-default-state {
1374		clkreq-n-pins {
1375			pins = "gpio140";
1376			function = "pcie4_clkreq";
1377			drive-strength = <2>;
1378			bias-pull-up;
1379		};
1380
1381		perst-n-pins {
1382			pins = "gpio141";
1383			function = "gpio";
1384			drive-strength = <2>;
1385			bias-disable;
1386		};
1387
1388		wake-n-pins {
1389			pins = "gpio139";
1390			function = "gpio";
1391			drive-strength = <2>;
1392			bias-pull-up;
1393		};
1394	};
1395
1396	spkr_1_sd_n_default: spkr-1-sd-n-default-state {
1397		perst-n-pins {
1398			pins = "gpio178";
1399			function = "gpio";
1400			drive-strength = <16>;
1401			bias-disable;
1402			output-high;
1403		};
1404	};
1405
1406	spkr_2_sd_n_default: spkr-2-sd-n-default-state {
1407		perst-n-pins {
1408			pins = "gpio179";
1409			function = "gpio";
1410			drive-strength = <16>;
1411			bias-disable;
1412			output-high;
1413		};
1414	};
1415
1416	ts0_default: ts0-default-state {
1417		int-n-pins {
1418			pins = "gpio175";
1419			function = "gpio";
1420			drive-strength = <2>;
1421			bias-disable;
1422		};
1423
1424		reset-n-pins {
1425			pins = "gpio99";
1426			function = "gpio";
1427			drive-strength = <2>;
1428			bias-disable;
1429			output-high;
1430		};
1431	};
1432
1433	uart2_default: uart2-default-state {
1434		cts-pins {
1435			pins = "gpio121";
1436			function = "qup2";
1437			bias-bus-hold;
1438		};
1439
1440		rts-pins {
1441			pins = "gpio122";
1442			function = "qup2";
1443			drive-strength = <2>;
1444			bias-disable;
1445		};
1446
1447		rx-pins {
1448			pins = "gpio124";
1449			function = "qup2";
1450			bias-pull-up;
1451		};
1452
1453		tx-pins {
1454			pins = "gpio123";
1455			function = "qup2";
1456			drive-strength = <2>;
1457			bias-disable;
1458		};
1459	};
1460
1461	usb0_sbu_default: usb0-sbu-state {
1462		pins = "gpio164";
1463		function = "gpio";
1464		drive-strength = <16>;
1465		bias-disable;
1466	};
1467
1468	usb1_sbu_default: usb1-sbu-state {
1469		pins = "gpio47";
1470		function = "gpio";
1471		drive-strength = <16>;
1472		bias-disable;
1473	};
1474
1475	wcd_default: wcd-default-state {
1476		reset-pins {
1477			pins = "gpio106";
1478			function = "gpio";
1479			bias-disable;
1480		};
1481	};
1482
1483	wlan_en: wlan-en-state {
1484		pins = "gpio134";
1485		function = "gpio";
1486		drive-strength = <8>;
1487		bias-pull-down;
1488	};
1489};
1490