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