1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2024, Alexandru Marc Serdeliuc <serdeliuk@yahoo.com> 4 * Copyright (c) 2024, David Wronek <david@mainlining.org> 5 * Copyright (c) 2022, Linaro Limited 6 */ 7 8/dts-v1/; 9 10#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 11#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 12#include "sm8550.dtsi" 13#include "pm8550.dtsi" 14#include "pm8550vs.dtsi" 15#include "pmk8550.dtsi" 16 17/delete-node/ &adspslpi_mem; 18/delete-node/ &cdsp_mem; 19/delete-node/ &mpss_dsm_mem; 20/delete-node/ &mpss_mem; 21/delete-node/ &rmtfs_mem; 22 23/ { 24 model = "Samsung Galaxy Z Fold5"; 25 compatible = "samsung,q5q", "qcom,sm8550"; 26 chassis-type = "handset"; 27 28 aliases { 29 serial0 = &uart7; 30 }; 31 32 chosen { 33 #address-cells = <2>; 34 #size-cells = <2>; 35 ranges; 36 37 framebuffer: framebuffer@b8000000 { 38 compatible = "simple-framebuffer"; 39 reg = <0x0 0xb8000000 0x0 0x2b00000>; 40 width = <2176>; 41 height = <1812>; 42 stride = <(2176 * 4)>; 43 format = "a8r8g8b8"; 44 }; 45 }; 46 47 gpio-keys { 48 compatible = "gpio-keys"; 49 pinctrl-0 = <&volume_up_n>; 50 pinctrl-names = "default"; 51 52 key-volume-up { 53 label = "Volume Up"; 54 linux,code = <KEY_VOLUMEUP>; 55 gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>; 56 debounce-interval = <15>; 57 linux,can-disable; 58 wakeup-source; 59 }; 60 }; 61 62 vph_pwr: vph-pwr-regulator { 63 compatible = "regulator-fixed"; 64 regulator-name = "vph_pwr"; 65 regulator-min-microvolt = <3700000>; 66 regulator-max-microvolt = <3700000>; 67 regulator-always-on; 68 regulator-boot-on; 69 }; 70 71 reserved-memory { 72 adspslpi_mem: adspslpi@9ea00000 { 73 reg = <0x0 0x9ea00000 0x0 0x59b4000>; 74 no-map; 75 }; 76 77 cdsp_mem: cdsp-region@9c900000 { 78 reg = <0 0x9c900000 0 0x2000000>; 79 no-map; 80 }; 81 82 mpss_dsm_mem: mpss-dsm@d4d00000 { 83 reg = <0x0 0xd4d00000 0x0 0x3300000>; 84 no-map; 85 }; 86 87 mpss_mem: mpss@8b400000 { 88 reg = <0x0 0x8b400000 0x0 0xfc00000>; 89 no-map; 90 }; 91 92 rmtfs_mem: rmtfs-region@d4a80000 { 93 reg = <0x0 0xd4a80000 0x0 0x280000>; 94 no-map; 95 }; 96 97 /* 98 * The bootloader will only keep display hardware enabled 99 * if this memory region is named exactly 'splash_region' 100 */ 101 splash_region@b8000000 { 102 reg = <0x0 0xb8000000 0x0 0x2b00000>; 103 no-map; 104 }; 105 }; 106}; 107 108&apps_rsc { 109 regulators-0 { 110 compatible = "qcom,pm8550-rpmh-regulators"; 111 qcom,pmic-id = "b"; 112 113 vreg_bob1: bob1 { 114 regulator-name = "vreg_bob1"; 115 regulator-min-microvolt = <3296000>; 116 regulator-max-microvolt = <3960000>; 117 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 118 }; 119 120 vreg_bob2: bob2 { 121 regulator-name = "vreg_bob2"; 122 regulator-min-microvolt = <2720000>; 123 regulator-max-microvolt = <3960000>; 124 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 125 }; 126 127 vreg_l1b_1p8: ldo1 { 128 regulator-name = "vreg_l1b_1p8"; 129 regulator-min-microvolt = <1800000>; 130 regulator-max-microvolt = <1800000>; 131 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 132 }; 133 134 vreg_l2b_3p0: ldo2 { 135 regulator-name = "vreg_l2b_3p0"; 136 regulator-min-microvolt = <3008000>; 137 regulator-max-microvolt = <3008000>; 138 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 139 }; 140 141 vreg_l5b_3p1: ldo5 { 142 regulator-name = "vreg_l5b_3p1"; 143 regulator-min-microvolt = <3104000>; 144 regulator-max-microvolt = <3104000>; 145 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 146 }; 147 148 vreg_l6b_1p8: ldo6 { 149 regulator-name = "vreg_l6b_1p8"; 150 regulator-min-microvolt = <1800000>; 151 regulator-max-microvolt = <3008000>; 152 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 153 }; 154 155 vreg_l7b_1p8: ldo7 { 156 regulator-name = "vreg_l7b_1p8"; 157 regulator-min-microvolt = <1800000>; 158 regulator-max-microvolt = <3008000>; 159 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 160 }; 161 162 vreg_l8b_1p8: ldo8 { 163 regulator-name = "vreg_l8b_1p8"; 164 regulator-min-microvolt = <1800000>; 165 regulator-max-microvolt = <3008000>; 166 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 167 }; 168 169 vreg_l9b_2p9: ldo9 { 170 regulator-name = "vreg_l9b_2p9"; 171 regulator-min-microvolt = <2960000>; 172 regulator-max-microvolt = <3008000>; 173 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 174 }; 175 176 vreg_l11b_1p2: ldo11 { 177 regulator-name = "vreg_l11b_1p2"; 178 regulator-min-microvolt = <1200000>; 179 regulator-max-microvolt = <1504000>; 180 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 181 }; 182 183 vreg_l12b_1p8: ldo12 { 184 regulator-name = "vreg_l12b_1p8"; 185 regulator-min-microvolt = <1800000>; 186 regulator-max-microvolt = <1800000>; 187 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 188 }; 189 190 vreg_l13b_3p0: ldo13 { 191 regulator-name = "vreg_l13b_3p0"; 192 regulator-min-microvolt = <3000000>; 193 regulator-max-microvolt = <3000000>; 194 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 195 }; 196 197 vreg_l14b_3p2: ldo14 { 198 regulator-name = "vreg_l14b_3p2"; 199 regulator-min-microvolt = <3200000>; 200 regulator-max-microvolt = <3200000>; 201 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 202 }; 203 204 vreg_l15b_1p8: ldo15 { 205 regulator-name = "vreg_l15b_1p8"; 206 regulator-min-microvolt = <1800000>; 207 regulator-max-microvolt = <1800000>; 208 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 209 regulator-allow-set-load; 210 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 211 RPMH_REGULATOR_MODE_HPM>; 212 regulator-always-on; 213 }; 214 215 vreg_l16b_2p8: ldo16 { 216 regulator-name = "vreg_l16b_2p8"; 217 regulator-min-microvolt = <2800000>; 218 regulator-max-microvolt = <2800000>; 219 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 220 }; 221 222 vreg_l17b_2p5: ldo17 { 223 regulator-name = "vreg_l17b_2p5"; 224 regulator-min-microvolt = <2504000>; 225 regulator-max-microvolt = <2504000>; 226 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 227 }; 228 }; 229 230 regulators-1 { 231 compatible = "qcom,pm8550vs-rpmh-regulators"; 232 qcom,pmic-id = "c"; 233 234 vreg_l3c_0p91: ldo3 { 235 regulator-name = "vreg_l3c_0p9"; 236 regulator-min-microvolt = <880000>; 237 regulator-max-microvolt = <912000>; 238 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 239 }; 240 }; 241 242 regulators-2 { 243 compatible = "qcom,pm8550vs-rpmh-regulators"; 244 qcom,pmic-id = "d"; 245 246 vreg_l1d_0p88: ldo1 { 247 regulator-name = "vreg_l1d_0p88"; 248 regulator-min-microvolt = <880000>; 249 regulator-max-microvolt = <920000>; 250 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 251 }; 252 }; 253 254 regulators-3 { 255 compatible = "qcom,pm8550vs-rpmh-regulators"; 256 qcom,pmic-id = "e"; 257 258 vreg_s4e_0p9: smps4 { 259 regulator-name = "vreg_s4e_0p9"; 260 regulator-min-microvolt = <904000>; 261 regulator-max-microvolt = <984000>; 262 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 263 }; 264 265 vreg_s5e_1p1: smps5 { 266 regulator-name = "vreg_s5e_1p1"; 267 regulator-min-microvolt = <1080000>; 268 regulator-max-microvolt = <1120000>; 269 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 270 }; 271 272 vreg_l1e_0p88: ldo1 { 273 regulator-name = "vreg_l1e_0p88"; 274 regulator-min-microvolt = <880000>; 275 regulator-max-microvolt = <880000>; 276 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 277 }; 278 279 vreg_l2e_0p9: ldo2 { 280 regulator-name = "vreg_l2e_0p9"; 281 regulator-min-microvolt = <904000>; 282 regulator-max-microvolt = <970000>; 283 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 284 }; 285 286 vreg_l3e_1p2: ldo3 { 287 regulator-name = "vreg_l3e_1p2"; 288 regulator-min-microvolt = <1200000>; 289 regulator-max-microvolt = <1200000>; 290 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 291 }; 292 }; 293 294 regulators-4 { 295 compatible = "qcom,pm8550ve-rpmh-regulators"; 296 qcom,pmic-id = "f"; 297 298 vreg_s4f_0p5: smps4 { 299 regulator-name = "vreg_s4f_0p5"; 300 regulator-min-microvolt = <500000>; 301 regulator-max-microvolt = <700000>; 302 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 303 }; 304 305 vreg_l1f_0p9: ldo1 { 306 regulator-name = "vreg_l1f_0p9"; 307 regulator-min-microvolt = <912000>; 308 regulator-max-microvolt = <912000>; 309 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 310 }; 311 312 vreg_l2f_0p88: ldo2 { 313 regulator-name = "vreg_l2f_0p88"; 314 regulator-min-microvolt = <880000>; 315 regulator-max-microvolt = <912000>; 316 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 317 }; 318 319 vreg_l3f_0p91: ldo3 { 320 regulator-name = "vreg_l3f_0p91"; 321 regulator-min-microvolt = <880000>; 322 regulator-max-microvolt = <912000>; 323 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 324 }; 325 }; 326 327 regulators-5 { 328 compatible = "qcom,pm8550vs-rpmh-regulators"; 329 qcom,pmic-id = "g"; 330 331 vreg_s1g_1p2: smps1 { 332 regulator-name = "vreg_s1g_1p2"; 333 regulator-min-microvolt = <1200000>; 334 regulator-max-microvolt = <1300000>; 335 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 336 }; 337 338 vreg_s2g_0p8: smps2 { 339 regulator-name = "vreg_s2g_0p8"; 340 regulator-min-microvolt = <800000>; 341 regulator-max-microvolt = <1000000>; 342 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 343 }; 344 345 vreg_s3g_0p7: smps3 { 346 regulator-name = "vreg_s3g_0p7"; 347 regulator-min-microvolt = <300000>; 348 regulator-max-microvolt = <1004000>; 349 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 350 }; 351 352 vreg_s4g_1p3: smps4 { 353 regulator-name = "vreg_s4g_1p3"; 354 regulator-min-microvolt = <1200000>; 355 regulator-max-microvolt = <1352000>; 356 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 357 }; 358 359 vreg_s5g_0p8: smps5 { 360 regulator-name = "vreg_s5g_0p8"; 361 regulator-min-microvolt = <500000>; 362 regulator-max-microvolt = <1004000>; 363 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 364 }; 365 366 vreg_s6g_1p8: smps6 { 367 regulator-name = "vreg_s6g_1p8"; 368 regulator-min-microvolt = <1800000>; 369 regulator-max-microvolt = <2000000>; 370 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 371 }; 372 373 vreg_l1g_1p2: ldo1 { 374 regulator-name = "vreg_l1g_1p2"; 375 regulator-min-microvolt = <1200000>; 376 regulator-max-microvolt = <1200000>; 377 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 378 }; 379 380 vreg_l2g_1p2: ldo2 { 381 regulator-name = "vreg_l2g_1p2"; 382 regulator-min-microvolt = <1200000>; 383 regulator-max-microvolt = <1200000>; 384 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 385 }; 386 387 vreg_l3g_1p2: ldo3 { 388 regulator-name = "vreg_l3g_1p2"; 389 regulator-min-microvolt = <1200000>; 390 regulator-max-microvolt = <1200000>; 391 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 392 }; 393 }; 394 395 regulators-6 { 396 compatible = "qcom,pm8010-rpmh-regulators"; 397 qcom,pmic-id = "m"; 398 399 vreg_l1m_1p056: ldo1 { 400 regulator-name = "vreg_l1m_1p056"; 401 regulator-min-microvolt = <1056000>; 402 regulator-max-microvolt = <1056000>; 403 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 404 }; 405 406 vreg_l2m_1p056: ldo2 { 407 regulator-name = "vreg_l2m_1p056"; 408 regulator-min-microvolt = <1056000>; 409 regulator-max-microvolt = <1056000>; 410 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 411 }; 412 413 vreg_l3m_2p8: ldo3 { 414 regulator-name = "vreg_l3m_2p8"; 415 regulator-min-microvolt = <2800000>; 416 regulator-max-microvolt = <2800000>; 417 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 418 }; 419 420 vreg_l4m_2p8: ldo4 { 421 regulator-name = "vreg_l4m_2p8"; 422 regulator-min-microvolt = <2800000>; 423 regulator-max-microvolt = <2800000>; 424 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 425 }; 426 427 vreg_l5m_1p8: ldo5 { 428 regulator-name = "vreg_l5m_1p8"; 429 regulator-min-microvolt = <1800000>; 430 regulator-max-microvolt = <1800000>; 431 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 432 }; 433 434 vreg_l6m_1p8: ldo6 { 435 regulator-name = "vreg_l6m_1p8"; 436 regulator-min-microvolt = <1800000>; 437 regulator-max-microvolt = <1800000>; 438 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 439 }; 440 441 vreg_l7m_2p9: ldo7 { 442 regulator-name = "vreg_l7m_2p9"; 443 regulator-min-microvolt = <2800000>; 444 regulator-max-microvolt = <2904000>; 445 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 446 }; 447 }; 448 449 regulators-7 { 450 compatible = "qcom,pm8010-rpmh-regulators"; 451 qcom,pmic-id = "n"; 452 453 vreg_l1n_1p1: ldo1 { 454 regulator-name = "vreg_l1n_1p1"; 455 regulator-min-microvolt = <1104000>; 456 regulator-max-microvolt = <1200000>; 457 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 458 }; 459 460 vreg_l2n_1p1: ldo2 { 461 regulator-name = "vreg_l2n_1p1"; 462 regulator-min-microvolt = <1104000>; 463 regulator-max-microvolt = <1200000>; 464 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 465 }; 466 467 vreg_l3n_2p8: ldo3 { 468 regulator-name = "vreg_l3n_2p8"; 469 regulator-min-microvolt = <2800000>; 470 regulator-max-microvolt = <3000000>; 471 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 472 }; 473 474 vreg_l4n_2p8: ldo4 { 475 regulator-name = "vreg_l4n_2p8"; 476 regulator-min-microvolt = <2800000>; 477 regulator-max-microvolt = <3300000>; 478 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 479 }; 480 481 vreg_l5n_1p8: ldo5 { 482 regulator-name = "vreg_l5n_1p8"; 483 regulator-min-microvolt = <1800000>; 484 regulator-max-microvolt = <1800000>; 485 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 486 }; 487 488 vreg_l6n_3p3: ldo6 { 489 regulator-name = "vreg_l6n_3p3"; 490 regulator-min-microvolt = <2800000>; 491 regulator-max-microvolt = <3304000>; 492 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 493 }; 494 495 vreg_l7n_2p96: ldo7 { 496 regulator-name = "vreg_l7n_2p96"; 497 regulator-min-microvolt = <2800000>; 498 regulator-max-microvolt = <2960000>; 499 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 500 }; 501 }; 502}; 503 504&dispcc { 505 status = "disabled"; 506}; 507 508&i2c_master_hub_0 { 509 status = "okay"; 510}; 511 512&pcie0 { 513 wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; 514 perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; 515 pinctrl-0 = <&pcie0_default_state>; 516 pinctrl-names = "default"; 517 status = "okay"; 518}; 519 520&pcie0_phy { 521 vdda-phy-supply = <&vreg_l1e_0p88>; 522 vdda-pll-supply = <&vreg_l3e_1p2>; 523 status = "okay"; 524}; 525 526&pm8550_gpios { 527 volume_up_n: volume-up-n-state { 528 pins = "gpio6"; 529 function = "normal"; 530 power-source = <1>; 531 bias-pull-up; 532 input-enable; 533 }; 534}; 535 536&pon_pwrkey { 537 status = "okay"; 538}; 539 540&pon_resin { 541 status = "okay"; 542 linux,code = <KEY_VOLUMEDOWN>; 543}; 544 545&qupv3_id_0 { 546 status = "okay"; 547}; 548 549&remoteproc_adsp { 550 firmware-name = "qcom/sm8550/adsp.mdt", 551 "qcom/sm8550/adsp_dtb.mdt"; 552 status = "okay"; 553}; 554 555&remoteproc_cdsp { 556 firmware-name = "qcom/sm8550/cdsp.mdt", 557 "qcom/sm8550/cdsp_dtb.mdt"; 558 status = "okay"; 559}; 560 561&remoteproc_mpss { 562 firmware-name = "qcom/sm8550/modem.mdt", 563 "qcom/sm8550/modem_dtb.mdt"; 564 status = "okay"; 565}; 566 567&sleep_clk { 568 clock-frequency = <32000>; 569}; 570 571&tlmm { 572 gpio-reserved-ranges = <36 4>, <50 2>; 573}; 574 575&ufs_mem_hc { 576 reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>; 577 vcc-supply = <&vreg_l17b_2p5>; 578 vcc-max-microamp = <1300000>; 579 vccq-supply = <&vreg_l1g_1p2>; 580 vccq-max-microamp = <1200000>; 581 vdd-hba-supply = <&vreg_l3g_1p2>; 582 status = "okay"; 583}; 584 585&ufs_mem_phy { 586 vdda-phy-supply = <&vreg_l1d_0p88>; 587 vdda-pll-supply = <&vreg_l3e_1p2>; 588 status = "okay"; 589}; 590 591&xo_board { 592 clock-frequency = <76800000>; 593}; 594