1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * sc7280 IDP board device tree source (common between SKU1 and SKU2) 4 * 5 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 6 */ 7 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h> 10#include <dt-bindings/input/linux-event-codes.h> 11#include "sc7280.dtsi" 12#include "pm7325.dtsi" 13#include "pm8350c.dtsi" 14#include "pmk8350.dtsi" 15 16/ { 17 gpio-keys { 18 compatible = "gpio-keys"; 19 label = "gpio-keys"; 20 21 pinctrl-names = "default"; 22 pinctrl-0 = <&key_vol_up_default>; 23 24 volume-up { 25 label = "volume_up"; 26 gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; 27 linux,input-type = <1>; 28 linux,code = <KEY_VOLUMEUP>; 29 gpio-key,wakeup; 30 debounce-interval = <15>; 31 linux,can-disable; 32 }; 33 }; 34}; 35 36/* 37 * Reserved memory changes 38 * 39 * Delete all unused memory nodes and define the peripheral memory regions 40 * required by the board dts. 41 * 42 */ 43 44/delete-node/ &hyp_mem; 45/delete-node/ &xbl_mem; 46/delete-node/ &reserved_xbl_uefi_log; 47/delete-node/ &sec_apps_mem; 48 49/* Increase the size from 2.5MB to 8MB */ 50&rmtfs_mem { 51 reg = <0x0 0x9c900000 0x0 0x800000>; 52}; 53 54/ { 55 reserved-memory { 56 adsp_mem: memory@86700000 { 57 reg = <0x0 0x86700000 0x0 0x2800000>; 58 no-map; 59 }; 60 61 camera_mem: memory@8ad00000 { 62 reg = <0x0 0x8ad00000 0x0 0x500000>; 63 no-map; 64 }; 65 66 venus_mem: memory@8b200000 { 67 reg = <0x0 0x8b200000 0x0 0x500000>; 68 no-map; 69 }; 70 71 mpss_mem: memory@8b800000 { 72 reg = <0x0 0x8b800000 0x0 0xf600000>; 73 no-map; 74 }; 75 76 wpss_mem: memory@9ae00000 { 77 reg = <0x0 0x9ae00000 0x0 0x1900000>; 78 no-map; 79 }; 80 81 mba_mem: memory@9c700000 { 82 reg = <0x0 0x9c700000 0x0 0x200000>; 83 no-map; 84 }; 85 }; 86}; 87 88&apps_rsc { 89 pm7325-regulators { 90 compatible = "qcom,pm7325-rpmh-regulators"; 91 qcom,pmic-id = "b"; 92 93 vreg_s1b_1p8: smps1 { 94 regulator-min-microvolt = <1856000>; 95 regulator-max-microvolt = <2040000>; 96 }; 97 98 vreg_s7b_0p9: smps7 { 99 regulator-min-microvolt = <535000>; 100 regulator-max-microvolt = <1120000>; 101 }; 102 103 vreg_s8b_1p2: smps8 { 104 regulator-min-microvolt = <1256000>; 105 regulator-max-microvolt = <1500000>; 106 }; 107 108 vreg_l1b_0p8: ldo1 { 109 regulator-min-microvolt = <825000>; 110 regulator-max-microvolt = <925000>; 111 }; 112 113 vreg_l2b_3p0: ldo2 { 114 regulator-min-microvolt = <2700000>; 115 regulator-max-microvolt = <3544000>; 116 }; 117 118 vreg_l6b_1p2: ldo6 { 119 regulator-min-microvolt = <1140000>; 120 regulator-max-microvolt = <1260000>; 121 }; 122 123 vreg_l7b_2p9: ldo7 { 124 regulator-min-microvolt = <2960000>; 125 regulator-max-microvolt = <2960000>; 126 }; 127 128 vreg_l8b_0p9: ldo8 { 129 regulator-min-microvolt = <870000>; 130 regulator-max-microvolt = <970000>; 131 }; 132 133 vreg_l9b_1p2: ldo9 { 134 regulator-min-microvolt = <1080000>; 135 regulator-max-microvolt = <1304000>; 136 }; 137 138 vreg_l11b_1p7: ldo11 { 139 regulator-min-microvolt = <1504000>; 140 regulator-max-microvolt = <2000000>; 141 }; 142 143 vreg_l12b_0p8: ldo12 { 144 regulator-min-microvolt = <751000>; 145 regulator-max-microvolt = <824000>; 146 }; 147 148 vreg_l13b_0p8: ldo13 { 149 regulator-min-microvolt = <530000>; 150 regulator-max-microvolt = <824000>; 151 }; 152 153 vreg_l14b_1p2: ldo14 { 154 regulator-min-microvolt = <1080000>; 155 regulator-max-microvolt = <1304000>; 156 }; 157 158 vreg_l15b_0p8: ldo15 { 159 regulator-min-microvolt = <765000>; 160 regulator-max-microvolt = <1020000>; 161 }; 162 163 vreg_l16b_1p2: ldo16 { 164 regulator-min-microvolt = <1100000>; 165 regulator-max-microvolt = <1300000>; 166 }; 167 168 vreg_l17b_1p8: ldo17 { 169 regulator-min-microvolt = <1700000>; 170 regulator-max-microvolt = <1900000>; 171 }; 172 173 vreg_l18b_1p8: ldo18 { 174 regulator-min-microvolt = <1800000>; 175 regulator-max-microvolt = <2000000>; 176 }; 177 178 vreg_l19b_1p8: ldo19 { 179 regulator-min-microvolt = <1800000>; 180 regulator-max-microvolt = <1800000>; 181 }; 182 }; 183 184 pm8350c-regulators { 185 compatible = "qcom,pm8350c-rpmh-regulators"; 186 qcom,pmic-id = "c"; 187 188 vreg_s1c_2p2: smps1 { 189 regulator-min-microvolt = <2190000>; 190 regulator-max-microvolt = <2210000>; 191 }; 192 193 vreg_s9c_1p0: smps9 { 194 regulator-min-microvolt = <1010000>; 195 regulator-max-microvolt = <1170000>; 196 }; 197 198 vreg_l1c_1p8: ldo1 { 199 regulator-min-microvolt = <1800000>; 200 regulator-max-microvolt = <1980000>; 201 }; 202 203 vreg_l2c_1p8: ldo2 { 204 regulator-min-microvolt = <1620000>; 205 regulator-max-microvolt = <1980000>; 206 }; 207 208 vreg_l3c_3p0: ldo3 { 209 regulator-min-microvolt = <2800000>; 210 regulator-max-microvolt = <3540000>; 211 }; 212 213 vreg_l4c_1p8: ldo4 { 214 regulator-min-microvolt = <1620000>; 215 regulator-max-microvolt = <3300000>; 216 }; 217 218 vreg_l5c_1p8: ldo5 { 219 regulator-min-microvolt = <1620000>; 220 regulator-max-microvolt = <3300000>; 221 }; 222 223 vreg_l6c_2p9: ldo6 { 224 regulator-min-microvolt = <1800000>; 225 regulator-max-microvolt = <2950000>; 226 }; 227 228 vreg_l7c_3p0: ldo7 { 229 regulator-min-microvolt = <3000000>; 230 regulator-max-microvolt = <3544000>; 231 }; 232 233 vreg_l8c_1p8: ldo8 { 234 regulator-min-microvolt = <1620000>; 235 regulator-max-microvolt = <2000000>; 236 }; 237 238 vreg_l9c_2p9: ldo9 { 239 regulator-min-microvolt = <2960000>; 240 regulator-max-microvolt = <2960000>; 241 }; 242 243 vreg_l10c_0p8: ldo10 { 244 regulator-min-microvolt = <720000>; 245 regulator-max-microvolt = <1050000>; 246 }; 247 248 vreg_l11c_2p8: ldo11 { 249 regulator-min-microvolt = <2800000>; 250 regulator-max-microvolt = <3544000>; 251 }; 252 253 vreg_l12c_1p8: ldo12 { 254 regulator-min-microvolt = <1650000>; 255 regulator-max-microvolt = <2000000>; 256 }; 257 258 vreg_l13c_3p0: ldo13 { 259 regulator-min-microvolt = <2700000>; 260 regulator-max-microvolt = <3544000>; 261 }; 262 263 vreg_bob: bob { 264 regulator-min-microvolt = <3008000>; 265 regulator-max-microvolt = <3960000>; 266 }; 267 }; 268}; 269 270&ipa { 271 status = "okay"; 272 modem-init; 273}; 274 275&pmk8350_vadc { 276 pmk8350_die_temp { 277 reg = <PMK8350_ADC7_DIE_TEMP>; 278 label = "pmk8350_die_temp"; 279 qcom,pre-scaling = <1 1>; 280 }; 281}; 282 283&qfprom { 284 vcc-supply = <&vreg_l1c_1p8>; 285}; 286 287&qspi { 288 status = "okay"; 289 pinctrl-names = "default"; 290 pinctrl-0 = <&qspi_clk>, <&qspi_cs0>, <&qspi_data01>; 291 292 flash@0 { 293 compatible = "jedec,spi-nor"; 294 reg = <0>; 295 spi-max-frequency = <37500000>; 296 spi-tx-bus-width = <2>; 297 spi-rx-bus-width = <2>; 298 }; 299}; 300 301&qupv3_id_0 { 302 status = "okay"; 303}; 304 305&qupv3_id_1 { 306 status = "okay"; 307}; 308 309&remoteproc_mpss { 310 status = "okay"; 311 compatible = "qcom,sc7280-mss-pil"; 312 iommus = <&apps_smmu 0x124 0x0>, <&apps_smmu 0x488 0x7>; 313 memory-region = <&mba_mem &mpss_mem>; 314}; 315 316&sdhc_1 { 317 status = "okay"; 318 319 pinctrl-names = "default", "sleep"; 320 pinctrl-0 = <&sdc1_on>; 321 pinctrl-1 = <&sdc1_off>; 322 323 non-removable; 324 no-sd; 325 no-sdio; 326 327 vmmc-supply = <&vreg_l7b_2p9>; 328 vqmmc-supply = <&vreg_l19b_1p8>; 329}; 330 331&sdhc_2 { 332 status = "okay"; 333 334 pinctrl-names = "default", "sleep"; 335 pinctrl-0 = <&sdc2_on>; 336 pinctrl-1 = <&sdc2_off>; 337 338 vmmc-supply = <&vreg_l9c_2p9>; 339 vqmmc-supply = <&vreg_l6c_2p9>; 340 341 cd-gpios = <&tlmm 91 GPIO_ACTIVE_LOW>; 342}; 343 344&uart5 { 345 compatible = "qcom,geni-debug-uart"; 346 status = "okay"; 347}; 348 349&usb_1 { 350 status = "okay"; 351}; 352 353&usb_1_dwc3 { 354 dr_mode = "host"; 355}; 356 357&usb_1_hsphy { 358 status = "okay"; 359 360 vdda-pll-supply = <&vreg_l10c_0p8>; 361 vdda33-supply = <&vreg_l2b_3p0>; 362 vdda18-supply = <&vreg_l1c_1p8>; 363}; 364 365&usb_1_qmpphy { 366 status = "okay"; 367 368 vdda-phy-supply = <&vreg_l6b_1p2>; 369 vdda-pll-supply = <&vreg_l1b_0p8>; 370}; 371 372&usb_2 { 373 status = "okay"; 374}; 375 376&usb_2_dwc3 { 377 dr_mode = "peripheral"; 378}; 379 380&usb_2_hsphy { 381 status = "okay"; 382 383 vdda-pll-supply = <&vreg_l10c_0p8>; 384 vdda33-supply = <&vreg_l2b_3p0>; 385 vdda18-supply = <&vreg_l1c_1p8>; 386}; 387 388&uart7 { 389 status = "okay"; 390 391 /delete-property/interrupts; 392 interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>, 393 <&tlmm 31 IRQ_TYPE_EDGE_FALLING>; 394 pinctrl-names = "default", "sleep"; 395 pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>; 396}; 397 398/* PINCTRL - additions to nodes defined in sc7280.dtsi */ 399 400&pm7325_gpios { 401 key_vol_up_default: key-vol-up-default { 402 pins = "gpio6"; 403 function = "normal"; 404 input-enable; 405 bias-pull-up; 406 power-source = <0>; 407 qcom,drive-strength = <3>; 408 }; 409}; 410 411&qspi_cs0 { 412 bias-disable; 413}; 414 415&qspi_clk { 416 bias-disable; 417}; 418 419&qspi_data01 { 420 /* High-Z when no transfers; nice to park the lines */ 421 bias-pull-up; 422}; 423 424&qup_uart5_tx { 425 drive-strength = <2>; 426 bias-disable; 427}; 428 429&qup_uart5_rx { 430 drive-strength = <2>; 431 bias-pull-up; 432}; 433 434&qup_uart7_cts { 435 /* 436 * Configure a pull-down on CTS to match the pull of 437 * the Bluetooth module. 438 */ 439 bias-pull-down; 440}; 441 442&qup_uart7_rts { 443 /* We'll drive RTS, so no pull */ 444 drive-strength = <2>; 445 bias-disable; 446}; 447 448&qup_uart7_tx { 449 /* We'll drive TX, so no pull */ 450 drive-strength = <2>; 451 bias-disable; 452}; 453 454&qup_uart7_rx { 455 /* 456 * Configure a pull-up on RX. This is needed to avoid 457 * garbage data when the TX pin of the Bluetooth module is 458 * in tri-state (module powered off or not driving the 459 * signal yet). 460 */ 461 bias-pull-up; 462}; 463 464&tlmm { 465 qup_uart7_sleep_cts: qup-uart7-sleep-cts { 466 pins = "gpio28"; 467 function = "gpio"; 468 /* 469 * Configure a pull-down on CTS to match the pull of 470 * the Bluetooth module. 471 */ 472 bias-pull-down; 473 }; 474 475 qup_uart7_sleep_rts: qup-uart7-sleep-rts { 476 pins = "gpio29"; 477 function = "gpio"; 478 /* 479 * Configure pull-down on RTS. As RTS is active low 480 * signal, pull it low to indicate the BT SoC that it 481 * can wakeup the system anytime from suspend state by 482 * pulling RX low (by sending wakeup bytes). 483 */ 484 bias-pull-down; 485 }; 486 487 qup_uart7_sleep_tx: qup-uart7-sleep-tx { 488 pins = "gpio30"; 489 function = "gpio"; 490 /* 491 * Configure pull-up on TX when it isn't actively driven 492 * to prevent BT SoC from receiving garbage during sleep. 493 */ 494 bias-pull-up; 495 }; 496 497 qup_uart7_sleep_rx: qup-uart7-sleep-rx { 498 pins = "gpio31"; 499 function = "gpio"; 500 /* 501 * Configure a pull-up on RX. This is needed to avoid 502 * garbage data when the TX pin of the Bluetooth module 503 * is floating which may cause spurious wakeups. 504 */ 505 bias-pull-up; 506 }; 507}; 508 509&sdc1_on { 510 clk { 511 bias-disable; 512 drive-strength = <16>; 513 }; 514 515 cmd { 516 bias-pull-up; 517 drive-strength = <10>; 518 }; 519 520 data { 521 bias-pull-up; 522 drive-strength = <10>; 523 }; 524 525 rclk { 526 bias-pull-down; 527 }; 528}; 529 530&sdc2_on { 531 clk { 532 bias-disable; 533 drive-strength = <16>; 534 }; 535 536 cmd { 537 bias-pull-up; 538 drive-strength = <10>; 539 }; 540 541 data { 542 bias-pull-up; 543 drive-strength = <10>; 544 }; 545 546 sd-cd { 547 pins = "gpio91"; 548 bias-pull-up; 549 }; 550}; 551