blob: ee94741a26ed6d591d8343666c6546e411670488 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: GPL-2.0
2#include "qcom-msm8974pro.dtsi"
Tom Rini93743d22024-04-01 09:08:13 -04003#include "pm8841.dtsi"
4#include "pm8941.dtsi"
Tom Rini53633a82024-02-29 12:33:36 -05005#include <dt-bindings/input/input.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
8
9/ {
10 model = "Sony Xperia Z2 Tablet";
11 compatible = "sony,xperia-castor", "qcom,msm8974pro", "qcom,msm8974";
12 chassis-type = "tablet";
13
14 aliases {
15 serial0 = &blsp1_uart2;
16 serial1 = &blsp2_uart1;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 };
22
23 gpio-keys {
24 compatible = "gpio-keys";
25
26 pinctrl-names = "default";
27 pinctrl-0 = <&gpio_keys_pin_a>;
28
29 key-volume-down {
30 label = "volume_down";
31 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
32 linux,input-type = <1>;
33 linux,code = <KEY_VOLUMEDOWN>;
34 };
35
36 key-camera-snapshot {
37 label = "camera_snapshot";
38 gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
39 linux,input-type = <1>;
40 linux,code = <KEY_CAMERA>;
41 };
42
43 key-camera-focus {
44 label = "camera_focus";
45 gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
46 linux,input-type = <1>;
47 linux,code = <KEY_CAMERA_FOCUS>;
48 };
49
50 key-volume-up {
51 label = "volume_up";
52 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
53 linux,input-type = <1>;
54 linux,code = <KEY_VOLUMEUP>;
55 };
56 };
57
58 vreg_bl_vddio: lcd-backlight-vddio {
59 compatible = "regulator-fixed";
60 regulator-name = "vreg_bl_vddio";
61 regulator-min-microvolt = <3150000>;
62 regulator-max-microvolt = <3150000>;
63
64 gpio = <&tlmm 69 0>;
65 enable-active-high;
66
67 vin-supply = <&pm8941_s3>;
68 startup-delay-us = <70000>;
69
70 pinctrl-names = "default";
71 pinctrl-0 = <&lcd_backlight_en_pin_a>;
72 };
73
74 vreg_vsp: lcd-dcdc-regulator {
75 compatible = "regulator-fixed";
76 regulator-name = "vreg_vsp";
77 regulator-min-microvolt = <5600000>;
78 regulator-max-microvolt = <5600000>;
79
80 gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>;
81 enable-active-high;
82
83 pinctrl-names = "default";
84 pinctrl-0 = <&lcd_dcdc_en_pin_a>;
85 };
86
Tom Rini93743d22024-04-01 09:08:13 -040087 vreg_boost: vreg-boost {
88 compatible = "regulator-fixed";
89
90 regulator-name = "vreg-boost";
91 regulator-min-microvolt = <3150000>;
92 regulator-max-microvolt = <3150000>;
93
94 regulator-always-on;
95 regulator-boot-on;
96
97 gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
98 enable-active-high;
99
100 pinctrl-names = "default";
101 pinctrl-0 = <&boost_bypass_n_pin>;
102 };
103
104 vreg_vph_pwr: vreg-vph-pwr {
105 compatible = "regulator-fixed";
106 regulator-name = "vph-pwr";
107
108 regulator-min-microvolt = <3600000>;
109 regulator-max-microvolt = <3600000>;
110
111 regulator-always-on;
112 };
113
Tom Rini53633a82024-02-29 12:33:36 -0500114 vreg_wlan: wlan-regulator {
115 compatible = "regulator-fixed";
116
117 regulator-name = "wl-reg";
118 regulator-min-microvolt = <3300000>;
119 regulator-max-microvolt = <3300000>;
120
121 gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>;
122 enable-active-high;
123
124 pinctrl-names = "default";
125 pinctrl-0 = <&wlan_regulator_pin>;
126 };
127};
128
129&blsp1_uart2 {
130 status = "okay";
131};
132
133&blsp2_i2c2 {
134 status = "okay";
135 clock-frequency = <355000>;
136
137 synaptics@2c {
138 compatible = "syna,rmi4-i2c";
139 reg = <0x2c>;
140
141 interrupt-parent = <&tlmm>;
142 interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
143
144 #address-cells = <1>;
145 #size-cells = <0>;
146
147 vdd-supply = <&pm8941_l22>;
148 vio-supply = <&pm8941_lvs3>;
149
150 pinctrl-names = "default";
151 pinctrl-0 = <&ts_int_pin>;
152
153 syna,startup-delay-ms = <100>;
154
155 rmi4-f01@1 {
156 reg = <0x1>;
157 syna,nosleep-mode = <1>;
158 };
159
160 rmi4-f11@11 {
161 reg = <0x11>;
162 syna,sensor-type = <1>;
163 touchscreen-inverted-x;
164 };
165 };
166};
167
168&blsp2_i2c5 {
169 status = "okay";
170 clock-frequency = <355000>;
171
172 lp8566_wled: backlight@2c {
173 compatible = "ti,lp8556";
174 reg = <0x2c>;
175 power-supply = <&vreg_bl_vddio>;
176
177 bl-name = "backlight";
178 dev-ctrl = /bits/ 8 <0x05>;
179 init-brt = /bits/ 8 <0x3f>;
180
181 rom-a0h {
182 rom-addr = /bits/ 8 <0xa0>;
183 rom-val = /bits/ 8 <0xff>;
184 };
185 rom-a1h {
186 rom-addr = /bits/ 8 <0xa1>;
187 rom-val = /bits/ 8 <0x3f>;
188 };
189 rom-a2h {
190 rom-addr = /bits/ 8 <0xa2>;
191 rom-val = /bits/ 8 <0x20>;
192 };
193 rom-a3h {
194 rom-addr = /bits/ 8 <0xa3>;
195 rom-val = /bits/ 8 <0x5e>;
196 };
197 rom-a4h {
198 rom-addr = /bits/ 8 <0xa4>;
199 rom-val = /bits/ 8 <0x02>;
200 };
201 rom-a5h {
202 rom-addr = /bits/ 8 <0xa5>;
203 rom-val = /bits/ 8 <0x04>;
204 };
205 rom-a6h {
206 rom-addr = /bits/ 8 <0xa6>;
207 rom-val = /bits/ 8 <0x80>;
208 };
209 rom-a7h {
210 rom-addr = /bits/ 8 <0xa7>;
211 rom-val = /bits/ 8 <0xf7>;
212 };
213 rom-a9h {
214 rom-addr = /bits/ 8 <0xa9>;
215 rom-val = /bits/ 8 <0x80>;
216 };
217 rom-aah {
218 rom-addr = /bits/ 8 <0xaa>;
219 rom-val = /bits/ 8 <0x0f>;
220 };
221 rom-aeh {
222 rom-addr = /bits/ 8 <0xae>;
223 rom-val = /bits/ 8 <0x0f>;
224 };
225 };
226};
227
228&blsp2_uart1 {
229 status = "okay";
230
231 bluetooth {
232 compatible = "brcm,bcm43438-bt";
233 max-speed = <3000000>;
234
235 pinctrl-names = "default";
236 pinctrl-0 = <&bt_host_wake_pin>, <&bt_dev_wake_pin>, <&bt_reg_on_pin>;
237
238 host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
239 device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
240 shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>;
241 };
242};
243
244&pm8941_coincell {
245 status = "okay";
246
247 qcom,rset-ohms = <2100>;
248 qcom,vset-millivolts = <3000>;
249};
250
251&pm8941_gpios {
252 gpio_keys_pin_a: gpio-keys-active-state {
253 pins = "gpio2", "gpio5";
254 function = "normal";
255
256 bias-pull-up;
257 power-source = <PM8941_GPIO_S3>;
258 };
259
260 bt_reg_on_pin: bt-reg-on-state {
261 pins = "gpio16";
262 function = "normal";
263
264 output-low;
265 power-source = <PM8941_GPIO_S3>;
266 };
267
268 wlan_sleep_clk_pin: wl-sleep-clk-state {
269 pins = "gpio17";
270 function = "func2";
271
272 output-high;
273 power-source = <PM8941_GPIO_S3>;
274 };
275
276 wlan_regulator_pin: wl-reg-active-state {
277 pins = "gpio18";
278 function = "normal";
279
280 bias-disable;
281 power-source = <PM8941_GPIO_S3>;
282 };
283
284 lcd_dcdc_en_pin_a: lcd-dcdc-en-active-state {
285 pins = "gpio20";
286 function = "normal";
287
288 bias-disable;
289 power-source = <PM8941_GPIO_S3>;
290 input-disable;
291 output-low;
292 };
293
294};
295
296&pm8941_lpg {
297 status = "okay";
298
299 qcom,power-source = <1>;
300
301 multi-led {
302 color = <LED_COLOR_ID_RGB>;
303 function = LED_FUNCTION_STATUS;
304
305 #address-cells = <1>;
306 #size-cells = <0>;
307
308 led@5 {
309 reg = <5>;
310 color = <LED_COLOR_ID_BLUE>;
311 };
312
313 led@6 {
314 reg = <6>;
315 color = <LED_COLOR_ID_GREEN>;
316 };
317
318 led@7 {
319 reg = <7>;
320 color = <LED_COLOR_ID_RED>;
321 };
322 };
323};
324
325&remoteproc_adsp {
326 cx-supply = <&pm8841_s2>;
Tom Rini93743d22024-04-01 09:08:13 -0400327 status = "okay";
Tom Rini53633a82024-02-29 12:33:36 -0500328};
329
330&remoteproc_mss {
331 cx-supply = <&pm8841_s2>;
332 mss-supply = <&pm8841_s3>;
333 mx-supply = <&pm8841_s1>;
334 pll-supply = <&pm8941_l12>;
Tom Rini93743d22024-04-01 09:08:13 -0400335 status = "okay";
Tom Rini53633a82024-02-29 12:33:36 -0500336};
337
338&rpm_requests {
339 regulators-0 {
340 compatible = "qcom,rpm-pm8841-regulators";
341
342 pm8841_s1: s1 {
343 regulator-min-microvolt = <675000>;
344 regulator-max-microvolt = <1050000>;
345 };
346
347 pm8841_s2: s2 {
348 regulator-min-microvolt = <500000>;
349 regulator-max-microvolt = <1050000>;
350 };
351
352 pm8841_s3: s3 {
353 regulator-min-microvolt = <500000>;
354 regulator-max-microvolt = <1050000>;
355 };
356
357 pm8841_s4: s4 {
358 regulator-min-microvolt = <500000>;
359 regulator-max-microvolt = <1050000>;
360 };
361 };
362
363 regulators-1 {
364 compatible = "qcom,rpm-pm8941-regulators";
365
366 vdd_l1_l3-supply = <&pm8941_s1>;
367 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
368 vdd_l4_l11-supply = <&pm8941_s1>;
369 vdd_l5_l7-supply = <&pm8941_s2>;
370 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
371 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
372 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
373 vdd_l21-supply = <&vreg_boost>;
374
375 pm8941_s1: s1 {
376 regulator-min-microvolt = <1300000>;
377 regulator-max-microvolt = <1300000>;
378 regulator-always-on;
379 regulator-boot-on;
380 };
381
382 pm8941_s2: s2 {
383 regulator-min-microvolt = <2150000>;
384 regulator-max-microvolt = <2150000>;
385 regulator-boot-on;
386 };
387
388 pm8941_s3: s3 {
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <1800000>;
391 regulator-system-load = <154000>;
392 regulator-always-on;
393 regulator-boot-on;
394 };
395
396 pm8941_s4: s4 {
397 regulator-min-microvolt = <5000000>;
398 regulator-max-microvolt = <5000000>;
399 };
400
401 pm8941_l1: l1 {
402 regulator-min-microvolt = <1225000>;
403 regulator-max-microvolt = <1225000>;
404 regulator-always-on;
405 regulator-boot-on;
406 };
407
408 pm8941_l2: l2 {
409 regulator-min-microvolt = <1200000>;
410 regulator-max-microvolt = <1200000>;
411 };
412
413 pm8941_l3: l3 {
414 regulator-min-microvolt = <1200000>;
415 regulator-max-microvolt = <1200000>;
416 };
417
418 pm8941_l4: l4 {
419 regulator-min-microvolt = <1225000>;
420 regulator-max-microvolt = <1225000>;
421 };
422
423 pm8941_l5: l5 {
424 regulator-min-microvolt = <1800000>;
425 regulator-max-microvolt = <1800000>;
426 };
427
428 pm8941_l6: l6 {
429 regulator-min-microvolt = <1800000>;
430 regulator-max-microvolt = <1800000>;
431 regulator-boot-on;
432 };
433
434 pm8941_l7: l7 {
435 regulator-min-microvolt = <1800000>;
436 regulator-max-microvolt = <1800000>;
437 regulator-boot-on;
438 };
439
440 pm8941_l8: l8 {
441 regulator-min-microvolt = <1800000>;
442 regulator-max-microvolt = <1800000>;
443 };
444
445 pm8941_l9: l9 {
446 regulator-min-microvolt = <1800000>;
447 regulator-max-microvolt = <2950000>;
448 };
449
450 pm8941_l11: l11 {
451 regulator-min-microvolt = <1300000>;
452 regulator-max-microvolt = <1350000>;
453 };
454
455 pm8941_l12: l12 {
456 regulator-min-microvolt = <1800000>;
457 regulator-max-microvolt = <1800000>;
458 regulator-always-on;
459 regulator-boot-on;
460 };
461
462 pm8941_l13: l13 {
463 regulator-min-microvolt = <1800000>;
464 regulator-max-microvolt = <2950000>;
465 regulator-boot-on;
466 };
467
468 pm8941_l14: l14 {
469 regulator-min-microvolt = <1800000>;
470 regulator-max-microvolt = <1800000>;
471 };
472
473 pm8941_l15: l15 {
474 regulator-min-microvolt = <2050000>;
475 regulator-max-microvolt = <2050000>;
476 };
477
478 pm8941_l16: l16 {
479 regulator-min-microvolt = <2700000>;
480 regulator-max-microvolt = <2700000>;
481 };
482
483 pm8941_l17: l17 {
484 regulator-min-microvolt = <2700000>;
485 regulator-max-microvolt = <2700000>;
486 };
487
488 pm8941_l18: l18 {
489 regulator-min-microvolt = <2850000>;
490 regulator-max-microvolt = <2850000>;
491 };
492
493 pm8941_l19: l19 {
494 regulator-min-microvolt = <2850000>;
495 regulator-max-microvolt = <2850000>;
496 };
497
498 pm8941_l20: l20 {
499 regulator-min-microvolt = <2950000>;
500 regulator-max-microvolt = <2950000>;
501 regulator-system-load = <500000>;
502 regulator-allow-set-load;
503 regulator-boot-on;
504 };
505
506 pm8941_l21: l21 {
507 regulator-min-microvolt = <2950000>;
508 regulator-max-microvolt = <2950000>;
509 regulator-boot-on;
510 };
511
512 pm8941_l22: l22 {
513 regulator-min-microvolt = <3000000>;
514 regulator-max-microvolt = <3000000>;
515 };
516
517 pm8941_l23: l23 {
518 regulator-min-microvolt = <2800000>;
519 regulator-max-microvolt = <2800000>;
520 };
521
522 pm8941_l24: l24 {
523 regulator-min-microvolt = <3075000>;
524 regulator-max-microvolt = <3075000>;
525 regulator-boot-on;
526 };
527
528 pm8941_lvs3: lvs3 {};
529 };
530};
531
532&sdhc_1 {
533 status = "okay";
534
535 vmmc-supply = <&pm8941_l20>;
536 vqmmc-supply = <&pm8941_s3>;
537
538 pinctrl-names = "default", "sleep";
539 pinctrl-0 = <&sdc1_on>;
540 pinctrl-1 = <&sdc1_off>;
541};
542
543&sdhc_2 {
544 status = "okay";
545
546 vmmc-supply = <&pm8941_l21>;
547 vqmmc-supply = <&pm8941_l13>;
548
549 cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
550
551 pinctrl-names = "default", "sleep";
552 pinctrl-0 = <&sdc2_on>;
553 pinctrl-1 = <&sdc2_off>;
554};
555
556&sdhc_3 {
557 status = "okay";
558
559 max-frequency = <100000000>;
560 vmmc-supply = <&vreg_wlan>;
561 non-removable;
562
563 pinctrl-names = "default";
564 pinctrl-0 = <&sdc3_on>;
565
566 #address-cells = <1>;
567 #size-cells = <0>;
568
569 bcrmf@1 {
570 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
571 reg = <1>;
572
573 brcm,drive-strength = <10>;
574
575 pinctrl-names = "default";
576 pinctrl-0 = <&wlan_sleep_clk_pin>;
577 };
578};
579
580&smbb {
581 qcom,fast-charge-safe-current = <1500000>;
582 qcom,fast-charge-current-limit = <1500000>;
583 qcom,dc-current-limit = <1800000>;
584 usb-charge-current-limit = <1800000>;
585 qcom,fast-charge-safe-voltage = <4400000>;
586 qcom,fast-charge-high-threshold-voltage = <4350000>;
587 qcom,fast-charge-low-threshold-voltage = <3400000>;
588 qcom,auto-recharge-threshold-voltage = <4200000>;
589 qcom,minimum-input-voltage = <4300000>;
Tom Rini93743d22024-04-01 09:08:13 -0400590
591 status = "okay";
Tom Rini53633a82024-02-29 12:33:36 -0500592};
593
594&tlmm {
595 lcd_backlight_en_pin_a: lcd-backlight-vddio-state {
596 pins = "gpio69";
597 function = "gpio";
598 drive-strength = <10>;
599 output-low;
600 bias-disable;
601 };
602
603 sdc1_on: sdc1-on-state {
604 clk-pins {
605 pins = "sdc1_clk";
606 drive-strength = <16>;
607 bias-disable;
608 };
609
610 cmd-data-pins {
611 pins = "sdc1_cmd", "sdc1_data";
612 drive-strength = <10>;
613 bias-pull-up;
614 };
615 };
616
617 sdc2_on: sdc2-on-state {
618 clk-pins {
619 pins = "sdc2_clk";
620 drive-strength = <6>;
621 bias-disable;
622 };
623
624 cmd-data-pins {
625 pins = "sdc2_cmd", "sdc2_data";
626 drive-strength = <6>;
627 bias-pull-up;
628 };
629
630 cd-pins {
631 pins = "gpio62";
632 function = "gpio";
633 drive-strength = <2>;
634 bias-disable;
635 };
636 };
637
638 sdc3_on: sdc3-on-state {
639 clk-pins {
640 pins = "gpio40";
641 function = "sdc3";
642 drive-strength = <10>;
643 bias-disable;
644 };
645
646 cmd-pins {
647 pins = "gpio39";
648 function = "sdc3";
649 drive-strength = <10>;
650 bias-pull-up;
651 };
652
653 data-pins {
654 pins = "gpio35", "gpio36", "gpio37", "gpio38";
655 function = "sdc3";
656 drive-strength = <10>;
657 bias-pull-up;
658 };
659 };
660
661 ts_int_pin: ts-int-pin-state {
662 pins = "gpio86";
663 function = "gpio";
664 drive-strength = <2>;
665 bias-disable;
666 };
667
668 bt_host_wake_pin: bt-host-wake-state {
669 pins = "gpio95";
670 function = "gpio";
671 drive-strength = <2>;
672 bias-disable;
673 output-low;
674 };
675
676 bt_dev_wake_pin: bt-dev-wake-state {
677 pins = "gpio96";
678 function = "gpio";
679 drive-strength = <2>;
680 bias-disable;
681 };
682};
683
684&usb {
685 status = "okay";
686
687 phys = <&usb_hs1_phy>;
688 phy-select = <&tcsr 0xb000 0>;
689 extcon = <&smbb>, <&usb_id>;
690 vbus-supply = <&chg_otg>;
691
692 hnp-disable;
693 srp-disable;
694 adp-disable;
695};
696
697&usb_hs1_phy {
698 status = "okay";
699
700 v1p8-supply = <&pm8941_l6>;
701 v3p3-supply = <&pm8941_l24>;
702
703 extcon = <&smbb>;
704 qcom,init-seq = /bits/ 8 <0x1 0x64>;
705};