1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
8 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
10 #include "pm8005.dtsi"
11 #include "pm8998.dtsi"
12 #include "pmi8998.dtsi"
15 qcom,msm-id = <321 0x20001>; /* SDM845 v2.1 */
16 qcom,board-id = <8 0>;
24 stdout-path = "serial0:115200n8";
28 compatible = "gpio-keys";
30 pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &vol_up_n>;
31 pinctrl-names = "default";
34 label = "Camera Focus";
35 gpios = <&pm8998_gpios 2 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_CAMERA_FOCUS>;
37 debounce-interval = <15>;
43 label = "Camera Snapshot";
44 gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_CAMERA>;
46 debounce-interval = <15>;
52 label = "Volume Down";
53 gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_VOLUMEDOWN>;
55 debounce-interval = <15>;
62 gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_VOLUMEUP>;
64 debounce-interval = <15>;
70 cam_vana_front_vreg: cam-vana-front-regulator {
71 compatible = "regulator-fixed";
72 regulator-name = "cam_vana_front_vreg";
73 gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
76 pinctrl-0 = <&chat_cam_pwr_en>;
77 pinctrl-names = "default";
80 cam_vana_rear_vreg: cam-vana-rear-regulator {
81 compatible = "regulator-fixed";
82 regulator-name = "cam_vana_rear_vreg";
83 gpio = <&tlmm 27 GPIO_ACTIVE_HIGH>;
86 pinctrl-0 = <&main_cam_pwr_en>;
87 pinctrl-names = "default";
90 cam_vio_vreg: cam-vio-reagulator {
91 compatible = "regulator-fixed";
92 regulator-name = "cam_vio_vreg";
93 gpio = <&pmi8998_gpios 12 GPIO_ACTIVE_HIGH>;
96 pinctrl-0 = <&cam_io_en>;
97 pinctrl-names = "default";
100 vph_pwr: vph-pwr-regulator {
101 compatible = "regulator-fixed";
102 regulator-name = "vph_pwr";
103 regulator-min-microvolt = <3700000>;
104 regulator-max-microvolt = <3700000>;
107 vreg_s4a_1p8: pm8998-smps4 {
108 compatible = "regulator-fixed";
109 regulator-name = "vreg_s4a_1p8";
111 regulator-min-microvolt = <1800000>;
112 regulator-max-microvolt = <1800000>;
117 vin-supply = <&vph_pwr>;
121 /* SONY was cool and didn't diverge from MTP this time, yay! */
122 cont_splash_mem: memory@9d400000 {
123 reg = <0x0 0x9d400000 0x0 0x2400000>;
128 compatible = "ramoops";
129 reg = <0x0 0xffc00000 0x0 0x100000>;
130 record-size = <0x10000>;
131 console-size = <0x60000>;
132 ftrace-size = <0x10000>;
133 pmsg-size = <0x20000>;
141 firmware-name = "/*(DEBLOBBED)*/";
147 compatible = "qcom,pm8998-rpmh-regulators";
150 vdd-s1-supply = <&vph_pwr>;
151 vdd-s2-supply = <&vph_pwr>;
152 vdd-s3-supply = <&vph_pwr>;
153 vdd-s4-supply = <&vph_pwr>;
154 vdd-s5-supply = <&vph_pwr>;
155 vdd-s6-supply = <&vph_pwr>;
156 vdd-s7-supply = <&vph_pwr>;
157 vdd-s8-supply = <&vph_pwr>;
158 vdd-s9-supply = <&vph_pwr>;
159 vdd-s10-supply = <&vph_pwr>;
160 vdd-s11-supply = <&vph_pwr>;
161 vdd-s12-supply = <&vph_pwr>;
162 vdd-s13-supply = <&vph_pwr>;
163 vdd-l1-l27-supply = <&vreg_s7a_0p9>;
164 vdd-l2-l8-l17-supply = <&vreg_s3a_1p3>;
165 vdd-l3-l11-supply = <&vreg_s7a_0p9>;
166 vdd-l4-l5-supply = <&vreg_s7a_0p9>;
167 vdd-l6-supply = <&vph_pwr>;
168 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
169 vdd-l9-supply = <&vreg_s5a_1p9>;
170 vdd-l10-l23-l25-supply = <&src_vreg_bob>;
171 vdd-l13-l19-l21-supply = <&src_vreg_bob>;
172 vdd-l16-l28-supply = <&src_vreg_bob>;
173 vdd-l18-l22-supply = <&src_vreg_bob>;
174 vdd-l20-l24-supply = <&src_vreg_bob>;
175 vdd-l26-supply = <&vreg_s3a_1p3>;
176 vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
178 vreg_s2a_1p1: smps2 {
179 regulator-min-microvolt = <1100000>;
180 regulator-max-microvolt = <1100000>;
183 vreg_s3a_1p3: smps3 {
184 regulator-min-microvolt = <1352000>;
185 regulator-max-microvolt = <1352000>;
188 vreg_s5a_1p9: smps5 {
189 regulator-min-microvolt = <1904000>;
190 regulator-max-microvolt = <2040000>;
193 vreg_s7a_0p9: smps7 {
194 regulator-min-microvolt = <900000>;
195 regulator-max-microvolt = <1028000>;
199 regulator-min-microvolt = <880000>;
200 regulator-max-microvolt = <880000>;
201 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
205 regulator-min-microvolt = <1200000>;
206 regulator-max-microvolt = <1200000>;
207 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
212 regulator-min-microvolt = <1000000>;
213 regulator-max-microvolt = <1000000>;
214 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
218 regulator-min-microvolt = <800000>;
219 regulator-max-microvolt = <800000>;
220 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
224 regulator-min-microvolt = <1856000>;
225 regulator-max-microvolt = <1856000>;
226 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
230 regulator-min-microvolt = <1800000>;
231 regulator-max-microvolt = <1800000>;
232 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
236 regulator-min-microvolt = <1200000>;
237 regulator-max-microvolt = <1248000>;
238 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
242 regulator-min-microvolt = <1704000>;
243 regulator-max-microvolt = <2928000>;
244 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
247 vreg_l10a_1p7: ldo10 {
248 regulator-min-microvolt = <1704000>;
249 regulator-max-microvolt = <2928000>;
250 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
253 vreg_l11a_1p0: ldo11 {
254 regulator-min-microvolt = <1000000>;
255 regulator-max-microvolt = <1048000>;
256 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
259 vreg_l12a_1p8: ldo12 {
260 regulator-min-microvolt = <1800000>;
261 regulator-max-microvolt = <1800000>;
262 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
265 vreg_l13a_1p8: ldo13 {
266 regulator-min-microvolt = <1800000>;
267 regulator-max-microvolt = <2960000>;
268 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
271 vreg_l14a_1p8: ldo14 {
272 regulator-min-microvolt = <1800000>;
273 regulator-max-microvolt = <1800000>;
274 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
275 regulator-system-load = <62000>;
278 vreg_l15a_1p8: ldo15 {
279 regulator-min-microvolt = <1800000>;
280 regulator-max-microvolt = <1800000>;
281 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
284 vreg_l16a_2p7: ldo16 {
285 regulator-min-microvolt = <2704000>;
286 regulator-max-microvolt = <2704000>;
287 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
290 vreg_l17a_1p3: ldo17 {
291 regulator-min-microvolt = <1304000>;
292 regulator-max-microvolt = <1304000>;
293 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
296 vreg_l18a_2p7: ldo18 {
297 regulator-min-microvolt = <2704000>;
298 regulator-max-microvolt = <2960000>;
299 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
302 vreg_l19a_2p7: ldo19 {
303 regulator-min-microvolt = <2700000>;
304 regulator-max-microvolt = <2700000>;
305 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
308 * The driver *really* doesn't want this regualtor to exist,
309 * saying that it could not get the current voltage (-ENOTRECOVERABLE)
310 * even though it surely is used on these devices (as a voltage
311 * source for camera autofocus)
316 vreg_l20a_2p7: ldo20 {
317 regulator-min-microvolt = <2704000>;
318 regulator-max-microvolt = <2960000>;
319 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
322 vreg_l21a_2p7: ldo21 {
323 regulator-min-microvolt = <2704000>;
324 regulator-max-microvolt = <2960000>;
325 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
328 vreg_l22a_2p8: ldo22 {
329 regulator-min-microvolt = <2800000>;
330 regulator-max-microvolt = <2800000>;
331 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
334 vreg_l23a_3p0: ldo23 {
335 regulator-min-microvolt = <3000000>;
336 regulator-max-microvolt = <3312000>;
337 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
340 vreg_l24a_3p1: ldo24 {
341 regulator-min-microvolt = <3088000>;
342 regulator-max-microvolt = <3088000>;
343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
346 vreg_l25a_3p0: ldo25 {
347 regulator-min-microvolt = <3000000>;
348 regulator-max-microvolt = <3312000>;
349 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
352 vreg_l26a_1p2: ldo26 {
353 regulator-min-microvolt = <1200000>;
354 regulator-max-microvolt = <1200000>;
355 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
358 vreg_l28a_2p8: ldo28 {
359 regulator-min-microvolt = <2856000>;
360 regulator-max-microvolt = <3008000>;
361 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
362 regulator-system-load = <100000>;
365 vreg_lvs1a_1p8: lvs1 {
366 regulator-min-microvolt = <1800000>;
367 regulator-max-microvolt = <1800000>;
368 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
371 vreg_lvs2a_1p8: lvs2 {
372 regulator-min-microvolt = <1800000>;
373 regulator-max-microvolt = <1800000>;
374 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
379 compatible = "qcom,pmi8998-rpmh-regulators";
383 regulator-min-microvolt = <3312000>;
384 regulator-max-microvolt = <3600000>;
385 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
390 compatible = "qcom,pm8005-rpmh-regulators";
393 vdd-s1-supply = <&vph_pwr>;
394 vdd-s2-supply = <&vph_pwr>;
395 vdd-s3-supply = <&vph_pwr>;
396 vdd-s4-supply = <&vph_pwr>;
398 vreg_s3c_0p6: smps3 {
399 regulator-min-microvolt = <600000>;
400 regulator-max-microvolt = <600000>;
406 firmware-name = "/*(DEBLOBBED)*/";
411 protected-clocks = <GCC_QSPI_CORE_CLK>,
412 <GCC_QSPI_CORE_CLK_SRC>,
413 <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
414 <GCC_LPASS_Q6_AXI_CLK>,
415 <GCC_LPASS_SWAY_CLK>;
434 memory-region = <&gpu_mem>;
435 firmware-name = "/*(DEBLOBBED)*/";
440 clock-frequency = <400000>;
443 touchscreen: touchscreen@2c {
444 compatible = "syna,rmi4-i2c";
447 interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
448 vdd-supply = <&vreg_l14a_1p8>;
450 * This is a blatant abuse of OF, but the panel driver *needs*
451 * to probe first, as the power/gpio switching needs to be precisely
452 * timed in order for both the display and touch panel to function properly.
454 incell-supply = <&panel>;
456 syna,reset-delay-ms = <220>;
457 syna,startup-delay-ms = <1000>;
459 pinctrl-0 = <&ts_default>;
460 pinctrl-1 = <&ts_sleep>;
461 pinctrl-names = "default", "sleep";
463 #address-cells = <1>;
468 syna,nosleep-mode = <1>;
473 syna,sensor-type = <1>;
480 clock-frequency = <400000>;
482 /* Qcom SMB1355 @ 8, c */
483 /* NXP PN547 NFC @ 28 */
484 /* Renesas IDTP9221 Qi charger @ 61 */
489 clock-frequency = <400000>;
491 /* SONY ToF sensor @ 52 */
492 /* AMS TCS3490 RGB+IR color sensor @ 72 */
496 qcom,discharge-resistor-kohms = <300>;
497 regulator-min-microvolt = <5500000>;
498 regulator-max-microvolt = <5700000>;
499 regulator-min-microamp = <0>;
500 regulator-max-microamp = <800000>;
501 regulator-over-current-protection;
502 regulator-soft-start;
507 regulator-min-microvolt = <5500000>;
508 regulator-max-microvolt = <5700000>;
509 regulator-min-microamp = <200000>;
510 regulator-max-microamp = <200000>;
511 regulator-over-current-protection;
512 regulator-soft-start;
521 vdda-supply = <&vreg_l26a_1p2>;
525 /* The compatible is assigned in device DTs. */
528 backlight = <&pmi8998_wled>;
529 vddio-supply = <&vreg_l14a_1p8>;
532 panel-reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
533 touch-reset-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>;
535 pinctrl-0 = <&sde_dsi_active &sde_te_active_sleep>;
536 pinctrl-1 = <&sde_dsi_sleep &sde_te_active_sleep>;
537 pinctrl-names = "default", "sleep";
541 remote-endpoint = <&mdss_dsi0_out>;
548 remote-endpoint = <&panel_in>;
549 data-lanes = <0 1 2 3>;
553 vdds-supply = <&vreg_l1a_0p9>;
558 gpio-line-names = "NC", /* GPIO_1 */
565 gpio-line-names = "NC", /* GPIO_1 */
592 focus_n: focus-n-state {
594 function = PMIC_GPIO_FUNC_NORMAL;
600 vol_down_n: vol-down-n-state {
602 function = PMIC_GPIO_FUNC_NORMAL;
608 vol_up_n: vol-up-n-state {
610 function = PMIC_GPIO_FUNC_NORMAL;
616 snapshot_n: snapshot-n-state {
618 function = PMIC_GPIO_FUNC_NORMAL;
626 cam_io_en: cam-io-en-state {
629 qcom,drive-strength = <3>;
637 default-brightness = <800>;
638 qcom,switching-freq = <800>;
639 qcom,ovp-millivolt = <29600>;
640 qcom,current-boost-limit = <970>;
641 qcom,current-limit-microamp = <20000>;
642 qcom,enabled-strings = <0 1 2 3>;
657 vmmc-supply = <&vreg_l21a_2p7>;
658 vqmmc-supply = <&vreg_l13a_1p8>;
659 cd-gpios = <&tlmm 126 GPIO_ACTIVE_HIGH>;
660 pinctrl-0 = <&sdc2_default_state>;
661 pinctrl-names = "default";
668 gpio-reserved-ranges = <0 4>, <81 4>;
670 sdc2_default_state: sdc2-default-state {
673 drive-strength = <16>;
679 drive-strength = <10>;
685 drive-strength = <10>;
690 sde_dsi_active: sde-dsi-active-state {
693 drive-strength = <8>;
697 sde_dsi_sleep: sde-dsi-sleep-state {
700 drive-strength = <2>;
704 chat_cam_pwr_en: chat-cam-pwr-en-state {
707 drive-strength = <2>;
712 sde_te_active_sleep: sde-te-active-sleep-state {
714 function = "mdp_vsync";
715 drive-strength = <2>;
719 main_cam_pwr_en: main-cam-pwr-en-state {
722 drive-strength = <2>;
727 ts_default: ts-default-state {
731 drive-strength = <2>;
738 drive-strength = <2>;
743 ts_sleep: ts-sleep-state {
747 drive-strength = <2>;
754 drive-strength = <2>;
768 /* BIG WARNING! DO NOT TOUCH UFS, YOUR DEVICE WILL DIE! */
769 &ufs_mem_hc { status = "disabled"; };
770 &ufs_mem_phy { status = "disabled"; };
775 qcom,select-utmi-as-pipe-clk;
779 dr_mode = "peripheral";
781 maximum-speed = "high-speed";
782 phys = <&usb_1_hsphy>;
783 phy-names = "usb2-phy";
789 vdd-supply = <&vreg_l1a_0p9>;
790 vdda-pll-supply = <&vreg_l12a_1p8>;
791 vdda-phy-dpdm-supply = <&vreg_l24a_3p1>;
795 firmware-name = "/*(DEBLOBBED)*/";