Merge branch 'elan-i2c' into next
[linux-2.6-microblaze.git] / arch / arm / boot / dts / qcom-msm8974-sony-xperia-honami.dts
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>
8
9 / {
10         model = "Sony Xperia Z1";
11         compatible = "sony,xperia-honami", "qcom,msm8974";
12
13         aliases {
14                 serial0 = &blsp1_uart2;
15         };
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         gpio-keys {
22                 compatible = "gpio-keys";
23                 input-name = "gpio-keys";
24
25                 pinctrl-names = "default";
26                 pinctrl-0 = <&gpio_keys_pin_a>;
27
28                 volume-down {
29                         label = "volume_down";
30                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
31                         linux,input-type = <1>;
32                         linux,code = <KEY_VOLUMEDOWN>;
33                 };
34
35                 camera-snapshot {
36                         label = "camera_snapshot";
37                         gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
38                         linux,input-type = <1>;
39                         linux,code = <KEY_CAMERA>;
40                 };
41
42                 camera-focus {
43                         label = "camera_focus";
44                         gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
45                         linux,input-type = <1>;
46                         linux,code = <KEY_CAMERA_FOCUS>;
47                 };
48
49                 volume-up {
50                         label = "volume_up";
51                         gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
52                         linux,input-type = <1>;
53                         linux,code = <KEY_VOLUMEUP>;
54                 };
55         };
56
57         memory@0 {
58                 reg = <0 0x40000000>, <0x40000000 0x40000000>;
59                 device_type = "memory";
60         };
61
62         smd {
63                 rpm {
64                         rpm_requests {
65                                 pm8841-regulators {
66                                         s1 {
67                                                 regulator-min-microvolt = <675000>;
68                                                 regulator-max-microvolt = <1050000>;
69                                         };
70
71                                         s2 {
72                                                 regulator-min-microvolt = <500000>;
73                                                 regulator-max-microvolt = <1050000>;
74                                         };
75
76                                         s3 {
77                                                 regulator-min-microvolt = <500000>;
78                                                 regulator-max-microvolt = <1050000>;
79                                         };
80
81                                         s4 {
82                                                 regulator-min-microvolt = <500000>;
83                                                 regulator-max-microvolt = <1050000>;
84                                         };
85                                 };
86
87                                 pm8941-regulators {
88                                         vdd_l1_l3-supply = <&pm8941_s1>;
89                                         vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
90                                         vdd_l4_l11-supply = <&pm8941_s1>;
91                                         vdd_l5_l7-supply = <&pm8941_s2>;
92                                         vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
93                                         vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
94                                         vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
95                                         vdd_l21-supply = <&vreg_boost>;
96
97                                         s1 {
98                                                 regulator-min-microvolt = <1300000>;
99                                                 regulator-max-microvolt = <1300000>;
100                                                 regulator-always-on;
101                                                 regulator-boot-on;
102                                         };
103
104                                         s2 {
105                                                 regulator-min-microvolt = <2150000>;
106                                                 regulator-max-microvolt = <2150000>;
107                                                 regulator-boot-on;
108                                         };
109
110                                         s3 {
111                                                 regulator-min-microvolt = <1800000>;
112                                                 regulator-max-microvolt = <1800000>;
113                                                 regulator-always-on;
114                                                 regulator-boot-on;
115                                         };
116
117                                         s4 {
118                                                 regulator-min-microvolt = <5000000>;
119                                                 regulator-max-microvolt = <5000000>;
120                                         };
121
122                                         l1 {
123                                                 regulator-min-microvolt = <1225000>;
124                                                 regulator-max-microvolt = <1225000>;
125
126                                                 regulator-always-on;
127                                                 regulator-boot-on;
128                                         };
129
130                                         l2 {
131                                                 regulator-min-microvolt = <1200000>;
132                                                 regulator-max-microvolt = <1200000>;
133                                         };
134
135                                         l3 {
136                                                 regulator-min-microvolt = <1200000>;
137                                                 regulator-max-microvolt = <1200000>;
138                                         };
139
140                                         l4 {
141                                                 regulator-min-microvolt = <1225000>;
142                                                 regulator-max-microvolt = <1225000>;
143                                         };
144
145                                         l5 {
146                                                 regulator-min-microvolt = <1800000>;
147                                                 regulator-max-microvolt = <1800000>;
148                                         };
149
150                                         l6 {
151                                                 regulator-min-microvolt = <1800000>;
152                                                 regulator-max-microvolt = <1800000>;
153
154                                                 regulator-boot-on;
155                                         };
156
157                                         l7 {
158                                                 regulator-min-microvolt = <1800000>;
159                                                 regulator-max-microvolt = <1800000>;
160
161                                                 regulator-boot-on;
162                                         };
163
164                                         l8 {
165                                                 regulator-min-microvolt = <1800000>;
166                                                 regulator-max-microvolt = <1800000>;
167                                         };
168
169                                         l9 {
170                                                 regulator-min-microvolt = <1800000>;
171                                                 regulator-max-microvolt = <2950000>;
172                                         };
173
174                                         l11 {
175                                                 regulator-min-microvolt = <1300000>;
176                                                 regulator-max-microvolt = <1350000>;
177                                         };
178
179                                         l12 {
180                                                 regulator-min-microvolt = <1800000>;
181                                                 regulator-max-microvolt = <1800000>;
182
183                                                 regulator-always-on;
184                                                 regulator-boot-on;
185                                         };
186
187                                         l13 {
188                                                 regulator-min-microvolt = <1800000>;
189                                                 regulator-max-microvolt = <2950000>;
190
191                                                 regulator-boot-on;
192                                         };
193
194                                         l14 {
195                                                 regulator-min-microvolt = <1800000>;
196                                                 regulator-max-microvolt = <1800000>;
197                                         };
198
199                                         l15 {
200                                                 regulator-min-microvolt = <2050000>;
201                                                 regulator-max-microvolt = <2050000>;
202                                         };
203
204                                         l16 {
205                                                 regulator-min-microvolt = <2700000>;
206                                                 regulator-max-microvolt = <2700000>;
207                                         };
208
209                                         l17 {
210                                                 regulator-min-microvolt = <2700000>;
211                                                 regulator-max-microvolt = <2700000>;
212                                         };
213
214                                         l18 {
215                                                 regulator-min-microvolt = <2850000>;
216                                                 regulator-max-microvolt = <2850000>;
217                                         };
218
219                                         l19 {
220                                                 regulator-min-microvolt = <3300000>;
221                                                 regulator-max-microvolt = <3300000>;
222                                         };
223
224                                         l20 {
225                                                 regulator-min-microvolt = <2950000>;
226                                                 regulator-max-microvolt = <2950000>;
227
228                                                 regulator-allow-set-load;
229                                                 regulator-boot-on;
230                                                 regulator-system-load = <200000>;
231                                         };
232
233                                         l21 {
234                                                 regulator-min-microvolt = <2950000>;
235                                                 regulator-max-microvolt = <2950000>;
236
237                                                 regulator-boot-on;
238                                         };
239
240                                         l22 {
241                                                 regulator-min-microvolt = <3000000>;
242                                                 regulator-max-microvolt = <3000000>;
243                                         };
244
245                                         l23 {
246                                                 regulator-min-microvolt = <2800000>;
247                                                 regulator-max-microvolt = <2800000>;
248                                         };
249
250                                         l24 {
251                                                 regulator-min-microvolt = <3075000>;
252                                                 regulator-max-microvolt = <3075000>;
253
254                                                 regulator-boot-on;
255                                         };
256                                 };
257                         };
258                 };
259         };
260 };
261
262 &soc {
263         usb@f9a55000 {
264                 status = "ok";
265
266                 phys = <&usb_hs1_phy>;
267                 phy-select = <&tcsr 0xb000 0>;
268                 extcon = <&smbb>, <&usb_id>;
269                 vbus-supply = <&chg_otg>;
270
271                 hnp-disable;
272                 srp-disable;
273                 adp-disable;
274
275                 ulpi {
276                         phy@a {
277                                 status = "ok";
278
279                                 v1p8-supply = <&pm8941_l6>;
280                                 v3p3-supply = <&pm8941_l24>;
281
282                                 extcon = <&smbb>;
283                                 qcom,init-seq = /bits/ 8 <0x1 0x64>;
284                         };
285                 };
286         };
287
288         sdhci@f9824900 {
289                 status = "ok";
290
291                 vmmc-supply = <&pm8941_l20>;
292                 vqmmc-supply = <&pm8941_s3>;
293
294                 bus-width = <8>;
295                 non-removable;
296
297                 pinctrl-names = "default";
298                 pinctrl-0 = <&sdhc1_pin_a>;
299         };
300
301         sdhci@f98a4900 {
302                 status = "ok";
303
304                 bus-width = <4>;
305
306                 vmmc-supply = <&pm8941_l21>;
307                 vqmmc-supply = <&pm8941_l13>;
308
309                 cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>;
310
311                 pinctrl-names = "default";
312                 pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
313         };
314
315         serial@f991e000 {
316                 status = "ok";
317
318                 pinctrl-names = "default";
319                 pinctrl-0 = <&blsp1_uart2_pin_a>;
320         };
321
322         i2c@f9924000 {
323                 status = "ok";
324
325                 clock-frequency = <355000>;
326                 qcom,src-freq = <50000000>;
327
328                 pinctrl-names = "default";
329                 pinctrl-0 = <&i2c2_pins>;
330
331                 synaptics@2c {
332                         compatible = "syna,rmi4-i2c";
333                         reg = <0x2c>;
334
335                         interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>;
336
337                         #address-cells = <1>;
338                         #size-cells = <0>;
339
340                         vdd-supply = <&pm8941_l22>;
341                         vio-supply = <&pm8941_lvs3>;
342
343                         pinctrl-names = "default";
344                         pinctrl-0 = <&ts_int_pin>;
345
346                         syna,startup-delay-ms = <10>;
347
348                         rmi4-f01@1 {
349                                 reg = <0x1>;
350                                 syna,nosleep-mode = <1>;
351                         };
352
353                         rmi4-f11@11 {
354                                 reg = <0x11>;
355                                 touchscreen-inverted-x;
356                                 syna,sensor-type = <1>;
357                         };
358                 };
359         };
360
361         pinctrl@fd510000 {
362                 blsp1_uart2_pin_a: blsp1-uart2-pin-active {
363                         rx {
364                                 pins = "gpio5";
365                                 function = "blsp_uart2";
366
367                                 drive-strength = <2>;
368                                 bias-pull-up;
369                         };
370
371                         tx {
372                                 pins = "gpio4";
373                                 function = "blsp_uart2";
374
375                                 drive-strength = <4>;
376                                 bias-disable;
377                         };
378                 };
379
380                 i2c2_pins: i2c2 {
381                         mux {
382                                 pins = "gpio6", "gpio7";
383                                 function = "blsp_i2c2";
384
385                                 drive-strength = <2>;
386                                 bias-disable;
387                         };
388                 };
389
390                 sdhc1_pin_a: sdhc1-pin-active {
391                         clk {
392                                 pins = "sdc1_clk";
393                                 drive-strength = <16>;
394                                 bias-disable;
395                         };
396
397                         cmd-data {
398                                 pins = "sdc1_cmd", "sdc1_data";
399                                 drive-strength = <10>;
400                                 bias-pull-up;
401                         };
402                 };
403
404                 sdhc2_cd_pin_a: sdhc2-cd-pin-active {
405                         pins = "gpio62";
406                         function = "gpio";
407
408                         drive-strength = <2>;
409                         bias-disable;
410                  };
411
412                 sdhc2_pin_a: sdhc2-pin-active {
413                         clk {
414                                 pins = "sdc2_clk";
415                                 drive-strength = <10>;
416                                 bias-disable;
417                         };
418
419                         cmd-data {
420                                 pins = "sdc2_cmd", "sdc2_data";
421                                 drive-strength = <6>;
422                                 bias-pull-up;
423                         };
424                 };
425
426                 ts_int_pin: touch-int {
427                         pin {
428                                 pins = "gpio61";
429                                 function = "gpio";
430
431                                 drive-strength = <2>;
432                                 bias-disable;
433                                 input-enable;
434                         };
435                 };
436         };
437
438         dma-controller@f9944000 {
439                 qcom,controlled-remotely;
440         };
441 };
442
443 &spmi_bus {
444         pm8941@0 {
445                 charger@1000 {
446                         qcom,fast-charge-safe-current = <1500000>;
447                         qcom,fast-charge-current-limit = <1500000>;
448                         qcom,dc-current-limit = <1800000>;
449                         qcom,fast-charge-safe-voltage = <4400000>;
450                         qcom,fast-charge-high-threshold-voltage = <4350000>;
451                         qcom,fast-charge-low-threshold-voltage = <3400000>;
452                         qcom,auto-recharge-threshold-voltage = <4200000>;
453                         qcom,minimum-input-voltage = <4300000>;
454                 };
455
456                 gpios@c000 {
457                         gpio_keys_pin_a: gpio-keys-active {
458                                 pins = "gpio2", "gpio3", "gpio4", "gpio5";
459                                 function = "normal";
460
461                                 bias-pull-up;
462                                 power-source = <PM8941_GPIO_S3>;
463                         };
464                 };
465
466                 coincell@2800 {
467                         status = "ok";
468                         qcom,rset-ohms = <2100>;
469                         qcom,vset-millivolts = <3000>;
470                 };
471         };
472
473         pm8941@1 {
474                 wled@d800 {
475                         status = "ok";
476
477                         qcom,cs-out;
478                         qcom,current-limit = <20>;
479                         qcom,current-boost-limit = <805>;
480                         qcom,switching-freq = <1600>;
481                         qcom,ovp = <29>;
482                         qcom,num-strings = <2>;
483                 };
484         };
485 };