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