1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2022, 2023 Jianhua Lu <lujianhua000@gmail.com> 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/arm/qcom,ids.h> 9#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 10#include "sm8250.dtsi" 11#include "pm8150.dtsi" 12#include "pm8150b.dtsi" 13#include "pm8150l.dtsi" 14#include "pm8009.dtsi" 15 16/* 17 * Delete following upstream (sm8250.dtsi) reserved 18 * memory mappings which are different on this device. 19 */ 20/delete-node/ &adsp_mem; 21/delete-node/ &cdsp_secure_heap; 22/delete-node/ &slpi_mem; 23/delete-node/ &spss_mem; 24/delete-node/ &xbl_aop_mem; 25 26/ { 27 model = "Xiaomi Mi Pad 5 Pro"; 28 compatible = "xiaomi,elish", "qcom,sm8250"; 29 classis-type = "tablet"; 30 31 /* required for bootloader to select correct board */ 32 qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */ 33 qcom,board-id = <0x10008 0>; 34 35 chosen { 36 #address-cells = <2>; 37 #size-cells = <2>; 38 ranges; 39 40 framebuffer: framebuffer@9c000000 { 41 compatible = "simple-framebuffer"; 42 reg = <0x0 0x9c000000 0x0 0x2300000>; 43 width = <1600>; 44 height = <2560>; 45 stride = <(1600 * 4)>; 46 format = "a8r8g8b8"; 47 }; 48 }; 49 50 battery_l: battery-l { 51 compatible = "simple-battery"; 52 voltage-min-design-microvolt = <3870000>; 53 energy-full-design-microwatt-hours = <16600000>; 54 charge-full-design-microamp-hours = <4300000>; 55 }; 56 57 battery_r: battery-r { 58 compatible = "simple-battery"; 59 voltage-min-design-microvolt = <3870000>; 60 energy-full-design-microwatt-hours = <16600000>; 61 charge-full-design-microamp-hours = <4300000>; 62 }; 63 64 bl_vddpos_5p5: bl-vddpos-regulator { 65 compatible = "regulator-fixed"; 66 regulator-name = "bl_vddpos_5p5"; 67 regulator-min-microvolt = <5500000>; 68 regulator-max-microvolt = <5500000>; 69 regulator-enable-ramp-delay = <233>; 70 gpio = <&tlmm 130 GPIO_ACTIVE_HIGH>; 71 enable-active-high; 72 regulator-boot-on; 73 }; 74 75 bl_vddneg_5p5: bl-vddneg-regulator { 76 compatible = "regulator-fixed"; 77 regulator-name = "bl_vddneg_5p5"; 78 regulator-min-microvolt = <5500000>; 79 regulator-max-microvolt = <5500000>; 80 regulator-enable-ramp-delay = <233>; 81 gpio = <&tlmm 131 GPIO_ACTIVE_HIGH>; 82 enable-active-high; 83 regulator-boot-on; 84 }; 85 86 gpio_keys: gpio-keys { 87 compatible = "gpio-keys"; 88 89 pinctrl-names = "default"; 90 pinctrl-0 = <&vol_up_n>; 91 92 key-vol-up { 93 label = "Volume Up"; 94 gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; 95 linux,code = <KEY_VOLUMEUP>; 96 debounce-interval = <15>; 97 linux,can-disable; 98 gpio-key,wakeup; 99 }; 100 }; 101 102 vph_pwr: vph-pwr-regulator { 103 compatible = "regulator-fixed"; 104 regulator-name = "vph_pwr"; 105 regulator-min-microvolt = <3700000>; 106 regulator-max-microvolt = <3700000>; 107 }; 108 109 /* S6c is really ebi.lvl but it's there for supply map completeness sake. */ 110 vreg_s6c_0p88: smpc6-regulator { 111 compatible = "regulator-fixed"; 112 regulator-name = "vreg_s6c_0p88"; 113 regulator-min-microvolt = <880000>; 114 regulator-max-microvolt = <880000>; 115 regulator-always-on; 116 vin-supply = <&vph_pwr>; 117 }; 118 119 reserved-memory { 120 xbl_aop_mem: xbl-aop@80700000 { 121 reg = <0x0 0x80600000 0x0 0x260000>; 122 no-map; 123 }; 124 125 slpi_mem: slpi@88c00000 { 126 reg = <0x0 0x88c00000 0x0 0x2f00000>; 127 no-map; 128 }; 129 130 adsp_mem: adsp@8bb00000 { 131 reg = <0x0 0x8bb00000 0x0 0x2500000>; 132 no-map; 133 }; 134 135 spss_mem: spss@8e000000 { 136 reg = <0x0 0x8e000000 0x0 0x100000>; 137 no-map; 138 }; 139 140 cdsp_secure_heap: cdsp-secure-heap@8e100000 { 141 reg = <0x0 0x8e100000 0x0 0x4600000>; 142 no-map; 143 }; 144 145 cont_splash_mem: cont-splash@9c000000 { 146 reg = <0x0 0x9c000000 0x0 0x2300000>; 147 no-map; 148 }; 149 150 ramoops@b0000000 { 151 compatible = "ramoops"; 152 reg = <0x0 0xb0000000 0x0 0x400000>; 153 record-size = <0x1000>; 154 console-size = <0x200000>; 155 ecc-size = <16>; 156 no-map; 157 }; 158 }; 159}; 160 161&adsp { 162 firmware-name = "qcom/sm8250/xiaomi/elish/adsp.mbn"; 163 status = "okay"; 164}; 165 166&apps_rsc { 167 regulators-0 { 168 compatible = "qcom,pm8150-rpmh-regulators"; 169 qcom,pmic-id = "a"; 170 171 vdd-s1-supply = <&vph_pwr>; 172 vdd-s2-supply = <&vph_pwr>; 173 vdd-s3-supply = <&vph_pwr>; 174 vdd-s4-supply = <&vph_pwr>; 175 vdd-s5-supply = <&vph_pwr>; 176 vdd-s6-supply = <&vph_pwr>; 177 vdd-s7-supply = <&vph_pwr>; 178 vdd-s8-supply = <&vph_pwr>; 179 vdd-s9-supply = <&vph_pwr>; 180 vdd-s10-supply = <&vph_pwr>; 181 vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>; 182 vdd-l2-l10-supply = <&vreg_bob>; 183 vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>; 184 vdd-l6-l9-supply = <&vreg_s8c_1p35>; 185 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>; 186 vdd-l13-l16-l17-supply = <&vreg_bob>; 187 188 /* (S1+S2+S3) - cx.lvl (ARC) */ 189 190 vreg_s4a_1p8: smps4 { 191 regulator-name = "vreg_s4a_1p8"; 192 regulator-min-microvolt = <1800000>; 193 regulator-max-microvolt = <1920000>; 194 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 195 regulator-allow-set-load; 196 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 197 RPMH_REGULATOR_MODE_HPM>; 198 }; 199 200 vreg_s5a_1p9: smps5 { 201 regulator-name = "vreg_s5a_1p9"; 202 regulator-min-microvolt = <1900000>; 203 regulator-max-microvolt = <2040000>; 204 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 205 }; 206 207 vreg_s6a_0p95: smps6 { 208 regulator-name = "vreg_s6a_0p95"; 209 regulator-min-microvolt = <950000>; 210 regulator-max-microvolt = <1128000>; 211 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 212 }; 213 214 vreg_l2a_3p1: ldo2 { 215 regulator-name = "vreg_l2a_3p1"; 216 regulator-min-microvolt = <3072000>; 217 regulator-max-microvolt = <3072000>; 218 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 219 }; 220 221 vreg_l3a_0p9: ldo3 { 222 regulator-name = "vreg_l3a_0p9"; 223 regulator-min-microvolt = <928000>; 224 regulator-max-microvolt = <932000>; 225 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 226 }; 227 228 /* L4 - lmx.lvl (ARC) */ 229 230 vreg_l5a_0p88: ldo5 { 231 regulator-name = "vreg_l5a_0p88"; 232 regulator-min-microvolt = <880000>; 233 regulator-max-microvolt = <880000>; 234 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 235 }; 236 237 vreg_l6a_1p2: ldo6 { 238 regulator-name = "vreg_l6a_1p2"; 239 regulator-min-microvolt = <1200000>; 240 regulator-max-microvolt = <1200000>; 241 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 242 regulator-allow-set-load; 243 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 244 RPMH_REGULATOR_MODE_HPM>; 245 }; 246 247 /* L7 is unused. */ 248 249 vreg_l9a_1p2: ldo9 { 250 regulator-name = "vreg_l9a_1p2"; 251 regulator-min-microvolt = <1200000>; 252 regulator-max-microvolt = <1200000>; 253 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 254 }; 255 256 /* L10 is unused, L11 - lcx.lvl (ARC) */ 257 258 vreg_l12a_1p8: ldo12 { 259 regulator-name = "vreg_l12a_1p8"; 260 regulator-min-microvolt = <1800000>; 261 regulator-max-microvolt = <1800000>; 262 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 263 }; 264 265 /* L13 is unused. */ 266 267 vreg_l14a_1p88: ldo14 { 268 regulator-name = "vreg_l14a_1p88"; 269 regulator-min-microvolt = <1880000>; 270 regulator-max-microvolt = <1880000>; 271 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 272 }; 273 274 /* L15 & L16 are unused. */ 275 276 vreg_l17a_3p0: ldo17 { 277 regulator-name = "vreg_l17a_3p0"; 278 regulator-min-microvolt = <2496000>; 279 regulator-max-microvolt = <3008000>; 280 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 281 regulator-allow-set-load; 282 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 283 RPMH_REGULATOR_MODE_HPM>; 284 }; 285 286 vreg_l18a_0p9: ldo18 { 287 regulator-name = "vreg_l18a_0p9"; 288 regulator-min-microvolt = <800000>; 289 regulator-max-microvolt = <920000>; 290 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 291 }; 292 }; 293 294 /* 295 * Remaining regulators that are not yet supported: 296 * OLEDB: 4925000-8100000 297 * ab: 4600000-6100000 298 * ibb: 800000-5400000 299 */ 300 regulators-1 { 301 compatible = "qcom,pm8150l-rpmh-regulators"; 302 qcom,pmic-id = "c"; 303 304 vdd-s1-supply = <&vph_pwr>; 305 vdd-s2-supply = <&vph_pwr>; 306 vdd-s3-supply = <&vph_pwr>; 307 vdd-s4-supply = <&vph_pwr>; 308 vdd-s5-supply = <&vph_pwr>; 309 vdd-s6-supply = <&vph_pwr>; 310 vdd-s7-supply = <&vph_pwr>; 311 vdd-s8-supply = <&vph_pwr>; 312 vdd-l1-l8-supply = <&vreg_s4a_1p8>; 313 vdd-l2-l3-supply = <&vreg_s8c_1p35>; 314 vdd-l4-l5-l6-supply = <&vreg_bob>; 315 vdd-l7-l11-supply = <&vreg_bob>; 316 vdd-l9-l10-supply = <&vreg_bob>; 317 vdd-bob-supply = <&vph_pwr>; 318 319 vreg_bob: bob { 320 regulator-name = "vreg_bob"; 321 regulator-min-microvolt = <3350000>; 322 regulator-max-microvolt = <3960000>; 323 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 324 }; 325 326 /* 327 * S1-S6 are ARCs: 328 * (S1+S2) - gfx.lvl, 329 * S3 - mx.lvl, 330 * (S4+S5) - mmcx.lvl, 331 * S6 - ebi.lvl 332 */ 333 334 vreg_s7c_0p35: smps7 { 335 regulator-name = "vreg_s7c_0p35"; 336 regulator-min-microvolt = <348000>; 337 regulator-max-microvolt = <1000000>; 338 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 339 }; 340 341 vreg_s8c_1p35: smps8 { 342 regulator-name = "vreg_s8c_1p35"; 343 regulator-min-microvolt = <1350000>; 344 regulator-max-microvolt = <1400000>; 345 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 346 }; 347 348 vreg_l1c_1p8: ldo1 { 349 regulator-name = "vreg_l1c_1p8"; 350 regulator-min-microvolt = <1800000>; 351 regulator-max-microvolt = <1800000>; 352 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 353 }; 354 355 /* L2-4 are unused. */ 356 357 vreg_l5c_1p8: ldo5 { 358 regulator-name = "vreg_l5c_1p8"; 359 regulator-min-microvolt = <1800000>; 360 regulator-max-microvolt = <2800000>; 361 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 362 }; 363 364 vreg_l6c_2p9: ldo6 { 365 regulator-name = "vreg_l6c_2p9"; 366 regulator-min-microvolt = <1800000>; 367 regulator-max-microvolt = <2960000>; 368 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 369 regulator-allow-set-load; 370 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 371 RPMH_REGULATOR_MODE_HPM>; 372 }; 373 374 vreg_l7c_2p85: ldo7 { 375 regulator-name = "vreg_l7c_2p85"; 376 regulator-min-microvolt = <2856000>; 377 regulator-max-microvolt = <3104000>; 378 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 379 }; 380 381 vreg_l8c_1p8: ldo8 { 382 regulator-name = "vreg_l8c_1p8"; 383 regulator-min-microvolt = <1800000>; 384 regulator-max-microvolt = <1800000>; 385 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 386 }; 387 388 vreg_l9c_2p9: ldo9 { 389 regulator-name = "vreg_l9c_2p9"; 390 regulator-min-microvolt = <2704000>; 391 regulator-max-microvolt = <2960000>; 392 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 393 regulator-allow-set-load; 394 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 395 RPMH_REGULATOR_MODE_HPM>; 396 }; 397 398 vreg_l10c_3p3: ldo10 { 399 regulator-name = "vreg_l10c_3p3"; 400 regulator-min-microvolt = <3296000>; 401 regulator-max-microvolt = <3296000>; 402 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 403 }; 404 405 vreg_l11c_3p0: ldo11 { 406 regulator-name = "vreg_l11c_3p0"; 407 regulator-min-microvolt = <3000000>; 408 regulator-max-microvolt = <3000000>; 409 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 410 }; 411 }; 412 413 regulators-2 { 414 compatible = "qcom,pm8009-rpmh-regulators"; 415 qcom,pmic-id = "f"; 416 417 vdd-s1-supply = <&vph_pwr>; 418 vdd-s2-supply = <&vreg_bob>; 419 vdd-l2-supply = <&vreg_s8c_1p35>; 420 vdd-l5-l6-supply = <&vreg_bob>; 421 vdd-l7-supply = <&vreg_s4a_1p8>; 422 423 vreg_s1f_1p2: smps1 { 424 regulator-name = "vreg_s1f_1p2"; 425 regulator-min-microvolt = <1200000>; 426 regulator-max-microvolt = <1200000>; 427 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 428 }; 429 430 vreg_s2f_0p5: smps2 { 431 regulator-name = "vreg_s2f_0p5"; 432 regulator-min-microvolt = <512000>; 433 regulator-max-microvolt = <1100000>; 434 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 435 }; 436 437 /* L1 is unused. */ 438 439 vreg_l2f_1p3: ldo2 { 440 regulator-name = "vreg_l2f_1p3"; 441 regulator-min-microvolt = <1304000>; 442 regulator-max-microvolt = <1304000>; 443 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 444 }; 445 446 /* L3 & L4 are unused. */ 447 448 vreg_l5f_2p8: ldo5 { 449 regulator-name = "vreg_l5f_2p85"; 450 regulator-min-microvolt = <2800000>; 451 regulator-max-microvolt = <2800000>; 452 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 453 }; 454 455 vreg_l6f_2p8: ldo6 { 456 regulator-name = "vreg_l6f_2p8"; 457 regulator-min-microvolt = <2800000>; 458 regulator-max-microvolt = <2800000>; 459 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 460 }; 461 462 vreg_l7f_1p8: ldo7 { 463 regulator-name = "vreg_l7f_1p8"; 464 regulator-min-microvolt = <1800000>; 465 regulator-max-microvolt = <1800000>; 466 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 467 }; 468 }; 469}; 470 471&cdsp { 472 firmware-name = "qcom/sm8250/xiaomi/elish/cdsp.mbn"; 473 status = "okay"; 474}; 475 476&gmu { 477 status = "okay"; 478}; 479 480&gpi_dma0 { 481 status = "okay"; 482}; 483 484&gpi_dma1 { 485 status = "okay"; 486}; 487 488&gpi_dma2 { 489 status = "okay"; 490}; 491 492&gpu { 493 status = "okay"; 494 495 zap-shader { 496 memory-region = <&gpu_mem>; 497 firmware-name = "qcom/sm8250/xiaomi/elish/a650_zap.mbn"; 498 }; 499}; 500 501&i2c0 { 502 clock-frequency = <400000>; 503 status = "okay"; 504 505 fuel-gauge@55 { 506 compatible = "ti,bq27z561"; 507 reg = <0x55>; 508 monitored-battery = <&battery_r>; 509 }; 510}; 511 512&i2c11 { 513 clock-frequency = <400000>; 514 status = "okay"; 515 516 backlight: backlight@11 { 517 compatible = "kinetic,ktz8866"; 518 reg = <0x11>; 519 vddpos-supply = <&bl_vddpos_5p5>; 520 vddneg-supply = <&bl_vddneg_5p5>; 521 enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>; 522 current-num-sinks = <5>; 523 kinetic,current-ramp-delay-ms = <128>; 524 kinetic,led-enable-ramp-delay-ms = <1>; 525 kinetic,enable-lcd-bias; 526 }; 527}; 528 529&i2c13 { 530 clock-frequency = <400000>; 531 status = "okay"; 532 533 fuel-gauge@55 { 534 compatible = "ti,bq27z561"; 535 reg = <0x55>; 536 monitored-battery = <&battery_l>; 537 }; 538}; 539 540&pcie0 { 541 status = "okay"; 542}; 543 544&pcie0_phy { 545 vdda-phy-supply = <&vreg_l5a_0p88>; 546 vdda-pll-supply = <&vreg_l9a_1p2>; 547 status = "okay"; 548}; 549 550&pm8150_gpios { 551 vol_up_n: vol-up-n-state { 552 pins = "gpio6"; 553 function = "normal"; 554 power-source = <1>; 555 input-enable; 556 bias-pull-up; 557 }; 558}; 559 560&pon_pwrkey { 561 status = "okay"; 562}; 563 564&pon_resin { 565 linux,code = <KEY_VOLUMEDOWN>; 566 status = "okay"; 567}; 568 569&qupv3_id_0 { 570 status = "okay"; 571}; 572 573&qupv3_id_1 { 574 status = "okay"; 575}; 576 577&qupv3_id_2 { 578 status = "okay"; 579}; 580 581&slpi { 582 firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn"; 583 status = "okay"; 584}; 585 586&tlmm { 587 gpio-reserved-ranges = <40 4>; 588}; 589 590&usb_1 { 591 /* USB 2.0 only */ 592 qcom,select-utmi-as-pipe-clk; 593 status = "okay"; 594}; 595 596&usb_1_dwc3 { 597 dr_mode = "peripheral"; 598 maximum-spped = "high-speed"; 599 /* Remove USB3 phy */ 600 phys = <&usb_1_hsphy>; 601 phy-names = "usb2-phy"; 602}; 603 604&usb_1_hsphy { 605 vdda-pll-supply = <&vreg_l5a_0p88>; 606 vdda18-supply = <&vreg_l12a_1p8>; 607 vdda33-supply = <&vreg_l2a_3p1>; 608 status = "okay"; 609}; 610 611&ufs_mem_hc { 612 vcc-supply = <&vreg_l17a_3p0>; 613 vcc-max-microamp = <800000>; 614 vccq-supply = <&vreg_l6a_1p2>; 615 vccq-max-microamp = <800000>; 616 vccq2-supply = <&vreg_s4a_1p8>; 617 vccq2-max-microamp = <800000>; 618 status = "okay"; 619}; 620 621&ufs_mem_phy { 622 vdda-phy-supply = <&vreg_l5a_0p88>; 623 vdda-pll-supply = <&vreg_l9a_1p2>; 624 status = "okay"; 625}; 626 627&venus { 628 firmware-name = "qcom/sm8250/xiaomi/elish/venus.mbn"; 629 status = "okay"; 630}; 631