Merge remote-tracking branches 'asoc/fix/msm8916', 'asoc/fix/nau8825', 'asoc/fix...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / qcom-msm8974-sony-xperia-castor.dts
1 #include "qcom-msm8974pro.dtsi"
2 #include "qcom-pm8841.dtsi"
3 #include "qcom-pm8941.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
8 / {
9         model = "Sony Xperia Z2 Tablet";
10         compatible = "sony,xperia-castor", "qcom,msm8974";
11
12         aliases {
13                 serial0 = &blsp1_uart2;
14         };
15
16         chosen {
17                 stdout-path = "serial0:115200n8";
18         };
19
20         gpio-keys {
21                 compatible = "gpio-keys";
22                 input-name = "gpio-keys";
23
24                 pinctrl-names = "default";
25                 pinctrl-0 = <&gpio_keys_pin_a>;
26
27                 volume-down {
28                         label = "volume_down";
29                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
30                         linux,input-type = <1>;
31                         linux,code = <KEY_VOLUMEDOWN>;
32                 };
33
34                 camera-snapshot {
35                         label = "camera_snapshot";
36                         gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
37                         linux,input-type = <1>;
38                         linux,code = <KEY_CAMERA>;
39                 };
40
41                 camera-focus {
42                         label = "camera_focus";
43                         gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
44                         linux,input-type = <1>;
45                         linux,code = <KEY_CAMERA_FOCUS>;
46                 };
47
48                 volume-up {
49                         label = "volume_up";
50                         gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
51                         linux,input-type = <1>;
52                         linux,code = <KEY_VOLUMEUP>;
53                 };
54         };
55
56         smd {
57                 rpm {
58                         rpm_requests {
59                                 pm8941-regulators {
60                                         vdd_l1_l3-supply = <&pm8941_s1>;
61                                         vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
62                                         vdd_l4_l11-supply = <&pm8941_s1>;
63                                         vdd_l5_l7-supply = <&pm8941_s2>;
64                                         vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
65                                         vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
66                                         vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
67                                         vdd_l21-supply = <&vreg_boost>;
68
69                                         s1 {
70                                                 regulator-min-microvolt = <1300000>;
71                                                 regulator-max-microvolt = <1300000>;
72                                                 regulator-always-on;
73                                                 regulator-boot-on;
74                                         };
75
76                                         s2 {
77                                                 regulator-min-microvolt = <2150000>;
78                                                 regulator-max-microvolt = <2150000>;
79                                                 regulator-boot-on;
80                                         };
81
82                                         s3 {
83                                                 regulator-min-microvolt = <1800000>;
84                                                 regulator-max-microvolt = <1800000>;
85                                                 regulator-always-on;
86                                                 regulator-boot-on;
87
88                                                 regulator-system-load = <154000>;
89                                         };
90
91                                         s4 {
92                                                 regulator-min-microvolt = <5000000>;
93                                                 regulator-max-microvolt = <5000000>;
94                                         };
95
96                                         l1 {
97                                                 regulator-min-microvolt = <1225000>;
98                                                 regulator-max-microvolt = <1225000>;
99
100                                                 regulator-always-on;
101                                                 regulator-boot-on;
102                                         };
103
104                                         l2 {
105                                                 regulator-min-microvolt = <1200000>;
106                                                 regulator-max-microvolt = <1200000>;
107                                         };
108
109                                         l3 {
110                                                 regulator-min-microvolt = <1200000>;
111                                                 regulator-max-microvolt = <1200000>;
112                                         };
113
114                                         l4 {
115                                                 regulator-min-microvolt = <1225000>;
116                                                 regulator-max-microvolt = <1225000>;
117                                         };
118
119                                         l5 {
120                                                 regulator-min-microvolt = <1800000>;
121                                                 regulator-max-microvolt = <1800000>;
122                                         };
123
124                                         l6 {
125                                                 regulator-min-microvolt = <1800000>;
126                                                 regulator-max-microvolt = <1800000>;
127
128                                                 regulator-boot-on;
129                                         };
130
131                                         l7 {
132                                                 regulator-min-microvolt = <1800000>;
133                                                 regulator-max-microvolt = <1800000>;
134
135                                                 regulator-boot-on;
136                                         };
137
138                                         l8 {
139                                                 regulator-min-microvolt = <1800000>;
140                                                 regulator-max-microvolt = <1800000>;
141                                         };
142
143                                         l9 {
144                                                 regulator-min-microvolt = <1800000>;
145                                                 regulator-max-microvolt = <2950000>;
146                                         };
147
148                                         l11 {
149                                                 regulator-min-microvolt = <1300000>;
150                                                 regulator-max-microvolt = <1350000>;
151                                         };
152
153                                         l12 {
154                                                 regulator-min-microvolt = <1800000>;
155                                                 regulator-max-microvolt = <1800000>;
156
157                                                 regulator-always-on;
158                                                 regulator-boot-on;
159                                         };
160
161                                         l13 {
162                                                 regulator-min-microvolt = <1800000>;
163                                                 regulator-max-microvolt = <2950000>;
164
165                                                 regulator-boot-on;
166                                         };
167
168                                         l14 {
169                                                 regulator-min-microvolt = <1800000>;
170                                                 regulator-max-microvolt = <1800000>;
171                                         };
172
173                                         l15 {
174                                                 regulator-min-microvolt = <2050000>;
175                                                 regulator-max-microvolt = <2050000>;
176                                         };
177
178                                         l16 {
179                                                 regulator-min-microvolt = <2700000>;
180                                                 regulator-max-microvolt = <2700000>;
181                                         };
182
183                                         l17 {
184                                                 regulator-min-microvolt = <2700000>;
185                                                 regulator-max-microvolt = <2700000>;
186                                         };
187
188                                         l18 {
189                                                 regulator-min-microvolt = <2850000>;
190                                                 regulator-max-microvolt = <2850000>;
191                                         };
192
193                                         l19 {
194                                                 regulator-min-microvolt = <2850000>;
195                                                 regulator-max-microvolt = <2850000>;
196                                         };
197
198                                         l20 {
199                                                 regulator-min-microvolt = <2950000>;
200                                                 regulator-max-microvolt = <2950000>;
201
202                                                 regulator-allow-set-load;
203                                                 regulator-boot-on;
204                                                 regulator-allow-set-load;
205                                                 regulator-system-load = <500000>;
206                                         };
207
208                                         l21 {
209                                                 regulator-min-microvolt = <2950000>;
210                                                 regulator-max-microvolt = <2950000>;
211
212                                                 regulator-boot-on;
213                                         };
214
215                                         l22 {
216                                                 regulator-min-microvolt = <3000000>;
217                                                 regulator-max-microvolt = <3000000>;
218                                         };
219
220                                         l23 {
221                                                 regulator-min-microvolt = <2800000>;
222                                                 regulator-max-microvolt = <2800000>;
223                                         };
224
225                                         l24 {
226                                                 regulator-min-microvolt = <3075000>;
227                                                 regulator-max-microvolt = <3075000>;
228
229                                                 regulator-boot-on;
230                                         };
231                                 };
232                         };
233                 };
234         };
235
236         vreg_bl_vddio: lcd-backlight-vddio {
237                 compatible = "regulator-fixed";
238                 regulator-name = "vreg_bl_vddio";
239                 regulator-min-microvolt = <3150000>;
240                 regulator-max-microvolt = <3150000>;
241
242                 gpio = <&msmgpio 69 0>;
243                 enable-active-high;
244
245                 vin-supply = <&pm8941_s3>;
246                 startup-delay-us = <70000>;
247
248                 pinctrl-names = "default";
249                 pinctrl-0 = <&lcd_backlight_en_pin_a>;
250         };
251
252         vreg_vsp: lcd-dcdc-regulator {
253                 compatible = "regulator-fixed";
254                 regulator-name = "vreg_vsp";
255                 regulator-min-microvolt = <5600000>;
256                 regulator-max-microvolt = <5600000>;
257
258                 gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>;
259                 enable-active-high;
260
261                 pinctrl-names = "default";
262                 pinctrl-0 = <&lcd_dcdc_en_pin_a>;
263         };
264
265         vreg_wlan: wlan-regulator {
266                 compatible = "regulator-fixed";
267
268                 regulator-name = "wl-reg";
269                 regulator-min-microvolt = <3300000>;
270                 regulator-max-microvolt = <3300000>;
271
272                 gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>;
273                 enable-active-high;
274
275                 pinctrl-names = "default";
276                 pinctrl-0 = <&wlan_regulator_pin>;
277         };
278 };
279
280 &soc {
281         sdhci@f9824900 {
282                 status = "ok";
283
284                 vmmc-supply = <&pm8941_l20>;
285                 vqmmc-supply = <&pm8941_s3>;
286
287                 bus-width = <8>;
288                 non-removable;
289
290                 pinctrl-names = "default";
291                 pinctrl-0 = <&sdhc1_pin_a>;
292         };
293
294         sdhci@f9864900 {
295                 status = "ok";
296
297                 max-frequency = <100000000>;
298                 non-removable;
299                 vmmc-supply = <&vreg_wlan>;
300
301                 pinctrl-names = "default";
302                 pinctrl-0 = <&sdhc3_pin_a>;
303
304                 #address-cells = <1>;
305                 #size-cells = <0>;
306
307                 bcrmf@1 {
308                         compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
309                         reg = <1>;
310
311                         brcm,drive-strength = <10>;
312
313                         pinctrl-names = "default";
314                         pinctrl-0 = <&wlan_sleep_clk_pin>;
315                 };
316         };
317
318         sdhci@f98a4900 {
319                 status = "ok";
320
321                 bus-width = <4>;
322
323                 vmmc-supply = <&pm8941_l21>;
324                 vqmmc-supply = <&pm8941_l13>;
325
326                 cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>;
327
328                 pinctrl-names = "default";
329                 pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
330         };
331
332         serial@f991e000 {
333                 status = "ok";
334
335                 pinctrl-names = "default";
336                 pinctrl-0 = <&blsp1_uart2_pin_a>;
337         };
338
339         usb@f9a55000 {
340                 status = "ok";
341
342                 phys = <&usb_hs1_phy>;
343                 phy-select = <&tcsr 0xb000 0>;
344                 extcon = <&smbb>, <&usb_id>;
345                 vbus-supply = <&chg_otg>;
346
347                 hnp-disable;
348                 srp-disable;
349                 adp-disable;
350
351                 ulpi {
352                         phy@a {
353                                 status = "ok";
354
355                                 v1p8-supply = <&pm8941_l6>;
356                                 v3p3-supply = <&pm8941_l24>;
357
358                                 extcon = <&smbb>;
359                                 qcom,init-seq = /bits/ 8 <0x1 0x64>;
360                         };
361                 };
362         };
363
364         pinctrl@fd510000 {
365                 blsp1_uart2_pin_a: blsp1-uart2-pin-active {
366                         rx {
367                                 pins = "gpio5";
368                                 function = "blsp_uart2";
369
370                                 drive-strength = <2>;
371                                 bias-pull-up;
372                         };
373
374                         tx {
375                                 pins = "gpio4";
376                                 function = "blsp_uart2";
377
378                                 drive-strength = <4>;
379                                 bias-disable;
380                         };
381                 };
382
383                 i2c8_pins: i2c8 {
384                         mux {
385                                 pins = "gpio47", "gpio48";
386                                 function = "blsp_i2c8";
387
388                                 drive-strength = <2>;
389                                 bias-disable;
390                         };
391                 };
392
393                 i2c11_pins: i2c11 {
394                         mux {
395                                 pins = "gpio83", "gpio84";
396                                 function = "blsp_i2c11";
397
398                                 drive-strength = <2>;
399                                 bias-disable;
400                         };
401                 };
402
403                 lcd_backlight_en_pin_a: lcd-backlight-vddio {
404                         pins = "gpio69";
405                         drive-strength = <10>;
406                         output-low;
407                         bias-disable;
408                 };
409
410                 sdhc1_pin_a: sdhc1-pin-active {
411                         clk {
412                                 pins = "sdc1_clk";
413                                 drive-strength = <16>;
414                                 bias-disable;
415                         };
416
417                         cmd-data {
418                                 pins = "sdc1_cmd", "sdc1_data";
419                                 drive-strength = <10>;
420                                 bias-pull-up;
421                         };
422                 };
423
424                 sdhc2_cd_pin_a: sdhc2-cd-pin-active {
425                         pins = "gpio62";
426                         function = "gpio";
427
428                         drive-strength = <2>;
429                         bias-disable;
430                  };
431
432                 sdhc2_pin_a: sdhc2-pin-active {
433                         clk {
434                                 pins = "sdc2_clk";
435                                 drive-strength = <6>;
436                                 bias-disable;
437                         };
438
439                         cmd-data {
440                                 pins = "sdc2_cmd", "sdc2_data";
441                                 drive-strength = <6>;
442                                 bias-pull-up;
443                         };
444                 };
445
446                 sdhc3_pin_a: sdhc3-pin-active {
447                         clk {
448                                 pins = "gpio40";
449                                 function = "sdc3";
450
451                                 drive-strength = <10>;
452                                 bias-disable;
453                         };
454
455                         cmd {
456                                 pins = "gpio39";
457                                 function = "sdc3";
458
459                                 drive-strength = <10>;
460                                 bias-pull-up;
461                         };
462
463                         data {
464                                 pins = "gpio35", "gpio36", "gpio37", "gpio38";
465                                 function = "sdc3";
466
467                                 drive-strength = <10>;
468                                 bias-pull-up;
469                         };
470                 };
471
472                 ts_int_pin: synaptics {
473                         pin {
474                                 pins = "gpio86";
475                                 function = "gpio";
476
477                                 drive-strength = <2>;
478                                 bias-disable;
479                                 input-enable;
480                         };
481                 };
482         };
483
484         i2c@f9964000 {
485                 status = "ok";
486
487                 clock-frequency = <355000>;
488                 qcom,src-freq = <50000000>;
489
490                 pinctrl-names = "default";
491                 pinctrl-0 = <&i2c8_pins>;
492
493                 synaptics@2c {
494                         compatible = "syna,rmi-i2c";
495                         reg = <0x2c>;
496
497                         interrupt-parent = <&msmgpio>;
498                         interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
499
500                         #address-cells = <1>;
501                         #size-cells = <0>;
502
503                         vdd-supply = <&pm8941_l22>;
504                         vio-supply = <&pm8941_lvs3>;
505
506                         pinctrl-names = "default";
507                         pinctrl-0 = <&ts_int_pin>;
508
509                         rmi-f01@1 {
510                                 reg = <0x1>;
511                                 syna,nosleep = <1>;
512                         };
513
514                         rmi-f11@11 {
515                                 reg = <0x11>;
516                                 syna,f11-flip-x = <1>;
517                                 syna,sensor-type = <1>;
518                         };
519                 };
520         };
521
522         i2c@f9967000 {
523                 status = "ok";
524                 pinctrl-names = "default";
525                 pinctrl-0 = <&i2c11_pins>;
526                 clock-frequency = <355000>;
527                 qcom,src-freq = <50000000>;
528
529                 lp8566_wled: backlight@2c {
530                         compatible = "ti,lp8556";
531                         reg = <0x2c>;
532                         power-supply = <&vreg_bl_vddio>;
533
534                         bl-name = "backlight";
535                         dev-ctrl = /bits/ 8 <0x05>;
536                         init-brt = /bits/ 8 <0x3f>;
537                         rom_a0h {
538                                 rom-addr = /bits/ 8 <0xa0>;
539                                 rom-val = /bits/ 8 <0xff>;
540                         };
541                         rom_a1h {
542                                 rom-addr = /bits/ 8 <0xa1>;
543                                 rom-val = /bits/ 8 <0x3f>;
544                         };
545                         rom_a2h {
546                                 rom-addr = /bits/ 8 <0xa2>;
547                                 rom-val = /bits/ 8 <0x20>;
548                         };
549                         rom_a3h {
550                                 rom-addr = /bits/ 8 <0xa3>;
551                                 rom-val = /bits/ 8 <0x5e>;
552                         };
553                         rom_a4h {
554                                 rom-addr = /bits/ 8 <0xa4>;
555                                 rom-val = /bits/ 8 <0x02>;
556                         };
557                         rom_a5h {
558                                 rom-addr = /bits/ 8 <0xa5>;
559                                 rom-val = /bits/ 8 <0x04>;
560                         };
561                         rom_a6h {
562                                 rom-addr = /bits/ 8 <0xa6>;
563                                 rom-val = /bits/ 8 <0x80>;
564                         };
565                         rom_a7h {
566                                 rom-addr = /bits/ 8 <0xa7>;
567                                 rom-val = /bits/ 8 <0xf7>;
568                         };
569                         rom_a9h {
570                                 rom-addr = /bits/ 8 <0xa9>;
571                                 rom-val = /bits/ 8 <0x80>;
572                         };
573                         rom_aah {
574                                 rom-addr = /bits/ 8 <0xaa>;
575                                 rom-val = /bits/ 8 <0x0f>;
576                         };
577                         rom_aeh {
578                                 rom-addr = /bits/ 8 <0xae>;
579                                 rom-val = /bits/ 8 <0x0f>;
580                         };
581                 };
582         };
583 };
584
585 &spmi_bus {
586         pm8941@0 {
587                 charger@1000 {
588                         qcom,fast-charge-safe-current = <1500000>;
589                         qcom,fast-charge-current-limit = <1500000>;
590                         qcom,dc-current-limit = <1800000>;
591                         qcom,fast-charge-safe-voltage = <4400000>;
592                         qcom,fast-charge-high-threshold-voltage = <4350000>;
593                         qcom,fast-charge-low-threshold-voltage = <3400000>;
594                         qcom,auto-recharge-threshold-voltage = <4200000>;
595                         qcom,minimum-input-voltage = <4300000>;
596                 };
597
598                 gpios@c000 {
599                         gpio_keys_pin_a: gpio-keys-active {
600                                 pins = "gpio2", "gpio5";
601                                 function = "normal";
602
603                                 bias-pull-up;
604                                 power-source = <PM8941_GPIO_S3>;
605                         };
606
607                         wlan_sleep_clk_pin: wl-sleep-clk {
608                                 pins = "gpio17";
609                                 function = "func2";
610
611                                 output-high;
612                                 power-source = <PM8941_GPIO_S3>;
613                         };
614
615                         wlan_regulator_pin: wl-reg-active {
616                                 pins = "gpio18";
617                                 function = "normal";
618
619                                 bias-disable;
620                                 power-source = <PM8941_GPIO_S3>;
621                         };
622
623                         lcd_dcdc_en_pin_a: lcd-dcdc-en-active {
624                                 pins = "gpio20";
625                                 function = "normal";
626
627                                 bias-disable;
628                                 power-source = <PM8941_GPIO_S3>;
629                                 input-disable;
630                                 output-low;
631                         };
632
633                 };
634
635                 coincell@2800 {
636                         status = "ok";
637                         qcom,rset-ohms = <2100>;
638                         qcom,vset-millivolts = <3000>;
639                 };
640         };
641 };