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