GNU Linux-libre 5.19-rc6-gnu
[releases.git] / arch / arm / boot / dts / qcom-msm8974pro-sony-xperia-shinano-castor.dts
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-msm8974pro.dtsi"
3 #include "qcom-pm8841.dtsi"
4 #include "qcom-pm8941.dtsi"
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                 serial1 = &blsp2_uart1;
15         };
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         gpio-keys {
22                 compatible = "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         vreg_bl_vddio: lcd-backlight-vddio {
57                 compatible = "regulator-fixed";
58                 regulator-name = "vreg_bl_vddio";
59                 regulator-min-microvolt = <3150000>;
60                 regulator-max-microvolt = <3150000>;
61
62                 gpio = <&tlmm 69 0>;
63                 enable-active-high;
64
65                 vin-supply = <&pm8941_s3>;
66                 startup-delay-us = <70000>;
67
68                 pinctrl-names = "default";
69                 pinctrl-0 = <&lcd_backlight_en_pin_a>;
70         };
71
72         vreg_vsp: lcd-dcdc-regulator {
73                 compatible = "regulator-fixed";
74                 regulator-name = "vreg_vsp";
75                 regulator-min-microvolt = <5600000>;
76                 regulator-max-microvolt = <5600000>;
77
78                 gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>;
79                 enable-active-high;
80
81                 pinctrl-names = "default";
82                 pinctrl-0 = <&lcd_dcdc_en_pin_a>;
83         };
84
85         vreg_wlan: wlan-regulator {
86                 compatible = "regulator-fixed";
87
88                 regulator-name = "wl-reg";
89                 regulator-min-microvolt = <3300000>;
90                 regulator-max-microvolt = <3300000>;
91
92                 gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>;
93                 enable-active-high;
94
95                 pinctrl-names = "default";
96                 pinctrl-0 = <&wlan_regulator_pin>;
97         };
98 };
99
100 &blsp1_uart2 {
101         status = "okay";
102 };
103
104 &blsp2_i2c2 {
105         status = "okay";
106         clock-frequency = <355000>;
107
108         synaptics@2c {
109                 compatible = "syna,rmi4-i2c";
110                 reg = <0x2c>;
111
112                 interrupt-parent = <&tlmm>;
113                 interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
114
115                 #address-cells = <1>;
116                 #size-cells = <0>;
117
118                 vdd-supply = <&pm8941_l22>;
119                 vio-supply = <&pm8941_lvs3>;
120
121                 pinctrl-names = "default";
122                 pinctrl-0 = <&ts_int_pin>;
123
124                 syna,startup-delay-ms = <10>;
125
126                 rmi-f01@1 {
127                         reg = <0x1>;
128                         syna,nosleep = <1>;
129                 };
130
131                 rmi-f11@11 {
132                         reg = <0x11>;
133                         syna,f11-flip-x = <1>;
134                         syna,sensor-type = <1>;
135                 };
136         };
137 };
138
139 &blsp2_i2c5 {
140         status = "okay";
141         clock-frequency = <355000>;
142
143         lp8566_wled: backlight@2c {
144                 compatible = "ti,lp8556";
145                 reg = <0x2c>;
146                 power-supply = <&vreg_bl_vddio>;
147
148                 bl-name = "backlight";
149                 dev-ctrl = /bits/ 8 <0x05>;
150                 init-brt = /bits/ 8 <0x3f>;
151                 rom_a0h {
152                         rom-addr = /bits/ 8 <0xa0>;
153                         rom-val = /bits/ 8 <0xff>;
154                 };
155                 rom_a1h {
156                         rom-addr = /bits/ 8 <0xa1>;
157                         rom-val = /bits/ 8 <0x3f>;
158                 };
159                 rom_a2h {
160                         rom-addr = /bits/ 8 <0xa2>;
161                         rom-val = /bits/ 8 <0x20>;
162                 };
163                 rom_a3h {
164                         rom-addr = /bits/ 8 <0xa3>;
165                         rom-val = /bits/ 8 <0x5e>;
166                 };
167                 rom_a4h {
168                         rom-addr = /bits/ 8 <0xa4>;
169                         rom-val = /bits/ 8 <0x02>;
170                 };
171                 rom_a5h {
172                         rom-addr = /bits/ 8 <0xa5>;
173                         rom-val = /bits/ 8 <0x04>;
174                 };
175                 rom_a6h {
176                         rom-addr = /bits/ 8 <0xa6>;
177                         rom-val = /bits/ 8 <0x80>;
178                 };
179                 rom_a7h {
180                         rom-addr = /bits/ 8 <0xa7>;
181                         rom-val = /bits/ 8 <0xf7>;
182                 };
183                 rom_a9h {
184                         rom-addr = /bits/ 8 <0xa9>;
185                         rom-val = /bits/ 8 <0x80>;
186                 };
187                 rom_aah {
188                         rom-addr = /bits/ 8 <0xaa>;
189                         rom-val = /bits/ 8 <0x0f>;
190                 };
191                 rom_aeh {
192                         rom-addr = /bits/ 8 <0xae>;
193                         rom-val = /bits/ 8 <0x0f>;
194                 };
195         };
196 };
197
198 &blsp2_uart1 {
199         status = "okay";
200
201         bluetooth {
202                 compatible = "brcm,bcm43438-bt";
203                 max-speed = <3000000>;
204
205                 pinctrl-names = "default";
206                 pinctrl-0 = <&bt_host_wake_pin>, <&bt_dev_wake_pin>, <&bt_reg_on_pin>;
207
208                 host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
209                 device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
210                 shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>;
211         };
212 };
213
214 &otg {
215         status = "okay";
216
217         phys = <&usb_hs1_phy>;
218         phy-select = <&tcsr 0xb000 0>;
219         extcon = <&smbb>, <&usb_id>;
220         vbus-supply = <&chg_otg>;
221
222         hnp-disable;
223         srp-disable;
224         adp-disable;
225
226         ulpi {
227                 phy@a {
228                         status = "okay";
229
230                         v1p8-supply = <&pm8941_l6>;
231                         v3p3-supply = <&pm8941_l24>;
232
233                         extcon = <&smbb>;
234                         qcom,init-seq = /bits/ 8 <0x1 0x64>;
235                 };
236         };
237 };
238
239 &pm8941_coincell {
240         status = "okay";
241
242         qcom,rset-ohms = <2100>;
243         qcom,vset-millivolts = <3000>;
244 };
245
246 &pm8941_gpios {
247         gpio_keys_pin_a: gpio-keys-active {
248                 pins = "gpio2", "gpio5";
249                 function = "normal";
250
251                 bias-pull-up;
252                 power-source = <PM8941_GPIO_S3>;
253         };
254
255         bt_reg_on_pin: bt-reg-on {
256                 pins = "gpio16";
257                 function = "normal";
258
259                 output-low;
260                 power-source = <PM8941_GPIO_S3>;
261         };
262
263         wlan_sleep_clk_pin: wl-sleep-clk {
264                 pins = "gpio17";
265                 function = "func2";
266
267                 output-high;
268                 power-source = <PM8941_GPIO_S3>;
269         };
270
271         wlan_regulator_pin: wl-reg-active {
272                 pins = "gpio18";
273                 function = "normal";
274
275                 bias-disable;
276                 power-source = <PM8941_GPIO_S3>;
277         };
278
279         lcd_dcdc_en_pin_a: lcd-dcdc-en-active {
280                 pins = "gpio20";
281                 function = "normal";
282
283                 bias-disable;
284                 power-source = <PM8941_GPIO_S3>;
285                 input-disable;
286                 output-low;
287         };
288
289 };
290
291 &rpm_requests {
292         pm8941-regulators {
293                 compatible = "qcom,rpm-pm8941-regulators";
294
295                 vdd_l1_l3-supply = <&pm8941_s1>;
296                 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
297                 vdd_l4_l11-supply = <&pm8941_s1>;
298                 vdd_l5_l7-supply = <&pm8941_s2>;
299                 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
300                 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
301                 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
302                 vdd_l21-supply = <&vreg_boost>;
303
304                 pm8941_s1: s1 {
305                         regulator-min-microvolt = <1300000>;
306                         regulator-max-microvolt = <1300000>;
307                         regulator-always-on;
308                         regulator-boot-on;
309                 };
310
311                 pm8941_s2: s2 {
312                         regulator-min-microvolt = <2150000>;
313                         regulator-max-microvolt = <2150000>;
314                         regulator-boot-on;
315                 };
316
317                 pm8941_s3: s3 {
318                         regulator-min-microvolt = <1800000>;
319                         regulator-max-microvolt = <1800000>;
320                         regulator-system-load = <154000>;
321                         regulator-always-on;
322                         regulator-boot-on;
323                 };
324
325                 pm8941_s4: s4 {
326                         regulator-min-microvolt = <5000000>;
327                         regulator-max-microvolt = <5000000>;
328                 };
329
330                 pm8941_l1: l1 {
331                         regulator-min-microvolt = <1225000>;
332                         regulator-max-microvolt = <1225000>;
333                         regulator-always-on;
334                         regulator-boot-on;
335                 };
336
337                 pm8941_l2: l2 {
338                         regulator-min-microvolt = <1200000>;
339                         regulator-max-microvolt = <1200000>;
340                 };
341
342                 pm8941_l3: l3 {
343                         regulator-min-microvolt = <1200000>;
344                         regulator-max-microvolt = <1200000>;
345                 };
346
347                 pm8941_l4: l4 {
348                         regulator-min-microvolt = <1225000>;
349                         regulator-max-microvolt = <1225000>;
350                 };
351
352                 pm8941_l5: l5 {
353                         regulator-min-microvolt = <1800000>;
354                         regulator-max-microvolt = <1800000>;
355                 };
356
357                 pm8941_l6: l6 {
358                         regulator-min-microvolt = <1800000>;
359                         regulator-max-microvolt = <1800000>;
360                         regulator-boot-on;
361                 };
362
363                 pm8941_l7: l7 {
364                         regulator-min-microvolt = <1800000>;
365                         regulator-max-microvolt = <1800000>;
366                         regulator-boot-on;
367                 };
368
369                 pm8941_l8: l8 {
370                         regulator-min-microvolt = <1800000>;
371                         regulator-max-microvolt = <1800000>;
372                 };
373
374                 pm8941_l9: l9 {
375                         regulator-min-microvolt = <1800000>;
376                         regulator-max-microvolt = <2950000>;
377                 };
378
379                 pm8941_l11: l11 {
380                         regulator-min-microvolt = <1300000>;
381                         regulator-max-microvolt = <1350000>;
382                 };
383
384                 pm8941_l12: l12 {
385                         regulator-min-microvolt = <1800000>;
386                         regulator-max-microvolt = <1800000>;
387                         regulator-always-on;
388                         regulator-boot-on;
389                 };
390
391                 pm8941_l13: l13 {
392                         regulator-min-microvolt = <1800000>;
393                         regulator-max-microvolt = <2950000>;
394                         regulator-boot-on;
395                 };
396
397                 pm8941_l14: l14 {
398                         regulator-min-microvolt = <1800000>;
399                         regulator-max-microvolt = <1800000>;
400                 };
401
402                 pm8941_l15: l15 {
403                         regulator-min-microvolt = <2050000>;
404                         regulator-max-microvolt = <2050000>;
405                 };
406
407                 pm8941_l16: l16 {
408                         regulator-min-microvolt = <2700000>;
409                         regulator-max-microvolt = <2700000>;
410                 };
411
412                 pm8941_l17: l17 {
413                         regulator-min-microvolt = <2700000>;
414                         regulator-max-microvolt = <2700000>;
415                 };
416
417                 pm8941_l18: l18 {
418                         regulator-min-microvolt = <2850000>;
419                         regulator-max-microvolt = <2850000>;
420                 };
421
422                 pm8941_l19: l19 {
423                         regulator-min-microvolt = <2850000>;
424                         regulator-max-microvolt = <2850000>;
425                 };
426
427                 pm8941_l20: l20 {
428                         regulator-min-microvolt = <2950000>;
429                         regulator-max-microvolt = <2950000>;
430                         regulator-system-load = <500000>;
431                         regulator-allow-set-load;
432                         regulator-boot-on;
433                 };
434
435                 pm8941_l21: l21 {
436                         regulator-min-microvolt = <2950000>;
437                         regulator-max-microvolt = <2950000>;
438                         regulator-boot-on;
439                 };
440
441                 pm8941_l22: l22 {
442                         regulator-min-microvolt = <3000000>;
443                         regulator-max-microvolt = <3000000>;
444                 };
445
446                 pm8941_l23: l23 {
447                         regulator-min-microvolt = <2800000>;
448                         regulator-max-microvolt = <2800000>;
449                 };
450
451                 pm8941_l24: l24 {
452                         regulator-min-microvolt = <3075000>;
453                         regulator-max-microvolt = <3075000>;
454                         regulator-boot-on;
455                 };
456
457                 pm8941_lvs3: lvs3 {};
458         };
459 };
460
461 &sdhc_1 {
462         status = "okay";
463
464         vmmc-supply = <&pm8941_l20>;
465         vqmmc-supply = <&pm8941_s3>;
466
467         pinctrl-names = "default", "sleep";
468         pinctrl-0 = <&sdc1_on>;
469         pinctrl-1 = <&sdc1_off>;
470 };
471
472 &sdhc_2 {
473         status = "okay";
474
475         vmmc-supply = <&pm8941_l21>;
476         vqmmc-supply = <&pm8941_l13>;
477
478         cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
479
480         pinctrl-names = "default", "sleep";
481         pinctrl-0 = <&sdc2_on>;
482         pinctrl-1 = <&sdc2_off>;
483 };
484
485 &sdhc_3 {
486         status = "okay";
487
488         max-frequency = <100000000>;
489         vmmc-supply = <&vreg_wlan>;
490         non-removable;
491
492         pinctrl-names = "default";
493         pinctrl-0 = <&sdc3_on>;
494
495         #address-cells = <1>;
496         #size-cells = <0>;
497
498         bcrmf@1 {
499                 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
500                 reg = <1>;
501
502                 brcm,drive-strength = <10>;
503
504                 pinctrl-names = "default";
505                 pinctrl-0 = <&wlan_sleep_clk_pin>;
506         };
507 };
508
509 &smbb {
510         qcom,fast-charge-safe-current = <1500000>;
511         qcom,fast-charge-current-limit = <1500000>;
512         qcom,dc-current-limit = <1800000>;
513         qcom,fast-charge-safe-voltage = <4400000>;
514         qcom,fast-charge-high-threshold-voltage = <4350000>;
515         qcom,fast-charge-low-threshold-voltage = <3400000>;
516         qcom,auto-recharge-threshold-voltage = <4200000>;
517         qcom,minimum-input-voltage = <4300000>;
518 };
519
520 &tlmm {
521         lcd_backlight_en_pin_a: lcd-backlight-vddio {
522                 pins = "gpio69";
523                 drive-strength = <10>;
524                 output-low;
525                 bias-disable;
526         };
527
528         sdc1_on: sdc1-on {
529                 clk {
530                         pins = "sdc1_clk";
531                         drive-strength = <16>;
532                         bias-disable;
533                 };
534
535                 cmd-data {
536                         pins = "sdc1_cmd", "sdc1_data";
537                         drive-strength = <10>;
538                         bias-pull-up;
539                 };
540         };
541
542         sdc2_on: sdc2-on {
543                 clk {
544                         pins = "sdc2_clk";
545                         drive-strength = <6>;
546                         bias-disable;
547                 };
548
549                 cmd-data {
550                         pins = "sdc2_cmd", "sdc2_data";
551                         drive-strength = <6>;
552                         bias-pull-up;
553                 };
554
555                 cd {
556                         pins = "gpio62";
557                         function = "gpio";
558                         drive-strength = <2>;
559                         bias-disable;
560                 };
561         };
562
563         sdc3_on: sdc3-on {
564                 clk {
565                         pins = "gpio40";
566                         function = "sdc3";
567                         drive-strength = <10>;
568                         bias-disable;
569                 };
570
571                 cmd {
572                         pins = "gpio39";
573                         function = "sdc3";
574                         drive-strength = <10>;
575                         bias-pull-up;
576                 };
577
578                 data {
579                         pins = "gpio35", "gpio36", "gpio37", "gpio38";
580                         function = "sdc3";
581                         drive-strength = <10>;
582                         bias-pull-up;
583                 };
584         };
585
586         ts_int_pin: ts-int-pin {
587                 pins = "gpio86";
588                 function = "gpio";
589                 drive-strength = <2>;
590                 bias-disable;
591                 input-enable;
592         };
593
594         bt_host_wake_pin: bt-host-wake {
595                 pins = "gpio95";
596                 function = "gpio";
597                 drive-strength = <2>;
598                 bias-disable;
599                 output-low;
600         };
601
602         bt_dev_wake_pin: bt-dev-wake {
603                 pins = "gpio96";
604                 function = "gpio";
605                 drive-strength = <2>;
606                 bias-disable;
607         };
608 };