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