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