treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm / boot / dts / qcom-msm8974-lge-nexus5-hammerhead.dts
blob3487daf98e8131adc9895f03c20bac45d5f37242
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/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
9 / {
10         model = "LGE MSM 8974 HAMMERHEAD";
11         compatible = "lge,hammerhead", "qcom,msm8974";
13         aliases {
14                 serial0 = &blsp1_uart1;
15         };
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
21         smd {
22                 rpm {
23                         rpm_requests {
24                                 pm8841-regulators {
25                                         s1 {
26                                                 regulator-min-microvolt = <675000>;
27                                                 regulator-max-microvolt = <1050000>;
28                                         };
30                                         s2 {
31                                                 regulator-min-microvolt = <500000>;
32                                                 regulator-max-microvolt = <1050000>;
33                                         };
35                                         s3 {
36                                                 regulator-min-microvolt = <1050000>;
37                                                 regulator-max-microvolt = <1050000>;
38                                         };
40                                         s4 {
41                                                 regulator-min-microvolt = <815000>;
42                                                 regulator-max-microvolt = <900000>;
43                                         };
44                                 };
46                                 pm8941-regulators {
47                                         vdd_l1_l3-supply = <&pm8941_s1>;
48                                         vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
49                                         vdd_l4_l11-supply = <&pm8941_s1>;
50                                         vdd_l5_l7-supply = <&pm8941_s2>;
51                                         vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
52                                         vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>;
53                                         vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
54                                         vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
55                                         vdd_l21-supply = <&vreg_boost>;
57                                         s1 {
58                                                 regulator-min-microvolt = <1300000>;
59                                                 regulator-max-microvolt = <1300000>;
61                                                 regulator-always-on;
62                                                 regulator-boot-on;
63                                         };
65                                         s2 {
66                                                 regulator-min-microvolt = <2150000>;
67                                                 regulator-max-microvolt = <2150000>;
69                                                 regulator-boot-on;
70                                         };
72                                         s3 {
73                                                 regulator-min-microvolt = <1800000>;
74                                                 regulator-max-microvolt = <1800000>;
76                                                 regulator-always-on;
77                                                 regulator-boot-on;
78                                         };
80                                         l1 {
81                                                 regulator-min-microvolt = <1225000>;
82                                                 regulator-max-microvolt = <1225000>;
84                                                 regulator-always-on;
85                                                 regulator-boot-on;
86                                         };
88                                         l2 {
89                                                 regulator-min-microvolt = <1200000>;
90                                                 regulator-max-microvolt = <1200000>;
91                                         };
93                                         l3 {
94                                                 regulator-min-microvolt = <1225000>;
95                                                 regulator-max-microvolt = <1225000>;
96                                         };
98                                         l4 {
99                                                 regulator-min-microvolt = <1225000>;
100                                                 regulator-max-microvolt = <1225000>;
101                                         };
103                                         l5 {
104                                                 regulator-min-microvolt = <1800000>;
105                                                 regulator-max-microvolt = <1800000>;
106                                         };
108                                         l6 {
109                                                 regulator-min-microvolt = <1800000>;
110                                                 regulator-max-microvolt = <1800000>;
112                                                 regulator-boot-on;
113                                         };
115                                         l7 {
116                                                 regulator-min-microvolt = <1800000>;
117                                                 regulator-max-microvolt = <1800000>;
119                                                 regulator-boot-on;
120                                         };
122                                         l8 {
123                                                 regulator-min-microvolt = <1800000>;
124                                                 regulator-max-microvolt = <1800000>;
125                                         };
127                                         l9 {
128                                                 regulator-min-microvolt = <1800000>;
129                                                 regulator-max-microvolt = <2950000>;
130                                         };
132                                         l10 {
133                                                 regulator-min-microvolt = <1800000>;
134                                                 regulator-max-microvolt = <2950000>;
135                                         };
137                                         l11 {
138                                                 regulator-min-microvolt = <1300000>;
139                                                 regulator-max-microvolt = <1300000>;
140                                         };
142                                         l12 {
143                                                 regulator-min-microvolt = <1800000>;
144                                                 regulator-max-microvolt = <1800000>;
146                                                 regulator-always-on;
147                                                 regulator-boot-on;
148                                         };
150                                         l13 {
151                                                 regulator-min-microvolt = <1800000>;
152                                                 regulator-max-microvolt = <2950000>;
154                                                 regulator-boot-on;
155                                         };
157                                         l14 {
158                                                 regulator-min-microvolt = <1800000>;
159                                                 regulator-max-microvolt = <1800000>;
160                                         };
162                                         l15 {
163                                                 regulator-min-microvolt = <2050000>;
164                                                 regulator-max-microvolt = <2050000>;
165                                         };
167                                         l16 {
168                                                 regulator-min-microvolt = <2700000>;
169                                                 regulator-max-microvolt = <2700000>;
170                                         };
172                                         l17 {
173                                                 regulator-min-microvolt = <2850000>;
174                                                 regulator-max-microvolt = <2850000>;
175                                         };
177                                         l18 {
178                                                 regulator-min-microvolt = <2850000>;
179                                                 regulator-max-microvolt = <2850000>;
180                                         };
182                                         l19 {
183                                                 regulator-min-microvolt = <3000000>;
184                                                 regulator-max-microvolt = <3300000>;
185                                         };
187                                         l20 {
188                                                 regulator-min-microvolt = <2950000>;
189                                                 regulator-max-microvolt = <2950000>;
191                                                 regulator-boot-on;
192                                                 regulator-system-load = <200000>;
193                                                 regulator-allow-set-load;
194                                         };
196                                         l21 {
197                                                 regulator-min-microvolt = <2950000>;
198                                                 regulator-max-microvolt = <2950000>;
200                                                 regulator-boot-on;
201                                         };
203                                         l22 {
204                                                 regulator-min-microvolt = <3000000>;
205                                                 regulator-max-microvolt = <3300000>;
206                                         };
208                                         l23 {
209                                                 regulator-min-microvolt = <3000000>;
210                                                 regulator-max-microvolt = <3000000>;
211                                         };
213                                         l24 {
214                                                 regulator-min-microvolt = <3075000>;
215                                                 regulator-max-microvolt = <3075000>;
217                                                 regulator-boot-on;
218                                         };
219                                 };
220                         };
221                 };
222         };
224         vreg_wlan: wlan-regulator {
225                 compatible = "regulator-fixed";
227                 regulator-name = "wl-reg";
228                 regulator-min-microvolt = <3300000>;
229                 regulator-max-microvolt = <3300000>;
231                 gpio = <&msmgpio 26 GPIO_ACTIVE_HIGH>;
232                 enable-active-high;
234                 pinctrl-names = "default";
235                 pinctrl-0 = <&wlan_regulator_pin>;
236         };
239 &soc {
240         serial@f991d000 {
241                 status = "ok";
242         };
244         pinctrl@fd510000 {
245                 sdhc1_pin_a: sdhc1-pin-active {
246                         clk {
247                                 pins = "sdc1_clk";
248                                 drive-strength = <16>;
249                                 bias-disable;
250                         };
252                         cmd-data {
253                                 pins = "sdc1_cmd", "sdc1_data";
254                                 drive-strength = <10>;
255                                 bias-pull-up;
256                         };
257                 };
259                 sdhc2_pin_a: sdhc2-pin-active {
260                         clk {
261                                 pins = "sdc2_clk";
262                                 drive-strength = <6>;
263                                 bias-disable;
264                         };
266                         cmd-data {
267                                 pins = "sdc2_cmd", "sdc2_data";
268                                 drive-strength = <6>;
269                                 bias-pull-up;
270                         };
271                 };
273                 i2c1_pins: i2c1 {
274                         mux {
275                                 pins = "gpio2", "gpio3";
276                                 function = "blsp_i2c1";
278                                 drive-strength = <2>;
279                                 bias-disable;
280                         };
281                 };
283                 i2c2_pins: i2c2 {
284                         mux {
285                                 pins = "gpio6", "gpio7";
286                                 function = "blsp_i2c2";
288                                 drive-strength = <2>;
289                                 bias-disable;
290                         };
291                 };
293                 i2c3_pins: i2c3 {
294                         mux {
295                                 pins = "gpio10", "gpio11";
296                                 function = "blsp_i2c3";
297                                 drive-strength = <2>;
298                                 bias-disable;
299                         };
300                 };
302                 i2c11_pins: i2c11 {
303                         mux {
304                                 pins = "gpio83", "gpio84";
305                                 function = "blsp_i2c11";
307                                 drive-strength = <2>;
308                                 bias-disable;
309                         };
310                 };
312                 i2c12_pins: i2c12 {
313                         mux {
314                                 pins = "gpio87", "gpio88";
315                                 function = "blsp_i2c12";
316                                 drive-strength = <2>;
317                                 bias-disable;
318                         };
319                 };
321                 mpu6515_pin: mpu6515 {
322                         irq {
323                                 pins = "gpio73";
324                                 function = "gpio";
325                                 bias-disable;
326                                 input-enable;
327                         };
328                 };
330                 touch_pin: touch {
331                         int {
332                                 pins = "gpio5";
333                                 function = "gpio";
335                                 drive-strength = <2>;
336                                 bias-disable;
337                                 input-enable;
338                         };
340                         reset {
341                                 pins = "gpio8";
342                                 function = "gpio";
344                                 drive-strength = <2>;
345                                 bias-pull-up;
346                         };
347                 };
349                 panel_pin: panel {
350                         te {
351                                 pins = "gpio12";
352                                 function = "mdp_vsync";
354                                 drive-strength = <2>;
355                                 bias-disable;
356                         };
357                 };
358         };
360         sdhci@f9824900 {
361                 status = "ok";
363                 vmmc-supply = <&pm8941_l20>;
364                 vqmmc-supply = <&pm8941_s3>;
366                 bus-width = <8>;
367                 non-removable;
369                 pinctrl-names = "default";
370                 pinctrl-0 = <&sdhc1_pin_a>;
371         };
373         sdhci@f98a4900 {
374                 status = "ok";
376                 max-frequency = <100000000>;
377                 bus-width = <4>;
378                 non-removable;
379                 vmmc-supply = <&vreg_wlan>;
380                 vqmmc-supply = <&pm8941_s3>;
382                 pinctrl-names = "default";
383                 pinctrl-0 = <&sdhc2_pin_a>;
385                 #address-cells = <1>;
386                 #size-cells = <0>;
388                 bcrmf@1 {
389                         compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
390                         reg = <1>;
392                         brcm,drive-strength = <10>;
394                         pinctrl-names = "default";
395                         pinctrl-0 = <&wlan_sleep_clk_pin>;
396                 };
397         };
399         gpio-keys {
400                 compatible = "gpio-keys";
401                 input-name = "gpio-keys";
403                 pinctrl-names = "default";
404                 pinctrl-0 = <&gpio_keys_pin_a>;
406                 volume-up {
407                         label = "volume_up";
408                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
409                         linux,input-type = <1>;
410                         linux,code = <KEY_VOLUMEUP>;
411                 };
413                 volume-down {
414                         label = "volume_down";
415                         gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
416                         linux,input-type = <1>;
417                         linux,code = <KEY_VOLUMEDOWN>;
418                 };
419         };
421         i2c@f9967000 {
422                 status = "ok";
423                 pinctrl-names = "default";
424                 pinctrl-0 = <&i2c11_pins>;
425                 clock-frequency = <355000>;
426                 qcom,src-freq = <50000000>;
428                 led-controller@38 {
429                         compatible = "ti,lm3630a";
430                         status = "ok";
431                         reg = <0x38>;
433                         #address-cells = <1>;
434                         #size-cells = <0>;
436                         led@0 {
437                                 reg = <0>;
438                                 led-sources = <0 1>;
439                                 label = "lcd-backlight";
440                                 default-brightness = <200>;
441                         };
442                 };
443         };
445         i2c@f9968000 {
446                 status = "ok";
447                 pinctrl-names = "default";
448                 pinctrl-0 = <&i2c12_pins>;
449                 clock-frequency = <100000>;
450                 qcom,src-freq = <50000000>;
452                 mpu6515@68 {
453                         compatible = "invensense,mpu6515";
454                         reg = <0x68>;
455                         interrupts-extended = <&msmgpio 73 IRQ_TYPE_EDGE_FALLING>;
456                         vddio-supply = <&pm8941_lvs1>;
458                         pinctrl-names = "default";
459                         pinctrl-0 = <&mpu6515_pin>;
461                         i2c-gate {
462                                 #address-cells = <1>;
463                                 #size-cells = <0>;
464                                 ak8963@f {
465                                         compatible = "asahi-kasei,ak8963";
466                                         reg = <0x0f>;
467                                         gpios = <&msmgpio 67 0>;
468                                         vid-supply = <&pm8941_lvs1>;
469                                         vdd-supply = <&pm8941_l17>;
470                                 };
472                                 bmp280@76 {
473                                         compatible = "bosch,bmp280";
474                                         reg = <0x76>;
475                                         vdda-supply = <&pm8941_lvs1>;
476                                         vddd-supply = <&pm8941_l17>;
477                                 };
478                         };
479                 };
480         };
482         i2c@f9923000 {
483                 status = "ok";
484                 pinctrl-names = "default";
485                 pinctrl-0 = <&i2c1_pins>;
486                 clock-frequency = <100000>;
487                 qcom,src-freq = <50000000>;
489                 charger: bq24192@6b {
490                         compatible = "ti,bq24192";
491                         reg = <0x6b>;
492                         interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>;
494                         omit-battery-class;
496                         usb_otg_vbus: usb-otg-vbus { };
497                 };
498         };
500         i2c@f9924000 {
501                 status = "ok";
503                 clock-frequency = <355000>;
504                 qcom,src-freq = <50000000>;
506                 pinctrl-names = "default";
507                 pinctrl-0 = <&i2c2_pins>;
509                 synaptics@70 {
510                         compatible = "syna,rmi4-i2c";
511                         reg = <0x70>;
513                         interrupts-extended = <&msmgpio 5 IRQ_TYPE_EDGE_FALLING>;
514                         vdd-supply = <&pm8941_l22>;
515                         vio-supply = <&pm8941_lvs3>;
517                         pinctrl-names = "default";
518                         pinctrl-0 = <&touch_pin>;
520                         #address-cells = <1>;
521                         #size-cells = <0>;
523                         rmi4-f01@1 {
524                                 reg = <0x1>;
525                                 syna,nosleep-mode = <1>;
526                         };
528                         rmi4-f12@12 {
529                                 reg = <0x12>;
530                                 syna,sensor-type = <1>;
531                         };
532                 };
533         };
535         i2c@f9925000 {
536                 status = "ok";
537                 pinctrl-names = "default";
538                 pinctrl-0 = <&i2c3_pins>;
539                 clock-frequency = <100000>;
540                 qcom,src-freq = <50000000>;
542                 avago_apds993@39 {
543                         compatible = "avago,apds9930";
544                         reg = <0x39>;
545                         interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>;
546                         vdd-supply = <&pm8941_l17>;
547                         vddio-supply = <&pm8941_lvs1>;
548                         led-max-microamp = <100000>;
549                         amstaos,proximity-diodes = <0>;
550                 };
551         };
553         usb@f9a55000 {
554                 status = "ok";
556                 phys = <&usb_hs1_phy>;
557                 phy-select = <&tcsr 0xb000 0>;
559                 extcon = <&charger>, <&usb_id>;
560                 vbus-supply = <&usb_otg_vbus>;
562                 hnp-disable;
563                 srp-disable;
564                 adp-disable;
566                 ulpi {
567                         phy@a {
568                                 status = "ok";
570                                 v1p8-supply = <&pm8941_l6>;
571                                 v3p3-supply = <&pm8941_l24>;
573                                 qcom,init-seq = /bits/ 8 <0x1 0x64>;
574                         };
575                 };
576         };
578         mdss@fd900000 {
579                 status = "ok";
581                 mdp@fd900000 {
582                         status = "ok";
583                 };
585                 dsi@fd922800 {
586                         status = "ok";
588                         vdda-supply = <&pm8941_l2>;
589                         vdd-supply = <&pm8941_lvs3>;
590                         vddio-supply = <&pm8941_l12>;
592                         #address-cells = <1>;
593                         #size-cells = <0>;
595                         ports {
596                                 port@1 {
597                                         endpoint {
598                                                 remote-endpoint = <&panel_in>;
599                                                 data-lanes = <0 1 2 3>;
600                                         };
601                                 };
602                         };
604                         panel: panel@0 {
605                                 reg = <0>;
606                                 compatible = "lg,acx467akm-7";
608                                 pinctrl-names = "default";
609                                 pinctrl-0 = <&panel_pin>;
611                                 port {
612                                         panel_in: endpoint {
613                                                 remote-endpoint = <&dsi0_out>;
614                                         };
615                                 };
616                         };
617                 };
619                 dsi-phy@fd922a00 {
620                         status = "ok";
622                         vddio-supply = <&pm8941_l12>;
623                 };
624         };
627 &spmi_bus {
628         pm8941@0 {
629                 gpios@c000 {
630                         gpio_keys_pin_a: gpio-keys-active {
631                                 pins = "gpio2", "gpio3";
632                                 function = "normal";
634                                 bias-pull-up;
635                                 power-source = <PM8941_GPIO_S3>;
636                         };
638                         wlan_sleep_clk_pin: wl-sleep-clk {
639                                 pins = "gpio16";
640                                 function = "func2";
642                                 output-high;
643                                 power-source = <PM8941_GPIO_S3>;
644                         };
646                         wlan_regulator_pin: wl-reg-active {
647                                 pins = "gpio17";
648                                 function = "normal";
650                                 bias-disable;
651                                 power-source = <PM8941_GPIO_S3>;
652                         };
654                         otg {
655                                 gpio-hog;
656                                 gpios = <35 GPIO_ACTIVE_HIGH>;
657                                 output-high;
658                                 line-name = "otg-gpio";
659                         };
660                 };
661         };