0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "qcom-msm8974.dtsi"
0003 #include "qcom-pm8841.dtsi"
0004 #include "qcom-pm8941.dtsi"
0005 #include <dt-bindings/input/input.h>
0006 #include <dt-bindings/leds/common.h>
0007 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0008
0009 / {
0010 model = "LGE MSM 8974 HAMMERHEAD";
0011 compatible = "lge,hammerhead", "qcom,msm8974";
0012
0013 aliases {
0014 serial0 = &blsp1_uart1;
0015 serial1 = &blsp2_uart4;
0016 };
0017
0018 chosen {
0019 stdout-path = "serial0:115200n8";
0020 };
0021
0022 gpio-keys {
0023 compatible = "gpio-keys";
0024
0025 pinctrl-names = "default";
0026 pinctrl-0 = <&gpio_keys_pin_a>;
0027
0028 key-volume-up {
0029 label = "volume_up";
0030 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
0031 linux,input-type = <1>;
0032 linux,code = <KEY_VOLUMEUP>;
0033 };
0034
0035 key-volume-down {
0036 label = "volume_down";
0037 gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
0038 linux,input-type = <1>;
0039 linux,code = <KEY_VOLUMEDOWN>;
0040 };
0041 };
0042
0043 vreg_wlan: wlan-regulator {
0044 compatible = "regulator-fixed";
0045
0046 regulator-name = "wl-reg";
0047 regulator-min-microvolt = <3300000>;
0048 regulator-max-microvolt = <3300000>;
0049
0050 gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
0051 enable-active-high;
0052
0053 pinctrl-names = "default";
0054 pinctrl-0 = <&wlan_regulator_pin>;
0055 };
0056 };
0057
0058 &blsp1_i2c1 {
0059 status = "okay";
0060 clock-frequency = <100000>;
0061
0062 charger: bq24192@6b {
0063 compatible = "ti,bq24192";
0064 reg = <0x6b>;
0065 interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>;
0066
0067 omit-battery-class;
0068
0069 usb_otg_vbus: usb-otg-vbus { };
0070 };
0071
0072 fuelgauge: max17048@36 {
0073 compatible = "maxim,max17048";
0074 reg = <0x36>;
0075
0076 maxim,double-soc;
0077 maxim,rcomp = /bits/ 8 <0x4d>;
0078
0079 interrupt-parent = <&tlmm>;
0080 interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
0081
0082 pinctrl-names = "default";
0083 pinctrl-0 = <&fuelgauge_pin>;
0084
0085 maxim,alert-low-soc-level = <2>;
0086 };
0087 };
0088
0089 &blsp1_i2c2 {
0090 status = "okay";
0091 clock-frequency = <355000>;
0092
0093 synaptics@70 {
0094 compatible = "syna,rmi4-i2c";
0095 reg = <0x70>;
0096
0097 interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>;
0098 vdd-supply = <&pm8941_l22>;
0099 vio-supply = <&pm8941_lvs3>;
0100
0101 pinctrl-names = "default";
0102 pinctrl-0 = <&touch_pin>;
0103
0104 #address-cells = <1>;
0105 #size-cells = <0>;
0106
0107 rmi4-f01@1 {
0108 reg = <0x1>;
0109 syna,nosleep-mode = <1>;
0110 };
0111
0112 rmi4-f12@12 {
0113 reg = <0x12>;
0114 syna,sensor-type = <1>;
0115 };
0116 };
0117 };
0118
0119 &blsp1_i2c3 {
0120 status = "okay";
0121 clock-frequency = <100000>;
0122
0123 avago_apds993@39 {
0124 compatible = "avago,apds9930";
0125 reg = <0x39>;
0126 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
0127 vdd-supply = <&pm8941_l17>;
0128 vddio-supply = <&pm8941_lvs1>;
0129 led-max-microamp = <100000>;
0130 amstaos,proximity-diodes = <0>;
0131 };
0132 };
0133
0134 &blsp2_i2c5 {
0135 status = "okay";
0136 clock-frequency = <355000>;
0137
0138 led-controller@38 {
0139 compatible = "ti,lm3630a";
0140 status = "okay";
0141 reg = <0x38>;
0142
0143 #address-cells = <1>;
0144 #size-cells = <0>;
0145
0146 led@0 {
0147 reg = <0>;
0148 led-sources = <0 1>;
0149 label = "lcd-backlight";
0150 default-brightness = <200>;
0151 };
0152 };
0153 };
0154
0155 &blsp2_i2c6 {
0156 status = "okay";
0157 clock-frequency = <100000>;
0158
0159 mpu6515@68 {
0160 compatible = "invensense,mpu6515";
0161 reg = <0x68>;
0162 interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>;
0163 vddio-supply = <&pm8941_lvs1>;
0164
0165 pinctrl-names = "default";
0166 pinctrl-0 = <&mpu6515_pin>;
0167
0168 mount-matrix = "0", "-1", "0",
0169 "-1", "0", "0",
0170 "0", "0", "1";
0171
0172 i2c-gate {
0173 #address-cells = <1>;
0174 #size-cells = <0>;
0175 ak8963@f {
0176 compatible = "asahi-kasei,ak8963";
0177 reg = <0x0f>;
0178 gpios = <&tlmm 67 0>;
0179 vid-supply = <&pm8941_lvs1>;
0180 vdd-supply = <&pm8941_l17>;
0181 };
0182
0183 bmp280@76 {
0184 compatible = "bosch,bmp280";
0185 reg = <0x76>;
0186 vdda-supply = <&pm8941_lvs1>;
0187 vddd-supply = <&pm8941_l17>;
0188 };
0189 };
0190 };
0191 };
0192
0193 &blsp1_uart1 {
0194 status = "okay";
0195 };
0196
0197 &blsp2_uart4 {
0198 status = "okay";
0199
0200 bluetooth {
0201 compatible = "brcm,bcm43438-bt";
0202 max-speed = <3000000>;
0203
0204 pinctrl-names = "default";
0205 pinctrl-0 = <&bt_pin>;
0206
0207 host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
0208 device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
0209 shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
0210 };
0211 };
0212
0213 &dsi0 {
0214 status = "okay";
0215
0216 vdda-supply = <&pm8941_l2>;
0217 vdd-supply = <&pm8941_lvs3>;
0218 vddio-supply = <&pm8941_l12>;
0219
0220 panel: panel@0 {
0221 reg = <0>;
0222 compatible = "lg,acx467akm-7";
0223
0224 pinctrl-names = "default";
0225 pinctrl-0 = <&panel_pin>;
0226
0227 port {
0228 panel_in: endpoint {
0229 remote-endpoint = <&dsi0_out>;
0230 };
0231 };
0232 };
0233 };
0234
0235 &dsi0_out {
0236 remote-endpoint = <&panel_in>;
0237 data-lanes = <0 1 2 3>;
0238 };
0239
0240 &dsi0_phy {
0241 status = "okay";
0242
0243 vddio-supply = <&pm8941_l12>;
0244 };
0245
0246 &mdss {
0247 status = "okay";
0248 };
0249
0250 &otg {
0251 status = "okay";
0252
0253 phys = <&usb_hs1_phy>;
0254 phy-select = <&tcsr 0xb000 0>;
0255
0256 extcon = <&charger>, <&usb_id>;
0257 vbus-supply = <&usb_otg_vbus>;
0258
0259 hnp-disable;
0260 srp-disable;
0261 adp-disable;
0262
0263 ulpi {
0264 phy@a {
0265 status = "okay";
0266
0267 v1p8-supply = <&pm8941_l6>;
0268 v3p3-supply = <&pm8941_l24>;
0269
0270 qcom,init-seq = /bits/ 8 <0x1 0x64>;
0271 };
0272 };
0273 };
0274
0275 &pm8941_gpios {
0276 gpio_keys_pin_a: gpio-keys-active-state {
0277 pins = "gpio2", "gpio3";
0278 function = "normal";
0279
0280 bias-pull-up;
0281 power-source = <PM8941_GPIO_S3>;
0282 };
0283
0284 fuelgauge_pin: fuelgauge-int-state {
0285 pins = "gpio9";
0286 function = "normal";
0287
0288 bias-disable;
0289 input-enable;
0290 power-source = <PM8941_GPIO_S3>;
0291 };
0292
0293 wlan_sleep_clk_pin: wl-sleep-clk-state {
0294 pins = "gpio16";
0295 function = "func2";
0296
0297 output-high;
0298 power-source = <PM8941_GPIO_S3>;
0299 };
0300
0301 wlan_regulator_pin: wl-reg-active-state {
0302 pins = "gpio17";
0303 function = "normal";
0304
0305 bias-disable;
0306 power-source = <PM8941_GPIO_S3>;
0307 };
0308
0309 otg {
0310 gpio-hog;
0311 gpios = <35 GPIO_ACTIVE_HIGH>;
0312 output-high;
0313 line-name = "otg-gpio";
0314 };
0315 };
0316
0317 &pm8941_lpg {
0318 status = "okay";
0319
0320 qcom,power-source = <1>;
0321
0322 multi-led {
0323 color = <LED_COLOR_ID_RGB>;
0324 function = LED_FUNCTION_STATUS;
0325
0326 #address-cells = <1>;
0327 #size-cells = <0>;
0328
0329 led@7 {
0330 reg = <7>;
0331 color = <LED_COLOR_ID_RED>;
0332 };
0333
0334 led@6 {
0335 reg = <6>;
0336 color = <LED_COLOR_ID_GREEN>;
0337 };
0338
0339 led@5 {
0340 reg = <5>;
0341 color = <LED_COLOR_ID_BLUE>;
0342 };
0343 };
0344 };
0345
0346 &rpm_requests {
0347 pm8841-regulators {
0348 compatible = "qcom,rpm-pm8841-regulators";
0349
0350 pm8841_s1: s1 {
0351 regulator-min-microvolt = <675000>;
0352 regulator-max-microvolt = <1050000>;
0353 };
0354
0355 pm8841_s2: s2 {
0356 regulator-min-microvolt = <500000>;
0357 regulator-max-microvolt = <1050000>;
0358 };
0359
0360 pm8841_s3: s3 {
0361 regulator-min-microvolt = <1050000>;
0362 regulator-max-microvolt = <1050000>;
0363 };
0364
0365 pm8841_s4: s4 {
0366 regulator-min-microvolt = <815000>;
0367 regulator-max-microvolt = <900000>;
0368 };
0369 };
0370
0371 pm8941-regulators {
0372 compatible = "qcom,rpm-pm8941-regulators";
0373
0374 vdd_l1_l3-supply = <&pm8941_s1>;
0375 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
0376 vdd_l4_l11-supply = <&pm8941_s1>;
0377 vdd_l5_l7-supply = <&pm8941_s2>;
0378 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
0379 vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>;
0380 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
0381 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
0382 vdd_l21-supply = <&vreg_boost>;
0383
0384 pm8941_s1: s1 {
0385 regulator-min-microvolt = <1300000>;
0386 regulator-max-microvolt = <1300000>;
0387 regulator-always-on;
0388 regulator-boot-on;
0389 };
0390
0391 pm8941_s2: s2 {
0392 regulator-min-microvolt = <2150000>;
0393 regulator-max-microvolt = <2150000>;
0394 regulator-boot-on;
0395 };
0396
0397 pm8941_s3: s3 {
0398 regulator-min-microvolt = <1800000>;
0399 regulator-max-microvolt = <1800000>;
0400 regulator-always-on;
0401 regulator-boot-on;
0402 };
0403
0404 pm8941_l1: l1 {
0405 regulator-min-microvolt = <1225000>;
0406 regulator-max-microvolt = <1225000>;
0407 regulator-always-on;
0408 regulator-boot-on;
0409 };
0410
0411 pm8941_l2: l2 {
0412 regulator-min-microvolt = <1200000>;
0413 regulator-max-microvolt = <1200000>;
0414 };
0415
0416 pm8941_l3: l3 {
0417 regulator-min-microvolt = <1225000>;
0418 regulator-max-microvolt = <1225000>;
0419 };
0420
0421 pm8941_l4: l4 {
0422 regulator-min-microvolt = <1225000>;
0423 regulator-max-microvolt = <1225000>;
0424 };
0425
0426 pm8941_l5: l5 {
0427 regulator-min-microvolt = <1800000>;
0428 regulator-max-microvolt = <1800000>;
0429 };
0430
0431 pm8941_l6: l6 {
0432 regulator-min-microvolt = <1800000>;
0433 regulator-max-microvolt = <1800000>;
0434 regulator-boot-on;
0435 };
0436
0437 pm8941_l7: l7 {
0438 regulator-min-microvolt = <1800000>;
0439 regulator-max-microvolt = <1800000>;
0440 regulator-boot-on;
0441 };
0442
0443 pm8941_l8: l8 {
0444 regulator-min-microvolt = <1800000>;
0445 regulator-max-microvolt = <1800000>;
0446 };
0447
0448 pm8941_l9: l9 {
0449 regulator-min-microvolt = <1800000>;
0450 regulator-max-microvolt = <2950000>;
0451 };
0452
0453 pm8941_l10: l10 {
0454 regulator-min-microvolt = <1800000>;
0455 regulator-max-microvolt = <2950000>;
0456 };
0457
0458 pm8941_l11: l11 {
0459 regulator-min-microvolt = <1300000>;
0460 regulator-max-microvolt = <1300000>;
0461 };
0462
0463 pm8941_l12: l12 {
0464 regulator-min-microvolt = <1800000>;
0465 regulator-max-microvolt = <1800000>;
0466 regulator-always-on;
0467 regulator-boot-on;
0468 };
0469
0470 pm8941_l13: l13 {
0471 regulator-min-microvolt = <1800000>;
0472 regulator-max-microvolt = <2950000>;
0473 regulator-boot-on;
0474 };
0475
0476 pm8941_l14: l14 {
0477 regulator-min-microvolt = <1800000>;
0478 regulator-max-microvolt = <1800000>;
0479 };
0480
0481 pm8941_l15: l15 {
0482 regulator-min-microvolt = <2050000>;
0483 regulator-max-microvolt = <2050000>;
0484 };
0485
0486 pm8941_l16: l16 {
0487 regulator-min-microvolt = <2700000>;
0488 regulator-max-microvolt = <2700000>;
0489 };
0490
0491 pm8941_l17: l17 {
0492 regulator-min-microvolt = <2850000>;
0493 regulator-max-microvolt = <2850000>;
0494 };
0495
0496 pm8941_l18: l18 {
0497 regulator-min-microvolt = <2850000>;
0498 regulator-max-microvolt = <2850000>;
0499 };
0500
0501 pm8941_l19: l19 {
0502 regulator-min-microvolt = <3000000>;
0503 regulator-max-microvolt = <3300000>;
0504 };
0505
0506 pm8941_l20: l20 {
0507 regulator-min-microvolt = <2950000>;
0508 regulator-max-microvolt = <2950000>;
0509 regulator-system-load = <200000>;
0510 regulator-allow-set-load;
0511 regulator-boot-on;
0512 };
0513
0514 pm8941_l21: l21 {
0515 regulator-min-microvolt = <2950000>;
0516 regulator-max-microvolt = <2950000>;
0517 regulator-boot-on;
0518 };
0519
0520 pm8941_l22: l22 {
0521 regulator-min-microvolt = <3000000>;
0522 regulator-max-microvolt = <3300000>;
0523 };
0524
0525 pm8941_l23: l23 {
0526 regulator-min-microvolt = <3000000>;
0527 regulator-max-microvolt = <3000000>;
0528 };
0529
0530 pm8941_l24: l24 {
0531 regulator-min-microvolt = <3075000>;
0532 regulator-max-microvolt = <3075000>;
0533 regulator-boot-on;
0534 };
0535
0536 pm8941_lvs1: lvs1 {};
0537 pm8941_lvs3: lvs3 {};
0538 };
0539 };
0540
0541 &sdhc_1 {
0542 status = "okay";
0543
0544 vmmc-supply = <&pm8941_l20>;
0545 vqmmc-supply = <&pm8941_s3>;
0546
0547 pinctrl-names = "default", "sleep";
0548 pinctrl-0 = <&sdc1_on>;
0549 pinctrl-1 = <&sdc1_off>;
0550 };
0551
0552 &sdhc_2 {
0553 status = "okay";
0554
0555 max-frequency = <100000000>;
0556 vmmc-supply = <&vreg_wlan>;
0557 vqmmc-supply = <&pm8941_s3>;
0558 non-removable;
0559
0560 pinctrl-names = "default", "sleep";
0561 pinctrl-0 = <&sdc2_on>;
0562 pinctrl-1 = <&sdc2_off>;
0563
0564 bcrmf@1 {
0565 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
0566 reg = <1>;
0567
0568 brcm,drive-strength = <10>;
0569
0570 pinctrl-names = "default";
0571 pinctrl-0 = <&wlan_sleep_clk_pin>;
0572 };
0573 };
0574
0575 &tlmm {
0576 sdc1_on: sdc1-on {
0577 clk {
0578 pins = "sdc1_clk";
0579 drive-strength = <16>;
0580 bias-disable;
0581 };
0582
0583 cmd-data {
0584 pins = "sdc1_cmd", "sdc1_data";
0585 drive-strength = <10>;
0586 bias-pull-up;
0587 };
0588 };
0589
0590 sdc2_on: sdc2-on {
0591 clk {
0592 pins = "sdc2_clk";
0593 drive-strength = <6>;
0594 bias-disable;
0595 };
0596
0597 cmd-data {
0598 pins = "sdc2_cmd", "sdc2_data";
0599 drive-strength = <6>;
0600 bias-pull-up;
0601 };
0602 };
0603
0604 mpu6515_pin: mpu6515 {
0605 pins = "gpio73";
0606 function = "gpio";
0607 bias-disable;
0608 input-enable;
0609 };
0610
0611 touch_pin: touch {
0612 int {
0613 pins = "gpio5";
0614 function = "gpio";
0615
0616 drive-strength = <2>;
0617 bias-disable;
0618 input-enable;
0619 };
0620
0621 reset {
0622 pins = "gpio8";
0623 function = "gpio";
0624
0625 drive-strength = <2>;
0626 bias-pull-up;
0627 };
0628 };
0629
0630 panel_pin: panel {
0631 pins = "gpio12";
0632 function = "mdp_vsync";
0633 drive-strength = <2>;
0634 bias-disable;
0635 };
0636
0637 bt_pin: bt {
0638 hostwake {
0639 pins = "gpio42";
0640 function = "gpio";
0641 };
0642
0643 devwake {
0644 pins = "gpio62";
0645 function = "gpio";
0646 };
0647
0648 shutdown {
0649 pins = "gpio41";
0650 function = "gpio";
0651 };
0652 };
0653 };