WIP FPC-III support
[linux/fpc-iii.git] / arch / arm / boot / dts / qcom-msm8974-samsung-klte.dts
blob97352de91314228469ea3e3f4a9642565a1df16f
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-msm8974pro.dtsi"
3 #include "qcom-pma8084.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
7 #include <dt-bindings/leds/common.h>
9 / {
10         model = "Samsung Galaxy S5";
11         compatible = "samsung,klte", "qcom,msm8974";
13         aliases {
14                 serial0 = &blsp1_uart1;
15                 sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
16                 sdhc2 = &sdhc_2; /* SDC2 SD card slot */
17         };
19         chosen {
20                 stdout-path = "serial0:115200n8";
21         };
23         smd {
24                 rpm {
25                         rpm_requests {
26                                 pma8084-regulators {
27                                         compatible = "qcom,rpm-pma8084-regulators";
28                                         status = "okay";
30                                         pma8084_s1: s1 {
31                                                 regulator-min-microvolt = <675000>;
32                                                 regulator-max-microvolt = <1050000>;
33                                         };
35                                         pma8084_s2: s2 {
36                                                 regulator-min-microvolt = <500000>;
37                                                 regulator-max-microvolt = <1050000>;
38                                         };
40                                         pma8084_s3: s3 {
41                                                 regulator-min-microvolt = <1300000>;
42                                                 regulator-max-microvolt = <1300000>;
43                                         };
45                                         pma8084_s4: s4 {
46                                                 regulator-min-microvolt = <1800000>;
47                                                 regulator-max-microvolt = <1800000>;
48                                         };
50                                         pma8084_s5: s5 {
51                                                 regulator-min-microvolt = <2150000>;
52                                                 regulator-max-microvolt = <2150000>;
53                                         };
55                                         pma8084_s6: s6 {
56                                                 regulator-min-microvolt = <1050000>;
57                                                 regulator-max-microvolt = <1050000>;
58                                         };
60                                         pma8084_l1: l1 {
61                                                 regulator-min-microvolt = <1225000>;
62                                                 regulator-max-microvolt = <1225000>;
63                                         };
65                                         pma8084_l2: l2 {
66                                                 regulator-min-microvolt = <1200000>;
67                                                 regulator-max-microvolt = <1200000>;
68                                         };
70                                         pma8084_l3: l3 {
71                                                 regulator-min-microvolt = <1050000>;
72                                                 regulator-max-microvolt = <1200000>;
73                                         };
75                                         pma8084_l4: l4 {
76                                                 regulator-min-microvolt = <1200000>;
77                                                 regulator-max-microvolt = <1225000>;
78                                         };
80                                         pma8084_l5: l5 {
81                                                 regulator-min-microvolt = <1800000>;
82                                                 regulator-max-microvolt = <1800000>;
83                                         };
85                                         pma8084_l6: l6 {
86                                                 regulator-min-microvolt = <1800000>;
87                                                 regulator-max-microvolt = <1800000>;
88                                         };
90                                         pma8084_l7: l7 {
91                                                 regulator-min-microvolt = <1800000>;
92                                                 regulator-max-microvolt = <1800000>;
93                                         };
95                                         pma8084_l8: l8 {
96                                                 regulator-min-microvolt = <1800000>;
97                                                 regulator-max-microvolt = <1800000>;
98                                         };
100                                         pma8084_l9: l9 {
101                                                 regulator-min-microvolt = <1800000>;
102                                                 regulator-max-microvolt = <2950000>;
103                                         };
105                                         pma8084_l10: l10 {
106                                                 regulator-min-microvolt = <1800000>;
107                                                 regulator-max-microvolt = <2950000>;
108                                         };
110                                         pma8084_l11: l11 {
111                                                 regulator-min-microvolt = <1300000>;
112                                                 regulator-max-microvolt = <1300000>;
113                                         };
115                                         pma8084_l12: l12 {
116                                                 regulator-min-microvolt = <1800000>;
117                                                 regulator-max-microvolt = <1800000>;
118                                         };
120                                         pma8084_l13: l13 {
121                                                 regulator-min-microvolt = <1800000>;
122                                                 regulator-max-microvolt = <2950000>;
123                                         };
125                                         pma8084_l14: l14 {
126                                                 regulator-min-microvolt = <1800000>;
127                                                 regulator-max-microvolt = <1800000>;
128                                         };
130                                         pma8084_l15: l15 {
131                                                 regulator-min-microvolt = <2050000>;
132                                                 regulator-max-microvolt = <2050000>;
133                                         };
135                                         pma8084_l16: l16 {
136                                                 regulator-min-microvolt = <2700000>;
137                                                 regulator-max-microvolt = <2700000>;
138                                         };
140                                         pma8084_l17: l17 {
141                                                 regulator-min-microvolt = <2850000>;
142                                                 regulator-max-microvolt = <2850000>;
143                                         };
145                                         pma8084_l18: l18 {
146                                                 regulator-min-microvolt = <2850000>;
147                                                 regulator-max-microvolt = <2850000>;
148                                         };
150                                         pma8084_l19: l19 {
151                                                 regulator-min-microvolt = <3300000>;
152                                                 regulator-max-microvolt = <3300000>;
153                                         };
155                                         pma8084_l20: l20 {
156                                                 regulator-min-microvolt = <2950000>;
157                                                 regulator-max-microvolt = <2950000>;
159                                                 regulator-allow-set-load;
160                                                 regulator-system-load = <200000>;
161                                         };
163                                         pma8084_l21: l21 {
164                                                 regulator-min-microvolt = <2950000>;
165                                                 regulator-max-microvolt = <2950000>;
167                                                 regulator-allow-set-load;
168                                                 regulator-system-load = <200000>;
169                                         };
171                                         pma8084_l22: l22 {
172                                                 regulator-min-microvolt = <3000000>;
173                                                 regulator-max-microvolt = <3300000>;
174                                         };
176                                         pma8084_l23: l23 {
177                                                 regulator-min-microvolt = <3000000>;
178                                                 regulator-max-microvolt = <3000000>;
179                                         };
181                                         pma8084_l24: l24 {
182                                                 regulator-min-microvolt = <3075000>;
183                                                 regulator-max-microvolt = <3075000>;
184                                         };
186                                         pma8084_l25: l25 {
187                                                 regulator-min-microvolt = <2100000>;
188                                                 regulator-max-microvolt = <2100000>;
189                                         };
191                                         pma8084_l26: l26 {
192                                                 regulator-min-microvolt = <1800000>;
193                                                 regulator-max-microvolt = <2050000>;
194                                         };
196                                         pma8084_l27: l27 {
197                                                 regulator-min-microvolt = <1000000>;
198                                                 regulator-max-microvolt = <1225000>;
199                                         };
201                                         pma8084_lvs1: lvs1 {};
202                                         pma8084_lvs2: lvs2 {};
203                                         pma8084_lvs3: lvs3 {};
204                                         pma8084_lvs4: lvs4 {};
206                                         pma8084_5vs1: 5vs1 {};
207                                 };
208                         };
209                 };
210         };
212         i2c-gpio-touchkey {
213                 compatible = "i2c-gpio";
214                 #address-cells = <1>;
215                 #size-cells = <0>;
216                 sda-gpios = <&msmgpio 95 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
217                 scl-gpios = <&msmgpio 96 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
218                 pinctrl-names = "default";
219                 pinctrl-0 = <&i2c_touchkey_pins>;
221                 touchkey@20 {
222                         compatible = "cypress,tm2-touchkey";
223                         reg = <0x20>;
225                         interrupt-parent = <&pma8084_gpios>;
226                         interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
227                         pinctrl-names = "default";
228                         pinctrl-0 = <&touchkey_pin>;
230                         vcc-supply = <&max77826_ldo15>;
231                         vdd-supply = <&pma8084_l19>;
233                         linux,keycodes = <KEY_APPSELECT KEY_BACK>;
234                 };
235         };
237         i2c-gpio-led {
238                 compatible = "i2c-gpio";
239                 #address-cells = <1>;
240                 #size-cells = <0>;
241                 scl-gpios = <&msmgpio 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
242                 sda-gpios = <&msmgpio 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
243                 pinctrl-names = "default";
244                 pinctrl-0 = <&i2c_led_gpioex_pins>;
246                 i2c-gpio,delay-us = <2>;
248                 gpio_expander: gpio@20 {
249                         compatible = "nxp,pcal6416";
250                         reg = <0x20>;
252                         gpio-controller;
253                         #gpio-cells = <2>;
255                         vcc-supply = <&pma8084_s4>;
257                         pinctrl-names = "default";
258                         pinctrl-0 = <&gpioex_pin>;
260                         reset-gpios = <&msmgpio 145 GPIO_ACTIVE_LOW>;
261                 };
263                 led-controller@30 {
264                         compatible = "panasonic,an30259a";
265                         reg = <0x30>;
267                         #address-cells = <1>;
268                         #size-cells = <0>;
270                         led@1 {
271                                 reg = <1>;
272                                 function = LED_FUNCTION_STATUS;
273                                 color = <LED_COLOR_ID_RED>;
274                         };
276                         led@2 {
277                                 reg = <2>;
278                                 function = LED_FUNCTION_STATUS;
279                                 color = <LED_COLOR_ID_GREEN>;
280                         };
282                         led@3 {
283                                 reg = <3>;
284                                 function = LED_FUNCTION_STATUS;
285                                 color = <LED_COLOR_ID_BLUE>;
286                         };
287                 };
288         };
290         vreg_wlan: wlan-regulator {
291                 compatible = "regulator-fixed";
293                 regulator-name = "wl-reg";
294                 regulator-min-microvolt = <3300000>;
295                 regulator-max-microvolt = <3300000>;
297                 gpio = <&gpio_expander 8 GPIO_ACTIVE_HIGH>;
298                 enable-active-high;
299         };
301         /delete-node/ vreg-boost;
304 &soc {
305         serial@f991e000 {
306                 status = "ok";
307         };
309         gpio-keys {
310                 compatible = "gpio-keys";
311                 input-name = "gpio-keys";
313                 pinctrl-names = "default";
314                 pinctrl-0 = <&gpio_keys_pin_a>;
316                 volume-down {
317                         label = "volume_down";
318                         gpios = <&pma8084_gpios 2 GPIO_ACTIVE_LOW>;
319                         linux,input-type = <1>;
320                         linux,code = <KEY_VOLUMEDOWN>;
321                         debounce-interval = <15>;
322                 };
324                 home-key {
325                         label = "home_key";
326                         gpios = <&pma8084_gpios 3 GPIO_ACTIVE_LOW>;
327                         linux,input-type = <1>;
328                         linux,code = <KEY_HOMEPAGE>;
329                         wakeup-source;
330                         debounce-interval = <15>;
331                 };
333                 volume-up {
334                         label = "volume_up";
335                         gpios = <&pma8084_gpios 5 GPIO_ACTIVE_LOW>;
336                         linux,input-type = <1>;
337                         linux,code = <KEY_VOLUMEUP>;
338                         debounce-interval = <15>;
339                 };
340         };
342         pinctrl@fd510000 {
343                 sdhc1_pin_a: sdhc1-pin-active {
344                         clk {
345                                 pins = "sdc1_clk";
346                                 drive-strength = <4>;
347                                 bias-disable;
348                         };
350                         cmd-data {
351                                 pins = "sdc1_cmd", "sdc1_data";
352                                 drive-strength = <4>;
353                                 bias-pull-up;
354                         };
355                 };
357                 sdhc2_pin_a: sdhc2-pin-active {
358                         clk-cmd-data {
359                                 pins = "gpio35", "gpio36", "gpio37", "gpio38",
360                                         "gpio39", "gpio40";
361                                 function = "sdc3";
362                                 drive-strength = <8>;
363                                 bias-disable;
364                         };
365                 };
367                 sdhc2_cd_pin: sdhc2-cd {
368                         pins = "gpio62";
369                         function = "gpio";
371                         drive-strength = <2>;
372                         bias-disable;
373                 };
375                 sdhc3_pin_a: sdhc3-pin-active {
376                         clk {
377                                 pins = "sdc2_clk";
378                                 drive-strength = <6>;
379                                 bias-disable;
380                         };
382                         cmd-data {
383                                 pins = "sdc2_cmd", "sdc2_data";
384                                 drive-strength = <6>;
385                                 bias-pull-up;
386                         };
387                 };
389                 i2c2_pins: i2c2 {
390                         mux {
391                                 pins = "gpio6", "gpio7";
392                                 function = "blsp_i2c2";
394                                 drive-strength = <2>;
395                                 bias-disable;
396                         };
397                 };
399                 i2c6_pins: i2c6 {
400                         mux {
401                                 pins = "gpio29", "gpio30";
402                                 function = "blsp_i2c6";
404                                 drive-strength = <2>;
405                                 bias-disable;
406                         };
407                 };
409                 i2c12_pins: i2c12 {
410                         mux {
411                                 pins = "gpio87", "gpio88";
412                                 function = "blsp_i2c12";
414                                 drive-strength = <2>;
415                                 bias-disable;
416                         };
417                 };
419                 i2c_touchkey_pins: i2c-touchkey {
420                         mux {
421                                 pins = "gpio95", "gpio96";
422                                 function = "gpio";
423                                 input-enable;
424                                 bias-pull-up;
425                         };
426                 };
428                 i2c_led_gpioex_pins: i2c-led-gpioex {
429                         mux {
430                                 pins = "gpio120", "gpio121";
431                                 function = "gpio";
432                                 input-enable;
433                                 bias-pull-down;
434                         };
435                 };
437                 gpioex_pin: gpioex {
438                         res {
439                                 pins = "gpio145";
440                                 function = "gpio";
442                                 bias-pull-up;
443                                 drive-strength = <2>;
444                         };
445                 };
447                 wifi_pin: wifi {
448                         int {
449                                 pins = "gpio92";
450                                 function = "gpio";
452                                 input-enable;
453                                 bias-pull-down;
454                         };
455                 };
456         };
458         sdhc_1: sdhci@f9824900 {
459                 status = "ok";
461                 vmmc-supply = <&pma8084_l20>;
462                 vqmmc-supply = <&pma8084_s4>;
464                 bus-width = <8>;
465                 non-removable;
467                 pinctrl-names = "default";
468                 pinctrl-0 = <&sdhc1_pin_a>;
469         };
471         sdhc_2: sdhci@f9864900 {
472                 status = "ok";
474                 max-frequency = <100000000>;
476                 vmmc-supply = <&pma8084_l21>;
477                 vqmmc-supply = <&pma8084_l13>;
479                 bus-width = <4>;
481                 /* cd-gpio is intentionally disabled. If enabled, an SD card
482                  * present during boot is not initialized correctly. Without
483                  * cd-gpios the driver resorts to polling, so hotplug works.
484                  */
485                 pinctrl-names = "default";
486                 pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>;
487                 // cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>;
488         };
490         sdhci@f98a4900 {
491                 status = "okay";
493                 #address-cells = <1>;
494                 #size-cells = <0>;
496                 max-frequency = <100000000>;
498                 pinctrl-names = "default";
499                 pinctrl-0 = <&sdhc3_pin_a>;
501                 vmmc-supply = <&vreg_wlan>;
502                 vqmmc-supply = <&pma8084_s4>;
504                 bus-width = <4>;
505                 non-removable;
507                 wifi@1 {
508                         reg = <1>;
509                         compatible = "brcm,bcm4329-fmac";
511                         interrupt-parent = <&msmgpio>;
512                         interrupts = <92 IRQ_TYPE_LEVEL_HIGH>;
513                         interrupt-names = "host-wake";
515                         pinctrl-names = "default";
516                         pinctrl-0 = <&wlan_sleep_clk_pin &wifi_pin>;
517                 };
518         };
520         usb@f9a55000 {
521                 status = "ok";
523                 phys = <&usb_hs1_phy>;
524                 phy-select = <&tcsr 0xb000 0>;
525                 /*extcon = <&smbb>, <&usb_id>;*/
526                 /*vbus-supply = <&chg_otg>;*/
528                 hnp-disable;
529                 srp-disable;
530                 adp-disable;
532                 ulpi {
533                         phy@a {
534                                 status = "ok";
536                                 v1p8-supply = <&pma8084_l6>;
537                                 v3p3-supply = <&pma8084_l24>;
539                                 /*extcon = <&smbb>;*/
540                                 qcom,init-seq = /bits/ 8 <0x1 0x64>;
541                         };
542                 };
543         };
545         i2c@f9924000 {
546                 status = "okay";
548                 pinctrl-names = "default";
549                 pinctrl-0 = <&i2c2_pins>;
551                 touchscreen@20 {
552                         compatible = "syna,rmi4-i2c";
553                         reg = <0x20>;
555                         interrupt-parent = <&pma8084_gpios>;
556                         interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
558                         vdd-supply = <&max77826_ldo13>;
559                         vio-supply = <&pma8084_lvs2>;
561                         pinctrl-names = "default";
562                         pinctrl-0 = <&touch_pin>;
564                         syna,startup-delay-ms = <100>;
566                         #address-cells = <1>;
567                         #size-cells = <0>;
569                         rmi4-f01@1 {
570                                 reg = <0x1>;
571                                 syna,nosleep-mode = <1>;
572                         };
574                         rmi4-f12@12 {
575                                 reg = <0x12>;
576                                 syna,sensor-type = <1>;
577                         };
578                 };
579         };
581         i2c@f9928000 {
582                 status = "okay";
584                 pinctrl-names = "default";
585                 pinctrl-0 = <&i2c6_pins>;
587                 pmic@60 {
588                         reg = <0x60>;
589                         compatible = "maxim,max77826";
591                         regulators {
592                                 max77826_ldo1: LDO1 {
593                                         regulator-min-microvolt = <1200000>;
594                                         regulator-max-microvolt = <1200000>;
595                                 };
597                                 max77826_ldo2: LDO2 {
598                                         regulator-min-microvolt = <1000000>;
599                                         regulator-max-microvolt = <1000000>;
600                                 };
602                                 max77826_ldo3: LDO3 {
603                                         regulator-min-microvolt = <1200000>;
604                                         regulator-max-microvolt = <1200000>;
605                                 };
607                                 max77826_ldo4: LDO4 {
608                                         regulator-min-microvolt = <1800000>;
609                                         regulator-max-microvolt = <1800000>;
610                                 };
612                                 max77826_ldo5: LDO5 {
613                                         regulator-min-microvolt = <1800000>;
614                                         regulator-max-microvolt = <1800000>;
615                                 };
617                                 max77826_ldo6: LDO6 {
618                                         regulator-min-microvolt = <1800000>;
619                                         regulator-max-microvolt = <3300000>;
620                                 };
622                                 max77826_ldo7: LDO7 {
623                                         regulator-min-microvolt = <1800000>;
624                                         regulator-max-microvolt = <1800000>;
625                                 };
627                                 max77826_ldo8: LDO8 {
628                                         regulator-min-microvolt = <1800000>;
629                                         regulator-max-microvolt = <3300000>;
630                                 };
632                                 max77826_ldo9: LDO9 {
633                                         regulator-min-microvolt = <1800000>;
634                                         regulator-max-microvolt = <1800000>;
635                                 };
637                                 max77826_ldo10: LDO10 {
638                                         regulator-min-microvolt = <2800000>;
639                                         regulator-max-microvolt = <2950000>;
640                                 };
642                                 max77826_ldo11: LDO11 {
643                                         regulator-min-microvolt = <2700000>;
644                                         regulator-max-microvolt = <2950000>;
645                                 };
647                                 max77826_ldo12: LDO12 {
648                                         regulator-min-microvolt = <2500000>;
649                                         regulator-max-microvolt = <3300000>;
650                                 };
652                                 max77826_ldo13: LDO13 {
653                                         regulator-min-microvolt = <3300000>;
654                                         regulator-max-microvolt = <3300000>;
655                                 };
657                                 max77826_ldo14: LDO14 {
658                                         regulator-min-microvolt = <3300000>;
659                                         regulator-max-microvolt = <3300000>;
660                                 };
662                                 max77826_ldo15: LDO15 {
663                                         regulator-min-microvolt = <1800000>;
664                                         regulator-max-microvolt = <1800000>;
665                                 };
667                                 max77826_buck: BUCK {
668                                         regulator-min-microvolt = <1225000>;
669                                         regulator-max-microvolt = <1225000>;
670                                 };
672                                 max77826_buckboost: BUCKBOOST {
673                                         regulator-min-microvolt = <3400000>;
674                                         regulator-max-microvolt = <3400000>;
675                                 };
676                         };
677                 };
678         };
680         i2c@f9968000 {
681                 status = "okay";
683                 pinctrl-names = "default";
684                 pinctrl-0 = <&i2c12_pins>;
686                 fuelgauge@36 {
687                         compatible = "maxim,max17048";
688                         reg = <0x36>;
690                         maxim,double-soc;
691                         maxim,rcomp = /bits/ 8 <0x56>;
693                         interrupt-parent = <&pma8084_gpios>;
694                         interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
696                         pinctrl-names = "default";
697                         pinctrl-0 = <&fuelgauge_pin>;
698                 };
699         };
702 &spmi_bus {
703         pma8084@0 {
704                 gpios@c000 {
705                         gpio_keys_pin_a: gpio-keys-active {
706                                 pins = "gpio2", "gpio3", "gpio5";
707                                 function = "normal";
709                                 bias-pull-up;
710                                 power-source = <PMA8084_GPIO_S4>;
711                         };
713                         touchkey_pin: touchkey-int-pin {
714                                 pins = "gpio6";
715                                 function = "normal";
716                                 bias-disable;
717                                 input-enable;
718                                 power-source = <PMA8084_GPIO_S4>;
719                         };
721                         touch_pin: touchscreen-int-pin {
722                                 pins = "gpio8";
723                                 function = "normal";
724                                 bias-disable;
725                                 input-enable;
726                                 power-source = <PMA8084_GPIO_S4>;
727                         };
729                         wlan_sleep_clk_pin: wlan-sleep-clk-pin {
730                                 pins = "gpio16";
731                                 function = "func2";
733                                 output-high;
734                                 power-source = <PMA8084_GPIO_S4>;
735                                 qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
736                         };
738                         fuelgauge_pin: fuelgauge-int-pin {
739                                 pins = "gpio21";
740                                 function = "normal";
741                                 bias-disable;
742                                 input-enable;
743                                 power-source = <PMA8084_GPIO_S4>;
744                         };
745                 };
746         };