1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 3 * Copyright (c) 2020, Konrad Dybcio <konrad.dy 4 * Copyright (c) 2020, AngeloGioacchino Del Re 5 * <angelogioacchino.delreg 6 */ 7 8 #include "pm660.dtsi" 9 #include "pm660l.dtsi" 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/input/gpio-keys.h> 13 #include <dt-bindings/leds/common.h> 14 15 / { 16 /* required for bootloader to select c 17 qcom,msm-id = <318 0>; 18 qcom,board-id = <8 1>; 19 qcom,pmic-id = <0x1001b 0x101011a 0x00 20 21 /* This part enables graphical output 22 chosen { 23 bootargs = "earlycon=tty0 cons 24 25 #address-cells = <2>; 26 #size-cells = <2>; 27 ranges; 28 29 stdout-path = "framebuffer0"; 30 31 framebuffer0: framebuffer@9d40 32 compatible = "simple-f 33 reg = <0 0x9d400000 0 34 width = <1080>; 35 height = <1920>; 36 stride = <(1080 * 4)>; 37 format = "a8r8g8b8"; 38 status = "okay"; 39 }; 40 }; 41 42 board_vbat: vbat-regulator { 43 compatible = "regulator-fixed" 44 regulator-name = "VBAT"; 45 46 regulator-min-microvolt = <400 47 regulator-max-microvolt = <400 48 regulator-always-on; 49 regulator-boot-on; 50 }; 51 52 vph_pwr: vph-pwr-regulator { 53 compatible = "regulator-fixed" 54 regulator-name = "vph_pwr"; 55 56 regulator-always-on; 57 regulator-boot-on; 58 }; 59 60 cam_vdig_imx300_219_vreg: cam-vdig-imx 61 compatible = "regulator-fixed" 62 regulator-name = "cam_vdig_imx 63 startup-delay-us = <0>; 64 enable-active-high; 65 gpio = <&tlmm 52 GPIO_ACTIVE_H 66 pinctrl-names = "default"; 67 pinctrl-0 = <&cam_vdig_default 68 }; 69 70 cam_vana_front_vreg: cam-vana-front-re 71 compatible = "regulator-fixed" 72 regulator-name = "cam_vana_fro 73 startup-delay-us = <0>; 74 enable-active-high; 75 gpio = <&tlmm 51 GPIO_ACTIVE_H 76 pinctrl-names = "default"; 77 pinctrl-0 = <&imx219_vana_defa 78 }; 79 80 cam_vana_rear_vreg: cam-vana-rear-regu 81 compatible = "regulator-fixed" 82 regulator-name = "cam_vana_rea 83 startup-delay-us = <0>; 84 enable-active-high; 85 gpio = <&tlmm 50 GPIO_ACTIVE_H 86 regulator-always-on; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&imx300_vana_defa 89 }; 90 91 gpio-keys { 92 compatible = "gpio-keys"; 93 pinctrl-0 = <&gpio_keys_defaul 94 pinctrl-names = "default"; 95 96 key-camera-focus { 97 label = "Camera Focus" 98 gpios = <&tlmm 64 GPIO 99 linux,input-type = <1> 100 linux,code = <KEY_CAME 101 debounce-interval = <1 102 }; 103 104 key-camera-snapshot { 105 label = "Camera Snapsh 106 gpios = <&tlmm 113 GPI 107 linux,input-type = <1> 108 linux,code = <KEY_CAME 109 debounce-interval = <1 110 }; 111 112 key-vol-down { 113 label = "Volume Down"; 114 gpios = <&pm660l_gpios 115 linux,input-type = <1> 116 linux,code = <KEY_VOLU 117 wakeup-source; 118 debounce-interval = <1 119 }; 120 }; 121 122 reserved-memory { 123 #address-cells = <2>; 124 #size-cells = <2>; 125 ranges; 126 127 ramoops@ffc00000 { 128 compatible = "ramoops" 129 reg = <0x0 0xffc00000 130 record-size = <0x10000 131 console-size = <0x6000 132 ftrace-size = <0x10000 133 pmsg-size = <0x20000>; 134 ecc-size = <16>; 135 status = "okay"; 136 }; 137 138 debug@ffb00000 { 139 reg = <0x00 0xffb00000 140 no-map; 141 }; 142 143 cont_splash_mem: splash@9d4000 144 reg = <0 0x9d400000 0 145 no-map; 146 }; 147 }; 148 149 /* 150 * Until we hook up type-c detection, 151 * have to stick with this. But it wor 152 */ 153 extcon_usb: extcon-usb { 154 compatible = "linux,extcon-usb 155 id-gpios = <&tlmm 58 GPIO_ACTI 156 }; 157 }; 158 159 &adsp_pil { 160 firmware-name = "qcom/sdm630/Sony/nile 161 }; 162 163 &blsp_i2c1 { 164 status = "okay"; 165 166 touchscreen: synaptics-rmi4-i2c@70 { 167 compatible = "syna,rmi4-i2c"; 168 reg = <0x70>; 169 #address-cells = <1>; 170 #size-cells = <0>; 171 interrupts-extended = <&tlmm 4 172 173 pinctrl-names = "default"; 174 pinctrl-0 = <&ts_int_active &t 175 176 syna,reset-delay-ms = <200>; 177 syna,startup-delay-ms = <220>; 178 179 rmi4-f01@1 { 180 reg = <0x01>; 181 syna,nosleep-mode = <1 182 }; 183 184 rmi4-f11@11 { 185 reg = <0x11>; 186 syna,sensor-type = <1> 187 }; 188 }; 189 }; 190 191 &blsp_i2c2 { 192 status = "okay"; 193 194 /* SMB1351 charger */ 195 }; 196 197 /* I2C3, 4, 5, 7 and 8 are disabled on this bo 198 199 &blsp_i2c6 { 200 status = "okay"; 201 202 /* NXP NFC */ 203 }; 204 205 &blsp1_uart2 { 206 status = "okay"; 207 208 /* MSM serial console */ 209 }; 210 211 &blsp2_uart1 { 212 status = "okay"; 213 214 /* HCI Bluetooth */ 215 }; 216 217 &pm660l_lpg { 218 qcom,power-source = <1>; 219 220 status = "okay"; 221 222 multi-led { 223 color = <LED_COLOR_ID_RGB>; 224 function = LED_FUNCTION_STATUS 225 226 #address-cells = <1>; 227 #size-cells = <0>; 228 229 led@1 { 230 reg = <1>; 231 color = <LED_COLOR_ID_ 232 }; 233 234 led@2 { 235 reg = <2>; 236 color = <LED_COLOR_ID_ 237 }; 238 239 led@3 { 240 reg = <3>; 241 color = <LED_COLOR_ID_ 242 }; 243 }; 244 }; 245 246 &pm660l_wled { 247 status = "okay"; 248 249 qcom,switching-freq = <800>; 250 qcom,ovp-millivolt = <29600>; 251 qcom,current-boost-limit = <970>; 252 qcom,current-limit-microamp = <17500>; 253 qcom,num-strings = <2>; 254 }; 255 256 &pon_pwrkey { 257 status = "okay"; 258 }; 259 260 &pon_resin { 261 status = "okay"; 262 263 linux,code = <KEY_VOLUMEUP>; 264 }; 265 266 &qhee_code { 267 reg = <0x00 0x85800000 0x00 0x3700000> 268 }; 269 270 &qusb2phy0 { 271 status = "okay"; 272 273 vdd-supply = <&vreg_l1b_0p925>; 274 vdda-pll-supply = <&vreg_l10a_1p8>; 275 vdda-phy-dpdm-supply = <&vreg_l7b_3p12 276 }; 277 278 &rpm_requests { 279 regulators-0 { 280 compatible = "qcom,rpm-pm660l- 281 282 vdd_s1-supply = <&vph_pwr>; 283 vdd_s2-supply = <&vph_pwr>; 284 vdd_s3_s4-supply = <&vph_pwr>; 285 vdd_s5-supply = <&vph_pwr>; 286 vdd_s6-supply = <&vph_pwr>; 287 288 vdd_l1_l9_l10-supply = <&vreg_ 289 vdd_l2-supply = <&vreg_bob>; 290 vdd_l3_l5_l7_l8-supply = <&vre 291 vdd_l4_l6-supply = <&vreg_bob> 292 vdd_bob-supply = <&vph_pwr>; 293 294 vreg_s1b_1p125: s1 { 295 regulator-min-microvol 296 regulator-max-microvol 297 regulator-enable-ramp- 298 regulator-ramp-delay = 299 }; 300 301 vreg_s2b_1p05: s2 { 302 regulator-min-microvol 303 regulator-max-microvol 304 regulator-enable-ramp- 305 regulator-ramp-delay = 306 }; 307 308 /* 309 * At least on Nile's configur 310 * S5B (VDD_MX) are managed on 311 * Trying to set a voltage on 312 * havoc and freeze the SoC. 313 * In any case, reference volt 314 * S3B/S4B: 0.870V 315 * S5B: 0.915V 316 */ 317 318 /* LDOs */ 319 vreg_l1b_0p925: l1 { 320 regulator-min-microvol 321 regulator-max-microvol 322 regulator-enable-ramp- 323 regulator-ramp-delay = 324 regulator-allow-set-lo 325 }; 326 327 vreg_l2b_2p95: l2 { 328 /* 329 * This regulator supp 330 * but we set a max vo 331 * to satisfy a condit 332 * 3.3V SDHCI signalin 333 * supported on the Xp 334 */ 335 regulator-min-microvol 336 regulator-max-microvol 337 regulator-enable-ramp- 338 regulator-ramp-delay = 339 regulator-allow-set-lo 340 }; 341 342 vreg_l3b_3p0: l3 { 343 regulator-min-microvol 344 regulator-max-microvol 345 regulator-enable-ramp- 346 regulator-ramp-delay = 347 regulator-min-microamp 348 regulator-max-microamp 349 regulator-system-load 350 regulator-allow-set-lo 351 }; 352 353 vreg_l4b_2p95: l4 { 354 regulator-min-microvol 355 regulator-max-microvol 356 regulator-enable-ramp- 357 regulator-ramp-delay = 358 359 regulator-min-microamp 360 regulator-max-microamp 361 regulator-system-load 362 regulator-allow-set-lo 363 }; 364 365 /* 366 * Downstream specifies a rang 367 * but the only assigned consu 368 * and Coresight QPDI that bot 369 * Tighten the range to 1.8-3. 370 * make the mmc driver happy. 371 */ 372 vreg_l5b_2p95: l5 { 373 regulator-min-microvol 374 regulator-max-microvol 375 regulator-enable-ramp- 376 regulator-ramp-delay = 377 regulator-allow-set-lo 378 regulator-system-load 379 }; 380 381 vreg_l6b_3p3: l6 { 382 regulator-min-microvol 383 regulator-max-microvol 384 regulator-enable-ramp- 385 regulator-ramp-delay = 386 }; 387 388 vreg_l7b_3p125: l7 { 389 regulator-min-microvol 390 regulator-max-microvol 391 regulator-enable-ramp- 392 regulator-ramp-delay = 393 }; 394 395 vreg_l8b_3p3: l8 { 396 regulator-min-microvol 397 regulator-max-microvol 398 regulator-enable-ramp- 399 regulator-ramp-delay = 400 }; 401 402 /* L9B (870mV) is currently un 403 /* L10B (915mV) is currently u 404 405 vreg_bob: bob { 406 regulator-min-microvol 407 regulator-max-microvol 408 regulator-enable-ramp- 409 regulator-ramp-delay = 410 }; 411 }; 412 413 regulators-1 { 414 compatible = "qcom,rpm-pm660-r 415 416 vdd_s1-supply = <&vph_pwr>; 417 vdd_s2-supply = <&vph_pwr>; 418 vdd_s3-supply = <&vph_pwr>; 419 vdd_s4-supply = <&vph_pwr>; 420 vdd_s5-supply = <&vph_pwr>; 421 vdd_s6-supply = <&vph_pwr>; 422 423 vdd_l1_l6_l7-supply = <&vreg_s 424 vdd_l2_l3-supply = <&vreg_s2b_ 425 vdd_l5-supply = <&vreg_s2b_1p0 426 vdd_l8_l9_l10_l11_l12_l13_l14- 427 vdd_l15_l16_l17_l18_l19-supply 428 429 /* 430 * S1A (FTAPC0), S2A (FTAPC1), 431 * by the Core Power Reduction 432 * Operating State Manager (OS 433 */ 434 435 vreg_s4a_2p04: s4 { 436 regulator-min-microvol 437 regulator-max-microvol 438 regulator-enable-ramp- 439 regulator-ramp-delay = 440 regulator-always-on; 441 }; 442 443 vreg_s5a_1p35: s5 { 444 regulator-min-microvol 445 regulator-max-microvol 446 regulator-enable-ramp- 447 regulator-ramp-delay = 448 }; 449 450 vreg_s6a_0p87: s6 { 451 regulator-min-microvol 452 regulator-max-microvol 453 regulator-enable-ramp- 454 regulator-ramp-delay = 455 }; 456 457 /* LDOs */ 458 vreg_l1a_1p225: l1 { 459 regulator-min-microvol 460 regulator-max-microvol 461 regulator-enable-ramp- 462 regulator-ramp-delay = 463 regulator-allow-set-lo 464 }; 465 466 vreg_l2a_1p0: l2 { 467 regulator-min-microvol 468 regulator-max-microvol 469 regulator-enable-ramp- 470 regulator-ramp-delay = 471 }; 472 473 vreg_l3a_1p0: l3 { 474 regulator-min-microvol 475 regulator-max-microvol 476 regulator-enable-ramp- 477 regulator-ramp-delay = 478 }; 479 480 vreg_l5a_0p848: l5 { 481 regulator-min-microvol 482 regulator-max-microvol 483 regulator-enable-ramp- 484 regulator-ramp-delay = 485 }; 486 487 vreg_l6a_1p3: l6 { 488 regulator-min-microvol 489 regulator-max-microvol 490 regulator-allow-set-lo 491 regulator-enable-ramp- 492 regulator-ramp-delay = 493 }; 494 495 vreg_l7a_1p2: l7 { 496 regulator-min-microvol 497 regulator-max-microvol 498 regulator-enable-ramp- 499 regulator-ramp-delay = 500 }; 501 502 vreg_l8a_1p8: l8 { 503 regulator-min-microvol 504 regulator-max-microvol 505 regulator-enable-ramp- 506 regulator-ramp-delay = 507 regulator-system-load 508 regulator-allow-set-lo 509 }; 510 511 vreg_l9a_1p8: l9 { 512 regulator-min-microvol 513 regulator-max-microvol 514 regulator-enable-ramp- 515 regulator-ramp-delay = 516 regulator-allow-set-lo 517 }; 518 519 vreg_l10a_1p8: l10 { 520 regulator-min-microvol 521 regulator-max-microvol 522 regulator-enable-ramp- 523 regulator-ramp-delay = 524 regulator-allow-set-lo 525 }; 526 527 vreg_l11a_1p8: l11 { 528 regulator-min-microvol 529 regulator-max-microvol 530 regulator-enable-ramp- 531 regulator-ramp-delay = 532 }; 533 534 vreg_l12a_1p8: l12 { 535 regulator-min-microvol 536 regulator-max-microvol 537 regulator-enable-ramp- 538 regulator-ramp-delay = 539 }; 540 541 /* This gives power to the LPD 542 vreg_l13a_1p8: l13 { 543 regulator-min-microvol 544 regulator-max-microvol 545 regulator-enable-ramp- 546 regulator-ramp-delay = 547 regulator-boot-on; 548 regulator-always-on; 549 }; 550 551 vreg_l14a_1p8: l14 { 552 regulator-min-microvol 553 regulator-max-microvol 554 regulator-enable-ramp- 555 regulator-ramp-delay = 556 }; 557 558 vreg_l15a_1p8: l15 { 559 regulator-min-microvol 560 regulator-max-microvol 561 regulator-enable-ramp- 562 regulator-ramp-delay = 563 }; 564 565 /* L16A (2.70V) is unused */ 566 567 vreg_l17a_1p8: l17 { 568 regulator-min-microvol 569 regulator-max-microvol 570 regulator-enable-ramp- 571 regulator-ramp-delay = 572 }; 573 574 vreg_l18a_1v8: l18 { 575 regulator-min-microvol 576 regulator-max-microvol 577 regulator-enable-ramp- 578 regulator-ramp-delay = 579 regulator-min-microamp 580 regulator-max-microamp 581 regulator-system-load 582 regulator-allow-set-lo 583 }; 584 585 vreg_l19a_3p3: l19 { 586 regulator-min-microvol 587 regulator-max-microvol 588 regulator-enable-ramp- 589 regulator-ramp-delay = 590 regulator-allow-set-lo 591 }; 592 }; 593 }; 594 595 &sdc2_state_on { 596 sd-cd-pins { 597 pins = "gpio54"; 598 function = "gpio"; 599 bias-pull-up; 600 drive-strength = <2>; 601 }; 602 }; 603 604 &sdc2_state_off { 605 sd-cd-pins { 606 pins = "gpio54"; 607 function = "gpio"; 608 bias-disable; 609 drive-strength = <2>; 610 }; 611 }; 612 613 &sdhc_1 { 614 status = "okay"; 615 supports-cqe; 616 617 /* SoMC Nile platform's eMMC doesn't s 618 mmc-ddr-1_8v; 619 mmc-hs400-1_8v; 620 mmc-hs400-enhanced-strobe; 621 622 vmmc-supply = <&vreg_l4b_2p95>; 623 vqmmc-supply = <&vreg_l8a_1p8>; 624 }; 625 626 &sdhc_2 { 627 status = "okay"; 628 629 vmmc-supply = <&vreg_l5b_2p95>; 630 vqmmc-supply = <&vreg_l2b_2p95>; 631 }; 632 633 &tlmm { 634 gpio-reserved-ranges = <8 4>; 635 636 ts_int_active: ts-int-active-state { 637 pins = "gpio45"; 638 function = "gpio"; 639 drive-strength = <8>; 640 bias-pull-up; 641 }; 642 643 ts_lcd_id_active: ts-lcd-id-active-sta 644 pins = "gpio56"; 645 function = "gpio"; 646 drive-strength = <8>; 647 bias-disable; 648 }; 649 650 gpio_keys_default: gpio-keys-default-s 651 pins = "gpio64", "gpio113"; 652 function = "gpio"; 653 drive-strength = <2>; 654 bias-pull-up; 655 }; 656 657 imx300_vana_default: imx300-vana-defau 658 pins = "gpio50"; 659 function = "gpio"; 660 bias-disable; 661 drive-strength = <2>; 662 }; 663 664 imx219_vana_default: imx219-vana-defau 665 pins = "gpio51"; 666 function = "gpio"; 667 bias-disable; 668 drive-strength = <2>; 669 }; 670 671 cam_vdig_default: cam-vdig-default-sta 672 pins = "gpio52"; 673 function = "gpio"; 674 bias-disable; 675 drive-strength = <2>; 676 }; 677 }; 678 679 &usb3 { 680 qcom,select-utmi-as-pipe-clk; 681 682 status = "okay"; 683 }; 684 685 &usb3_dwc3 { 686 maximum-speed = "high-speed"; 687 phys = <&qusb2phy0>; 688 phy-names = "usb2-phy"; 689 690 dr_mode = "peripheral"; 691 extcon = <&extcon_usb>; 692 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.