1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * SC7180 IDP board device tree source 4 * 5 * Copyright (c) 2019, The Linux Foundation. All rights reserved. 6 */ 7 8/dts-v1/; 9 10#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 12#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 13#include "sc7180.dtsi" 14#include "pm6150.dtsi" 15#include "pm6150l.dtsi" 16 17/ { 18 model = "Qualcomm Technologies, Inc. SC7180 IDP"; 19 compatible = "qcom,sc7180-idp", "qcom,sc7180"; 20 21 aliases { 22 bluetooth0 = &bluetooth; 23 hsuart0 = &uart3; 24 serial0 = &uart8; 25 wifi0 = &wifi; 26 }; 27 28 chosen { 29 stdout-path = "serial0:115200n8"; 30 }; 31}; 32 33/* 34 * Reserved memory changes 35 * 36 * Delete all unused memory nodes and define the peripheral memory regions 37 * required by the board dts. 38 * 39 */ 40 41/delete-node/ &hyp_mem; 42/delete-node/ &xbl_mem; 43/delete-node/ &aop_mem; 44/delete-node/ &sec_apps_mem; 45/delete-node/ &tz_mem; 46 47/* Increase the size from 2MB to 8MB */ 48&rmtfs_mem { 49 reg = <0x0 0x94600000 0x0 0x800000>; 50}; 51 52/ { 53 reserved-memory { 54 atf_mem: memory@80b00000 { 55 reg = <0x0 0x80b00000 0x0 0x100000>; 56 no-map; 57 }; 58 59 mpss_mem: memory@86000000 { 60 reg = <0x0 0x86000000 0x0 0x8c00000>; 61 no-map; 62 }; 63 64 camera_mem: memory@8ec00000 { 65 reg = <0x0 0x8ec00000 0x0 0x500000>; 66 no-map; 67 }; 68 69 venus_mem: memory@8f600000 { 70 reg = <0 0x8f600000 0 0x500000>; 71 no-map; 72 }; 73 74 wlan_mem: memory@94100000 { 75 reg = <0x0 0x94100000 0x0 0x200000>; 76 no-map; 77 }; 78 79 mba_mem: memory@94400000 { 80 reg = <0x0 0x94400000 0x0 0x200000>; 81 no-map; 82 }; 83 }; 84}; 85 86&apps_rsc { 87 pm6150-rpmh-regulators { 88 compatible = "qcom,pm6150-rpmh-regulators"; 89 qcom,pmic-id = "a"; 90 91 vreg_s1a_1p1: smps1 { 92 regulator-min-microvolt = <1128000>; 93 regulator-max-microvolt = <1128000>; 94 }; 95 96 vreg_s4a_1p0: smps4 { 97 regulator-min-microvolt = <824000>; 98 regulator-max-microvolt = <1120000>; 99 }; 100 101 vreg_s5a_2p0: smps5 { 102 regulator-min-microvolt = <1744000>; 103 regulator-max-microvolt = <2040000>; 104 }; 105 106 vreg_l1a_1p2: ldo1 { 107 regulator-min-microvolt = <1178000>; 108 regulator-max-microvolt = <1256000>; 109 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 110 }; 111 112 vreg_l2a_1p0: ldo2 { 113 regulator-min-microvolt = <944000>; 114 regulator-max-microvolt = <1056000>; 115 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 116 }; 117 118 vreg_l3a_1p0: ldo3 { 119 regulator-min-microvolt = <968000>; 120 regulator-max-microvolt = <1064000>; 121 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 122 }; 123 124 vreg_l4a_0p8: ldo4 { 125 regulator-min-microvolt = <824000>; 126 regulator-max-microvolt = <928000>; 127 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 128 }; 129 130 vreg_l5a_2p7: ldo5 { 131 regulator-min-microvolt = <2496000>; 132 regulator-max-microvolt = <3000000>; 133 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 134 }; 135 136 vreg_l6a_0p6: ldo6 { 137 regulator-min-microvolt = <568000>; 138 regulator-max-microvolt = <648000>; 139 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 140 }; 141 142 vreg_l9a_0p6: ldo9 { 143 regulator-min-microvolt = <488000>; 144 regulator-max-microvolt = <800000>; 145 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 146 }; 147 148 vreg_l10a_1p8: ldo10 { 149 regulator-min-microvolt = <1800000>; 150 regulator-max-microvolt = <1832000>; 151 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 152 }; 153 154 vreg_l11a_1p8: ldo11 { 155 regulator-min-microvolt = <1696000>; 156 regulator-max-microvolt = <1904000>; 157 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 158 }; 159 160 vreg_l12a_1p8: ldo12 { 161 regulator-min-microvolt = <1800000>; 162 regulator-max-microvolt = <1800000>; 163 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 164 }; 165 166 vreg_l13a_1p8: ldo13 { 167 regulator-min-microvolt = <1696000>; 168 regulator-max-microvolt = <1904000>; 169 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 170 }; 171 172 vreg_l14a_1p8: ldo14 { 173 regulator-min-microvolt = <1728000>; 174 regulator-max-microvolt = <1832000>; 175 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 176 }; 177 178 vreg_l15a_1p8: ldo15 { 179 regulator-min-microvolt = <1696000>; 180 regulator-max-microvolt = <1904000>; 181 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 182 }; 183 184 vreg_l16a_2p7: ldo16 { 185 regulator-min-microvolt = <2496000>; 186 regulator-max-microvolt = <3304000>; 187 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 188 }; 189 190 vreg_l17a_3p0: ldo17 { 191 regulator-min-microvolt = <2920000>; 192 regulator-max-microvolt = <3232000>; 193 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 194 }; 195 196 vreg_l18a_2p8: ldo18 { 197 regulator-min-microvolt = <2496000>; 198 regulator-max-microvolt = <3304000>; 199 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 200 }; 201 202 vreg_l19a_2p9: ldo19 { 203 regulator-min-microvolt = <2960000>; 204 regulator-max-microvolt = <2960000>; 205 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 206 }; 207 }; 208 209 pm6150l-rpmh-regulators { 210 compatible = "qcom,pm6150l-rpmh-regulators"; 211 qcom,pmic-id = "c"; 212 213 vreg_s8c_1p3: smps8 { 214 regulator-min-microvolt = <1120000>; 215 regulator-max-microvolt = <1408000>; 216 }; 217 218 vreg_l1c_1p8: ldo1 { 219 regulator-min-microvolt = <1616000>; 220 regulator-max-microvolt = <1984000>; 221 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 222 }; 223 224 vreg_l2c_1p3: ldo2 { 225 regulator-min-microvolt = <1168000>; 226 regulator-max-microvolt = <1304000>; 227 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 228 }; 229 230 vreg_l3c_1p2: ldo3 { 231 regulator-min-microvolt = <1144000>; 232 regulator-max-microvolt = <1304000>; 233 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 234 }; 235 236 vreg_l4c_1p8: ldo4 { 237 regulator-min-microvolt = <1648000>; 238 regulator-max-microvolt = <3304000>; 239 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 240 }; 241 242 vreg_l5c_1p8: ldo5 { 243 regulator-min-microvolt = <1648000>; 244 regulator-max-microvolt = <3304000>; 245 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 246 }; 247 248 vreg_l6c_2p9: ldo6 { 249 regulator-min-microvolt = <1800000>; 250 regulator-max-microvolt = <2950000>; 251 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 252 }; 253 254 vreg_l7c_3p0: ldo7 { 255 regulator-min-microvolt = <3000000>; 256 regulator-max-microvolt = <3312000>; 257 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 258 }; 259 260 vreg_l8c_1p8: ldo8 { 261 regulator-min-microvolt = <1800000>; 262 regulator-max-microvolt = <1904000>; 263 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 264 }; 265 266 vreg_l9c_2p9: ldo9 { 267 regulator-min-microvolt = <2960000>; 268 regulator-max-microvolt = <2960000>; 269 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 270 }; 271 272 vreg_l10c_3p3: ldo10 { 273 regulator-min-microvolt = <3000000>; 274 regulator-max-microvolt = <3400000>; 275 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 276 }; 277 278 vreg_l11c_3p3: ldo11 { 279 regulator-min-microvolt = <3000000>; 280 regulator-max-microvolt = <3400000>; 281 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 282 }; 283 284 vreg_bob: bob { 285 regulator-min-microvolt = <3008000>; 286 regulator-max-microvolt = <3960000>; 287 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 288 }; 289 }; 290}; 291 292&dsi0 { 293 status = "okay"; 294 295 vdda-supply = <&vreg_l3c_1p2>; 296 297 panel@0 { 298 compatible = "visionox,rm69299-1080p-display"; 299 reg = <0>; 300 301 vdda-supply = <&vreg_l8c_1p8>; 302 vdd3p3-supply = <&vreg_l18a_2p8>; 303 304 pinctrl-names = "default"; 305 pinctrl-0 = <&disp_pins>; 306 307 reset-gpios = <&pm6150l_gpio 3 GPIO_ACTIVE_HIGH>; 308 309 ports { 310 #address-cells = <1>; 311 #size-cells = <0>; 312 port@0 { 313 reg = <0>; 314 panel0_in: endpoint { 315 remote-endpoint = <&dsi0_out>; 316 }; 317 }; 318 }; 319 }; 320 321 ports { 322 port@1 { 323 endpoint { 324 remote-endpoint = <&panel0_in>; 325 data-lanes = <0 1 2 3>; 326 }; 327 }; 328 }; 329}; 330 331&dsi_phy { 332 status = "okay"; 333}; 334 335&mdp { 336 status = "okay"; 337}; 338 339&mdss { 340 status = "okay"; 341}; 342 343&qfprom { 344 vcc-supply = <&vreg_l11a_1p8>; 345}; 346 347&qspi { 348 status = "okay"; 349 pinctrl-names = "default"; 350 pinctrl-0 = <&qspi_clk &qspi_cs0 &qspi_data01>; 351 352 flash@0 { 353 compatible = "jedec,spi-nor"; 354 reg = <0>; 355 spi-max-frequency = <25000000>; 356 spi-tx-bus-width = <2>; 357 spi-rx-bus-width = <2>; 358 }; 359}; 360 361&qupv3_id_0 { 362 status = "okay"; 363}; 364 365&qupv3_id_1 { 366 status = "okay"; 367}; 368 369&remoteproc_mpss { 370 status = "okay"; 371 compatible = "qcom,sc7180-mss-pil"; 372 iommus = <&apps_smmu 0x461 0x0>, <&apps_smmu 0x444 0x3>; 373 memory-region = <&mba_mem &mpss_mem>; 374}; 375 376&sdhc_1 { 377 status = "okay"; 378 379 pinctrl-names = "default", "sleep"; 380 pinctrl-0 = <&sdc1_on>; 381 pinctrl-1 = <&sdc1_off>; 382 vmmc-supply = <&vreg_l19a_2p9>; 383 vqmmc-supply = <&vreg_l12a_1p8>; 384}; 385 386&sdhc_2 { 387 status = "okay"; 388 389 pinctrl-names = "default","sleep"; 390 pinctrl-0 = <&sdc2_on>; 391 pinctrl-1 = <&sdc2_off>; 392 vmmc-supply = <&vreg_l9c_2p9>; 393 vqmmc-supply = <&vreg_l6c_2p9>; 394 395 cd-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>; 396}; 397 398&uart3 { 399 status = "okay"; 400 401 /delete-property/interrupts; 402 interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>, 403 <&tlmm 41 IRQ_TYPE_EDGE_FALLING>; 404 405 pinctrl-names = "default", "sleep"; 406 pinctrl-1 = <&qup_uart3_sleep>; 407 408 bluetooth: wcn3990-bt { 409 compatible = "qcom,wcn3990-bt"; 410 vddio-supply = <&vreg_l10a_1p8>; 411 vddxo-supply = <&vreg_l1c_1p8>; 412 vddrf-supply = <&vreg_l2c_1p3>; 413 vddch0-supply = <&vreg_l10c_3p3>; 414 max-speed = <3200000>; 415 }; 416}; 417 418&uart8 { 419 status = "okay"; 420}; 421 422&usb_1 { 423 status = "okay"; 424}; 425 426&usb_1_dwc3 { 427 dr_mode = "host"; 428}; 429 430&usb_1_hsphy { 431 status = "okay"; 432 vdd-supply = <&vreg_l4a_0p8>; 433 vdda-pll-supply = <&vreg_l11a_1p8>; 434 vdda-phy-dpdm-supply = <&vreg_l17a_3p0>; 435 qcom,imp-res-offset-value = <8>; 436 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_15_PERCENT>; 437 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>; 438 qcom,bias-ctrl-value = <0x22>; 439 qcom,charge-ctrl-value = <3>; 440 qcom,hsdisc-trim-value = <0>; 441}; 442 443&usb_1_qmpphy { 444 status = "okay"; 445 vdda-phy-supply = <&vreg_l3c_1p2>; 446 vdda-pll-supply = <&vreg_l4a_0p8>; 447}; 448 449&venus { 450 video-firmware { 451 iommus = <&apps_smmu 0x0c42 0x0>; 452 }; 453}; 454 455&wifi { 456 status = "okay"; 457 vdd-0.8-cx-mx-supply = <&vreg_l9a_0p6>; 458 vdd-1.8-xo-supply = <&vreg_l1c_1p8>; 459 vdd-1.3-rfa-supply = <&vreg_l2c_1p3>; 460 vdd-3.3-ch0-supply = <&vreg_l10c_3p3>; 461 vdd-3.3-ch1-supply = <&vreg_l11c_3p3>; 462 wifi-firmware { 463 iommus = <&apps_smmu 0xc2 0x1>; 464 }; 465}; 466 467/* PINCTRL - additions to nodes defined in sc7180.dtsi */ 468 469&pm6150l_gpio { 470 disp_pins: disp-pins { 471 pinconf { 472 pins = "gpio3"; 473 function = PMIC_GPIO_FUNC_FUNC1; 474 qcom,drive-strength = <PMIC_GPIO_STRENGTH_MED>; 475 power-source = <0>; 476 bias-disable; 477 output-low; 478 }; 479 }; 480}; 481 482&qspi_clk { 483 pinconf { 484 pins = "gpio63"; 485 bias-disable; 486 }; 487}; 488 489&qspi_cs0 { 490 pinconf { 491 pins = "gpio68"; 492 bias-disable; 493 }; 494}; 495 496&qspi_data01 { 497 pinconf { 498 pins = "gpio64", "gpio65"; 499 500 /* High-Z when no transfers; nice to park the lines */ 501 bias-pull-up; 502 }; 503}; 504 505&qup_i2c2_default { 506 pinconf { 507 pins = "gpio15", "gpio16"; 508 drive-strength = <2>; 509 510 /* Has external pullup */ 511 bias-disable; 512 }; 513}; 514 515&qup_i2c4_default { 516 pinconf { 517 pins = "gpio115", "gpio116"; 518 drive-strength = <2>; 519 520 /* Has external pullup */ 521 bias-disable; 522 }; 523}; 524 525&qup_i2c7_default { 526 pinconf { 527 pins = "gpio6", "gpio7"; 528 drive-strength = <2>; 529 530 /* Has external pullup */ 531 bias-disable; 532 }; 533}; 534 535&qup_i2c9_default { 536 pinconf { 537 pins = "gpio46", "gpio47"; 538 drive-strength = <2>; 539 540 /* Has external pullup */ 541 bias-disable; 542 }; 543}; 544 545&qup_uart3_default { 546 pinconf-cts { 547 /* 548 * Configure a pull-down on CTS to match the pull of 549 * the Bluetooth module. 550 */ 551 pins = "gpio38"; 552 bias-pull-down; 553 }; 554 555 pinconf-rts { 556 /* We'll drive RTS, so no pull */ 557 pins = "gpio39"; 558 drive-strength = <2>; 559 bias-disable; 560 }; 561 562 pinconf-tx { 563 /* We'll drive TX, so no pull */ 564 pins = "gpio40"; 565 drive-strength = <2>; 566 bias-disable; 567 }; 568 569 pinconf-rx { 570 /* 571 * Configure a pull-up on RX. This is needed to avoid 572 * garbage data when the TX pin of the Bluetooth module is 573 * in tri-state (module powered off or not driving the 574 * signal yet). 575 */ 576 pins = "gpio41"; 577 bias-pull-up; 578 }; 579}; 580 581&qup_uart8_default { 582 pinconf-tx { 583 pins = "gpio44"; 584 drive-strength = <2>; 585 bias-disable; 586 }; 587 588 pinconf-rx { 589 pins = "gpio45"; 590 drive-strength = <2>; 591 bias-pull-up; 592 }; 593}; 594 595&qup_spi0_default { 596 pinconf { 597 pins = "gpio34", "gpio35", "gpio36", "gpio37"; 598 drive-strength = <2>; 599 bias-disable; 600 }; 601}; 602 603&qup_spi6_default { 604 pinconf { 605 pins = "gpio59", "gpio60", "gpio61", "gpio62"; 606 drive-strength = <2>; 607 bias-disable; 608 }; 609}; 610 611&qup_spi10_default { 612 pinconf { 613 pins = "gpio86", "gpio87", "gpio88", "gpio89"; 614 drive-strength = <2>; 615 bias-disable; 616 }; 617}; 618 619&tlmm { 620 qup_uart3_sleep: qup-uart3-sleep { 621 pinmux { 622 pins = "gpio38", "gpio39", 623 "gpio40", "gpio41"; 624 function = "gpio"; 625 }; 626 627 pinconf-cts { 628 /* 629 * Configure a pull-down on CTS to match the pull of 630 * the Bluetooth module. 631 */ 632 pins = "gpio38"; 633 bias-pull-down; 634 }; 635 636 pinconf-rts { 637 /* 638 * Configure pull-down on RTS. As RTS is active low 639 * signal, pull it low to indicate the BT SoC that it 640 * can wakeup the system anytime from suspend state by 641 * pulling RX low (by sending wakeup bytes). 642 */ 643 pins = "gpio39"; 644 bias-pull-down; 645 }; 646 647 pinconf-tx { 648 /* 649 * Configure pull-up on TX when it isn't actively driven 650 * to prevent BT SoC from receiving garbage during sleep. 651 */ 652 pins = "gpio40"; 653 bias-pull-up; 654 }; 655 656 pinconf-rx { 657 /* 658 * Configure a pull-up on RX. This is needed to avoid 659 * garbage data when the TX pin of the Bluetooth module 660 * is floating which may cause spurious wakeups. 661 */ 662 pins = "gpio41"; 663 bias-pull-up; 664 }; 665 }; 666 667 sdc1_on: sdc1-on { 668 pinconf-clk { 669 pins = "sdc1_clk"; 670 bias-disable; 671 drive-strength = <16>; 672 }; 673 674 pinconf-cmd { 675 pins = "sdc1_cmd"; 676 bias-pull-up; 677 drive-strength = <10>; 678 }; 679 680 pinconf-data { 681 pins = "sdc1_data"; 682 bias-pull-up; 683 drive-strength = <10>; 684 }; 685 686 pinconf-rclk { 687 pins = "sdc1_rclk"; 688 bias-pull-down; 689 }; 690 }; 691 692 sdc1_off: sdc1-off { 693 pinconf-clk { 694 pins = "sdc1_clk"; 695 bias-disable; 696 drive-strength = <2>; 697 }; 698 699 pinconf-cmd { 700 pins = "sdc1_cmd"; 701 bias-pull-up; 702 drive-strength = <2>; 703 }; 704 705 pinconf-data { 706 pins = "sdc1_data"; 707 bias-pull-up; 708 drive-strength = <2>; 709 }; 710 711 pinconf-rclk { 712 pins = "sdc1_rclk"; 713 bias-pull-down; 714 }; 715 }; 716 717 sdc2_on: sdc2-on { 718 pinconf-clk { 719 pins = "sdc2_clk"; 720 bias-disable; 721 drive-strength = <16>; 722 }; 723 724 pinconf-cmd { 725 pins = "sdc2_cmd"; 726 bias-pull-up; 727 drive-strength = <10>; 728 }; 729 730 pinconf-data { 731 pins = "sdc2_data"; 732 bias-pull-up; 733 drive-strength = <10>; 734 }; 735 736 pinconf-sd-cd { 737 pins = "gpio69"; 738 bias-pull-up; 739 drive-strength = <2>; 740 }; 741 }; 742 743 sdc2_off: sdc2-off { 744 pinconf-clk { 745 pins = "sdc2_clk"; 746 bias-disable; 747 drive-strength = <2>; 748 }; 749 750 pinconf-cmd { 751 pins = "sdc2_cmd"; 752 bias-pull-up; 753 drive-strength = <2>; 754 }; 755 756 pinconf-data { 757 pins = "sdc2_data"; 758 bias-pull-up; 759 drive-strength = <2>; 760 }; 761 762 pinconf-sd-cd { 763 pins = "gpio69"; 764 bias-pull-up; 765 drive-strength = <2>; 766 }; 767 }; 768}; 769