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