1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, AngeloGioacchino Del Regno
4 * <angelogioacchino.delregno@somainline.org>
5 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
11 #include "msm8998.dtsi"
12 #include "pm8005.dtsi"
13 #include "pm8998.dtsi"
14 #include "pmi8998.dtsi"
17 /* required for bootloader to select correct board */
18 qcom,msm-id = <0x124 0x20000>, <0x124 0x20001>; /* 8998v2, v2.1 */
19 qcom,board-id = <8 0>;
23 compatible = "gpio-gate-clock";
24 pinctrl-0 = <&audio_mclk_pin>;
25 pinctrl-names = "default";
26 clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
28 enable-gpios = <&pm8998_gpio 13 GPIO_ACTIVE_HIGH>;
32 board_vbat: vbat-regulator {
33 compatible = "regulator-fixed";
34 regulator-name = "VBAT";
36 regulator-min-microvolt = <4000000>;
37 regulator-max-microvolt = <4000000>;
42 cam0_vdig_vreg: cam0-vdig {
43 compatible = "regulator-fixed";
44 regulator-name = "cam0_vdig";
45 startup-delay-us = <0>;
47 gpio = <&tlmm 21 GPIO_ACTIVE_HIGH>;
48 pinctrl-names = "default";
49 pinctrl-0 = <&cam0_vdig_default>;
52 cam1_vdig_vreg: cam1-vdig {
53 compatible = "regulator-fixed";
54 regulator-name = "cam1_vdig";
55 startup-delay-us = <0>;
57 gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>;
58 pinctrl-names = "default";
59 pinctrl-0 = <&cam1_vdig_default>;
60 vin-supply = <&vreg_s3a_1p35>;
63 cam_vio_vreg: cam-vio-vreg {
64 compatible = "regulator-fixed";
65 regulator-name = "cam_vio_vreg";
66 startup-delay-us = <0>;
68 gpio = <&pmi8998_gpio 1 GPIO_ACTIVE_HIGH>;
69 pinctrl-names = "default";
70 pinctrl-0 = <&cam_vio_default>;
71 vin-supply = <&vreg_lvs1a_1p8>;
74 touch_vddio_vreg: touch-vddio-vreg {
75 compatible = "regulator-fixed";
76 regulator-name = "touch_vddio_vreg";
77 startup-delay-us = <10000>;
78 gpio = <&tlmm 133 GPIO_ACTIVE_HIGH>;
79 pinctrl-names = "default";
80 pinctrl-0 = <&ts_vddio_en>;
83 vph_pwr: vph-pwr-regulator {
84 compatible = "regulator-fixed";
85 regulator-name = "vph_pwr";
90 extcon_usb: extcon-usb {
91 compatible = "linux,extcon-usb-gpio";
92 id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
93 vbus-gpio = <&tlmm 128 GPIO_ACTIVE_HIGH>;
94 pinctrl-names = "default";
95 pinctrl-0 = <&usb_extcon_active &usb_vbus_active>;
99 compatible = "gpio-keys";
100 label = "Side buttons";
101 pinctrl-names = "default";
102 pinctrl-0 = <&vol_down_pin_a>, <&cam_focus_pin_a>,
103 <&cam_snapshot_pin_a>;
105 label = "Volume Down";
106 gpios = <&pm8998_gpio 5 GPIO_ACTIVE_LOW>;
107 linux,input-type = <EV_KEY>;
108 linux,code = <KEY_VOLUMEDOWN>;
110 debounce-interval = <15>;
113 button-camera-snapshot {
114 label = "Camera Snapshot";
115 gpios = <&pm8998_gpio 7 GPIO_ACTIVE_LOW>;
116 linux,input-type = <EV_KEY>;
117 linux,code = <KEY_CAMERA>;
118 debounce-interval = <15>;
121 button-camera-focus {
122 label = "Camera Focus";
123 gpios = <&pm8998_gpio 8 GPIO_ACTIVE_LOW>;
124 linux,input-type = <EV_KEY>;
125 linux,code = <KEY_CAMERA_FOCUS>;
126 debounce-interval = <15>;
131 compatible = "gpio-keys";
132 label = "Hall sensors";
133 pinctrl-names = "default";
134 pinctrl-0 = <&hall_sensor0_default>;
137 label = "Cover Hall Sensor";
138 gpios = <&tlmm 124 GPIO_ACTIVE_LOW>;
139 linux,input-type = <EV_SW>;
140 linux,code = <SW_LID>;
142 debounce-interval = <30>;
147 #address-cells = <2>;
151 hyp_mem: memory@85800000 {
152 reg = <0x0 0x85800000 0x0 0x3700000>;
156 cont_splash_mem: memory@9d400000 {
157 reg = <0x0 0x9d400000 0x0 0x2400000>;
161 zap_shader_region: memory@f6400000 {
162 compatible = "shared-dma-pool";
163 reg = <0x0 0xf6400000 0x0 0x2000>;
167 adsp_region: memory@fe000000 {
168 reg = <0x0 0xfe000000 0x0 0x800000>;
172 qseecom_region: memory@fe800000 {
173 reg = <0x0 0xfe800000 0x0 0x1400000>;
178 compatible = "ramoops";
179 reg = <0x0 0xffc00000 0x0 0x100000>;
180 record-size = <0x10000>;
181 console-size = <0x60000>;
182 ftrace-size = <0x10000>;
183 pmsg-size = <0x20000>;
189 compatible = "gpio-vibrator";
190 enable-gpios = <&pmi8998_gpio 5 GPIO_ACTIVE_HIGH>;
191 pinctrl-names = "default";
192 pinctrl-0 = <&vib_default>;
198 clock-frequency = <355000>;
201 compatible = "syna,rmi4-i2c";
203 #address-cells = <1>;
205 interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
207 pinctrl-names = "default";
208 pinctrl-0 = <&ts_int_n>;
210 vdd-supply = <&vreg_l28_3p0>;
211 vio-supply = <&touch_vddio_vreg>;
213 syna,reset-delay-ms = <220>;
214 syna,startup-delay-ms = <1000>;
218 syna,nosleep-mode = <1>;
223 syna,sensor-type = <1>;
236 compatible = "qcom,wcn3990-bt";
238 vddio-supply = <&vreg_s4a_1p8>;
239 vddxo-supply = <&vreg_l7a_1p8>;
240 vddrf-supply = <&vreg_l17a_1p3>;
241 vddch0-supply = <&vreg_l25a_3p3>;
242 max-speed = <3200000>;
244 clocks = <&rpmcc RPM_SMD_RF_CLK2_PIN>;
256 compatible = "st,vl53l0x";
259 interrupt-parent = <&tlmm>;
260 interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
262 reset-gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
263 vdd-supply = <&cam_vio_vreg>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&tof_int &tof_reset>;
271 regulator-min-microamp = <800000>;
272 regulator-max-microamp = <800000>;
273 regulator-enable-ramp-delay = <200>;
274 regulator-over-current-protection;
276 regulator-ramp-delay = <1>;
277 regulator-settling-time-up-us = <600>;
278 regulator-settling-time-down-us = <1000>;
279 regulator-soft-start;
280 qcom,discharge-resistor-kohms = <300>;
284 regulator-min-microamp = <200000>;
285 regulator-max-microamp = <200000>;
286 regulator-enable-ramp-delay = <500>;
287 regulator-over-current-protection;
289 regulator-ramp-delay = <1>;
290 regulator-settling-time-up-us = <50000>;
291 regulator-settling-time-down-us = <3000>;
292 regulator-soft-start;
298 regulator-min-microvolt = <524000>;
299 regulator-max-microvolt = <1088000>;
300 regulator-enable-ramp-delay = <500>;
301 /* Hack until we rig up the gpu consumer */
307 vol_down_pin_a: vol-down-active-state {
309 function = PMIC_GPIO_FUNC_NORMAL;
312 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
315 cam_focus_pin_a: cam-focus-btn-active-state {
317 function = PMIC_GPIO_FUNC_NORMAL;
320 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
323 cam_snapshot_pin_a: cam-snapshot-btn-active-state {
325 function = PMIC_GPIO_FUNC_NORMAL;
328 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
331 audio_mclk_pin: audio-mclk-pin-active-state {
339 cam_vio_default: cam-vio-active-state {
341 function = PMIC_GPIO_FUNC_NORMAL;
345 qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
349 vib_default: vib-en-state {
351 function = PMIC_GPIO_FUNC_NORMAL;
355 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
362 compatible = "qcom,pm8941-resin";
363 interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
366 linux,code = <KEY_VOLUMEUP>;
373 vdda-pll-supply = <&vreg_l12a_1p8>;
374 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
379 compatible = "qcom,rpm-pm8998-regulators";
381 vdd_s1-supply = <&vph_pwr>;
382 vdd_s2-supply = <&vph_pwr>;
383 vdd_s3-supply = <&vph_pwr>;
384 vdd_s4-supply = <&vph_pwr>;
385 vdd_s5-supply = <&vph_pwr>;
386 vdd_s6-supply = <&vph_pwr>;
387 vdd_s7-supply = <&vph_pwr>;
388 vdd_s8-supply = <&vph_pwr>;
389 vdd_s9-supply = <&vph_pwr>;
390 vdd_s10-supply = <&vph_pwr>;
391 vdd_s11-supply = <&vph_pwr>;
392 vdd_s12-supply = <&vph_pwr>;
393 vdd_s13-supply = <&vph_pwr>;
394 vdd_l1_l27-supply = <&vreg_s7a_1p025>;
395 vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
396 vdd_l3_l11-supply = <&vreg_s7a_1p025>;
397 vdd_l4_l5-supply = <&vreg_s7a_1p025>;
398 vdd_l6-supply = <&vreg_s5a_2p04>;
399 vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
400 vdd_l9-supply = <&vreg_bob>;
401 vdd_l10_l23_l25-supply = <&vreg_bob>;
402 vdd_l13_l19_l21-supply = <&vreg_bob>;
403 vdd_l16_l28-supply = <&vreg_bob>;
404 vdd_l18_l22-supply = <&vreg_bob>;
405 vdd_l20_l24-supply = <&vreg_bob>;
406 vdd_l26-supply = <&vreg_s3a_1p35>;
407 vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
410 regulator-min-microvolt = <1352000>;
411 regulator-max-microvolt = <1352000>;
414 regulator-min-microvolt = <1800000>;
415 regulator-max-microvolt = <1800000>;
416 regulator-system-load = <100000>;
417 regulator-allow-set-load;
420 regulator-min-microvolt = <1904000>;
421 regulator-max-microvolt = <2032000>;
424 regulator-min-microvolt = <900000>;
425 regulator-max-microvolt = <1028000>;
428 regulator-min-microvolt = <880000>;
429 regulator-max-microvolt = <880000>;
430 regulator-system-load = <73400>;
431 regulator-allow-set-load;
434 regulator-min-microvolt = <1200000>;
435 regulator-max-microvolt = <1200000>;
436 regulator-system-load = <12560>;
437 regulator-allow-set-load;
440 regulator-min-microvolt = <1000000>;
441 regulator-max-microvolt = <1000000>;
444 regulator-min-microvolt = <800000>;
445 regulator-max-microvolt = <800000>;
448 regulator-min-microvolt = <1800000>;
449 regulator-max-microvolt = <1800000>;
452 regulator-min-microvolt = <1800000>;
453 regulator-max-microvolt = <1800000>;
456 regulator-min-microvolt = <1200000>;
457 regulator-max-microvolt = <1200000>;
460 regulator-min-microvolt = <1808000>;
461 regulator-max-microvolt = <2960000>;
464 regulator-min-microvolt = <1808000>;
465 regulator-max-microvolt = <2960000>;
468 regulator-min-microvolt = <1000000>;
469 regulator-max-microvolt = <1000000>;
472 regulator-min-microvolt = <1800000>;
473 regulator-max-microvolt = <1800000>;
475 vreg_l13a_2p95: l13 {
476 regulator-min-microvolt = <1808000>;
477 regulator-max-microvolt = <2960000>;
478 regulator-allow-set-load;
480 vreg_l14a_1p85: l14 {
481 regulator-min-microvolt = <1848000>;
482 regulator-max-microvolt = <1856000>;
483 regulator-system-load = <32000>;
484 regulator-allow-set-load;
487 regulator-min-microvolt = <1800000>;
488 regulator-max-microvolt = <1800000>;
491 regulator-min-microvolt = <2704000>;
492 regulator-max-microvolt = <2704000>;
495 regulator-min-microvolt = <1304000>;
496 regulator-max-microvolt = <1304000>;
498 vreg_l18a_2p85: l18 {};
500 regulator-min-microvolt = <2696000>;
501 regulator-max-microvolt = <2704000>;
503 vreg_l20a_2p95: l20 {
504 regulator-min-microvolt = <2960000>;
505 regulator-max-microvolt = <2960000>;
506 regulator-system-load = <10000>;
507 regulator-allow-set-load;
509 vreg_l21a_2p95: l21 {
510 regulator-min-microvolt = <2960000>;
511 regulator-max-microvolt = <2960000>;
512 regulator-system-load = <800000>;
513 regulator-allow-set-load;
515 vreg_l22a_2p85: l22 { };
517 regulator-min-microvolt = <3312000>;
518 regulator-max-microvolt = <3312000>;
520 vreg_l24a_3p075: l24 {
521 regulator-min-microvolt = <3088000>;
522 regulator-max-microvolt = <3088000>;
525 regulator-min-microvolt = <3104000>;
526 regulator-max-microvolt = <3312000>;
529 regulator-min-microvolt = <1200000>;
530 regulator-max-microvolt = <1200000>;
531 regulator-allow-set-load;
534 regulator-min-microvolt = <3000000>;
535 regulator-max-microvolt = <3000000>;
537 vreg_lvs1a_1p8: lvs1 { };
538 vreg_lvs2a_1p8: lvs2 { };
542 compatible = "qcom,rpm-pmi8998-regulators";
544 vdd_bob-supply = <&vph_pwr>;
547 regulator-min-microvolt = <3312000>;
548 regulator-max-microvolt = <3600000>;
555 cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
557 vmmc-supply = <&vreg_l21a_2p95>;
558 vqmmc-supply = <&vreg_l13a_2p95>;
560 pinctrl-names = "default", "sleep";
561 pinctrl-0 = <&sdc2_on &sdc2_cd>;
562 pinctrl-1 = <&sdc2_off &sdc2_cd>;
566 gpio-reserved-ranges = <0 4>, <81 4>;
568 mdp_vsync_n: mdp-vsync-n {
570 function = "mdp_vsync_a";
571 drive-strength = <2>;
579 drive-strength = <2>;
583 msm_mclk0_default: msm-mclk0-active {
585 function = "cam_mclk";
586 drive-strength = <2>;
590 msm_mclk1_default: msm-mclk1-active {
592 function = "cam_mclk";
593 drive-strength = <2>;
597 cci0_default: cci0-default {
598 pins = "gpio18", "gpio19";
599 function = "cci_i2c";
601 drive-strength = <2>;
604 cci1_default: cci1-default {
605 pins = "gpio19", "gpio20";
606 function = "cci_i2c";
608 drive-strength = <2>;
611 cam0_vdig_default: cam0-vdig-default {
615 drive-strength = <2>;
622 drive-strength = <2>;
626 cam1_vdig_default: cam1-vdig-default {
630 drive-strength = <2>;
633 usb_extcon_active: usb-extcon-active {
637 drive-strength = <16>;
640 tof_reset: tof-reset {
644 drive-strength = <2>;
647 hall_sensor0_default: acc-cover-open {
651 drive-strength = <2>;
658 drive-strength = <8>;
662 usb_vbus_active: usb-vbus-active {
666 drive-strength = <2>;
670 ts_vddio_en: ts-vddio-en-default {
674 drive-strength = <2>;
681 * Disable UFS until card quirks are in to avoid unrecoverable hard-brick
682 * that would happen as soon as the UFS card gets probed as, without the
683 * required quirks, the bootloader will be erased right after card probe.
698 /* Force to peripheral until we have Type-C hooked up */
699 dr_mode = "peripheral";
700 extcon = <&extcon_usb>;
706 vdda-phy-supply = <&vreg_l1a_0p875>;
707 vdda-pll-supply = <&vreg_l2a_1p2>;