1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2020, Yassine Oudjana <y.oudjana@protonmail.com> 4 */ 5 6/dts-v1/; 7 8#include "msm8996.dtsi" 9#include "pm8994.dtsi" 10#include "pmi8994.dtsi" 11#include <dt-bindings/input/input.h> 12#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/leds/common.h> 14#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 15 16/ { 17 clocks { 18 compatible = "simple-bus"; 19 20 divclk1_cdc: divclk1 { 21 compatible = "gpio-gate-clock"; 22 clocks = <&rpmcc RPM_SMD_DIV_CLK1>; 23 #clock-cells = <0>; 24 enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>; 25 26 pinctrl-names = "default"; 27 pinctrl-0 = <&divclk1_default>; 28 }; 29 30 divclk4: divclk4 { 31 compatible = "fixed-clock"; 32 #clock-cells = <0>; 33 clock-frequency = <32768>; 34 clock-output-names = "divclk4"; 35 36 pinctrl-names = "default"; 37 pinctrl-0 = <&divclk4_pin_a>; 38 }; 39 }; 40 41 gpio-keys { 42 compatible = "gpio-keys"; 43 44 key-vol-up { 45 label = "Volume Up"; 46 gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>; 47 linux,code = <KEY_VOLUMEUP>; 48 wakeup-source; 49 debounce-interval = <15>; 50 }; 51 52 key-dome { 53 label = "Home"; 54 gpios = <&tlmm 34 GPIO_ACTIVE_LOW>; 55 linux,code = <KEY_HOME>; 56 wakeup-source; 57 debounce-interval = <15>; 58 }; 59 }; 60 61 reserved-memory { 62 memory@88800000 { 63 reg = <0x0 0x88800000 0x0 0x1400000>; 64 no-map; 65 }; 66 67 /* This platform has all PIL regions offset by 0x1400000 */ 68 /delete-node/ mpss@88800000; 69 mpss_mem: mpss@89c00000 { 70 reg = <0x0 0x89c00000 0x0 0x6200000>; 71 no-map; 72 }; 73 74 /delete-node/ adsp@8ea00000; 75 adsp_mem: adsp@8fe00000 { 76 reg = <0x0 0x8fe00000 0x0 0x1b00000>; 77 no-map; 78 }; 79 80 /delete-node/ slpi@90500000; 81 slpi_mem: slpi@91900000 { 82 reg = <0x0 0x91900000 0x0 0xa00000>; 83 no-map; 84 }; 85 86 /delete-node/ gpu@90f00000; 87 gpu_mem: gpu@92300000 { 88 compatible = "shared-dma-pool"; 89 reg = <0x0 0x92300000 0x0 0x2000>; 90 no-map; 91 }; 92 93 /delete-node/ venus@91000000; 94 venus_mem: venus@92400000 { 95 reg = <0x0 0x92400000 0x0 0x500000>; 96 no-map; 97 }; 98 99 ramoops@92900000 { 100 compatible = "ramoops"; 101 reg = <0x0 0x92900000 0x0 0x100000>; 102 no-map; 103 104 record-size = <0x8000>; 105 console-size = <0x80000>; 106 ftrace-size = <0x20000>; 107 pmsg-size = <0x40000>; 108 }; 109 110 /delete-node/ rmtfs; 111 rmtfs@f6c00000 { 112 compatible = "qcom,rmtfs-mem"; 113 reg = <0 0xf6c00000 0 0x200000>; 114 no-map; 115 116 qcom,client-id = <1>; 117 qcom,vmid = <15>; 118 }; 119 120 /delete-node/ mba@91500000; 121 mba_mem: mba@f6f00000 { 122 reg = <0x0 0xf6f00000 0x0 0x100000>; 123 no-map; 124 }; 125 }; 126 127 vph_pwr: vph-pwr-regulator { 128 compatible = "regulator-fixed"; 129 regulator-name = "vph_pwr"; 130 regulator-min-microvolt = <3800000>; 131 regulator-max-microvolt = <3800000>; 132 regulator-always-on; 133 regulator-boot-on; 134 }; 135 136 vdd_3v2_tp: vdd-3v2-tp { 137 compatible = "regulator-fixed"; 138 regulator-name = "vdd_3v2_tp"; 139 regulator-min-microvolt = <3200000>; 140 regulator-max-microvolt = <3200000>; 141 startup-delay-us = <4000>; 142 vin-supply = <&vph_pwr>; 143 144 gpio = <&tlmm 73 0>; 145 enable-active-high; 146 }; 147 148 vdd_3v3: rome-vreg { 149 compatible = "regulator-fixed"; 150 regulator-name = "vdd_3v3"; 151 regulator-min-microvolt = <3300000>; 152 regulator-max-microvolt = <3300000>; 153 startup-delay-us = <4000>; 154 vin-supply = <&vph_pwr_bbyp>; 155 156 gpio = <&pm8994_gpios 9 0>; 157 enable-active-high; 158 pinctrl-names = "default"; 159 pinctrl-0 = <&rome_enable_default>; 160 161 /* Required by QCA6174a - vddpe-3v3 */ 162 regulator-always-on; 163 }; 164 165 /* WL_EN pin defined as a fixed regulator */ 166 wlan_en: wlan-en-1-8v { 167 compatible = "regulator-fixed"; 168 regulator-name = "wlan-en-regulator"; 169 regulator-min-microvolt = <1800000>; 170 regulator-max-microvolt = <1800000>; 171 172 gpio = <&pm8994_gpios 8 0>; 173 /* WLAN card specific delay */ 174 startup-delay-us = <70000>; 175 enable-active-high; 176 pinctrl-names = "default"; 177 pinctrl-0 = <&wlan_en_default>; 178 }; 179}; 180 181&adsp_pil { 182 status = "okay"; 183}; 184 185&blsp2_i2c2 { 186 status = "okay"; 187 label = "NFC_I2C"; 188 clock-frequency = <400000>; 189 190 nfc: pn548@28 { 191 compatible = "nxp,nxp-nci-i2c"; 192 193 reg = <0x28>; 194 195 interrupt-parent = <&tlmm>; 196 interrupts = <9 IRQ_TYPE_LEVEL_HIGH>; 197 198 enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; 199 firmware-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; 200 201 pinctrl-names = "default"; 202 pinctrl-0 = <&nfc_default>; 203 }; 204}; 205 206&blsp2_i2c3 { 207 status = "okay"; 208 label = "TYPEC_I2C"; 209 210 typec: tusb320l@47 { 211 compatible = "ti,tusb320l"; 212 reg = <0x47>; 213 interrupt-parent = <&tlmm>; 214 interrupts = <63 IRQ_TYPE_EDGE_RISING>; 215 }; 216}; 217 218&blsp2_i2c6 { 219 status = "okay"; 220 label = "MSM_TS_I2C"; 221}; 222 223&blsp1_uart2 { 224 status = "okay"; 225 label = "QCA_UART"; 226 227 bluetooth: qca6174a { 228 compatible = "qcom,qca6174-bt"; 229 230 enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; 231 clocks = <&divclk4>; 232 }; 233}; 234 235&dsi0 { 236 status = "okay"; 237 238 vdd-supply = <&vreg_l2a_1p25>; 239 vddio-supply = <&vreg_l14a_1p8>; 240 241 pinctrl-names = "default", "sleep"; 242 pinctrl-0 = <&mdss_dsi_default &mdss_te_default>; 243 pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>; 244}; 245 246&dsi0_out { 247 status = "okay"; 248 249 data-lanes = <0 1 2 3>; 250}; 251 252&dsi0_phy { 253 status = "okay"; 254 255 vcca-supply = <&vreg_l28a_0p925>; 256}; 257 258&gpu { 259 status = "okay"; 260}; 261 262&mdss { 263 status = "okay"; 264}; 265 266&mmcc { 267 vdd-gfx-supply = <&vdd_gfx>; 268}; 269 270&mss_pil { 271 status = "okay"; 272 273 pll-supply = <&vreg_l12a_1p8>; 274}; 275 276&pcie0 { 277 status = "okay"; 278 279 /* Supplied by vdd_3v3, but choose wlan_en to drive enable pin high */ 280 vddpe-3v3-supply = <&wlan_en>; 281 vdda-supply = <&vreg_l28a_0p925>; 282 283 perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; 284 wake-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; 285}; 286 287&pcie_phy { 288 status = "okay"; 289 290 vdda-phy-supply = <&vreg_l28a_0p925>; 291 vdda-pll-supply = <&vreg_l12a_1p8>; 292}; 293 294&pm8994_resin { 295 status = "okay"; 296 297 linux,code = <KEY_VOLUMEDOWN>; 298}; 299 300&slpi_pil { 301 status = "okay"; 302 303 px-supply = <&vreg_lvs2a_1p8>; 304}; 305 306&usb3 { 307 status = "okay"; 308 extcon = <&typec>; 309 310 qcom,select-utmi-as-pipe-clk; 311}; 312 313&usb3_dwc3 { 314 extcon = <&typec>; 315 316 /* usb3-phy is not used on this device */ 317 phys = <&hsusb_phy1>; 318 phy-names = "usb2-phy"; 319 320 maximum-speed = "high-speed"; 321 snps,is-utmi-l1-suspend; 322 snps,usb2-gadget-lpm-disable; 323 snps,hird-threshold = /bits/ 8 <0>; 324}; 325 326&hsusb_phy1 { 327 status = "okay"; 328 extcon = <&typec>; 329 330 vdda-pll-supply = <&vreg_l12a_1p8>; 331 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; 332}; 333 334&ufshc { 335 status = "okay"; 336 337 vcc-supply = <&vreg_l20a_2p95>; 338 vccq-supply = <&vreg_l25a_1p2>; 339 vccq2-supply = <&vreg_s4a_1p8>; 340 341 vcc-max-microamp = <600000>; 342 vccq-max-microamp = <450000>; 343 vccq2-max-microamp = <450000>; 344}; 345 346&ufsphy { 347 status = "okay"; 348 349 vdda-phy-supply = <&vreg_l28a_0p925>; 350 vdda-pll-supply = <&vreg_l12a_1p8>; 351 vddp-ref-clk-supply = <&vreg_l25a_1p2>; 352}; 353 354&venus { 355 status = "okay"; 356}; 357 358&wcd9335 { 359 clock-names = "mclk", "slimbus"; 360 clocks = <&divclk1_cdc>, 361 <&rpmcc RPM_SMD_BB_CLK1>; 362 363 vdd-buck-supply = <&vreg_s4a_1p8>; 364 vdd-buck-sido-supply = <&vreg_s4a_1p8>; 365 vdd-rx-supply = <&vreg_s4a_1p8>; 366 vdd-tx-supply = <&vreg_s4a_1p8>; 367 vdd-vbat-supply = <&vph_pwr>; 368 vdd-micbias-supply = <&vph_pwr_bbyp>; 369 vdd-io-supply = <&vreg_s4a_1p8>; 370}; 371 372&rpm_requests { 373 pm8994-regulators { 374 compatible = "qcom,rpm-pm8994-regulators"; 375 376 vdd_s1-supply = <&vph_pwr>; 377 vdd_s2-supply = <&vph_pwr>; 378 vdd_s3-supply = <&vph_pwr>; 379 vdd_s4-supply = <&vph_pwr>; 380 vdd_s5-supply = <&vph_pwr>; 381 vdd_s6-supply = <&vph_pwr>; 382 vdd_s7-supply = <&vph_pwr>; 383 vdd_s8-supply = <&vph_pwr>; 384 vdd_s9-supply = <&vph_pwr>; 385 vdd_s10-supply = <&vph_pwr>; 386 vdd_s11-supply = <&vph_pwr>; 387 vdd_s12-supply = <&vph_pwr>; 388 vdd_l1-supply = <&vreg_s1b_1p025>; 389 vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>; 390 vdd_l3_l11-supply = <&vreg_s3a_1p3>; 391 vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>; 392 vdd_l5_l7-supply = <&vreg_s5a_2p15>; 393 vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>; 394 vdd_l8_l16_l30-supply = <&vph_pwr>; 395 vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>; 396 vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>; 397 vdd_l14_l15-supply = <&vreg_s5a_2p15>; 398 vdd_l17_l29-supply = <&vph_pwr_bbyp>; 399 vdd_l20_l21-supply = <&vph_pwr_bbyp>; 400 vdd_l25-supply = <&vreg_s3a_1p3>; 401 vdd_lvs1_2-supply = <&vreg_s4a_1p8>; 402 403 vreg_s3a_1p3: s3 { 404 regulator-name = "vreg_s3a_1p3"; 405 regulator-min-microvolt = <1300000>; 406 regulator-max-microvolt = <1300000>; 407 408 /* Required by QCA6174a - vdd-core */ 409 regulator-always-on; 410 }; 411 vreg_s4a_1p8: s4 { 412 regulator-name = "vreg_s4a_1p8"; 413 regulator-min-microvolt = <1800000>; 414 regulator-max-microvolt = <1800000>; 415 regulator-allow-set-load; 416 417 /* Required by QCA6174a - vddio */ 418 regulator-always-on; 419 }; 420 vreg_s5a_2p15: s5 { 421 regulator-name = "vreg_s5a_2p15"; 422 regulator-min-microvolt = <2150000>; 423 regulator-max-microvolt = <2150000>; 424 }; 425 vreg_s7a_0p8: s7 { 426 regulator-name = "vreg_s7a_0p8"; 427 regulator-min-microvolt = <800000>; 428 regulator-max-microvolt = <800000>; 429 }; 430 vreg_l1a_1p0: l1 { 431 regulator-name = "vreg_l1a_1p0"; 432 regulator-min-microvolt = <1000000>; 433 regulator-max-microvolt = <1000000>; 434 }; 435 vreg_l2a_1p25: l2 { 436 regulator-name = "vreg_l2a_1p25"; 437 regulator-min-microvolt = <1250000>; 438 regulator-max-microvolt = <1250000>; 439 }; 440 vreg_l4a_1p225: l4 { 441 regulator-name = "vreg_l4a_1p225"; 442 regulator-min-microvolt = <1225000>; 443 regulator-max-microvolt = <1225000>; 444 }; 445 vreg_l6a_1p8: l6 { 446 regulator-name = "vreg_l6a_1p8"; 447 regulator-min-microvolt = <1800000>; 448 regulator-max-microvolt = <1800000>; 449 }; 450 vreg_l8a_1p8: l8 { 451 regulator-name = "vreg_l8a_1p8"; 452 regulator-min-microvolt = <1800000>; 453 regulator-max-microvolt = <1800000>; 454 }; 455 vreg_l9a_1p8: l9 { 456 regulator-name = "vreg_l9a_1p8"; 457 regulator-min-microvolt = <1800000>; 458 regulator-max-microvolt = <1800000>; 459 }; 460 vreg_l10a_1p8: l10 { 461 regulator-name = "vreg_l10a_1p8"; 462 regulator-min-microvolt = <1800000>; 463 regulator-max-microvolt = <1800000>; 464 }; 465 vreg_l12a_1p8: l12 { 466 regulator-name = "vreg_l12a_1p8"; 467 regulator-min-microvolt = <1800000>; 468 regulator-max-microvolt = <1800000>; 469 regulator-allow-set-load; 470 }; 471 vreg_l13a_2p95: l13 { 472 regulator-name = "vreg_l13a_2p95"; 473 regulator-min-microvolt = <1800000>; 474 regulator-max-microvolt = <2950000>; 475 }; 476 vreg_l14a_1p8: l14 { 477 regulator-name = "vreg_l14a_1p8"; 478 regulator-min-microvolt = <1800000>; 479 regulator-max-microvolt = <1800000>; 480 }; 481 vreg_l15a_1p8: l15 { 482 regulator-name = "vreg_l15a_1p8"; 483 regulator-min-microvolt = <1800000>; 484 regulator-max-microvolt = <1800000>; 485 }; 486 vreg_l16a_2p7: l16 { 487 regulator-name = "vreg_l16a_2p7"; 488 regulator-min-microvolt = <2700000>; 489 regulator-max-microvolt = <2700000>; 490 }; 491 vreg_l19a_3p3: l19 { 492 regulator-name = "vreg_l19a_3p3"; 493 regulator-min-microvolt = <3000000>; 494 regulator-max-microvolt = <3000000>; 495 }; 496 vreg_l20a_2p95: l20 { 497 regulator-name = "vreg_l20a_2p95"; 498 regulator-min-microvolt = <2950000>; 499 regulator-max-microvolt = <2950000>; 500 regulator-allow-set-load; 501 }; 502 vreg_l21a_2p95: l21 { 503 regulator-name = "vreg_l21a_2p95"; 504 regulator-min-microvolt = <3300000>; 505 regulator-max-microvolt = <3300000>; 506 regulator-always-on; 507 }; 508 vreg_l23a_2p8: l23 { 509 regulator-name = "vreg_l23a_2p8"; 510 regulator-min-microvolt = <2800000>; 511 regulator-max-microvolt = <2800000>; 512 }; 513 vreg_l24a_3p075: l24 { 514 regulator-name = "vreg_l24a_3p075"; 515 regulator-min-microvolt = <3075000>; 516 regulator-max-microvolt = <3075000>; 517 }; 518 vreg_l25a_1p2: l25 { 519 regulator-name = "vreg_l25a_1p2"; 520 regulator-min-microvolt = <1200000>; 521 regulator-max-microvolt = <1200000>; 522 regulator-allow-set-load; 523 }; 524 vreg_l27a_1p2: l27 { 525 regulator-name = "vreg_l27a_1p2"; 526 regulator-min-microvolt = <1200000>; 527 regulator-max-microvolt = <1200000>; 528 }; 529 vreg_l28a_0p925: l28 { 530 regulator-name = "vreg_l28a_0p925"; 531 regulator-min-microvolt = <925000>; 532 regulator-max-microvolt = <925000>; 533 regulator-allow-set-load; 534 }; 535 vreg_l30a_1p8: l30 { 536 regulator-name = "vreg_l30a_1p8"; 537 regulator-min-microvolt = <1800000>; 538 regulator-max-microvolt = <1800000>; 539 540 /* Required by QCA6174a - vddio-xtal */ 541 regulator-always-on; 542 }; 543 vreg_l32a_1p8: l32 { 544 regulator-name = "vreg_l32a_1p8"; 545 regulator-min-microvolt = <1800000>; 546 regulator-max-microvolt = <1800000>; 547 }; 548 vreg_lvs1a_1p8: lvs1 { 549 regulator-min-microvolt = <1800000>; 550 regulator-max-microvolt = <1800000>; 551 }; 552 vreg_lvs2a_1p8: lvs2 { 553 regulator-min-microvolt = <1800000>; 554 regulator-max-microvolt = <1800000>; 555 }; 556 }; 557 558 pmi8994-regulators { 559 compatible = "qcom,rpm-pmi8994-regulators"; 560 561 vdd_s1-supply = <&vph_pwr>; 562 vdd_s2-supply = <&vph_pwr>; 563 vdd_s3-supply = <&vph_pwr>; 564 vdd_bst_byp-supply = <&vph_pwr>; 565 566 vreg_s1b_1p025: s1 { 567 regulator-name = "vreg_s1b_1p025"; 568 regulator-min-microvolt = <1025000>; 569 regulator-max-microvolt = <1025000>; 570 }; 571 572 vph_pwr_bbyp: boost-bypass { 573 regulator-name = "vph_pwr_bbyp"; 574 regulator-min-microvolt = <3150000>; 575 regulator-max-microvolt = <3600000>; 576 }; 577 }; 578}; 579 580&pm8994_spmi_regulators { 581 qcom,saw-reg = <&saw3>; 582 s8 { 583 qcom,saw-slave; 584 }; 585 s9 { 586 qcom,saw-slave; 587 }; 588 s10 { 589 qcom,saw-slave; 590 }; 591 vreg_apc_0p8: s11 { 592 qcom,saw-leader; 593 regulator-name = "vreg_apc_0p8"; 594 regulator-min-microvolt = <470000>; 595 regulator-max-microvolt = <1140000>; 596 regulator-max-step-microvolt = <150000>; 597 regulator-always-on; 598 }; 599}; 600 601&pmi8994_spmi_regulators { 602 vdd_gfx: s2 { 603 regulator-name = "vdd_gfx"; 604 regulator-min-microvolt = <400000>; 605 regulator-max-microvolt = <1015000>; 606 regulator-enable-ramp-delay = <500>; 607 }; 608}; 609 610&pm8994_gpios { 611 wlan_en_default: wlan-en-state { 612 pins = "gpio8"; 613 function = PMIC_GPIO_FUNC_NORMAL; 614 output-low; 615 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; 616 power-source = <PM8994_GPIO_S4>; 617 bias-disable; 618 }; 619 620 rome_enable_default: rome-enable-state { 621 pins = "gpio9"; 622 function = PMIC_GPIO_FUNC_NORMAL; 623 output-high; 624 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; 625 power-source = <PM8994_GPIO_VPH>; 626 }; 627 628 divclk1_default: divclk1-state { 629 pins = "gpio15"; 630 function = PMIC_GPIO_FUNC_FUNC1; 631 bias-disable; 632 power-source = <PM8994_GPIO_S4>; 633 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; 634 }; 635 636 divclk4_pin_a: divclk4-state { 637 pins = "gpio18"; 638 function = PMIC_GPIO_FUNC_FUNC2; 639 bias-disable; 640 power-source = <PM8994_GPIO_S4>; 641 }; 642}; 643 644&tlmm { 645 mdss_dsi_default: mdss_dsi_default { 646 pins = "gpio8"; 647 function = "gpio"; 648 drive-strength = <8>; 649 bias-disable; 650 }; 651 652 mdss_dsi_sleep: mdss_dsi_sleep { 653 pins = "gpio8"; 654 function = "gpio"; 655 drive-strength = <2>; 656 bias-pull-down; 657 }; 658 659 mdss_te_default: mdss_te_default { 660 pins = "gpio10"; 661 function = "mdp_vsync"; 662 drive-strength = <2>; 663 bias-pull-down; 664 }; 665 666 mdss_te_sleep: mdss_te_sleep { 667 pins = "gpio10"; 668 function = "mdp_vsync"; 669 drive-strength = <2>; 670 bias-pull-down; 671 }; 672 673 nfc_default: nfc_default { 674 pins = "gpio12", "gpio21"; 675 function = "gpio"; 676 drive-strength = <16>; 677 bias-pull-up; 678 }; 679}; 680