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/regulator/qcom,rpmh-regulator.h> 11 12#include "sc8280xp.dtsi" 13#include "sc8280xp-pmics.dtsi" 14 15/ { 16 model = "Qualcomm SC8280XP CRD"; 17 compatible = "qcom,sc8280xp-crd", "qcom,sc8280xp"; 18 19 aliases { 20 i2c4 = &i2c4; 21 i2c21 = &i2c21; 22 serial0 = &uart17; 23 }; 24 25 backlight: backlight { 26 compatible = "pwm-backlight"; 27 pwms = <&pmc8280c_lpg 3 1000000>; 28 enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; 29 power-supply = <&vreg_edp_bl>; 30 31 pinctrl-names = "default"; 32 pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; 33 }; 34 35 chosen { 36 stdout-path = "serial0:115200n8"; 37 }; 38 39 vreg_edp_3p3: regulator-edp-3p3 { 40 compatible = "regulator-fixed"; 41 42 regulator-name = "VREG_EDP_3P3"; 43 regulator-min-microvolt = <3300000>; 44 regulator-max-microvolt = <3300000>; 45 46 gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>; 47 enable-active-high; 48 49 pinctrl-names = "default"; 50 pinctrl-0 = <&edp_reg_en>; 51 52 regulator-boot-on; 53 }; 54 55 vreg_edp_bl: regulator-edp-bl { 56 compatible = "regulator-fixed"; 57 58 regulator-name = "VBL9"; 59 regulator-min-microvolt = <3600000>; 60 regulator-max-microvolt = <3600000>; 61 62 gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>; 63 enable-active-high; 64 65 pinctrl-names = "default"; 66 pinctrl-0 = <&edp_bl_reg_en>; 67 68 regulator-boot-on; 69 }; 70 71 vreg_nvme: regulator-nvme { 72 compatible = "regulator-fixed"; 73 74 regulator-name = "VCC3_SSD"; 75 regulator-min-microvolt = <3300000>; 76 regulator-max-microvolt = <3300000>; 77 78 gpio = <&tlmm 135 GPIO_ACTIVE_HIGH>; 79 enable-active-high; 80 81 pinctrl-names = "default"; 82 pinctrl-0 = <&nvme_reg_en>; 83 }; 84 85 vreg_misc_3p3: regulator-misc-3p3 { 86 compatible = "regulator-fixed"; 87 88 regulator-name = "VCC3B"; 89 regulator-min-microvolt = <3300000>; 90 regulator-max-microvolt = <3300000>; 91 92 gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>; 93 enable-active-high; 94 95 pinctrl-names = "default"; 96 pinctrl-0 = <&misc_3p3_reg_en>; 97 98 regulator-boot-on; 99 regulator-always-on; 100 }; 101 102 vreg_wlan: regulator-wlan { 103 compatible = "regulator-fixed"; 104 105 regulator-name = "VCC_WLAN_3R9"; 106 regulator-min-microvolt = <3900000>; 107 regulator-max-microvolt = <3900000>; 108 109 gpio = <&pmr735a_gpios 1 GPIO_ACTIVE_HIGH>; 110 enable-active-high; 111 112 pinctrl-names = "default"; 113 pinctrl-0 = <&hastings_reg_en>; 114 115 regulator-boot-on; 116 }; 117 118 vreg_wwan: regulator-wwan { 119 compatible = "regulator-fixed"; 120 121 regulator-name = "VCC3B_WAN"; 122 regulator-min-microvolt = <3300000>; 123 regulator-max-microvolt = <3300000>; 124 125 gpio = <&pmc8280_2_gpios 1 GPIO_ACTIVE_HIGH>; 126 enable-active-high; 127 128 pinctrl-names = "default"; 129 pinctrl-0 = <&wwan_sw_en>; 130 131 regulator-boot-on; 132 }; 133 134 reserved-memory { 135 linux,cma { 136 compatible = "shared-dma-pool"; 137 size = <0x0 0x8000000>; 138 reusable; 139 linux,cma-default; 140 }; 141 }; 142}; 143 144&apps_rsc { 145 pmc8280-1-rpmh-regulators { 146 compatible = "qcom,pm8350-rpmh-regulators"; 147 qcom,pmic-id = "b"; 148 149 vdd-l3-l5-supply = <&vreg_s11b>; 150 151 vreg_s11b: smps11 { 152 regulator-name = "vreg_s11b"; 153 regulator-min-microvolt = <1272000>; 154 regulator-max-microvolt = <1272000>; 155 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 156 }; 157 158 vreg_l3b: ldo3 { 159 regulator-name = "vreg_l3b"; 160 regulator-min-microvolt = <1200000>; 161 regulator-max-microvolt = <1200000>; 162 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 163 regulator-boot-on; 164 }; 165 166 vreg_l4b: ldo4 { 167 regulator-name = "vreg_l4b"; 168 regulator-min-microvolt = <912000>; 169 regulator-max-microvolt = <912000>; 170 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 171 }; 172 173 vreg_l6b: ldo6 { 174 regulator-name = "vreg_l6b"; 175 regulator-min-microvolt = <880000>; 176 regulator-max-microvolt = <880000>; 177 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 178 regulator-boot-on; 179 }; 180 }; 181 182 pmc8280c-rpmh-regulators { 183 compatible = "qcom,pm8350c-rpmh-regulators"; 184 qcom,pmic-id = "c"; 185 186 vreg_l1c: ldo1 { 187 regulator-name = "vreg_l1c"; 188 regulator-min-microvolt = <1800000>; 189 regulator-max-microvolt = <1800000>; 190 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 191 }; 192 193 vreg_l7c: ldo7 { 194 regulator-name = "vreg_l7c"; 195 regulator-min-microvolt = <2504000>; 196 regulator-max-microvolt = <2504000>; 197 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 198 regulator-allow-set-load; 199 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 200 RPMH_REGULATOR_MODE_HPM>; 201 }; 202 203 vreg_l13c: ldo13 { 204 regulator-name = "vreg_l13c"; 205 regulator-min-microvolt = <3072000>; 206 regulator-max-microvolt = <3072000>; 207 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 208 }; 209 }; 210 211 pmc8280-2-rpmh-regulators { 212 compatible = "qcom,pm8350-rpmh-regulators"; 213 qcom,pmic-id = "d"; 214 215 vdd-l1-l4-supply = <&vreg_s11b>; 216 217 vreg_l3d: ldo3 { 218 regulator-name = "vreg_l3d"; 219 regulator-min-microvolt = <1200000>; 220 regulator-max-microvolt = <1200000>; 221 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 222 regulator-allow-set-load; 223 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 224 RPMH_REGULATOR_MODE_HPM>; 225 }; 226 227 vreg_l4d: ldo4 { 228 regulator-name = "vreg_l4d"; 229 regulator-min-microvolt = <1200000>; 230 regulator-max-microvolt = <1200000>; 231 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 232 }; 233 234 vreg_l6d: ldo6 { 235 regulator-name = "vreg_l6d"; 236 regulator-min-microvolt = <880000>; 237 regulator-max-microvolt = <880000>; 238 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 239 }; 240 241 vreg_l7d: ldo7 { 242 regulator-name = "vreg_l7d"; 243 regulator-min-microvolt = <3072000>; 244 regulator-max-microvolt = <3072000>; 245 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 246 }; 247 248 vreg_l9d: ldo9 { 249 regulator-name = "vreg_l9d"; 250 regulator-min-microvolt = <912000>; 251 regulator-max-microvolt = <912000>; 252 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 253 }; 254 }; 255}; 256 257&dispcc0 { 258 status = "okay"; 259}; 260 261&mdss0 { 262 status = "okay"; 263}; 264 265&mdss0_dp3 { 266 compatible = "qcom,sc8280xp-edp"; 267 268 data-lanes = <0 1 2 3>; 269 270 status = "okay"; 271 272 aux-bus { 273 panel { 274 compatible = "edp-panel"; 275 power-supply = <&vreg_edp_3p3>; 276 277 backlight = <&backlight>; 278 279 ports { 280 port { 281 edp_panel_in: endpoint { 282 remote-endpoint = <&mdss0_dp3_out>; 283 }; 284 }; 285 }; 286 }; 287 }; 288 289 ports { 290 port@1 { 291 reg = <1>; 292 mdss0_dp3_out: endpoint { 293 remote-endpoint = <&edp_panel_in>; 294 }; 295 }; 296 }; 297}; 298 299&mdss0_dp3_phy { 300 vdda-phy-supply = <&vreg_l6b>; 301 vdda-pll-supply = <&vreg_l3b>; 302 303 status = "okay"; 304}; 305 306&i2c4 { 307 clock-frequency = <400000>; 308 309 pinctrl-names = "default"; 310 pinctrl-0 = <&i2c4_default>; 311 312 status = "okay"; 313 314 touchscreen@10 { 315 compatible = "hid-over-i2c"; 316 reg = <0x10>; 317 318 hid-descr-addr = <0x1>; 319 interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; 320 vdd-supply = <&vreg_misc_3p3>; 321 322 pinctrl-names = "default"; 323 pinctrl-0 = <&ts0_default>; 324 }; 325}; 326 327&i2c21 { 328 clock-frequency = <400000>; 329 330 pinctrl-names = "default"; 331 pinctrl-0 = <&i2c21_default>; 332 333 status = "okay"; 334 335 touchpad@15 { 336 compatible = "hid-over-i2c"; 337 reg = <0x15>; 338 339 hid-descr-addr = <0x1>; 340 interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; 341 vdd-supply = <&vreg_misc_3p3>; 342 343 pinctrl-names = "default"; 344 pinctrl-0 = <&tpad_default>; 345 346 wakeup-source; 347 }; 348 349 keyboard@68 { 350 compatible = "hid-over-i2c"; 351 reg = <0x68>; 352 353 hid-descr-addr = <0x1>; 354 interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; 355 vdd-supply = <&vreg_misc_3p3>; 356 357 pinctrl-names = "default"; 358 pinctrl-0 = <&kybd_default>; 359 360 wakeup-source; 361 }; 362}; 363 364&pcie2a { 365 perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; 366 wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; 367 368 vddpe-3v3-supply = <&vreg_nvme>; 369 370 pinctrl-names = "default"; 371 pinctrl-0 = <&pcie2a_default>; 372 373 status = "okay"; 374}; 375 376&pcie2a_phy { 377 vdda-phy-supply = <&vreg_l6d>; 378 vdda-pll-supply = <&vreg_l4d>; 379 380 status = "okay"; 381}; 382 383&pcie3a { 384 perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; 385 wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; 386 387 vddpe-3v3-supply = <&vreg_wwan>; 388 389 pinctrl-names = "default"; 390 pinctrl-0 = <&pcie3a_default>; 391 392 status = "okay"; 393}; 394 395&pcie3a_phy { 396 vdda-phy-supply = <&vreg_l6d>; 397 vdda-pll-supply = <&vreg_l4d>; 398 399 status = "okay"; 400}; 401 402&pcie4 { 403 perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; 404 wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; 405 406 vddpe-3v3-supply = <&vreg_wlan>; 407 408 pinctrl-names = "default"; 409 pinctrl-0 = <&pcie4_default>; 410 411 status = "okay"; 412}; 413 414&pcie4_phy { 415 vdda-phy-supply = <&vreg_l6d>; 416 vdda-pll-supply = <&vreg_l4d>; 417 418 status = "okay"; 419}; 420 421&pmc8280c_lpg { 422 status = "okay"; 423}; 424 425&pmk8280_pon_pwrkey { 426 status = "okay"; 427}; 428 429&qup0 { 430 status = "okay"; 431}; 432 433&qup1 { 434 status = "okay"; 435}; 436 437&qup2 { 438 status = "okay"; 439}; 440 441&remoteproc_adsp { 442 firmware-name = "qcom/sc8280xp/qcadsp8280.mbn"; 443 444 status = "okay"; 445}; 446 447&remoteproc_nsp0 { 448 firmware-name = "qcom/sc8280xp/qccdsp8280.mbn"; 449 450 status = "okay"; 451}; 452 453&uart17 { 454 compatible = "qcom,geni-debug-uart"; 455 456 status = "okay"; 457}; 458 459&ufs_mem_hc { 460 reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; 461 462 vcc-supply = <&vreg_l7c>; 463 vcc-max-microamp = <800000>; 464 vccq-supply = <&vreg_l3d>; 465 vccq-max-microamp = <900000>; 466 467 status = "okay"; 468}; 469 470&ufs_mem_phy { 471 vdda-phy-supply = <&vreg_l6b>; 472 vdda-pll-supply = <&vreg_l3b>; 473 474 status = "okay"; 475}; 476 477&usb_0 { 478 status = "okay"; 479}; 480 481&usb_0_dwc3 { 482 /* TODO: Define USB-C connector properly */ 483 dr_mode = "host"; 484}; 485 486&usb_0_hsphy { 487 vdda-pll-supply = <&vreg_l9d>; 488 vdda18-supply = <&vreg_l1c>; 489 vdda33-supply = <&vreg_l7d>; 490 491 status = "okay"; 492}; 493 494&usb_0_qmpphy { 495 vdda-phy-supply = <&vreg_l9d>; 496 vdda-pll-supply = <&vreg_l4d>; 497 498 status = "okay"; 499}; 500 501&usb_1 { 502 status = "okay"; 503}; 504 505&usb_1_dwc3 { 506 /* TODO: Define USB-C connector properly */ 507 dr_mode = "host"; 508}; 509 510&usb_1_hsphy { 511 vdda-pll-supply = <&vreg_l4b>; 512 vdda18-supply = <&vreg_l1c>; 513 vdda33-supply = <&vreg_l13c>; 514 515 status = "okay"; 516}; 517 518&usb_1_qmpphy { 519 vdda-phy-supply = <&vreg_l4b>; 520 vdda-pll-supply = <&vreg_l3b>; 521 522 status = "okay"; 523}; 524 525&xo_board_clk { 526 clock-frequency = <38400000>; 527}; 528 529/* PINCTRL - additions to nodes defined in sc8280xp.dtsi */ 530 531&pmc8280_1_gpios { 532 edp_bl_en: edp-bl-en-state { 533 pins = "gpio8"; 534 function = "normal"; 535 }; 536 537 edp_bl_reg_en: edp-bl-reg-en-state { 538 pins = "gpio9"; 539 function = "normal"; 540 }; 541 542 misc_3p3_reg_en: misc-3p3-reg-en-state { 543 pins = "gpio1"; 544 function = "normal"; 545 }; 546}; 547 548&pmc8280_2_gpios { 549 wwan_sw_en: wwan-sw-en-state { 550 pins = "gpio1"; 551 function = "normal"; 552 }; 553}; 554 555&pmc8280c_gpios { 556 edp_bl_pwm: edp-bl-pwm-state { 557 pins = "gpio8"; 558 function = "func1"; 559 }; 560}; 561 562&pmr735a_gpios { 563 hastings_reg_en: hastings-reg-en-state { 564 pins = "gpio1"; 565 function = "normal"; 566 }; 567}; 568 569&tlmm { 570 gpio-reserved-ranges = <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; 571 572 edp_reg_en: edp-reg-en-state { 573 pins = "gpio25"; 574 function = "gpio"; 575 drive-strength = <16>; 576 bias-disable; 577 }; 578 579 i2c4_default: i2c4-default-state { 580 pins = "gpio171", "gpio172"; 581 function = "qup4"; 582 drive-strength = <16>; 583 bias-disable; 584 }; 585 586 i2c21_default: i2c21-default-state { 587 pins = "gpio81", "gpio82"; 588 function = "qup21"; 589 drive-strength = <16>; 590 bias-disable; 591 }; 592 593 kybd_default: kybd-default-state { 594 disable-pins { 595 pins = "gpio102"; 596 function = "gpio"; 597 output-low; 598 }; 599 600 int-n-pins { 601 pins = "gpio104"; 602 function = "gpio"; 603 bias-disable; 604 }; 605 606 reset-pins { 607 pins = "gpio105"; 608 function = "gpio"; 609 bias-disable; 610 }; 611 }; 612 613 nvme_reg_en: nvme-reg-en-state { 614 pins = "gpio135"; 615 function = "gpio"; 616 drive-strength = <2>; 617 bias-disable; 618 }; 619 620 pcie2a_default: pcie2a-default-state { 621 clkreq-n-pins { 622 pins = "gpio142"; 623 function = "pcie2a_clkreq"; 624 drive-strength = <2>; 625 bias-pull-up; 626 }; 627 628 perst-n-pins { 629 pins = "gpio143"; 630 function = "gpio"; 631 drive-strength = <2>; 632 bias-pull-down; 633 }; 634 635 wake-n-pins { 636 pins = "gpio145"; 637 function = "gpio"; 638 drive-strength = <2>; 639 bias-pull-up; 640 }; 641 }; 642 643 pcie3a_default: pcie3a-default-state { 644 clkreq-n-pins { 645 pins = "gpio150"; 646 function = "pcie3a_clkreq"; 647 drive-strength = <2>; 648 bias-pull-up; 649 }; 650 651 perst-n-pins { 652 pins = "gpio151"; 653 function = "gpio"; 654 drive-strength = <2>; 655 bias-pull-down; 656 }; 657 658 wake-n-pins { 659 pins = "gpio148"; 660 function = "gpio"; 661 drive-strength = <2>; 662 bias-pull-up; 663 }; 664 }; 665 666 pcie4_default: pcie4-default-state { 667 clkreq-n-pins { 668 pins = "gpio140"; 669 function = "pcie4_clkreq"; 670 drive-strength = <2>; 671 bias-pull-up; 672 }; 673 674 perst-n-pins { 675 pins = "gpio141"; 676 function = "gpio"; 677 drive-strength = <2>; 678 bias-pull-down; 679 }; 680 681 wake-n-pins { 682 pins = "gpio139"; 683 function = "gpio"; 684 drive-strength = <2>; 685 bias-pull-up; 686 }; 687 }; 688 689 tpad_default: tpad-default-state { 690 int-n-pins { 691 pins = "gpio182"; 692 function = "gpio"; 693 bias-disable; 694 }; 695 }; 696 697 ts0_default: ts0-default-state { 698 int-n-pins { 699 pins = "gpio175"; 700 function = "gpio"; 701 bias-disable; 702 }; 703 704 reset-n-pins { 705 pins = "gpio99"; 706 function = "gpio"; 707 output-high; 708 drive-strength = <16>; 709 }; 710 }; 711}; 712