1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
4 * Copyright (c) 2020, AngeloGioacchino Del Regno
5 * <angelogioacchino.delregno@somainline.org>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/input/gpio-keys.h>
13 #include <dt-bindings/leds/common.h>
16 /* required for bootloader to select correct board */
17 qcom,msm-id = <318 0>;
18 qcom,board-id = <8 1>;
19 qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;
21 /* This part enables graphical output via bootloader-enabled display */
23 bootargs = "earlycon=tty0 console=tty0";
29 stdout-path = "framebuffer0";
31 framebuffer0: framebuffer@9d400000 {
32 compatible = "simple-framebuffer";
33 reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
36 stride = <(1080 * 4)>;
42 board_vbat: vbat-regulator {
43 compatible = "regulator-fixed";
44 regulator-name = "VBAT";
46 regulator-min-microvolt = <4000000>;
47 regulator-max-microvolt = <4000000>;
52 vph_pwr: vph-pwr-regulator {
53 compatible = "regulator-fixed";
54 regulator-name = "vph_pwr";
60 cam_vdig_imx300_219_vreg: cam_vdig_imx300_219_vreg {
61 compatible = "regulator-fixed";
62 regulator-name = "cam_vdig_imx300_219_vreg";
63 startup-delay-us = <0>;
65 gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>;
66 pinctrl-names = "default";
67 pinctrl-0 = <&cam_vdig_default>;
70 cam_vana_front_vreg: cam_vana_front_vreg {
71 compatible = "regulator-fixed";
72 regulator-name = "cam_vana_front_vreg";
73 startup-delay-us = <0>;
75 gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
76 pinctrl-names = "default";
77 pinctrl-0 = <&imx219_vana_default>;
80 cam_vana_rear_vreg: cam_vana_rear_vreg {
81 compatible = "regulator-fixed";
82 regulator-name = "cam_vana_rear_vreg";
83 startup-delay-us = <0>;
85 gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&imx300_vana_default>;
92 compatible = "gpio-keys";
95 label = "Camera Focus";
96 gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
97 linux,input-type = <1>;
98 linux,code = <KEY_CAMERA_FOCUS>;
99 debounce-interval = <15>;
102 key-camera-snapshot {
103 label = "Camera Snapshot";
104 gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
105 linux,input-type = <1>;
106 linux,code = <KEY_CAMERA>;
107 debounce-interval = <15>;
111 label = "Volume Down";
112 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
113 linux,input-type = <1>;
114 linux,code = <KEY_VOLUMEDOWN>;
116 debounce-interval = <15>;
121 #address-cells = <2>;
126 compatible = "ramoops";
127 reg = <0x0 0xffc00000 0x0 0x100000>;
128 record-size = <0x10000>;
129 console-size = <0x60000>;
130 ftrace-size = <0x10000>;
131 pmsg-size = <0x20000>;
136 debug_region@ffb00000 {
137 reg = <0x00 0xffb00000 0x00 0x100000>;
141 removed_region@85800000 {
142 reg = <0x00 0x85800000 0x00 0x3700000>;
148 * Until we hook up type-c detection, we
149 * have to stick with this. But it works.
151 extcon_usb: extcon-usb {
152 compatible = "linux,extcon-usb-gpio";
153 id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
158 firmware-name = "/*(DEBLOBBED)*/";
164 touchscreen: synaptics-rmi4-i2c@70 {
165 compatible = "syna,rmi4-i2c";
167 #address-cells = <1>;
169 interrupts-extended = <&tlmm 45 0x2008>;
171 pinctrl-names = "default";
172 pinctrl-0 = <&ts_int_active &ts_lcd_id_active>;
174 syna,reset-delay-ms = <200>;
175 syna,startup-delay-ms = <220>;
179 syna,nosleep-mode = <1>;
184 syna,sensor-type = <1>;
192 /* SMB1351 charger */
195 /* I2C3, 4, 5, 7 and 8 are disabled on this board. */
206 /* MSM serial console */
216 qcom,power-source = <1>;
221 color = <LED_COLOR_ID_RGB>;
222 function = LED_FUNCTION_STATUS;
224 #address-cells = <1>;
229 color = <LED_COLOR_ID_BLUE>;
234 color = <LED_COLOR_ID_GREEN>;
239 color = <LED_COLOR_ID_RED>;
251 linux,code = <KEY_VOLUMEUP>;
257 vdd-supply = <&vreg_l1b_0p925>;
258 vdda-pll-supply = <&vreg_l10a_1p8>;
259 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
264 compatible = "qcom,rpm-pm660l-regulators";
266 vdd_s1-supply = <&vph_pwr>;
267 vdd_s2-supply = <&vph_pwr>;
268 vdd_s3_s4-supply = <&vph_pwr>;
269 vdd_s5-supply = <&vph_pwr>;
270 vdd_s6-supply = <&vph_pwr>;
272 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
273 vdd_l2-supply = <&vreg_bob>;
274 vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
275 vdd_l4_l6-supply = <&vreg_bob>;
276 vdd_bob-supply = <&vph_pwr>;
279 regulator-min-microvolt = <1125000>;
280 regulator-max-microvolt = <1125000>;
281 regulator-enable-ramp-delay = <200>;
282 regulator-ramp-delay = <0>;
286 regulator-min-microvolt = <1050000>;
287 regulator-max-microvolt = <1050000>;
288 regulator-enable-ramp-delay = <200>;
289 regulator-ramp-delay = <0>;
293 * At least on Nile's configuration, S3B/S4B (VDD_CX) and
294 * S5B (VDD_MX) are managed only through RPM Power Domains.
295 * Trying to set a voltage on the main supply will create
296 * havoc and freeze the SoC.
297 * In any case, reference voltages for these regulators are:
304 regulator-min-microvolt = <920000>;
305 regulator-max-microvolt = <928000>;
306 regulator-enable-ramp-delay = <250>;
307 regulator-ramp-delay = <0>;
308 regulator-allow-set-load;
313 * This regulator supports 1.648 - 3.104V on this board
314 * but we set a max voltage of anything less than 2.7V
315 * to satisfy a condition in sdhci.c that will disable
316 * 3.3V SDHCI signaling, which happens to be not really
317 * supported on the Xperia Nile/Ganges platform.
319 regulator-min-microvolt = <1648000>;
320 regulator-max-microvolt = <2696000>;
321 regulator-enable-ramp-delay = <250>;
322 regulator-ramp-delay = <0>;
323 regulator-allow-set-load;
327 regulator-min-microvolt = <2800000>;
328 regulator-max-microvolt = <2800000>;
329 regulator-enable-ramp-delay = <250>;
330 regulator-ramp-delay = <0>;
331 regulator-min-microamp = <200>;
332 regulator-max-microamp = <600000>;
333 regulator-system-load = <100000>;
334 regulator-allow-set-load;
338 regulator-min-microvolt = <2944000>;
339 regulator-max-microvolt = <2952000>;
340 regulator-enable-ramp-delay = <250>;
341 regulator-ramp-delay = <0>;
343 regulator-min-microamp = <200>;
344 regulator-max-microamp = <600000>;
345 regulator-system-load = <570000>;
346 regulator-allow-set-load;
350 * Downstream specifies a range of 1721-3600mV,
351 * but the only assigned consumers are SDHCI2 VMMC
352 * and Coresight QPDI that both request pinned 2.95V.
353 * Tighten the range to 1.8-3.328 (closest to 3.3) to
354 * make the mmc driver happy.
357 regulator-min-microvolt = <1800000>;
358 regulator-max-microvolt = <3328000>;
359 regulator-enable-ramp-delay = <250>;
360 regulator-ramp-delay = <0>;
361 regulator-allow-set-load;
362 regulator-system-load = <800000>;
366 regulator-min-microvolt = <1704000>;
367 regulator-max-microvolt = <3312000>;
368 regulator-enable-ramp-delay = <250>;
369 regulator-ramp-delay = <0>;
373 regulator-min-microvolt = <2704000>;
374 regulator-max-microvolt = <3128000>;
375 regulator-enable-ramp-delay = <250>;
376 regulator-ramp-delay = <0>;
380 regulator-min-microvolt = <2800000>;
381 regulator-max-microvolt = <3400000>;
382 regulator-enable-ramp-delay = <250>;
383 regulator-ramp-delay = <0>;
386 /* L9B (870mV) is currently unused */
387 /* L10B (915mV) is currently unused */
390 regulator-min-microvolt = <3304000>;
391 regulator-max-microvolt = <3624000>;
392 regulator-enable-ramp-delay = <500>;
393 regulator-ramp-delay = <0>;
398 compatible = "qcom,rpm-pm660-regulators";
400 vdd_s1-supply = <&vph_pwr>;
401 vdd_s2-supply = <&vph_pwr>;
402 vdd_s3-supply = <&vph_pwr>;
403 vdd_s4-supply = <&vph_pwr>;
404 vdd_s5-supply = <&vph_pwr>;
405 vdd_s6-supply = <&vph_pwr>;
407 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
408 vdd_l2_l3-supply = <&vreg_s2b_1p05>;
409 vdd_l5-supply = <&vreg_s2b_1p05>;
410 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
411 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
414 * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
415 * by the Core Power Reduction hardened (CPRh) and the
416 * Operating State Manager (OSM) HW automatically.
420 regulator-min-microvolt = <2040000>;
421 regulator-max-microvolt = <2040000>;
422 regulator-enable-ramp-delay = <200>;
423 regulator-ramp-delay = <0>;
428 regulator-min-microvolt = <1224000>;
429 regulator-max-microvolt = <1350000>;
430 regulator-enable-ramp-delay = <200>;
431 regulator-ramp-delay = <0>;
435 regulator-min-microvolt = <504000>;
436 regulator-max-microvolt = <992000>;
437 regulator-enable-ramp-delay = <150>;
438 regulator-ramp-delay = <0>;
443 regulator-min-microvolt = <1226000>;
444 regulator-max-microvolt = <1250000>;
445 regulator-enable-ramp-delay = <250>;
446 regulator-ramp-delay = <0>;
447 regulator-allow-set-load;
451 regulator-min-microvolt = <944000>;
452 regulator-max-microvolt = <1008000>;
453 regulator-enable-ramp-delay = <250>;
454 regulator-ramp-delay = <0>;
458 regulator-min-microvolt = <944000>;
459 regulator-max-microvolt = <1008000>;
460 regulator-enable-ramp-delay = <250>;
461 regulator-ramp-delay = <0>;
465 regulator-min-microvolt = <800000>;
466 regulator-max-microvolt = <952000>;
467 regulator-enable-ramp-delay = <250>;
468 regulator-ramp-delay = <0>;
472 regulator-min-microvolt = <1304000>;
473 regulator-max-microvolt = <1368000>;
474 regulator-allow-set-load;
475 regulator-enable-ramp-delay = <250>;
476 regulator-ramp-delay = <0>;
480 regulator-min-microvolt = <1200000>;
481 regulator-max-microvolt = <1200000>;
482 regulator-enable-ramp-delay = <250>;
483 regulator-ramp-delay = <0>;
487 regulator-min-microvolt = <1800000>;
488 regulator-max-microvolt = <1800000>;
489 regulator-enable-ramp-delay = <250>;
490 regulator-ramp-delay = <0>;
491 regulator-system-load = <325000>;
492 regulator-allow-set-load;
496 regulator-min-microvolt = <1804000>;
497 regulator-max-microvolt = <1896000>;
498 regulator-enable-ramp-delay = <250>;
499 regulator-ramp-delay = <0>;
500 regulator-allow-set-load;
504 regulator-min-microvolt = <1800000>;
505 regulator-max-microvolt = <1944000>;
506 regulator-enable-ramp-delay = <250>;
507 regulator-ramp-delay = <0>;
508 regulator-allow-set-load;
512 regulator-min-microvolt = <1784000>;
513 regulator-max-microvolt = <1944000>;
514 regulator-enable-ramp-delay = <250>;
515 regulator-ramp-delay = <0>;
519 regulator-min-microvolt = <1800000>;
520 regulator-max-microvolt = <1944000>;
521 regulator-enable-ramp-delay = <250>;
522 regulator-ramp-delay = <0>;
525 /* This gives power to the LPDDR4: never turn it off! */
527 regulator-min-microvolt = <1800000>;
528 regulator-max-microvolt = <1944000>;
529 regulator-enable-ramp-delay = <250>;
530 regulator-ramp-delay = <0>;
536 regulator-min-microvolt = <1710000>;
537 regulator-max-microvolt = <1904000>;
538 regulator-enable-ramp-delay = <250>;
539 regulator-ramp-delay = <0>;
543 regulator-min-microvolt = <1648000>;
544 regulator-max-microvolt = <2952000>;
545 regulator-enable-ramp-delay = <250>;
546 regulator-ramp-delay = <0>;
549 /* L16A (2.70V) is unused */
552 regulator-min-microvolt = <1648000>;
553 regulator-max-microvolt = <2952000>;
554 regulator-enable-ramp-delay = <250>;
555 regulator-ramp-delay = <0>;
559 regulator-min-microvolt = <1800000>;
560 regulator-max-microvolt = <1800000>;
561 regulator-enable-ramp-delay = <250>;
562 regulator-ramp-delay = <10>;
563 regulator-min-microamp = <200>;
564 regulator-max-microamp = <50000>;
565 regulator-system-load = <10000>;
566 regulator-allow-set-load;
570 regulator-min-microvolt = <3312000>;
571 regulator-max-microvolt = <3400000>;
572 regulator-enable-ramp-delay = <250>;
573 regulator-ramp-delay = <0>;
574 regulator-allow-set-load;
583 drive-strength = <2>;
591 drive-strength = <2>;
599 /* SoMC Nile platform's eMMC doesn't support HS200 mode */
602 mmc-hs400-enhanced-strobe;
604 vmmc-supply = <&vreg_l4b_2p95>;
605 vqmmc-supply = <&vreg_l8a_1p8>;
611 vmmc-supply = <&vreg_l5b_2p95>;
612 vqmmc-supply = <&vreg_l2b_2p95>;
616 gpio-reserved-ranges = <8 4>;
618 ts_int_active: ts-int-active {
620 drive-strength = <8>;
624 ts_lcd_id_active: ts-lcd-id-active {
626 drive-strength = <8>;
630 imx300_vana_default: imx300-vana-default {
634 drive-strength = <2>;
637 imx219_vana_default: imx219-vana-default {
641 drive-strength = <2>;
644 cam_vdig_default: cam-vdig-default {
648 drive-strength = <2>;
657 dr_mode = "peripheral";
658 extcon = <&extcon_usb>;