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