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