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