1// SPDX-License-Identifier: GPL-2.0 2#include "qcom-msm8974.dtsi" 3#include "pm8841.dtsi" 4#include "pm8941.dtsi" 5#include <dt-bindings/input/input.h> 6#include <dt-bindings/leds/common.h> 7#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 8 9/ { 10 model = "LGE MSM 8974 HAMMERHEAD"; 11 compatible = "lge,hammerhead", "qcom,msm8974"; 12 chassis-type = "handset"; 13 14 aliases { 15 serial0 = &blsp1_uart1; 16 serial1 = &blsp2_uart4; 17 }; 18 19 chosen { 20 stdout-path = "serial0:115200n8"; 21 }; 22 23 gpio-keys { 24 compatible = "gpio-keys"; 25 26 pinctrl-names = "default"; 27 pinctrl-0 = <&gpio_keys_pin_a>; 28 29 key-volume-up { 30 label = "volume_up"; 31 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; 32 linux,input-type = <1>; 33 linux,code = <KEY_VOLUMEUP>; 34 }; 35 36 key-volume-down { 37 label = "volume_down"; 38 gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; 39 linux,input-type = <1>; 40 linux,code = <KEY_VOLUMEDOWN>; 41 }; 42 }; 43 44 clk_pwm: pwm { 45 compatible = "clk-pwm"; 46 clocks = <&mmcc CAMSS_GP1_CLK>; 47 48 pinctrl-0 = <&vibrator_pin>; 49 pinctrl-names = "default"; 50 51 #pwm-cells = <2>; 52 }; 53 54 vibrator { 55 compatible = "pwm-vibrator"; 56 pwms = <&clk_pwm 0 100000>; 57 pwm-names = "enable"; 58 59 vcc-supply = <&pm8941_l19>; 60 enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>; 61 }; 62 63 vreg_boost: vreg-boost { 64 compatible = "regulator-fixed"; 65 66 regulator-name = "vreg-boost"; 67 regulator-min-microvolt = <3150000>; 68 regulator-max-microvolt = <3150000>; 69 70 regulator-always-on; 71 regulator-boot-on; 72 73 gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>; 74 enable-active-high; 75 76 pinctrl-names = "default"; 77 pinctrl-0 = <&boost_bypass_n_pin>; 78 }; 79 80 vreg_vph_pwr: vreg-vph-pwr { 81 compatible = "regulator-fixed"; 82 regulator-name = "vph-pwr"; 83 84 regulator-min-microvolt = <3600000>; 85 regulator-max-microvolt = <3600000>; 86 87 regulator-always-on; 88 }; 89 90 vreg_wlan: wlan-regulator { 91 compatible = "regulator-fixed"; 92 93 regulator-name = "wl-reg"; 94 regulator-min-microvolt = <3300000>; 95 regulator-max-microvolt = <3300000>; 96 97 gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>; 98 enable-active-high; 99 100 pinctrl-names = "default"; 101 pinctrl-0 = <&wlan_regulator_pin>; 102 }; 103}; 104 105&blsp1_i2c1 { 106 status = "okay"; 107 clock-frequency = <100000>; 108 109 charger: bq24192@6b { 110 compatible = "ti,bq24192"; 111 reg = <0x6b>; 112 interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>; 113 114 omit-battery-class; 115 116 usb_otg_vbus: usb-otg-vbus { }; 117 }; 118 119 fuelgauge: max17048@36 { 120 compatible = "maxim,max17048"; 121 reg = <0x36>; 122 123 maxim,double-soc; 124 maxim,rcomp = /bits/ 8 <0x4d>; 125 126 interrupt-parent = <&tlmm>; 127 interrupts = <9 IRQ_TYPE_LEVEL_LOW>; 128 129 pinctrl-names = "default"; 130 pinctrl-0 = <&fuelgauge_pin>; 131 132 maxim,alert-low-soc-level = <2>; 133 }; 134}; 135 136&blsp1_i2c2 { 137 status = "okay"; 138 clock-frequency = <355000>; 139 140 synaptics@70 { 141 compatible = "syna,rmi4-i2c"; 142 reg = <0x70>; 143 144 interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>; 145 vdd-supply = <&pm8941_l22>; 146 vio-supply = <&pm8941_lvs3>; 147 148 pinctrl-names = "default"; 149 pinctrl-0 = <&touch_pin>; 150 151 #address-cells = <1>; 152 #size-cells = <0>; 153 154 rmi4-f01@1 { 155 reg = <0x1>; 156 syna,nosleep-mode = <1>; 157 }; 158 159 rmi4-f12@12 { 160 reg = <0x12>; 161 syna,sensor-type = <1>; 162 }; 163 }; 164}; 165 166&blsp1_i2c3 { 167 status = "okay"; 168 clock-frequency = <100000>; 169 170 avago_apds993@39 { 171 compatible = "avago,apds9930"; 172 reg = <0x39>; 173 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; 174 vdd-supply = <&pm8941_l17>; 175 vddio-supply = <&pm8941_lvs1>; 176 led-max-microamp = <100000>; 177 amstaos,proximity-diodes = <0>; 178 }; 179}; 180 181&blsp2_i2c5 { 182 status = "okay"; 183 clock-frequency = <355000>; 184 185 led-controller@38 { 186 compatible = "ti,lm3630a"; 187 status = "okay"; 188 reg = <0x38>; 189 190 #address-cells = <1>; 191 #size-cells = <0>; 192 193 led@0 { 194 reg = <0>; 195 led-sources = <0 1>; 196 label = "lcd-backlight"; 197 default-brightness = <200>; 198 }; 199 }; 200}; 201 202&blsp2_i2c6 { 203 status = "okay"; 204 clock-frequency = <100000>; 205 206 mpu6515@68 { 207 compatible = "invensense,mpu6515"; 208 reg = <0x68>; 209 interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>; 210 vddio-supply = <&pm8941_lvs1>; 211 212 pinctrl-names = "default"; 213 pinctrl-0 = <&mpu6515_pin>; 214 215 mount-matrix = "0", "-1", "0", 216 "-1", "0", "0", 217 "0", "0", "1"; 218 219 i2c-gate { 220 #address-cells = <1>; 221 #size-cells = <0>; 222 ak8963@f { 223 compatible = "asahi-kasei,ak8963"; 224 reg = <0x0f>; 225 gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>; 226 vid-supply = <&pm8941_lvs1>; 227 vdd-supply = <&pm8941_l17>; 228 }; 229 230 bmp280@76 { 231 compatible = "bosch,bmp280"; 232 reg = <0x76>; 233 vdda-supply = <&pm8941_lvs1>; 234 vddd-supply = <&pm8941_l17>; 235 }; 236 }; 237 }; 238}; 239 240&blsp1_uart1 { 241 status = "okay"; 242}; 243 244&blsp2_uart4 { 245 status = "okay"; 246 247 bluetooth { 248 compatible = "brcm,bcm43438-bt"; 249 max-speed = <3000000>; 250 251 pinctrl-names = "default"; 252 pinctrl-0 = <&bt_pin>; 253 254 host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; 255 device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; 256 shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; 257 }; 258}; 259 260&mdss { 261 status = "okay"; 262}; 263 264&mdss_dsi0 { 265 status = "okay"; 266 267 vdda-supply = <&pm8941_l2>; 268 vdd-supply = <&pm8941_lvs3>; 269 vddio-supply = <&pm8941_l12>; 270 271 panel: panel@0 { 272 reg = <0>; 273 compatible = "lg,acx467akm-7"; 274 275 pinctrl-names = "default"; 276 pinctrl-0 = <&panel_pin>; 277 278 port { 279 panel_in: endpoint { 280 remote-endpoint = <&mdss_dsi0_out>; 281 }; 282 }; 283 }; 284}; 285 286&mdss_dsi0_out { 287 remote-endpoint = <&panel_in>; 288 data-lanes = <0 1 2 3>; 289}; 290 291&mdss_dsi0_phy { 292 status = "okay"; 293 294 vddio-supply = <&pm8941_l12>; 295}; 296 297&pm8941_gpios { 298 gpio_keys_pin_a: gpio-keys-active-state { 299 pins = "gpio2", "gpio3"; 300 function = "normal"; 301 302 bias-pull-up; 303 power-source = <PM8941_GPIO_S3>; 304 }; 305 306 fuelgauge_pin: fuelgauge-int-state { 307 pins = "gpio9"; 308 function = "normal"; 309 310 bias-disable; 311 input-enable; 312 power-source = <PM8941_GPIO_S3>; 313 }; 314 315 wlan_sleep_clk_pin: wl-sleep-clk-state { 316 pins = "gpio16"; 317 function = "func2"; 318 319 output-high; 320 power-source = <PM8941_GPIO_S3>; 321 }; 322 323 wlan_regulator_pin: wl-reg-active-state { 324 pins = "gpio17"; 325 function = "normal"; 326 327 bias-disable; 328 power-source = <PM8941_GPIO_S3>; 329 }; 330 331 otg { 332 gpio-hog; 333 gpios = <35 GPIO_ACTIVE_HIGH>; 334 output-high; 335 line-name = "otg-gpio"; 336 }; 337}; 338 339&pm8941_lpg { 340 status = "okay"; 341 342 qcom,power-source = <1>; 343 344 multi-led { 345 color = <LED_COLOR_ID_RGB>; 346 function = LED_FUNCTION_STATUS; 347 348 #address-cells = <1>; 349 #size-cells = <0>; 350 351 led@7 { 352 reg = <7>; 353 color = <LED_COLOR_ID_RED>; 354 }; 355 356 led@6 { 357 reg = <6>; 358 color = <LED_COLOR_ID_GREEN>; 359 }; 360 361 led@5 { 362 reg = <5>; 363 color = <LED_COLOR_ID_BLUE>; 364 }; 365 }; 366}; 367 368&remoteproc_adsp { 369 cx-supply = <&pm8841_s2>; 370 status = "okay"; 371}; 372 373&remoteproc_mss { 374 cx-supply = <&pm8841_s2>; 375 mss-supply = <&pm8841_s3>; 376 mx-supply = <&pm8841_s1>; 377 pll-supply = <&pm8941_l12>; 378 status = "okay"; 379}; 380 381&rpm_requests { 382 regulators-0 { 383 compatible = "qcom,rpm-pm8841-regulators"; 384 385 pm8841_s1: s1 { 386 regulator-min-microvolt = <675000>; 387 regulator-max-microvolt = <1050000>; 388 }; 389 390 pm8841_s2: s2 { 391 regulator-min-microvolt = <500000>; 392 regulator-max-microvolt = <1050000>; 393 }; 394 395 pm8841_s3: s3 { 396 regulator-min-microvolt = <1050000>; 397 regulator-max-microvolt = <1050000>; 398 }; 399 400 pm8841_s4: s4 { 401 regulator-min-microvolt = <815000>; 402 regulator-max-microvolt = <900000>; 403 }; 404 }; 405 406 regulators-1 { 407 compatible = "qcom,rpm-pm8941-regulators"; 408 409 vdd_l1_l3-supply = <&pm8941_s1>; 410 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; 411 vdd_l4_l11-supply = <&pm8941_s1>; 412 vdd_l5_l7-supply = <&pm8941_s2>; 413 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; 414 vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>; 415 vdd_l9_l10_l17_l22-supply = <&vreg_boost>; 416 vdd_l13_l20_l23_l24-supply = <&vreg_boost>; 417 vdd_l21-supply = <&vreg_boost>; 418 419 pm8941_s1: s1 { 420 regulator-min-microvolt = <1300000>; 421 regulator-max-microvolt = <1300000>; 422 regulator-always-on; 423 regulator-boot-on; 424 }; 425 426 pm8941_s2: s2 { 427 regulator-min-microvolt = <2150000>; 428 regulator-max-microvolt = <2150000>; 429 regulator-boot-on; 430 }; 431 432 pm8941_s3: s3 { 433 regulator-min-microvolt = <1800000>; 434 regulator-max-microvolt = <1800000>; 435 regulator-always-on; 436 regulator-boot-on; 437 }; 438 439 pm8941_l1: l1 { 440 regulator-min-microvolt = <1225000>; 441 regulator-max-microvolt = <1225000>; 442 regulator-always-on; 443 regulator-boot-on; 444 }; 445 446 pm8941_l2: l2 { 447 regulator-min-microvolt = <1200000>; 448 regulator-max-microvolt = <1200000>; 449 }; 450 451 pm8941_l3: l3 { 452 regulator-min-microvolt = <1225000>; 453 regulator-max-microvolt = <1225000>; 454 }; 455 456 pm8941_l4: l4 { 457 regulator-min-microvolt = <1225000>; 458 regulator-max-microvolt = <1225000>; 459 }; 460 461 pm8941_l5: l5 { 462 regulator-min-microvolt = <1800000>; 463 regulator-max-microvolt = <1800000>; 464 }; 465 466 pm8941_l6: l6 { 467 regulator-min-microvolt = <1800000>; 468 regulator-max-microvolt = <1800000>; 469 regulator-boot-on; 470 }; 471 472 pm8941_l7: l7 { 473 regulator-min-microvolt = <1800000>; 474 regulator-max-microvolt = <1800000>; 475 regulator-boot-on; 476 }; 477 478 pm8941_l8: l8 { 479 regulator-min-microvolt = <1800000>; 480 regulator-max-microvolt = <1800000>; 481 }; 482 483 pm8941_l9: l9 { 484 regulator-min-microvolt = <1800000>; 485 regulator-max-microvolt = <2950000>; 486 }; 487 488 pm8941_l10: l10 { 489 regulator-min-microvolt = <1800000>; 490 regulator-max-microvolt = <2950000>; 491 }; 492 493 pm8941_l11: l11 { 494 regulator-min-microvolt = <1300000>; 495 regulator-max-microvolt = <1300000>; 496 }; 497 498 pm8941_l12: l12 { 499 regulator-min-microvolt = <1800000>; 500 regulator-max-microvolt = <1800000>; 501 regulator-always-on; 502 regulator-boot-on; 503 }; 504 505 pm8941_l13: l13 { 506 regulator-min-microvolt = <1800000>; 507 regulator-max-microvolt = <2950000>; 508 regulator-boot-on; 509 }; 510 511 pm8941_l14: l14 { 512 regulator-min-microvolt = <1800000>; 513 regulator-max-microvolt = <1800000>; 514 }; 515 516 pm8941_l15: l15 { 517 regulator-min-microvolt = <2050000>; 518 regulator-max-microvolt = <2050000>; 519 }; 520 521 pm8941_l16: l16 { 522 regulator-min-microvolt = <2700000>; 523 regulator-max-microvolt = <2700000>; 524 }; 525 526 pm8941_l17: l17 { 527 regulator-min-microvolt = <2850000>; 528 regulator-max-microvolt = <2850000>; 529 }; 530 531 pm8941_l18: l18 { 532 regulator-min-microvolt = <2850000>; 533 regulator-max-microvolt = <2850000>; 534 }; 535 536 pm8941_l19: l19 { 537 regulator-min-microvolt = <3000000>; 538 regulator-max-microvolt = <3300000>; 539 }; 540 541 pm8941_l20: l20 { 542 regulator-min-microvolt = <2950000>; 543 regulator-max-microvolt = <2950000>; 544 regulator-system-load = <200000>; 545 regulator-allow-set-load; 546 regulator-boot-on; 547 }; 548 549 pm8941_l21: l21 { 550 regulator-min-microvolt = <2950000>; 551 regulator-max-microvolt = <2950000>; 552 regulator-boot-on; 553 }; 554 555 pm8941_l22: l22 { 556 regulator-min-microvolt = <3000000>; 557 regulator-max-microvolt = <3300000>; 558 }; 559 560 pm8941_l23: l23 { 561 regulator-min-microvolt = <3000000>; 562 regulator-max-microvolt = <3000000>; 563 }; 564 565 pm8941_l24: l24 { 566 regulator-min-microvolt = <3075000>; 567 regulator-max-microvolt = <3075000>; 568 regulator-boot-on; 569 }; 570 571 pm8941_lvs1: lvs1 {}; 572 pm8941_lvs3: lvs3 {}; 573 }; 574}; 575 576&sdhc_1 { 577 status = "okay"; 578 579 vmmc-supply = <&pm8941_l20>; 580 vqmmc-supply = <&pm8941_s3>; 581 582 pinctrl-names = "default", "sleep"; 583 pinctrl-0 = <&sdc1_on>; 584 pinctrl-1 = <&sdc1_off>; 585}; 586 587&sdhc_2 { 588 status = "okay"; 589 590 max-frequency = <100000000>; 591 vmmc-supply = <&vreg_wlan>; 592 vqmmc-supply = <&pm8941_s3>; 593 non-removable; 594 595 pinctrl-names = "default", "sleep"; 596 pinctrl-0 = <&sdc2_on>; 597 pinctrl-1 = <&sdc2_off>; 598 599 bcrmf@1 { 600 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; 601 reg = <1>; 602 603 brcm,drive-strength = <10>; 604 605 pinctrl-names = "default"; 606 pinctrl-0 = <&wlan_sleep_clk_pin>; 607 }; 608}; 609 610&tlmm { 611 sdc1_on: sdc1-on-state { 612 clk-pins { 613 pins = "sdc1_clk"; 614 drive-strength = <16>; 615 bias-disable; 616 }; 617 618 cmd-data-pins { 619 pins = "sdc1_cmd", "sdc1_data"; 620 drive-strength = <10>; 621 bias-pull-up; 622 }; 623 }; 624 625 sdc2_on: sdc2-on-state { 626 clk-pins { 627 pins = "sdc2_clk"; 628 drive-strength = <6>; 629 bias-disable; 630 }; 631 632 cmd-data-pins { 633 pins = "sdc2_cmd", "sdc2_data"; 634 drive-strength = <6>; 635 bias-pull-up; 636 }; 637 }; 638 639 mpu6515_pin: mpu6515-state { 640 pins = "gpio73"; 641 function = "gpio"; 642 bias-disable; 643 }; 644 645 touch_pin: touch-state { 646 int-pins { 647 pins = "gpio5"; 648 function = "gpio"; 649 650 drive-strength = <2>; 651 bias-disable; 652 }; 653 654 reset-pins { 655 pins = "gpio8"; 656 function = "gpio"; 657 658 drive-strength = <2>; 659 bias-pull-up; 660 }; 661 }; 662 663 panel_pin: panel-state { 664 pins = "gpio12"; 665 function = "mdp_vsync"; 666 drive-strength = <2>; 667 bias-disable; 668 }; 669 670 bt_pin: bt-state { 671 hostwake-pins { 672 pins = "gpio42"; 673 function = "gpio"; 674 }; 675 676 devwake-pins { 677 pins = "gpio62"; 678 function = "gpio"; 679 }; 680 681 shutdown-pins { 682 pins = "gpio41"; 683 function = "gpio"; 684 }; 685 }; 686 687 vibrator_pin: vibrator-state { 688 core-pins { 689 pins = "gpio27"; 690 function = "gp1_clk"; 691 drive-strength = <6>; 692 bias-disable; 693 }; 694 695 enable-pins { 696 pins = "gpio60"; 697 function = "gpio"; 698 drive-strength = <2>; 699 bias-disable; 700 }; 701 }; 702}; 703 704&usb { 705 status = "okay"; 706 707 phys = <&usb_hs1_phy>; 708 phy-select = <&tcsr 0xb000 0>; 709 710 extcon = <&charger>, <&usb_id>; 711 vbus-supply = <&usb_otg_vbus>; 712 713 hnp-disable; 714 srp-disable; 715 adp-disable; 716}; 717 718&usb_hs1_phy { 719 status = "okay"; 720 721 v1p8-supply = <&pm8941_l6>; 722 v3p3-supply = <&pm8941_l24>; 723 724 qcom,init-seq = /bits/ 8 <0x1 0x64>; 725}; 726