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/iio/qcom,spmi-adc7-pm8350.h> 10#include <dt-bindings/gpio/gpio.h> 11#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 83 pinctrl-names = "default"; 84 pinctrl-0 = <&cam_indicator_en>; 85 86 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 orientation-gpios = <&tlmm 166 GPIO_ACTIVE_HIGH>, 104 <&tlmm 49 GPIO_ACTIVE_HIGH>; 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_l1b: ldo1 { 420 regulator-name = "vreg_l1b"; 421 regulator-min-microvolt = <912000>; 422 regulator-max-microvolt = <912000>; 423 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 424 }; 425 426 vreg_l3b: ldo3 { 427 regulator-name = "vreg_l3b"; 428 regulator-min-microvolt = <1200000>; 429 regulator-max-microvolt = <1200000>; 430 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 431 regulator-boot-on; 432 }; 433 434 vreg_l4b: ldo4 { 435 regulator-name = "vreg_l4b"; 436 regulator-min-microvolt = <912000>; 437 regulator-max-microvolt = <912000>; 438 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 439 }; 440 441 vreg_l6b: ldo6 { 442 regulator-name = "vreg_l6b"; 443 regulator-min-microvolt = <880000>; 444 regulator-max-microvolt = <880000>; 445 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 446 regulator-boot-on; 447 }; 448 }; 449 450 regulators-1 { 451 compatible = "qcom,pm8350c-rpmh-regulators"; 452 qcom,pmic-id = "c"; 453 454 vdd-bob-supply = <&vreg_vph_pwr>; 455 vdd-l1-l12-supply = <&vreg_s1c>; 456 vdd-l2-l8-supply = <&vreg_s1c>; 457 vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>; 458 vdd-l6-l9-l11-supply = <&vreg_bob>; 459 vdd-l10-supply = <&vreg_s11b>; 460 461 vreg_s1c: smps1 { 462 regulator-name = "vreg_s1c"; 463 regulator-min-microvolt = <1880000>; 464 regulator-max-microvolt = <1900000>; 465 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 466 regulator-always-on; 467 }; 468 469 vreg_l1c: ldo1 { 470 regulator-name = "vreg_l1c"; 471 regulator-min-microvolt = <1800000>; 472 regulator-max-microvolt = <1800000>; 473 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 474 }; 475 476 vreg_l8c: ldo8 { 477 regulator-name = "vreg_l8c"; 478 regulator-min-microvolt = <1800000>; 479 regulator-max-microvolt = <1800000>; 480 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 481 }; 482 483 vreg_l12c: ldo12 { 484 regulator-name = "vreg_l12c"; 485 regulator-min-microvolt = <1800000>; 486 regulator-max-microvolt = <1800000>; 487 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 488 }; 489 490 vreg_l13c: ldo13 { 491 regulator-name = "vreg_l13c"; 492 regulator-min-microvolt = <3072000>; 493 regulator-max-microvolt = <3072000>; 494 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 495 }; 496 497 vreg_bob: bob { 498 regulator-name = "vreg_bob"; 499 regulator-min-microvolt = <3008000>; 500 regulator-max-microvolt = <3960000>; 501 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 502 regulator-always-on; 503 }; 504 }; 505 506 regulators-2 { 507 compatible = "qcom,pm8350-rpmh-regulators"; 508 qcom,pmic-id = "d"; 509 510 vdd-l1-l4-supply = <&vreg_s11b>; 511 vdd-l2-l7-supply = <&vreg_bob>; 512 vdd-l3-l5-supply = <&vreg_s11b>; 513 vdd-l6-l9-l10-supply = <&vreg_s12b>; 514 vdd-l8-supply = <&vreg_s12b>; 515 516 vreg_l2d: ldo2 { 517 regulator-name = "vreg_l2d"; 518 regulator-min-microvolt = <3072000>; 519 regulator-max-microvolt = <3072000>; 520 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 521 }; 522 523 vreg_l3d: ldo3 { 524 regulator-name = "vreg_l3d"; 525 regulator-min-microvolt = <1200000>; 526 regulator-max-microvolt = <1200000>; 527 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 528 }; 529 530 vreg_l4d: ldo4 { 531 regulator-name = "vreg_l4d"; 532 regulator-min-microvolt = <1200000>; 533 regulator-max-microvolt = <1200000>; 534 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 535 }; 536 537 vreg_l6d: ldo6 { 538 regulator-name = "vreg_l6d"; 539 regulator-min-microvolt = <880000>; 540 regulator-max-microvolt = <880000>; 541 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 542 }; 543 544 vreg_l7d: ldo7 { 545 regulator-name = "vreg_l7d"; 546 regulator-min-microvolt = <3072000>; 547 regulator-max-microvolt = <3072000>; 548 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 549 }; 550 551 vreg_l8d: ldo8 { 552 regulator-name = "vreg_l8d"; 553 regulator-min-microvolt = <912000>; 554 regulator-max-microvolt = <912000>; 555 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 556 }; 557 558 vreg_l9d: ldo9 { 559 regulator-name = "vreg_l9d"; 560 regulator-min-microvolt = <912000>; 561 regulator-max-microvolt = <912000>; 562 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 563 }; 564 565 vreg_l10d: ldo10 { 566 regulator-name = "vreg_l10d"; 567 regulator-min-microvolt = <912000>; 568 regulator-max-microvolt = <912000>; 569 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 570 }; 571 }; 572}; 573 574&dispcc0 { 575 status = "okay"; 576}; 577 578&gpu { 579 status = "okay"; 580 581 zap-shader { 582 memory-region = <&gpu_mem>; 583 firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn"; 584 }; 585}; 586 587&mdss0 { 588 status = "okay"; 589}; 590 591&mdss0_dp0 { 592 status = "okay"; 593}; 594 595&mdss0_dp0_out { 596 data-lanes = <0 1>; 597 remote-endpoint = <&usb_0_qmpphy_dp_in>; 598}; 599 600&mdss0_dp1 { 601 status = "okay"; 602}; 603 604&mdss0_dp1_out { 605 data-lanes = <0 1>; 606 remote-endpoint = <&usb_1_qmpphy_dp_in>; 607}; 608 609&mdss0_dp3 { 610 compatible = "qcom,sc8280xp-edp"; 611 /delete-property/ #sound-dai-cells; 612 613 data-lanes = <0 1 2 3>; 614 615 status = "okay"; 616 617 aux-bus { 618 panel { 619 compatible = "edp-panel"; 620 621 backlight = <&backlight>; 622 power-supply = <&vreg_edp_3p3>; 623 624 port { 625 edp_panel_in: endpoint { 626 remote-endpoint = <&mdss0_dp3_out>; 627 }; 628 }; 629 }; 630 }; 631 632 ports { 633 port@1 { 634 reg = <1>; 635 mdss0_dp3_out: endpoint { 636 remote-endpoint = <&edp_panel_in>; 637 }; 638 }; 639 }; 640}; 641 642&mdss0_dp3_phy { 643 compatible = "qcom,sc8280xp-edp-phy"; 644 vdda-phy-supply = <&vreg_l6b>; 645 vdda-pll-supply = <&vreg_l3b>; 646 647 status = "okay"; 648}; 649 650&i2c4 { 651 clock-frequency = <400000>; 652 653 pinctrl-names = "default"; 654 pinctrl-0 = <&i2c4_default>; 655 656 status = "okay"; 657 658 /* FIXME: verify */ 659 touchscreen@10 { 660 compatible = "hid-over-i2c"; 661 reg = <0x10>; 662 663 hid-descr-addr = <0x1>; 664 interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; 665 vdd-supply = <&vreg_misc_3p3>; 666 vddl-supply = <&vreg_s10b>; 667 668 pinctrl-names = "default"; 669 pinctrl-0 = <&ts0_default>; 670 }; 671}; 672 673&i2c21 { 674 clock-frequency = <400000>; 675 676 pinctrl-names = "default"; 677 pinctrl-0 = <&i2c21_default>, <&tpad_default>; 678 679 status = "okay"; 680 681 touchpad@15 { 682 compatible = "hid-over-i2c"; 683 reg = <0x15>; 684 685 hid-descr-addr = <0x1>; 686 interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; 687 vdd-supply = <&vreg_misc_3p3>; 688 vddl-supply = <&vreg_s10b>; 689 690 wakeup-source; 691 }; 692 693 touchpad@2c { 694 compatible = "hid-over-i2c"; 695 reg = <0x2c>; 696 697 hid-descr-addr = <0x20>; 698 interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; 699 vdd-supply = <&vreg_misc_3p3>; 700 vddl-supply = <&vreg_s10b>; 701 702 wakeup-source; 703 }; 704 705 keyboard@68 { 706 compatible = "hid-over-i2c"; 707 reg = <0x68>; 708 709 hid-descr-addr = <0x1>; 710 interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; 711 vdd-supply = <&vreg_misc_3p3>; 712 vddl-supply = <&vreg_s10b>; 713 714 pinctrl-names = "default"; 715 pinctrl-0 = <&kybd_default>; 716 717 wakeup-source; 718 }; 719}; 720 721&pcie2a { 722 perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; 723 wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; 724 725 vddpe-3v3-supply = <&vreg_nvme>; 726 727 pinctrl-names = "default"; 728 pinctrl-0 = <&pcie2a_default>; 729 730 status = "okay"; 731}; 732 733&pcie2a_phy { 734 vdda-phy-supply = <&vreg_l6d>; 735 vdda-pll-supply = <&vreg_l4d>; 736 737 status = "okay"; 738}; 739 740&pcie3a { 741 perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; 742 wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; 743 744 vddpe-3v3-supply = <&vreg_wwan>; 745 746 pinctrl-names = "default"; 747 pinctrl-0 = <&pcie3a_default>; 748 749 status = "okay"; 750}; 751 752&pcie3a_phy { 753 vdda-phy-supply = <&vreg_l6d>; 754 vdda-pll-supply = <&vreg_l4d>; 755 756 status = "okay"; 757}; 758 759&pcie4 { 760 max-link-speed = <2>; 761 762 perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; 763 wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; 764 765 vddpe-3v3-supply = <&vreg_wlan>; 766 767 pinctrl-names = "default"; 768 pinctrl-0 = <&pcie4_default>; 769 770 status = "okay"; 771}; 772 773&pcie4_port0 { 774 wifi@0 { 775 compatible = "pci17cb,1103"; 776 reg = <0x10000 0x0 0x0 0x0 0x0>; 777 778 qcom,ath11k-calibration-variant = "LE_X13S"; 779 }; 780}; 781 782&pcie4_phy { 783 vdda-phy-supply = <&vreg_l6d>; 784 vdda-pll-supply = <&vreg_l4d>; 785 786 status = "okay"; 787}; 788 789&pmc8280c_lpg { 790 status = "okay"; 791}; 792 793&pmk8280_adc_tm { 794 status = "okay"; 795 796 sys-therm@0 { 797 reg = <0>; 798 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>; 799 qcom,hw-settle-time-us = <200>; 800 qcom,avg-samples = <2>; 801 qcom,ratiometric; 802 }; 803 804 sys-therm@1 { 805 reg = <1>; 806 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>; 807 qcom,hw-settle-time-us = <200>; 808 qcom,avg-samples = <2>; 809 qcom,ratiometric; 810 }; 811 812 sys-therm@2 { 813 reg = <2>; 814 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>; 815 qcom,hw-settle-time-us = <200>; 816 qcom,avg-samples = <2>; 817 qcom,ratiometric; 818 }; 819 820 sys-therm@3 { 821 reg = <3>; 822 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>; 823 qcom,hw-settle-time-us = <200>; 824 qcom,avg-samples = <2>; 825 qcom,ratiometric; 826 }; 827 828 sys-therm@4 { 829 reg = <4>; 830 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>; 831 qcom,hw-settle-time-us = <200>; 832 qcom,avg-samples = <2>; 833 qcom,ratiometric; 834 }; 835 836 sys-therm@5 { 837 reg = <5>; 838 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>; 839 qcom,hw-settle-time-us = <200>; 840 qcom,avg-samples = <2>; 841 qcom,ratiometric; 842 }; 843 844 sys-therm@6 { 845 reg = <6>; 846 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>; 847 qcom,hw-settle-time-us = <200>; 848 qcom,avg-samples = <2>; 849 qcom,ratiometric; 850 }; 851 852 sys-therm@7 { 853 reg = <7>; 854 io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>; 855 qcom,hw-settle-time-us = <200>; 856 qcom,avg-samples = <2>; 857 qcom,ratiometric; 858 }; 859}; 860 861&pmk8280_pon_pwrkey { 862 status = "okay"; 863}; 864 865&pmk8280_pon_resin { 866 status = "okay"; 867}; 868 869&pmk8280_rtc { 870 nvmem-cells = <&rtc_offset>; 871 nvmem-cell-names = "offset"; 872 873 status = "okay"; 874}; 875 876&pmk8280_sdam_6 { 877 status = "okay"; 878 879 rtc_offset: rtc-offset@bc { 880 reg = <0xbc 0x4>; 881 }; 882}; 883 884&pmk8280_vadc { 885 channel@144 { 886 reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>; 887 qcom,hw-settle-time = <200>; 888 qcom,ratiometric; 889 label = "sys_therm1"; 890 }; 891 892 channel@145 { 893 reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>; 894 qcom,hw-settle-time = <200>; 895 qcom,ratiometric; 896 label = "sys_therm2"; 897 }; 898 899 channel@146 { 900 reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>; 901 qcom,hw-settle-time = <200>; 902 qcom,ratiometric; 903 label = "sys_therm3"; 904 }; 905 906 channel@147 { 907 reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>; 908 qcom,hw-settle-time = <200>; 909 qcom,ratiometric; 910 label = "sys_therm4"; 911 }; 912 913 channel@344 { 914 reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>; 915 qcom,hw-settle-time = <200>; 916 qcom,ratiometric; 917 label = "sys_therm5"; 918 }; 919 920 channel@345 { 921 reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>; 922 qcom,hw-settle-time = <200>; 923 qcom,ratiometric; 924 label = "sys_therm6"; 925 }; 926 927 channel@346 { 928 reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>; 929 qcom,hw-settle-time = <200>; 930 qcom,ratiometric; 931 label = "sys_therm7"; 932 }; 933 934 channel@347 { 935 reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>; 936 qcom,hw-settle-time = <200>; 937 qcom,ratiometric; 938 label = "sys_therm8"; 939 }; 940}; 941 942&qup0 { 943 status = "okay"; 944}; 945 946&qup1 { 947 status = "okay"; 948}; 949 950&qup2 { 951 status = "okay"; 952}; 953 954&remoteproc_adsp { 955 firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; 956 957 status = "okay"; 958}; 959 960&remoteproc_nsp0 { 961 firmware-name = "qcom/sc8280xp/LENOVO/21BX/qccdsp8280.mbn"; 962 963 status = "okay"; 964}; 965 966&rxmacro { 967 status = "okay"; 968}; 969 970&sound { 971 compatible = "qcom,sc8280xp-sndcard"; 972 model = "SC8280XP-LENOVO-X13S"; 973 audio-routing = 974 "SpkrLeft IN", "WSA_SPK1 OUT", 975 "SpkrRight IN", "WSA_SPK2 OUT", 976 "IN1_HPHL", "HPHL_OUT", 977 "IN2_HPHR", "HPHR_OUT", 978 "AMIC2", "MIC BIAS2", 979 "VA DMIC0", "MIC BIAS1", 980 "VA DMIC1", "MIC BIAS1", 981 "VA DMIC2", "MIC BIAS3", 982 "VA DMIC0", "VA MIC BIAS1", 983 "VA DMIC1", "VA MIC BIAS1", 984 "VA DMIC2", "VA MIC BIAS3", 985 "TX SWR_ADC1", "ADC2_OUTPUT"; 986 987 wcd-playback-dai-link { 988 link-name = "WCD Playback"; 989 cpu { 990 sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; 991 }; 992 993 codec { 994 sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>; 995 }; 996 997 platform { 998 sound-dai = <&q6apm>; 999 }; 1000 }; 1001 1002 wcd-capture-dai-link { 1003 link-name = "WCD Capture"; 1004 cpu { 1005 sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; 1006 }; 1007 1008 codec { 1009 sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>; 1010 }; 1011 1012 platform { 1013 sound-dai = <&q6apm>; 1014 }; 1015 }; 1016 1017 wsa-dai-link { 1018 link-name = "WSA Playback"; 1019 cpu { 1020 sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>; 1021 }; 1022 1023 codec { 1024 sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>; 1025 }; 1026 1027 platform { 1028 sound-dai = <&q6apm>; 1029 }; 1030 }; 1031 1032 va-dai-link { 1033 link-name = "VA Capture"; 1034 cpu { 1035 sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>; 1036 }; 1037 1038 platform { 1039 sound-dai = <&q6apm>; 1040 }; 1041 1042 codec { 1043 sound-dai = <&vamacro 0>; 1044 }; 1045 }; 1046}; 1047 1048&swr0 { 1049 status = "okay"; 1050 1051 left_spkr: wsa8830-left@0,1 { 1052 compatible = "sdw10217020200"; 1053 reg = <0 1>; 1054 pinctrl-names = "default"; 1055 pinctrl-0 = <&spkr_1_sd_n_default>; 1056 powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>; 1057 #thermal-sensor-cells = <0>; 1058 sound-name-prefix = "SpkrLeft"; 1059 #sound-dai-cells = <0>; 1060 vdd-supply = <&vreg_s10b>; 1061 }; 1062 1063 right_spkr: wsa8830-right@0,2 { 1064 compatible = "sdw10217020200"; 1065 reg = <0 2>; 1066 pinctrl-names = "default"; 1067 pinctrl-0 = <&spkr_2_sd_n_default>; 1068 powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_LOW>; 1069 #thermal-sensor-cells = <0>; 1070 sound-name-prefix = "SpkrRight"; 1071 #sound-dai-cells = <0>; 1072 vdd-supply = <&vreg_s10b>; 1073 }; 1074}; 1075 1076&swr1 { 1077 status = "okay"; 1078 1079 wcd_rx: wcd9380-rx@0,4 { 1080 compatible = "sdw20217010d00"; 1081 reg = <0 4>; 1082 qcom,rx-port-mapping = <1 2 3 4 5>; 1083 }; 1084}; 1085 1086&swr2 { 1087 status = "okay"; 1088 1089 wcd_tx: wcd9380-tx@0,3 { 1090 compatible = "sdw20217010d00"; 1091 reg = <0 3>; 1092 qcom,tx-port-mapping = <1 1 2 3>; 1093 }; 1094}; 1095 1096&txmacro { 1097 status = "okay"; 1098}; 1099 1100&uart2 { 1101 pinctrl-0 = <&uart2_default>; 1102 pinctrl-names = "default"; 1103 1104 status = "okay"; 1105 1106 bluetooth { 1107 compatible = "qcom,wcn6855-bt"; 1108 1109 vddio-supply = <&vreg_s10b>; 1110 vddbtcxmx-supply = <&vreg_s12b>; 1111 vddrfacmn-supply = <&vreg_s12b>; 1112 vddrfa0p8-supply = <&vreg_s12b>; 1113 vddrfa1p2-supply = <&vreg_s11b>; 1114 vddrfa1p7-supply = <&vreg_s1c>; 1115 1116 max-speed = <3200000>; 1117 1118 enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; 1119 swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; 1120 1121 pinctrl-0 = <&bt_default>; 1122 pinctrl-names = "default"; 1123 }; 1124}; 1125 1126&usb_0 { 1127 status = "okay"; 1128}; 1129 1130&usb_0_dwc3 { 1131 dr_mode = "host"; 1132}; 1133 1134&usb_0_hsphy { 1135 vdda-pll-supply = <&vreg_l9d>; 1136 vdda18-supply = <&vreg_l1c>; 1137 vdda33-supply = <&vreg_l7d>; 1138 1139 status = "okay"; 1140}; 1141 1142&usb_0_qmpphy { 1143 vdda-phy-supply = <&vreg_l9d>; 1144 vdda-pll-supply = <&vreg_l4d>; 1145 1146 orientation-switch; 1147 1148 status = "okay"; 1149}; 1150 1151&usb_0_qmpphy_dp_in { 1152 remote-endpoint = <&mdss0_dp0_out>; 1153}; 1154 1155&usb_0_qmpphy_out { 1156 remote-endpoint = <&pmic_glink_con0_ss>; 1157}; 1158 1159&usb_0_role_switch { 1160 remote-endpoint = <&pmic_glink_con0_hs>; 1161}; 1162 1163&usb_1 { 1164 status = "okay"; 1165}; 1166 1167&usb_1_dwc3 { 1168 dr_mode = "host"; 1169}; 1170 1171&usb_1_hsphy { 1172 vdda-pll-supply = <&vreg_l4b>; 1173 vdda18-supply = <&vreg_l1c>; 1174 vdda33-supply = <&vreg_l13c>; 1175 1176 status = "okay"; 1177}; 1178 1179&usb_1_qmpphy { 1180 vdda-phy-supply = <&vreg_l4b>; 1181 vdda-pll-supply = <&vreg_l3b>; 1182 1183 orientation-switch; 1184 1185 status = "okay"; 1186}; 1187 1188&usb_1_qmpphy_dp_in { 1189 remote-endpoint = <&mdss0_dp1_out>; 1190}; 1191 1192&usb_1_qmpphy_out { 1193 remote-endpoint = <&pmic_glink_con1_ss>; 1194}; 1195 1196&usb_1_role_switch { 1197 remote-endpoint = <&pmic_glink_con1_hs>; 1198}; 1199 1200&usb_2 { 1201 status = "okay"; 1202}; 1203 1204&usb_2_hsphy0 { 1205 vdda-pll-supply = <&vreg_l1b>; 1206 vdda18-supply = <&vreg_l1c>; 1207 vdda33-supply = <&vreg_l7d>; 1208 1209 status = "okay"; 1210}; 1211 1212&usb_2_hsphy1 { 1213 vdda-pll-supply = <&vreg_l8d>; 1214 vdda18-supply = <&vreg_l1c>; 1215 vdda33-supply = <&vreg_l7d>; 1216 1217 status = "okay"; 1218}; 1219 1220&usb_2_hsphy2 { 1221 vdda-pll-supply = <&vreg_l10d>; 1222 vdda18-supply = <&vreg_l8c>; 1223 vdda33-supply = <&vreg_l2d>; 1224 1225 status = "okay"; 1226}; 1227 1228&usb_2_hsphy3 { 1229 vdda-pll-supply = <&vreg_l10d>; 1230 vdda18-supply = <&vreg_l8c>; 1231 vdda33-supply = <&vreg_l2d>; 1232 1233 status = "okay"; 1234}; 1235 1236&usb_2_qmpphy0 { 1237 vdda-phy-supply = <&vreg_l1b>; 1238 vdda-pll-supply = <&vreg_l4d>; 1239 1240 status = "okay"; 1241}; 1242 1243&usb_2_qmpphy1 { 1244 vdda-phy-supply = <&vreg_l8d>; 1245 vdda-pll-supply = <&vreg_l4d>; 1246 1247 status = "okay"; 1248}; 1249 1250&vamacro { 1251 pinctrl-0 = <&dmic01_default>, <&dmic23_default>; 1252 pinctrl-names = "default"; 1253 1254 vdd-micb-supply = <&vreg_s10b>; 1255 1256 qcom,dmic-sample-rate = <4800000>; 1257 1258 status = "okay"; 1259}; 1260 1261&wsamacro { 1262 status = "okay"; 1263}; 1264 1265&xo_board_clk { 1266 clock-frequency = <38400000>; 1267}; 1268 1269/* PINCTRL */ 1270 1271&lpass_tlmm { 1272 status = "okay"; 1273}; 1274 1275&pmc8280_1_gpios { 1276 edp_bl_en: edp-bl-en-state { 1277 pins = "gpio8"; 1278 function = "normal"; 1279 }; 1280 1281 edp_bl_reg_en: edp-bl-reg-en-state { 1282 pins = "gpio9"; 1283 function = "normal"; 1284 }; 1285 1286 misc_3p3_reg_en: misc-3p3-reg-en-state { 1287 pins = "gpio1"; 1288 function = "normal"; 1289 }; 1290}; 1291 1292&pmc8280_2_gpios { 1293 wwan_sw_en: wwan-sw-en-state { 1294 pins = "gpio1"; 1295 function = "normal"; 1296 }; 1297}; 1298 1299&pmc8280c_gpios { 1300 edp_bl_pwm: edp-bl-pwm-state { 1301 pins = "gpio8"; 1302 function = "func1"; 1303 }; 1304}; 1305 1306&pmr735a_gpios { 1307 hastings_reg_en: hastings-reg-en-state { 1308 pins = "gpio1"; 1309 function = "normal"; 1310 }; 1311}; 1312 1313&tlmm { 1314 gpio-reserved-ranges = <70 2>, <74 6>, <125 2>, <128 2>, <154 4>; 1315 1316 bt_default: bt-default-state { 1317 hstp-bt-en-pins { 1318 pins = "gpio133"; 1319 function = "gpio"; 1320 drive-strength = <16>; 1321 bias-disable; 1322 }; 1323 1324 hstp-sw-ctrl-pins { 1325 pins = "gpio132"; 1326 function = "gpio"; 1327 bias-pull-down; 1328 }; 1329 }; 1330 1331 cam_indicator_en: cam-indicator-en-state { 1332 pins = "gpio28"; 1333 function = "gpio"; 1334 drive-strength = <2>; 1335 bias-disable; 1336 }; 1337 1338 edp_reg_en: edp-reg-en-state { 1339 pins = "gpio25"; 1340 function = "gpio"; 1341 drive-strength = <16>; 1342 bias-disable; 1343 }; 1344 1345 hall_int_n_default: hall-int-n-state { 1346 pins = "gpio107"; 1347 function = "gpio"; 1348 bias-disable; 1349 }; 1350 1351 i2c4_default: i2c4-default-state { 1352 pins = "gpio171", "gpio172"; 1353 function = "qup4"; 1354 drive-strength = <16>; 1355 bias-disable; 1356 }; 1357 1358 i2c21_default: i2c21-default-state { 1359 pins = "gpio81", "gpio82"; 1360 function = "qup21"; 1361 drive-strength = <16>; 1362 bias-disable; 1363 }; 1364 1365 kybd_default: kybd-default-state { 1366 disable-pins { 1367 pins = "gpio102"; 1368 function = "gpio"; 1369 output-low; 1370 }; 1371 1372 int-n-pins { 1373 pins = "gpio104"; 1374 function = "gpio"; 1375 bias-disable; 1376 }; 1377 1378 reset-pins { 1379 pins = "gpio105"; 1380 function = "gpio"; 1381 bias-disable; 1382 }; 1383 }; 1384 1385 nvme_reg_en: nvme-reg-en-state { 1386 pins = "gpio135"; 1387 function = "gpio"; 1388 drive-strength = <2>; 1389 bias-disable; 1390 }; 1391 1392 pcie2a_default: pcie2a-default-state { 1393 clkreq-n-pins { 1394 pins = "gpio142"; 1395 function = "pcie2a_clkreq"; 1396 drive-strength = <2>; 1397 bias-pull-up; 1398 }; 1399 1400 perst-n-pins { 1401 pins = "gpio143"; 1402 function = "gpio"; 1403 drive-strength = <2>; 1404 bias-pull-down; 1405 }; 1406 1407 wake-n-pins { 1408 pins = "gpio145"; 1409 function = "gpio"; 1410 drive-strength = <2>; 1411 bias-pull-up; 1412 }; 1413 }; 1414 1415 pcie3a_default: pcie3a-default-state { 1416 clkreq-n-pins { 1417 pins = "gpio150"; 1418 function = "pcie3a_clkreq"; 1419 drive-strength = <2>; 1420 bias-pull-up; 1421 }; 1422 1423 perst-n-pins { 1424 pins = "gpio151"; 1425 function = "gpio"; 1426 drive-strength = <2>; 1427 bias-pull-down; 1428 }; 1429 1430 wake-n-pins { 1431 pins = "gpio148"; 1432 function = "gpio"; 1433 drive-strength = <2>; 1434 bias-pull-up; 1435 }; 1436 }; 1437 1438 pcie4_default: pcie4-default-state { 1439 clkreq-n-pins { 1440 pins = "gpio140"; 1441 function = "pcie4_clkreq"; 1442 drive-strength = <2>; 1443 bias-pull-up; 1444 }; 1445 1446 perst-n-pins { 1447 pins = "gpio141"; 1448 function = "gpio"; 1449 drive-strength = <2>; 1450 bias-pull-down; 1451 }; 1452 1453 wake-n-pins { 1454 pins = "gpio139"; 1455 function = "gpio"; 1456 drive-strength = <2>; 1457 bias-pull-up; 1458 }; 1459 }; 1460 1461 spkr_1_sd_n_default: spkr-1-sd-n-default-state { 1462 perst-n-pins { 1463 pins = "gpio178"; 1464 function = "gpio"; 1465 drive-strength = <16>; 1466 bias-disable; 1467 output-high; 1468 }; 1469 }; 1470 1471 spkr_2_sd_n_default: spkr-2-sd-n-default-state { 1472 perst-n-pins { 1473 pins = "gpio179"; 1474 function = "gpio"; 1475 drive-strength = <16>; 1476 bias-disable; 1477 output-high; 1478 }; 1479 }; 1480 1481 tpad_default: tpad-default-state { 1482 int-n-pins { 1483 pins = "gpio182"; 1484 function = "gpio"; 1485 bias-disable; 1486 }; 1487 }; 1488 1489 ts0_default: ts0-default-state { 1490 int-n-pins { 1491 pins = "gpio175"; 1492 function = "gpio"; 1493 bias-disable; 1494 }; 1495 1496 reset-n-pins { 1497 pins = "gpio99"; 1498 function = "gpio"; 1499 output-high; 1500 drive-strength = <16>; 1501 }; 1502 }; 1503 1504 uart2_default: uart2-default-state { 1505 cts-pins { 1506 pins = "gpio121"; 1507 function = "qup2"; 1508 bias-bus-hold; 1509 }; 1510 1511 rts-pins { 1512 pins = "gpio122"; 1513 function = "qup2"; 1514 drive-strength = <2>; 1515 bias-disable; 1516 }; 1517 1518 rx-pins { 1519 pins = "gpio124"; 1520 function = "qup2"; 1521 bias-pull-up; 1522 }; 1523 1524 tx-pins { 1525 pins = "gpio123"; 1526 function = "qup2"; 1527 drive-strength = <2>; 1528 bias-disable; 1529 }; 1530 }; 1531 1532 usb0_sbu_default: usb0-sbu-state { 1533 oe-n-pins { 1534 pins = "gpio101"; 1535 function = "gpio"; 1536 bias-disable; 1537 drive-strength = <16>; 1538 output-high; 1539 }; 1540 1541 sel-pins { 1542 pins = "gpio164"; 1543 function = "gpio"; 1544 bias-disable; 1545 drive-strength = <16>; 1546 }; 1547 }; 1548 1549 usb1_sbu_default: usb1-sbu-state { 1550 oe-n-pins { 1551 pins = "gpio48"; 1552 function = "gpio"; 1553 bias-disable; 1554 drive-strength = <16>; 1555 output-high; 1556 }; 1557 1558 sel-pins { 1559 pins = "gpio47"; 1560 function = "gpio"; 1561 bias-disable; 1562 drive-strength = <16>; 1563 }; 1564 }; 1565 1566 wcd_default: wcd-default-state { 1567 reset-pins { 1568 pins = "gpio106"; 1569 function = "gpio"; 1570 bias-disable; 1571 }; 1572 }; 1573}; 1574