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 "sc7180.dtsi" 13#include "pm6150.dtsi" 14#include "pm6150l.dtsi" 15 16/ { 17 model = "Qualcomm Technologies, Inc. SC7180 IDP"; 18 compatible = "qcom,sc7180-idp", "qcom,sc7180"; 19 20 aliases { 21 bluetooth0 = &bluetooth; 22 hsuart0 = &uart3; 23 serial0 = &uart8; 24 wifi0 = &wifi; 25 }; 26 27 chosen { 28 stdout-path = "serial0:115200n8"; 29 }; 30}; 31 32/* 33 * Reserved memory changes 34 * 35 * Delete all unused memory nodes and define the peripheral memory regions 36 * required by the board dts. 37 * 38 */ 39 40/delete-node/ &hyp_mem; 41/delete-node/ &xbl_mem; 42/delete-node/ &aop_mem; 43/delete-node/ &sec_apps_mem; 44/delete-node/ &tz_mem; 45 46/* Increase the size from 2MB to 8MB */ 47&rmtfs_mem { 48 reg = <0x0 0x84400000 0x0 0x800000>; 49}; 50 51/ { 52 reserved-memory { 53 atf_mem: memory@80b00000 { 54 reg = <0x0 0x80b00000 0x0 0x100000>; 55 no-map; 56 }; 57 58 mpss_mem: memory@86000000 { 59 reg = <0x0 0x86000000 0x0 0x8c00000>; 60 no-map; 61 }; 62 63 camera_mem: memory@8ec00000 { 64 reg = <0x0 0x8ec00000 0x0 0x500000>; 65 no-map; 66 }; 67 68 venus_mem: memory@8f600000 { 69 reg = <0 0x8f600000 0 0x500000>; 70 no-map; 71 }; 72 73 wlan_mem: memory@94100000 { 74 reg = <0x0 0x94100000 0x0 0x200000>; 75 no-map; 76 }; 77 78 mba_mem: memory@94400000 { 79 reg = <0x0 0x94400000 0x0 0x200000>; 80 no-map; 81 }; 82 }; 83}; 84 85&apps_rsc { 86 pm6150-rpmh-regulators { 87 compatible = "qcom,pm6150-rpmh-regulators"; 88 qcom,pmic-id = "a"; 89 90 vreg_s1a_1p1: smps1 { 91 regulator-min-microvolt = <1128000>; 92 regulator-max-microvolt = <1128000>; 93 }; 94 95 vreg_s4a_1p0: smps4 { 96 regulator-min-microvolt = <824000>; 97 regulator-max-microvolt = <1120000>; 98 }; 99 100 vreg_s5a_2p0: smps5 { 101 regulator-min-microvolt = <1744000>; 102 regulator-max-microvolt = <2040000>; 103 }; 104 105 vreg_l1a_1p2: ldo1 { 106 regulator-min-microvolt = <1178000>; 107 regulator-max-microvolt = <1256000>; 108 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 109 }; 110 111 vreg_l2a_1p0: ldo2 { 112 regulator-min-microvolt = <944000>; 113 regulator-max-microvolt = <1056000>; 114 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 115 }; 116 117 vreg_l3a_1p0: ldo3 { 118 regulator-min-microvolt = <968000>; 119 regulator-max-microvolt = <1064000>; 120 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 121 }; 122 123 vreg_l4a_0p8: ldo4 { 124 regulator-min-microvolt = <824000>; 125 regulator-max-microvolt = <928000>; 126 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 127 }; 128 129 vreg_l5a_2p7: ldo5 { 130 regulator-min-microvolt = <2496000>; 131 regulator-max-microvolt = <3000000>; 132 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 133 }; 134 135 vreg_l6a_0p6: ldo6 { 136 regulator-min-microvolt = <568000>; 137 regulator-max-microvolt = <648000>; 138 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 139 }; 140 141 vreg_l9a_0p6: ldo9 { 142 regulator-min-microvolt = <488000>; 143 regulator-max-microvolt = <800000>; 144 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 145 }; 146 147 vreg_l10a_1p8: ldo10 { 148 regulator-min-microvolt = <1800000>; 149 regulator-max-microvolt = <1832000>; 150 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 151 }; 152 153 vreg_l11a_1p8: ldo11 { 154 regulator-min-microvolt = <1696000>; 155 regulator-max-microvolt = <1904000>; 156 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 157 }; 158 159 vreg_l12a_1p8: ldo12 { 160 regulator-min-microvolt = <1800000>; 161 regulator-max-microvolt = <1800000>; 162 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 163 }; 164 165 vreg_l13a_1p8: ldo13 { 166 regulator-min-microvolt = <1696000>; 167 regulator-max-microvolt = <1904000>; 168 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 169 }; 170 171 vreg_l14a_1p8: ldo14 { 172 regulator-min-microvolt = <1728000>; 173 regulator-max-microvolt = <1832000>; 174 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 175 }; 176 177 vreg_l15a_1p8: ldo15 { 178 regulator-min-microvolt = <1696000>; 179 regulator-max-microvolt = <1904000>; 180 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 181 }; 182 183 vreg_l16a_2p7: ldo16 { 184 regulator-min-microvolt = <2496000>; 185 regulator-max-microvolt = <3304000>; 186 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 187 }; 188 189 vreg_l17a_3p0: ldo17 { 190 regulator-min-microvolt = <2920000>; 191 regulator-max-microvolt = <3232000>; 192 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 193 }; 194 195 vreg_l18a_2p8: ldo18 { 196 regulator-min-microvolt = <2496000>; 197 regulator-max-microvolt = <3304000>; 198 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 199 }; 200 201 vreg_l19a_2p9: ldo19 { 202 regulator-min-microvolt = <2960000>; 203 regulator-max-microvolt = <2960000>; 204 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 205 }; 206 }; 207 208 pm6150l-rpmh-regulators { 209 compatible = "qcom,pm6150l-rpmh-regulators"; 210 qcom,pmic-id = "c"; 211 212 vreg_s8c_1p3: smps8 { 213 regulator-min-microvolt = <1120000>; 214 regulator-max-microvolt = <1408000>; 215 }; 216 217 vreg_l1c_1p8: ldo1 { 218 regulator-min-microvolt = <1616000>; 219 regulator-max-microvolt = <1984000>; 220 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 221 }; 222 223 vreg_l2c_1p3: ldo2 { 224 regulator-min-microvolt = <1168000>; 225 regulator-max-microvolt = <1304000>; 226 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 227 }; 228 229 vreg_l3c_1p2: ldo3 { 230 regulator-min-microvolt = <1144000>; 231 regulator-max-microvolt = <1304000>; 232 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 233 }; 234 235 vreg_l4c_1p8: ldo4 { 236 regulator-min-microvolt = <1648000>; 237 regulator-max-microvolt = <3304000>; 238 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 239 }; 240 241 vreg_l5c_1p8: ldo5 { 242 regulator-min-microvolt = <1648000>; 243 regulator-max-microvolt = <3304000>; 244 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 245 }; 246 247 vreg_l6c_2p9: ldo6 { 248 regulator-min-microvolt = <1800000>; 249 regulator-max-microvolt = <2950000>; 250 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 251 }; 252 253 vreg_l7c_3p0: ldo7 { 254 regulator-min-microvolt = <3000000>; 255 regulator-max-microvolt = <3312000>; 256 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 257 }; 258 259 vreg_l8c_1p8: ldo8 { 260 regulator-min-microvolt = <1800000>; 261 regulator-max-microvolt = <1904000>; 262 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 263 }; 264 265 vreg_l9c_2p9: ldo9 { 266 regulator-min-microvolt = <2960000>; 267 regulator-max-microvolt = <2960000>; 268 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 269 }; 270 271 vreg_l10c_3p3: ldo10 { 272 regulator-min-microvolt = <3000000>; 273 regulator-max-microvolt = <3400000>; 274 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 275 }; 276 277 vreg_l11c_3p3: ldo11 { 278 regulator-min-microvolt = <3000000>; 279 regulator-max-microvolt = <3400000>; 280 regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>; 281 }; 282 283 vreg_bob: bob { 284 regulator-min-microvolt = <3008000>; 285 regulator-max-microvolt = <3960000>; 286 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 287 }; 288 }; 289}; 290 291&qfprom { 292 vcc-supply = <&vreg_l11a_1p8>; 293}; 294 295&qspi { 296 status = "okay"; 297 pinctrl-names = "default"; 298 pinctrl-0 = <&qspi_clk &qspi_cs0 &qspi_data01>; 299 300 flash@0 { 301 compatible = "jedec,spi-nor"; 302 reg = <0>; 303 spi-max-frequency = <25000000>; 304 spi-tx-bus-width = <2>; 305 spi-rx-bus-width = <2>; 306 }; 307}; 308 309&qupv3_id_0 { 310 status = "okay"; 311}; 312 313&qupv3_id_1 { 314 status = "okay"; 315}; 316 317&remoteproc_mpss { 318 status = "okay"; 319 compatible = "qcom,sc7180-mss-pil"; 320 iommus = <&apps_smmu 0x461 0x0>, <&apps_smmu 0x444 0x3>; 321 memory-region = <&mba_mem &mpss_mem>; 322}; 323 324&sdhc_1 { 325 status = "okay"; 326 327 pinctrl-names = "default", "sleep"; 328 pinctrl-0 = <&sdc1_on>; 329 pinctrl-1 = <&sdc1_off>; 330 vmmc-supply = <&vreg_l19a_2p9>; 331 vqmmc-supply = <&vreg_l12a_1p8>; 332}; 333 334&sdhc_2 { 335 status = "okay"; 336 337 pinctrl-names = "default","sleep"; 338 pinctrl-0 = <&sdc2_on>; 339 pinctrl-1 = <&sdc2_off>; 340 vmmc-supply = <&vreg_l9c_2p9>; 341 vqmmc-supply = <&vreg_l6c_2p9>; 342 343 cd-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>; 344}; 345 346&uart3 { 347 status = "okay"; 348 349 bluetooth: wcn3990-bt { 350 compatible = "qcom,wcn3990-bt"; 351 vddio-supply = <&vreg_l10a_1p8>; 352 vddxo-supply = <&vreg_l1c_1p8>; 353 vddrf-supply = <&vreg_l2c_1p3>; 354 vddch0-supply = <&vreg_l10c_3p3>; 355 max-speed = <3200000>; 356 clocks = <&rpmhcc RPMH_RF_CLK2>; 357 }; 358}; 359 360&uart8 { 361 status = "okay"; 362}; 363 364&usb_1 { 365 status = "okay"; 366}; 367 368&usb_1_dwc3 { 369 dr_mode = "host"; 370}; 371 372&usb_1_hsphy { 373 status = "okay"; 374 vdd-supply = <&vreg_l4a_0p8>; 375 vdda-pll-supply = <&vreg_l11a_1p8>; 376 vdda-phy-dpdm-supply = <&vreg_l17a_3p0>; 377 qcom,imp-res-offset-value = <8>; 378 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_15_PERCENT>; 379 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>; 380 qcom,bias-ctrl-value = <0x22>; 381 qcom,charge-ctrl-value = <3>; 382 qcom,hsdisc-trim-value = <0>; 383}; 384 385&usb_1_qmpphy { 386 status = "okay"; 387 vdda-phy-supply = <&vreg_l3c_1p2>; 388 vdda-pll-supply = <&vreg_l4a_0p8>; 389}; 390 391&venus { 392 video-firmware { 393 iommus = <&apps_smmu 0x0c42 0x0>; 394 }; 395}; 396 397&wifi { 398 status = "okay"; 399 vdd-0.8-cx-mx-supply = <&vreg_l9a_0p6>; 400 vdd-1.8-xo-supply = <&vreg_l1c_1p8>; 401 vdd-1.3-rfa-supply = <&vreg_l2c_1p3>; 402 vdd-3.3-ch0-supply = <&vreg_l10c_3p3>; 403 vdd-3.3-ch1-supply = <&vreg_l11c_3p3>; 404 wifi-firmware { 405 iommus = <&apps_smmu 0xc2 0x1>; 406 }; 407}; 408 409/* PINCTRL - additions to nodes defined in sc7180.dtsi */ 410 411&qspi_clk { 412 pinconf { 413 pins = "gpio63"; 414 bias-disable; 415 }; 416}; 417 418&qspi_cs0 { 419 pinconf { 420 pins = "gpio68"; 421 bias-disable; 422 }; 423}; 424 425&qspi_data01 { 426 pinconf { 427 pins = "gpio64", "gpio65"; 428 429 /* High-Z when no transfers; nice to park the lines */ 430 bias-pull-up; 431 }; 432}; 433 434&qup_i2c2_default { 435 pinconf { 436 pins = "gpio15", "gpio16"; 437 drive-strength = <2>; 438 439 /* Has external pullup */ 440 bias-disable; 441 }; 442}; 443 444&qup_i2c4_default { 445 pinconf { 446 pins = "gpio115", "gpio116"; 447 drive-strength = <2>; 448 449 /* Has external pullup */ 450 bias-disable; 451 }; 452}; 453 454&qup_i2c7_default { 455 pinconf { 456 pins = "gpio6", "gpio7"; 457 drive-strength = <2>; 458 459 /* Has external pullup */ 460 bias-disable; 461 }; 462}; 463 464&qup_i2c9_default { 465 pinconf { 466 pins = "gpio46", "gpio47"; 467 drive-strength = <2>; 468 469 /* Has external pullup */ 470 bias-disable; 471 }; 472}; 473 474&qup_uart3_default { 475 pinconf-cts { 476 /* 477 * Configure a pull-down on 38 (CTS) to match the pull of 478 * the Bluetooth module. 479 */ 480 pins = "gpio38"; 481 bias-pull-down; 482 output-high; 483 }; 484 485 pinconf-rts { 486 /* We'll drive 39 (RTS), so no pull */ 487 pins = "gpio39"; 488 drive-strength = <2>; 489 bias-disable; 490 }; 491 492 pinconf-tx { 493 /* We'll drive 40 (TX), so no pull */ 494 pins = "gpio40"; 495 drive-strength = <2>; 496 bias-disable; 497 output-high; 498 }; 499 500 pinconf-rx { 501 /* 502 * Configure a pull-up on 41 (RX). This is needed to avoid 503 * garbage data when the TX pin of the Bluetooth module is 504 * in tri-state (module powered off or not driving the 505 * signal yet). 506 */ 507 pins = "gpio41"; 508 bias-pull-up; 509 }; 510}; 511 512&qup_uart8_default { 513 pinconf-tx { 514 pins = "gpio44"; 515 drive-strength = <2>; 516 bias-disable; 517 }; 518 519 pinconf-rx { 520 pins = "gpio45"; 521 drive-strength = <2>; 522 bias-pull-up; 523 }; 524}; 525 526&qup_spi0_default { 527 pinconf { 528 pins = "gpio34", "gpio35", "gpio36", "gpio37"; 529 drive-strength = <2>; 530 bias-disable; 531 }; 532}; 533 534&qup_spi6_default { 535 pinconf { 536 pins = "gpio59", "gpio60", "gpio61", "gpio62"; 537 drive-strength = <2>; 538 bias-disable; 539 }; 540}; 541 542&qup_spi10_default { 543 pinconf { 544 pins = "gpio86", "gpio87", "gpio88", "gpio89"; 545 drive-strength = <2>; 546 bias-disable; 547 }; 548}; 549 550