1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2022, Konrad Dybcio <konrad.dybcio@somainline.org> 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 9#include "sm8450.dtsi" 10 11/delete-node/ &adsp_mem; 12/delete-node/ &rmtfs_mem; 13/delete-node/ &video_mem; 14 15/ { 16 model = "Sony Xperia 1 IV"; 17 compatible = "sony,pdx223", "qcom,sm8450"; 18 chassis-type = "handset"; 19 20 aliases { 21 serial0 = &uart7; 22 }; 23 24 chosen { 25 stdout-path = "serial0:115200n8"; 26 }; 27 28 reserved-memory { 29 adsp_mem: memory@85700000 { 30 reg = <0x0 0x85700000 0x0 0x2800000>; 31 no-map; 32 }; 33 34 video_mem: memory@9fd00000 { 35 reg = <0x0 0x9fd00000 0x0 0x700000>; 36 no-map; 37 }; 38 39 rmtfs_mem: memory@f3300000 { 40 compatible = "qcom,rmtfs-mem"; 41 reg = <0x0 0xf3300000 0x0 0x280000>; 42 no-map; 43 44 qcom,client-id = <1>; 45 qcom,vmid = <15>; 46 }; 47 48 ramoops@ffc00000 { 49 compatible = "ramoops"; 50 reg = <0 0xffc00000 0 0x200000>; 51 console-size = <0x40000>; 52 record-size = <0x1000>; 53 ecc-size = <16>; 54 no-map; 55 }; 56 }; 57 58 /* Sadly, the voltages for these GPIO regulators are unknown. */ 59 imx650_vana_vreg: imx650-vana-regulator { 60 compatible = "regulator-fixed"; 61 regulator-name = "imx650_vana_vreg"; 62 gpio = <&tlmm 23 GPIO_ACTIVE_HIGH>; 63 enable-active-high; 64 }; 65 66 vph_pwr: vph-pwr-regulator { 67 compatible = "regulator-fixed"; 68 regulator-name = "vph_pwr"; 69 regulator-min-microvolt = <3700000>; 70 regulator-max-microvolt = <3700000>; 71 72 regulator-always-on; 73 regulator-boot-on; 74 }; 75}; 76 77&apps_rsc { 78 pm8350-rpmh-regulators { 79 compatible = "qcom,pm8350-rpmh-regulators"; 80 qcom,pmic-id = "b"; 81 82 vdd-s1-supply = <&vph_pwr>; 83 vdd-s2-supply = <&vph_pwr>; 84 vdd-s3-supply = <&vph_pwr>; 85 vdd-s4-supply = <&vph_pwr>; 86 vdd-s5-supply = <&vph_pwr>; 87 vdd-s6-supply = <&vph_pwr>; 88 vdd-s7-supply = <&vph_pwr>; 89 vdd-s8-supply = <&vph_pwr>; 90 vdd-s9-supply = <&vph_pwr>; 91 vdd-s10-supply = <&vph_pwr>; 92 vdd-s11-supply = <&vph_pwr>; 93 vdd-s12-supply = <&vph_pwr>; 94 95 vdd-l1-l4-supply = <&pm8350_s11>; 96 vdd-l2-l7-supply = <&vreg_bob>; 97 vdd-l3-l5-supply = <&vreg_bob>; 98 vdd-l6-l9-l10-supply = <&pm8350_s12>; 99 100 /* 101 * ARC regulators: 102 * s5 - gfx.lvl 103 * l8 - lcx.lvl 104 */ 105 106 pm8350_s10: smps10 { 107 regulator-name = "pm8350_s10"; 108 regulator-min-microvolt = <1800000>; 109 regulator-max-microvolt = <1800000>; 110 }; 111 112 pm8350_s11: smps11 { 113 regulator-name = "pm8350_s11"; 114 regulator-min-microvolt = <848000>; 115 regulator-max-microvolt = <1104000>; 116 }; 117 118 pm8350_s12: smps12 { 119 regulator-name = "pm8350_s12"; 120 regulator-min-microvolt = <1224000>; 121 regulator-max-microvolt = <1400000>; 122 }; 123 124 pm8350_l1: ldo1 { 125 regulator-name = "pm8350_l1"; 126 regulator-min-microvolt = <912000>; 127 regulator-max-microvolt = <920000>; 128 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 129 }; 130 131 pm8350_l2: ldo2 { 132 regulator-name = "pm8350_l2"; 133 regulator-min-microvolt = <3072000>; 134 regulator-max-microvolt = <3072000>; 135 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 136 }; 137 138 pm8350_l3: ldo3 { 139 regulator-name = "pm8350_l3"; 140 regulator-min-microvolt = <904000>; 141 regulator-max-microvolt = <904000>; 142 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 143 }; 144 145 pm8350_l5: ldo5 { 146 regulator-name = "pm8350_l5"; 147 regulator-min-microvolt = <880000>; 148 regulator-max-microvolt = <912000>; 149 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 150 }; 151 152 pm8350_l6: ldo6 { 153 regulator-name = "pm8350_l6"; 154 regulator-min-microvolt = <1200000>; 155 regulator-max-microvolt = <1200000>; 156 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 157 }; 158 159 pm8350_l7: ldo7 { 160 regulator-name = "pm8350_l7"; 161 regulator-min-microvolt = <2504000>; 162 regulator-max-microvolt = <2504000>; 163 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 164 }; 165 166 pm8350_l9: ldo9 { 167 regulator-name = "pm8350_l9"; 168 regulator-min-microvolt = <1200000>; 169 regulator-max-microvolt = <1200000>; 170 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 171 }; 172 }; 173 174 pm8350c-rpmh-regulators { 175 compatible = "qcom,pm8350c-rpmh-regulators"; 176 qcom,pmic-id = "c"; 177 178 vdd-s1-supply = <&vph_pwr>; 179 vdd-s2-supply = <&vph_pwr>; 180 vdd-s3-supply = <&vph_pwr>; 181 vdd-s4-supply = <&vph_pwr>; 182 vdd-s5-supply = <&vph_pwr>; 183 vdd-s6-supply = <&vph_pwr>; 184 vdd-s7-supply = <&vph_pwr>; 185 vdd-s8-supply = <&vph_pwr>; 186 vdd-s9-supply = <&vph_pwr>; 187 vdd-s10-supply = <&vph_pwr>; 188 189 vdd-l1-l12-supply = <&vreg_bob>; 190 vdd-l2-l8-supply = <&vreg_bob>; 191 vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>; 192 vdd-l6-l9-l11-supply = <&vreg_bob>; 193 vdd-l10-supply = <&pm8350_s12>; 194 195 vdd-bob-supply = <&vph_pwr>; 196 197 /* 198 * ARC regulators: 199 * s2 - mxc.lvl 200 * s4 - mss.lvl 201 * s6 - cx.lvl 202 */ 203 204 pm8350c_s1: smps1 { 205 regulator-name = "pm8350c_s1"; 206 regulator-min-microvolt = <1800000>; 207 regulator-max-microvolt = <2024000>; 208 }; 209 210 pm8350c_s10: smps10 { 211 regulator-name = "pm8350c_s10"; 212 regulator-min-microvolt = <1000000>; 213 regulator-max-microvolt = <1100000>; 214 }; 215 216 vreg_bob: bob { 217 regulator-name = "vreg_bob"; 218 regulator-min-microvolt = <3400000>; 219 regulator-max-microvolt = <3960000>; 220 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 221 }; 222 223 pm8350c_l1: ldo1 { 224 regulator-name = "pm8350c_l1"; 225 regulator-min-microvolt = <1800000>; 226 regulator-max-microvolt = <1800000>; 227 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 228 }; 229 230 pm8350c_l2: ldo2 { 231 regulator-name = "pm8350c_l2"; 232 regulator-min-microvolt = <1800000>; 233 regulator-max-microvolt = <1800000>; 234 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 235 }; 236 237 pm8350c_l3: ldo3 { 238 regulator-name = "pm8350c_l3"; 239 regulator-min-microvolt = <3296000>; 240 regulator-max-microvolt = <3304000>; 241 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 242 }; 243 244 pm8350c_l4: ldo4 { 245 regulator-name = "pm8350c_l4"; 246 regulator-min-microvolt = <1704000>; 247 regulator-max-microvolt = <3000000>; 248 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 249 }; 250 251 pm8350c_l5: ldo5 { 252 regulator-name = "pm8350c_l5"; 253 regulator-min-microvolt = <1704000>; 254 regulator-max-microvolt = <3000000>; 255 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 256 }; 257 258 pm8350c_l6: ldo6 { 259 regulator-name = "pm8350c_l6"; 260 regulator-min-microvolt = <2960000>; 261 /* Originally max = 3008000 but SDHCI expects 2960000 */ 262 regulator-max-microvolt = <2960000>; 263 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 264 }; 265 266 pm8350c_l7: ldo7 { 267 regulator-name = "pm8350c_l7"; 268 regulator-min-microvolt = <3008000>; 269 regulator-max-microvolt = <3008000>; 270 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 271 }; 272 273 pm8350c_l8: ldo8 { 274 regulator-name = "pm8350c_l8"; 275 regulator-min-microvolt = <1800000>; 276 regulator-max-microvolt = <1800000>; 277 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 278 }; 279 280 pm8350c_l9: ldo9 { 281 regulator-name = "pm8350c_l9"; 282 regulator-min-microvolt = <2960000>; 283 /* Originally max = 3008000 but SDHCI expects 2960000 */ 284 regulator-max-microvolt = <2960000>; 285 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 286 }; 287 288 pm8350c_l10: ldo10 { 289 regulator-name = "pm8350c_l10"; 290 regulator-min-microvolt = <1200000>; 291 regulator-max-microvolt = <1200000>; 292 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 293 }; 294 295 pm8350c_l12: ldo12 { 296 regulator-name = "pm8350c_l12"; 297 regulator-min-microvolt = <1800000>; 298 regulator-max-microvolt = <1968000>; 299 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 300 }; 301 302 pm8350c_l13: ldo13 { 303 regulator-name = "pm8350c_l13"; 304 regulator-min-microvolt = <3000000>; 305 regulator-max-microvolt = <3000000>; 306 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 307 }; 308 }; 309 310 pm8450-rpmh-regulators { 311 compatible = "qcom,pm8450-rpmh-regulators"; 312 qcom,pmic-id = "h"; 313 314 vdd-s1-supply = <&vph_pwr>; 315 vdd-s2-supply = <&vph_pwr>; 316 vdd-s3-supply = <&vph_pwr>; 317 vdd-s4-supply = <&vph_pwr>; 318 vdd-s5-supply = <&vph_pwr>; 319 vdd-s6-supply = <&vph_pwr>; 320 321 vdd-l2-supply = <&vreg_bob>; 322 vdd-l3-supply = <&vreg_bob>; 323 vdd-l4-supply = <&vreg_bob>; 324 325 /* 326 * ARC regulators: 327 * S2 - ebi.lvl 328 * S4 - mmcx.lvl 329 * S6 - mx.lvl 330 * L1 - lmx.lvl 331 */ 332 333 pm8450_s3: smps3 { 334 regulator-name = "pm8450_s3"; 335 regulator-min-microvolt = <500000>; 336 regulator-max-microvolt = <600000>; 337 }; 338 339 pm8450_l2: ldo2 { 340 regulator-name = "pm8450_l2"; 341 regulator-min-microvolt = <880000>; 342 regulator-max-microvolt = <912000>; 343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 344 }; 345 346 pm8450_l3: ldo3 { 347 regulator-name = "pm8450_l3"; 348 regulator-min-microvolt = <912000>; 349 regulator-max-microvolt = <912000>; 350 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 351 }; 352 }; 353 354 pmr735a-rpmh-regulators { 355 compatible = "qcom,pmr735a-rpmh-regulators"; 356 qcom,pmic-id = "e"; 357 358 vdd-s1-supply = <&vph_pwr>; 359 vdd-s2-supply = <&vph_pwr>; 360 vdd-s3-supply = <&vph_pwr>; 361 362 vdd-l1-l2-supply = <&pmr735a_s2>; 363 vdd-l3-supply = <&pmr735a_s1>; 364 vdd-l4-supply = <&pm8350c_s1>; 365 vdd-l5-l6-supply = <&pm8350c_s1>; 366 vdd-l7-bob-supply = <&vreg_bob>; 367 368 pmr735a_s1: smps1 { 369 regulator-name = "pmr735a_s1"; 370 regulator-min-microvolt = <1200000>; 371 regulator-max-microvolt = <1296000>; 372 }; 373 374 pmr735a_s2: smps2 { 375 regulator-name = "pmr735a_s2"; 376 regulator-min-microvolt = <500000>; 377 regulator-max-microvolt = <1040000>; 378 }; 379 380 pmr735a_s3: smps3 { 381 regulator-name = "pmr735a_s3"; 382 regulator-min-microvolt = <435000>; 383 regulator-max-microvolt = <2352000>; 384 }; 385 386 pmr735a_l1: ldo1 { 387 regulator-name = "pmr735a_l1"; 388 regulator-min-microvolt = <800000>; 389 regulator-max-microvolt = <800000>; 390 }; 391 392 pmr735a_l2: ldo2 { 393 regulator-name = "pmr735a_l2"; 394 regulator-min-microvolt = <480000>; 395 regulator-max-microvolt = <912000>; 396 }; 397 398 pmr735a_l3: ldo3 { 399 regulator-name = "pmr735a_l3"; 400 regulator-min-microvolt = <1200000>; 401 regulator-max-microvolt = <1200000>; 402 }; 403 404 pmr735a_l4: ldo4 { 405 regulator-name = "pmr735a_l4"; 406 regulator-min-microvolt = <1776000>; 407 regulator-max-microvolt = <1776000>; 408 }; 409 410 pmr735a_l5: ldo5 { 411 regulator-name = "pmr735a_l5"; 412 regulator-min-microvolt = <880000>; 413 regulator-max-microvolt = <880000>; 414 }; 415 416 pmr735a_l6: ldo6 { 417 regulator-name = "pmr735a_l6"; 418 regulator-min-microvolt = <1200000>; 419 regulator-max-microvolt = <1200000>; 420 }; 421 422 pmr735a_l7: ldo7 { 423 regulator-name = "pmr735a_l7"; 424 regulator-min-microvolt = <2800000>; 425 regulator-max-microvolt = <2800000>; 426 }; 427 }; 428}; 429 430&gpi_dma0 { 431 status = "okay"; 432}; 433 434&gpi_dma1 { 435 status = "okay"; 436}; 437 438&gpi_dma2 { 439 status = "okay"; 440}; 441 442/* I2C4 is used, it hosts a Samsung touchscreen, but GPI DMA is broken.. */ 443 444&i2c5 { 445 clock-frequency = <400000>; 446 status = "okay"; 447 448 /* Dialog SLG51000 CMIC @ 75 */ 449}; 450 451&i2c9 { 452 clock-frequency = <400000>; 453 status = "okay"; 454 455 /* NXP SN1X0 NFC @ 28 */ 456}; 457 458&i2c13 { 459 clock-frequency = <400000>; 460 status = "okay"; 461 462 /* Richwave RTC6226 FM Radio Receiver @ 64 */ 463}; 464 465&i2c14 { 466 clock-frequency = <1000000>; 467 status = "okay"; 468 469 cs35l41_l: speaker-amp@40 { 470 compatible = "cirrus,cs35l41"; 471 reg = <0x40>; 472 interrupt-parent = <&tlmm>; 473 interrupts = <182 IRQ_TYPE_LEVEL_LOW>; 474 reset-gpios = <&tlmm 183 GPIO_ACTIVE_HIGH>; 475 cirrus,boost-peak-milliamp = <4000>; 476 cirrus,boost-ind-nanohenry = <1000>; 477 cirrus,boost-cap-microfarad = <15>; 478 cirrus,gpio2-src-select = <2>; 479 cirrus,gpio2-output-enable; 480 cirrus,asp-sdout-hiz = <3>; 481 #sound-dai-cells = <1>; 482 }; 483 484 cs35l41_r: speaker-amp@41 { 485 compatible = "cirrus,cs35l41"; 486 reg = <0x41>; 487 interrupt-parent = <&tlmm>; 488 interrupts = <182 IRQ_TYPE_LEVEL_LOW>; 489 reset-gpios = <&tlmm 183 GPIO_ACTIVE_HIGH>; 490 cirrus,boost-peak-milliamp = <4000>; 491 cirrus,boost-ind-nanohenry = <1000>; 492 cirrus,boost-cap-microfarad = <15>; 493 cirrus,gpio2-src-select = <2>; 494 cirrus,gpio2-output-enable; 495 cirrus,asp-sdout-hiz = <3>; 496 #sound-dai-cells = <1>; 497 }; 498}; 499 500&i2c15 { 501 clock-frequency = <400000>; 502 status = "okay"; 503 504 /* AMS TCS3490 RGB+IR color sensor @ 72 */ 505}; 506 507&i2c19 { 508 clock-frequency = <1000000>; 509 status = "okay"; 510 511 /* Cirrus Logic CS40L25A boosted haptics driver @ 40 */ 512}; 513 514&pcie0 { 515 max-link-speed = <2>; 516 status = "okay"; 517}; 518 519&pcie0_phy { 520 vdda-phy-supply = <&pm8350_l5>; 521 vdda-pll-supply = <&pm8350_l6>; 522 status = "okay"; 523}; 524 525&remoteproc_adsp { 526 firmware-name = "qcom/adsp.mbn"; 527 status = "okay"; 528}; 529 530&remoteproc_cdsp { 531 firmware-name = "qcom/cdsp.mbn"; 532 status = "okay"; 533}; 534 535&remoteproc_slpi { 536 firmware-name = "qcom/slpi.mbn"; 537 status = "okay"; 538}; 539 540&qupv3_id_0 { 541 status = "okay"; 542}; 543 544&qupv3_id_1 { 545 status = "okay"; 546}; 547 548&qupv3_id_2 { 549 status = "okay"; 550}; 551 552&sdhc_2 { 553 cd-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; 554 pinctrl-names = "default", "sleep"; 555 pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>; 556 pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>; 557 vmmc-supply = <&pm8350c_l9>; 558 vqmmc-supply = <&pm8350c_l6>; 559 /* Forbid SDR104/SDR50 - broken hw! */ 560 sdhci-caps-mask = <0x3 0x0>; 561 no-sdio; 562 no-mmc; 563 status = "okay"; 564}; 565 566&spi10 { 567 status = "okay"; 568 569 /* NXP SN1X0 NFC Secure Element @ 0 */ 570}; 571 572&tlmm { 573 gpio-reserved-ranges = <28 4>; 574 575 sdc2_default_state: sdc2-default-state { 576 clk-pins { 577 pins = "sdc2_clk"; 578 drive-strength = <16>; 579 bias-disable; 580 }; 581 582 cmd-pins { 583 pins = "sdc2_cmd"; 584 drive-strength = <16>; 585 bias-pull-up; 586 }; 587 588 data-pins { 589 pins = "sdc2_data"; 590 drive-strength = <16>; 591 bias-pull-up; 592 }; 593 }; 594 595 ts_int_default: ts-int-default-state { 596 pins = "gpio23"; 597 function = "gpio"; 598 drive-strength = <2>; 599 bias-disable; 600 input-enable; 601 }; 602 603 sdc2_card_det_n: sd-card-det-n-state { 604 pins = "gpio92"; 605 function = "gpio"; 606 drive-strength = <2>; 607 bias-pull-up; 608 }; 609}; 610 611&uart7 { 612 status = "okay"; 613}; 614 615&usb_1 { 616 status = "okay"; 617}; 618 619&usb_1_dwc3 { 620 dr_mode = "peripheral"; 621}; 622 623&usb_1_hsphy { 624 vdda-pll-supply = <&pm8350_l5>; 625 vdda18-supply = <&pm8350c_l1>; 626 vdda33-supply = <&pm8350_l2>; 627 status = "okay"; 628}; 629 630&usb_1_qmpphy { 631 vdda-phy-supply = <&pm8350_l6>; 632 vdda-pll-supply = <&pm8350_l1>; 633 status = "okay"; 634}; 635