1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
6 #include "msm8994.dtsi"
8 #include "pmi8994.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/gpio-keys.h>
13 /* required for bootloader to select correct board */
16 * We support MSM8994 v2 (0x20000) and v2.1 (0x20001).
17 * The V1 chip (0x0 and 0x10000) is significantly different
18 * and requires driver-side changes (including CPR, be warned!!).
19 * Besides that, it's very rare.
21 qcom,msm-id = <207 0x20000>, <207 0x20001>;
22 /* We only use pm8994+pmi8994. */
23 qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
24 /* This property is shared across all kitakami devices. */
25 qcom,board-id = <8 0>;
27 /* Kitakami firmware doesn't support PSCI */
31 compatible = "gpio-keys";
35 label = "Volume Down";
36 gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
37 linux,input-type = <1>;
38 linux,code = <KEY_VOLUMEDOWN>;
40 debounce-interval = <15>;
45 gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
46 linux,input-type = <1>;
47 linux,code = <KEY_VOLUMEUP>;
49 debounce-interval = <15>;
53 label = "Camera Snapshot";
54 gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
55 linux,input-type = <1>;
56 linux,code = <KEY_CAMERA>;
58 debounce-interval = <15>;
62 label = "Camera Focus";
63 gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
64 linux,input-type = <1>;
65 linux,code = <KEY_VOLUMEUP>;
67 debounce-interval = <15>;
72 /* This is for getting crash logs using Android downstream kernels */
74 compatible = "ramoops";
75 reg = <0 0x1fe00000 0 0x200000>;
76 console-size = <0x100000>;
77 record-size = <0x10000>;
78 ftrace-size = <0x10000>;
79 pmsg-size = <0x80000>;
82 fb_region: fb_region@40000000 {
83 reg = <0 0x40000000 0 0x1000000>;
87 tzapp: memory@c7800000 {
88 reg = <0 0xc7800000 0 0x1900000>;
97 /* FPC fingerprint reader */
100 /* I2C1 is disabled on this board */
104 clock-frequency = <355000>;
111 clock-frequency = <355000>;
113 touchscreen: rmi4-i2c-dev@2c {
114 compatible = "syna,rmi4-i2c";
116 #address-cells = <1>;
119 interrupt-parent = <&tlmm>;
120 interrupts = <42 IRQ_TYPE_EDGE_FALLING>;
122 pinctrl-names = "default";
123 pinctrl-0 = <&ts_int_active &ts_reset_active>;
125 vdd-supply = <&pm8994_l22>;
126 vio-supply = <&pm8994_s4>;
128 syna,reset-delay-ms = <220>;
129 syna,startup-delay-ms = <220>;
133 syna,nosleep-mode = <1>;
138 syna,sensor-type = <1>;
149 clock-frequency = <355000>;
151 /* sii8620 HDMI/MHL bridge */
159 * Kitakami bootloader only turns cont_splash on when it detects
160 * specific downstream MDSS/backlight nodes in the active DTB.
161 * One way to use that framebuffer is to load a secondary instance of
162 * LK with the downstream DTB appended and then, only from there, load
166 reg = <0 0x03401000 0 0x2200000>;
169 &pmi8994_spmi_regulators {
171 * Yeah, this one *is* managed by RPMPD, but also needs
172 * to be hacked up as a-o due to the GPU device only accepting a single
173 * power domain.. which still isn't enough and forces us to bind
174 * OXILI_CX and OXILI_GX together!
177 regulator-name = "VDD_GFX";
178 regulator-min-microvolt = <980000>;
179 regulator-max-microvolt = <980000>;
181 /* hack until we rig up the gpu consumer */
187 /* PMI8994 should probe first, because pmi8994_bby supplies some of PM8994's regulators */
188 pmi8994_regulators: regulators-0 {
189 compatible = "qcom,rpm-pmi8994-regulators";
191 vdd_s1-supply = <&vph_pwr>;
192 vdd_bst_byp-supply = <&vph_pwr>;
195 regulator-min-microvolt = <1025000>;
196 regulator-max-microvolt = <1025000>;
199 /* S2 & S3 - VDD_GFX */
201 pmi8994_bby: boost-bypass {
202 regulator-min-microvolt = <3150000>;
203 regulator-max-microvolt = <3600000>;
207 pm8994_regulators: regulators-1 {
208 compatible = "qcom,rpm-pm8994-regulators";
210 vdd_s3-supply = <&vph_pwr>;
211 vdd_s4-supply = <&vph_pwr>;
212 vdd_s5-supply = <&vph_pwr>;
213 vdd_s6-supply = <&vph_pwr>;
214 vdd_s7-supply = <&vph_pwr>;
215 vdd_l1-supply = <&pmi8994_s1>;
216 vdd_l2_l26_l28-supply = <&pm8994_s3>;
217 vdd_l3_l11-supply = <&pm8994_s3>;
218 vdd_l4_l27_l31-supply = <&pm8994_s3>;
219 vdd_l6_l12_l32-supply = <&pm8994_s5>;
220 vdd_l8_l16_l30-supply = <&vph_pwr>;
221 vdd_l9_l10_l18_l22-supply = <&pmi8994_bby>;
222 vdd_l13_l19_l23_l24-supply = <&pmi8994_bby>;
223 vdd_l14_l15-supply = <&pm8994_s5>;
224 vdd_l17_l29-supply = <&pmi8994_bby>;
225 vdd_l20_l21-supply = <&pmi8994_bby>;
226 vdd_l25-supply = <&pm8994_s3>;
227 vdd_lvs1_2-supply = <&pm8994_s4>;
229 /* S1, S2, S6 and S12 are managed by RPMPD */
232 regulator-min-microvolt = <1300000>;
233 regulator-max-microvolt = <1300000>;
237 regulator-min-microvolt = <1800000>;
238 regulator-max-microvolt = <1800000>;
239 regulator-system-load = <325000>;
240 regulator-allow-set-load;
245 regulator-min-microvolt = <2150000>;
246 regulator-max-microvolt = <2150000>;
250 regulator-min-microvolt = <1000000>;
251 regulator-max-microvolt = <1000000>;
255 * S8 - SPMI-managed VDD_APC0
256 * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
260 regulator-min-microvolt = <1000000>;
261 regulator-max-microvolt = <1000000>;
265 regulator-min-microvolt = <1250000>;
266 regulator-max-microvolt = <1250000>;
267 regulator-system-load = <10000>;
268 regulator-allow-set-load;
272 regulator-min-microvolt = <1100000>;
273 regulator-max-microvolt = <1100000>;
278 regulator-min-microvolt = <1225000>;
279 regulator-max-microvolt = <1225000>;
282 /* L5 is inaccessible from RPM */
285 regulator-min-microvolt = <1800000>;
286 regulator-max-microvolt = <1800000>;
289 /* L7 is inaccessible from RPM */
292 regulator-min-microvolt = <1800000>;
293 regulator-max-microvolt = <1800000>;
297 regulator-min-microvolt = <1800000>;
298 regulator-max-microvolt = <1800000>;
302 regulator-min-microvolt = <1800000>;
303 regulator-max-microvolt = <1800000>;
307 regulator-min-microvolt = <1200000>;
308 regulator-max-microvolt = <1200000>;
312 regulator-min-microvolt = <1800000>;
313 regulator-max-microvolt = <1800000>;
314 regulator-system-load = <10000>;
315 regulator-allow-set-load;
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <2950000>;
324 regulator-min-microvolt = <1800000>;
325 regulator-max-microvolt = <1800000>;
326 regulator-system-load = <10000>;
327 regulator-allow-set-load;
332 regulator-min-microvolt = <1800000>;
333 regulator-max-microvolt = <1800000>;
337 regulator-min-microvolt = <2700000>;
338 regulator-max-microvolt = <2700000>;
342 regulator-min-microvolt = <2200000>;
343 regulator-max-microvolt = <2200000>;
348 regulator-min-microvolt = <2850000>;
349 regulator-max-microvolt = <2850000>;
355 regulator-min-microvolt = <2850000>;
356 regulator-max-microvolt = <2850000>;
361 regulator-min-microvolt = <2950000>;
362 regulator-max-microvolt = <2950000>;
363 regulator-system-load = <570000>;
364 regulator-allow-set-load;
368 regulator-min-microvolt = <2950000>;
369 regulator-max-microvolt = <2950000>;
370 regulator-system-load = <800000>;
371 regulator-allow-set-load;
375 regulator-min-microvolt = <3000000>;
376 regulator-max-microvolt = <3000000>;
381 regulator-min-microvolt = <2800000>;
382 regulator-max-microvolt = <2800000>;
388 regulator-min-microvolt = <3075000>;
389 regulator-max-microvolt = <3150000>;
393 regulator-min-microvolt = <1000000>;
394 regulator-max-microvolt = <1000000>;
399 regulator-min-microvolt = <987500>;
400 regulator-max-microvolt = <987500>;
404 regulator-min-microvolt = <1200000>;
405 regulator-max-microvolt = <1200000>;
410 regulator-min-microvolt = <1000000>;
411 regulator-max-microvolt = <1000000>;
412 regulator-system-load = <10000>;
413 regulator-allow-set-load;
417 regulator-min-microvolt = <2700000>;
418 regulator-max-microvolt = <2700000>;
423 regulator-min-microvolt = <1800000>;
424 regulator-max-microvolt = <1800000>;
429 regulator-min-microvolt = <1200000>;
430 regulator-max-microvolt = <1200000>;
431 regulator-system-load = <10000>;
432 regulator-allow-set-load;
436 regulator-min-microvolt = <1800000>;
437 regulator-max-microvolt = <1800000>;
451 * There is an issue with the eMMC causing permanent
452 * damage to the card if a quirk isn't addressed.
453 * Until it's fixed, disable the MMC so as not to brick
459 * Downstream pushes 2.95V to the sdhci device,
460 * but upstream driver REALLY wants to make vmmc 1.8v
461 * cause of the hs400-1_8v mode. MMC works fine without
462 * that regulator, so let's not use it for now.
463 * vqmmc is also disabled cause driver stll complains.
465 * vmmc-supply = <&pm8994_l20>;
466 * vqmmc-supply = <&pm8994_s4>;
473 cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
474 vmmc-supply = <&pm8994_l21>;
475 vqmmc-supply = <&pm8994_l13>;
479 ts_int_active: ts-int-active-state {
482 drive-strength = <2>;
486 ts_reset_active: ts-reset-active-state {
489 drive-strength = <2>;