1 // SPDX-License-Identifier: BSD-3-Clause
3 * Common Board Device Tree for
4 * Microsoft Mobile MSM8994 Octagon Platforms
6 * Copyright (c) 2020, Konrad Dybcio
7 * Copyright (c) 2020, Gustave Monce <gustave.monce@outlook.com>
10 #include "pm8994.dtsi"
11 #include "pmi8994.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/input/gpio-keys.h>
14 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
17 * Delete all generic (msm8994.dtsi) reserved
18 * memory mappings which are different in this device.
20 /delete-node/ &adsp_mem;
21 /delete-node/ &audio_mem;
22 /delete-node/ &cont_splash_mem;
23 /delete-node/ &mba_mem;
24 /delete-node/ &mpss_mem;
25 /delete-node/ &peripheral_region;
26 /delete-node/ &rmtfs_mem;
27 /delete-node/ &smem_mem;
31 * Most Lumia 950/XL users use GRUB to load their kernels,
32 * hence there is no need for msm-id and friends.
36 * This enables graphical output via bootloader-enabled display.
37 * acpi=no is required due to WP platforms having ACPI support, but
38 * only for Windows-based OSes.
41 bootargs = "earlycon=efifb console=efifb acpi=no";
49 compatible = "simple-bus";
52 compatible = "fixed-clock";
55 clock-frequency = <32768>;
56 clock-output-names = "divclk4";
58 pinctrl-names = "default";
59 pinctrl-0 = <&divclk4_pin_a>;
64 compatible = "gpio-keys";
69 gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
70 linux,input-type = <1>;
71 linux,code = <KEY_VOLUMEUP>;
73 debounce-interval = <15>;
77 label = "Camera Snapshot";
78 gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
79 linux,input-type = <1>;
80 linux,code = <KEY_CAMERA>;
82 debounce-interval = <15>;
86 label = "Camera Focus";
87 gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
88 linux,input-type = <1>;
89 linux,code = <KEY_VOLUMEUP>;
91 debounce-interval = <15>;
96 compatible = "gpio-keys";
98 pinctrl-names = "default";
99 pinctrl-0 = <&hall_front_default &hall_back_default>;
101 label = "GPIO Hall Effect Sensor";
103 event-hall-front-sensor {
104 label = "Hall Effect Front Sensor";
105 gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
106 linux,input-type = <EV_SW>;
107 linux,code = <SW_LID>;
111 event-hall-back-sensor {
112 label = "Hall Effect Back Sensor";
113 gpios = <&tlmm 75 GPIO_ACTIVE_HIGH>;
114 linux,input-type = <EV_SW>;
115 linux,code = <SW_MACHINE_COVER>;
122 * This device being a WP platform has a very different
123 * memory layout than other Android based devices.
124 * This memory layout is directly copied from the original
125 * device UEFI firmware, and adapted based on observations
126 * using JTAG for the Qualcomm Peripheral Image regions.
129 uefi_mem: memory@200000 {
130 reg = <0 0x200000 0 0x100000>;
134 mppark_mem: memory@300000 {
135 reg = <0 0x300000 0 0x80000>;
139 fbpt_mem: memory@380000 {
140 reg = <0 0x380000 0 0x1000>;
144 dbg2_mem: memory@381000 {
145 reg = <0 0x381000 0 0x4000>;
149 capsule_mem: memory@385000 {
150 reg = <0 0x385000 0 0x1000>;
154 tpmctrl_mem: memory@386000 {
155 reg = <0 0x386000 0 0x3000>;
159 uefiinfo_mem: memory@389000 {
160 reg = <0 0x389000 0 0x1000>;
164 reset_mem: memory@389000 {
165 reg = <0 0x389000 0 0x1000>;
169 resuncached_mem: memory@38e000 {
170 reg = <0 0x38e000 0 0x72000>;
174 disp_mem: memory@400000 {
175 reg = <0 0x400000 0 0x800000>;
179 uefistack_mem: memory@c00000 {
180 reg = <0 0xc00000 0 0x40000>;
184 cpuvect_mem: memory@c40000 {
185 reg = <0 0xc40000 0 0x10000>;
189 rescached_mem: memory@400000 {
190 reg = <0 0xc50000 0 0xb0000>;
194 tzapps_mem: memory@6500000 {
195 reg = <0 0x6500000 0 0x500000>;
199 smem_mem: memory@6a00000 {
200 reg = <0 0x6a00000 0 0x200000>;
204 hyp_mem: memory@6c00000 {
205 reg = <0 0x6c00000 0 0x100000>;
209 tz_mem: memory@6d00000 {
210 reg = <0 0x6d00000 0 0x160000>;
214 rfsa_adsp_mem: memory@6e60000 {
215 reg = <0 0x6e60000 0 0x10000>;
219 rfsa_mpss_mem: memory@6e70000 {
220 compatible = "qcom,rmtfs-mem";
221 reg = <0 0x6e70000 0 0x10000>;
224 qcom,client-id = <1>;
228 * Value obtained from the device original ACPI DSDT table
231 mba_mem: memory@6e80000 {
232 reg = <0 0x6e80000 0 0x180000>;
237 * Peripheral Image loader region begin!
238 * The region reserved for pil is 0x7000000-0xef00000
241 mpss_mem: memory@7000000 {
242 reg = <0 0x7000000 0 0x5a00000>;
246 adsp_mem: memory@ca00000 {
247 reg = <0 0xca00000 0 0x1800000>;
251 venus_mem: memory@e200000 {
252 reg = <0 0xe200000 0 0x500000>;
256 pil_metadata_mem: memory@e700000 {
257 reg = <0 0xe700000 0 0x4000>;
262 reg = <0 0xe704000 0 0x7fc000>;
265 /* Peripheral Image loader region end */
267 cnss_mem: memory@ef00000 {
268 reg = <0 0xef00000 0 0x300000>;
278 compatible = "syna,rmi4-i2c";
280 #address-cells = <1>;
283 interrupt-parent = <&tlmm>;
284 interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
288 syna,nosleep-mode = <1>;
293 syna,sensor-type = <1>;
294 syna,clip-x-low = <0>;
295 syna,clip-x-high = <1440>;
296 syna,clip-y-low = <0>;
297 syna,clip-y-high = <2560>;
306 * This device uses the Texas Instruments TAS2553, however the TAS2552 driver
307 * seems to work here. In the future a proper driver might need to
308 * be written for this device.
310 tas2553: tas2553@40 {
311 compatible = "ti,tas2552";
314 vbat-supply = <&vph_pwr>;
315 iovdd-supply = <&vreg_s4a_1p8>;
316 avdd-supply = <&vreg_s4a_1p8>;
318 enable-gpio = <&pm8994_gpios 12 GPIO_ACTIVE_HIGH>;
325 ak09912: magnetometer@c {
326 compatible = "asahi-kasei,ak09912";
329 interrupt-parent = <&tlmm>;
330 interrupts = <26 IRQ_TYPE_EDGE_RISING>;
332 vdd-supply = <&vreg_l18a_2p85>;
333 vid-supply = <&vreg_lvs2a_1p8>;
336 zpa2326: barometer@5c {
337 compatible = "murata,zpa2326";
340 interrupt-parent = <&tlmm>;
341 interrupts = <74 IRQ_TYPE_EDGE_RISING>;
343 vdd-supply = <&vreg_lvs2a_1p8>;
346 mpu6050: accelerometer@68 {
347 compatible = "invensense,mpu6500";
350 interrupt-parent = <&tlmm>;
351 interrupts = <64 IRQ_TYPE_EDGE_RISING>;
353 vdd-supply = <&vreg_lvs2a_1p8>;
354 vddio-supply = <&vreg_lvs2a_1p8>;
362 compatible = "nxp,pn544-i2c";
366 interrupt-parent = <&tlmm>;
367 interrupts = <29 IRQ_TYPE_EDGE_RISING>;
369 enable-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
370 firmware-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
381 sideinteraction: ad7147_captouch@2c {
382 compatible = "ad,ad7147_captouch";
385 pinctrl-names = "default", "sleep";
386 pinctrl-0 = <&grip_default>;
387 pinctrl-1 = <&grip_sleep>;
389 interrupts = <&tlmm 96 IRQ_TYPE_EDGE_FALLING>;
396 vcc-supply = <&vreg_l18a_2p85>;
400 * The QPDS-T900/QPDS-T930 is a customized part built for Nokia
401 * by Avago. It is very similar to the Avago APDS-9930 with some
402 * minor differences. In the future a proper driver might need to
403 * be written for this device. For now this works fine.
405 qpdst900: qpdst900@39 {
406 compatible = "avago,apds9930";
409 interrupt-parent = <&tlmm>;
410 interrupts = <40 IRQ_TYPE_EDGE_FALLING>;
417 fm_radio: si4705@11 {
418 compatible = "silabs,si470x";
421 interrupt-parent = <&tlmm>;
422 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
423 reset-gpios = <&tlmm 93 GPIO_ACTIVE_HIGH>;
426 vreg_lpddr_1p1: fan53526a@6c {
427 compatible = "fcs,fan53526";
430 regulator-min-microvolt = <1100000>;
431 regulator-max-microvolt = <1100000>;
432 vin-supply = <&vph_pwr>;
433 fcs,suspend-voltage-selector = <1>;
434 regulator-always-on; /* Turning off DDR power doesn't sound good. */
437 /* ANX7816 HDMI bridge (needs MDSS HDMI) */
444 * This device is a Lattice UC120 USB-C PD PHY.
445 * It is actually a Lattice iCE40 FPGA pre-programmed by
446 * the device firmware with a specific bitstream
447 * enabling USB Type C PHY functionality.
448 * Communication is done via a proprietary protocol over SPI.
450 * TODO: Once a proper driver is available, replace this.
453 compatible = "lattice,ice40-fpga-mgr";
455 spi-max-frequency = <5000000>;
456 cdone-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
457 reset-gpios = <&pmi8994_gpios 4 GPIO_ACTIVE_LOW>;
464 qca6174_bt: bluetooth {
465 compatible = "qcom,qca6174-bt";
467 enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
473 bt_en_gpios: bt-en-gpios-state {
476 function = PMIC_GPIO_FUNC_NORMAL;
478 power-source = <PM8994_GPIO_S4>;
479 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
484 divclk4_pin_a: divclk4-state {
487 function = PMIC_GPIO_FUNC_FUNC2;
488 power-source = <PM8994_GPIO_S4>;
496 compatible = "qcom,pm8941-pwrkey";
497 interrupts = <0 8 0 IRQ_TYPE_EDGE_BOTH>;
499 linux,code = <KEY_POWER>;
503 compatible = "qcom,pm8941-resin";
504 interrupts = <0 8 1 IRQ_TYPE_EDGE_BOTH>;
506 linux,code = <KEY_VOLUMEDOWN>;
511 pinctrl-0 = <&hd3ss460_pol &hd3ss460_amsel &hd3ss460_en>;
512 pinctrl-names = "default";
515 * This device uses a TI HD3SS460 Type-C MUX
516 * As this device has no driver currently,
517 * the configuration for USB Face Up is set-up here.
519 * TODO: remove once a driver is available
520 * TODO: add VBUS GPIO 5
522 hd3ss460_pol: pol-low-state {
524 function = PMIC_GPIO_FUNC_NORMAL;
525 qcom,drive-strength = <3>;
529 hd3ss460_amsel: amsel-high-state {
531 function = PMIC_GPIO_FUNC_NORMAL;
532 qcom,drive-strength = <1>;
536 hd3ss460_en: en-high-state {
538 function = PMIC_GPIO_FUNC_NORMAL;
539 qcom,drive-strength = <1>;
544 &pmi8994_spmi_regulators {
546 reg = <0x1700 0x100>;
547 regulator-min-microvolt = <980000>;
548 regulator-max-microvolt = <980000>;
553 /* These values were taken from the original firmware ACPI tables */
554 pm8994_regulators: pm8994-regulators {
555 compatible = "qcom,rpm-pm8994-regulators";
557 vdd_s1-supply = <&vph_pwr>;
558 vdd_s2-supply = <&vph_pwr>;
559 vdd_s3-supply = <&vph_pwr>;
560 vdd_s4-supply = <&vph_pwr>;
561 vdd_s5-supply = <&vph_pwr>;
562 vdd_s6-supply = <&vph_pwr>;
563 vdd_s7-supply = <&vph_pwr>;
564 vdd_s8-supply = <&vph_pwr>;
565 vdd_s9-supply = <&vph_pwr>;
566 vdd_s10-supply = <&vph_pwr>;
567 vdd_s11-supply = <&vph_pwr>;
568 vdd_s12-supply = <&vph_pwr>;
569 vdd_l1-supply = <&vreg_s1b_1p0>;
570 vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
571 vdd_l3_l11-supply = <&vreg_s3a_1p3>;
572 vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
573 vdd_l5_l7-supply = <&vreg_s5a_2p15>;
574 vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
575 vdd_l8_l16_l30-supply = <&vph_pwr>;
576 vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>;
577 vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>;
578 vdd_l14_l15-supply = <&vreg_s5a_2p15>;
579 vdd_l17_l29-supply = <&vph_pwr_bbyp>;
580 vdd_l20_l21-supply = <&vph_pwr_bbyp>;
581 vdd_l25-supply = <&vreg_s5a_2p15>;
582 vdd_lvs1_2-supply = <&vreg_s4a_1p8>;
584 /* S1, S2, S6 and S12 are managed by RPMPD */
587 regulator-min-microvolt = <1300000>;
588 regulator-max-microvolt = <1300000>;
589 regulator-allow-set-load;
590 regulator-system-load = <300000>;
594 regulator-min-microvolt = <1800000>;
595 regulator-max-microvolt = <1800000>;
596 regulator-allow-set-load;
598 regulator-system-load = <325000>;
602 regulator-min-microvolt = <2150000>;
603 regulator-max-microvolt = <2150000>;
604 regulator-allow-set-load;
605 regulator-system-load = <325000>;
609 regulator-min-microvolt = <1000000>;
610 regulator-max-microvolt = <1000000>;
614 * S8 - SPMI-managed VDD_APC0
615 * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
619 regulator-min-microvolt = <1000000>;
620 regulator-max-microvolt = <1000000>;
624 regulator-min-microvolt = <1250000>;
625 regulator-max-microvolt = <1250000>;
626 regulator-allow-set-load;
627 regulator-system-load = <4160>;
631 regulator-min-microvolt = <1200000>;
632 regulator-max-microvolt = <1200000>;
634 regulator-allow-set-load;
635 regulator-system-load = <80000>;
639 regulator-min-microvolt = <1225000>;
640 regulator-max-microvolt = <1225000>;
643 /* L5 is inaccessible from RPM */
646 regulator-min-microvolt = <1800000>;
647 regulator-max-microvolt = <1800000>;
648 regulator-allow-set-load;
649 regulator-system-load = <1000>;
652 /* L7 is inaccessible from RPM */
655 regulator-min-microvolt = <1800000>;
656 regulator-max-microvolt = <1800000>;
660 regulator-min-microvolt = <1800000>;
661 regulator-max-microvolt = <1800000>;
665 regulator-min-microvolt = <1800000>;
666 regulator-max-microvolt = <1800000>;
670 regulator-min-microvolt = <1200000>;
671 regulator-max-microvolt = <1200000>;
673 regulator-allow-set-load;
674 regulator-system-load = <35000>;
678 regulator-min-microvolt = <1800000>;
679 regulator-max-microvolt = <1800000>;
681 regulator-allow-set-load;
682 regulator-system-load = <50000>;
685 vreg_l13a_2p95: l13 {
686 regulator-min-microvolt = <1850000>;
687 regulator-max-microvolt = <2950000>;
689 regulator-allow-set-load;
690 regulator-system-load = <22000>;
694 regulator-min-microvolt = <1800000>;
695 regulator-max-microvolt = <1800000>;
697 regulator-allow-set-load;
698 regulator-system-load = <52000>;
702 regulator-min-microvolt = <1800000>;
703 regulator-max-microvolt = <1800000>;
707 regulator-min-microvolt = <2700000>;
708 regulator-max-microvolt = <2700000>;
712 regulator-min-microvolt = <2800000>;
713 regulator-max-microvolt = <2800000>;
715 regulator-allow-set-load;
716 regulator-system-load = <300000>;
719 vreg_l18a_2p85: l18 {
720 regulator-min-microvolt = <2850000>;
721 regulator-max-microvolt = <2850000>;
723 regulator-allow-set-load;
724 regulator-system-load = <600000>;
728 regulator-min-microvolt = <3300000>;
729 regulator-max-microvolt = <3300000>;
731 regulator-allow-set-load;
732 regulator-system-load = <500000>;
735 vreg_l20a_2p95: l20 {
736 regulator-min-microvolt = <2950000>;
737 regulator-max-microvolt = <2950000>;
740 regulator-allow-set-load;
741 regulator-system-load = <570000>;
744 vreg_l21a_2p95: l21 {
745 regulator-min-microvolt = <2950000>;
746 regulator-max-microvolt = <2950000>;
748 regulator-allow-set-load;
749 regulator-system-load = <800000>;
753 regulator-min-microvolt = <3000000>;
754 regulator-max-microvolt = <3000000>;
756 regulator-allow-set-load;
757 regulator-system-load = <150000>;
761 regulator-min-microvolt = <2850000>;
762 regulator-max-microvolt = <2850000>;
764 regulator-allow-set-load;
765 regulator-system-load = <80000>;
768 vreg_l24a_3p075: l24 {
769 regulator-min-microvolt = <3075000>;
770 regulator-max-microvolt = <3150000>;
771 regulator-allow-set-load;
772 regulator-system-load = <5800>;
776 regulator-min-microvolt = <1150000>;
777 regulator-max-microvolt = <1150000>;
779 regulator-allow-set-load;
780 regulator-system-load = <80000>;
784 regulator-min-microvolt = <1000000>;
785 regulator-max-microvolt = <1000000>;
788 vreg_l27a_1p05: l27 {
789 regulator-min-microvolt = <1000000>;
790 regulator-max-microvolt = <1000000>;
792 regulator-allow-set-load;
793 regulator-system-load = <500000>;
797 regulator-min-microvolt = <1000000>;
798 regulator-max-microvolt = <1000000>;
800 regulator-allow-set-load;
801 regulator-system-load = <26000>;
805 regulator-min-microvolt = <2850000>;
806 regulator-max-microvolt = <2850000>;
808 regulator-allow-set-load;
809 regulator-system-load = <80000>;
813 regulator-min-microvolt = <1800000>;
814 regulator-max-microvolt = <1800000>;
816 regulator-allow-set-load;
817 regulator-system-load = <2500>;
821 regulator-min-microvolt = <1200000>;
822 regulator-max-microvolt = <1200000>;
824 regulator-allow-set-load;
825 regulator-system-load = <600000>;
829 regulator-min-microvolt = <1800000>;
830 regulator-max-microvolt = <1800000>;
833 vreg_lvs1a_1p8: lvs1 { };
835 vreg_lvs2a_1p8: lvs2 { };
838 pmi8994_regulators: pmi8994-regulators {
839 compatible = "qcom,rpm-pmi8994-regulators";
841 vdd_s1-supply = <&vph_pwr>;
842 vdd_bst_byp-supply = <&vph_pwr>;
845 regulator-min-microvolt = <1025000>;
846 regulator-max-microvolt = <1025000>;
849 /* S2 & S3 - VDD_GFX */
851 vph_pwr_bbyp: boost-bypass {
852 regulator-min-microvolt = <3300000>;
853 regulator-max-microvolt = <3300000>;
862 * This device is shipped with HS400 capabable eMMCs
863 * However various brands have been used in various product batches,
864 * including a Samsung eMMC (BGND3R) which features a quirk with HS400.
865 * Set the speed to HS200 as a safety measure.
873 pinctrl-names = "default", "sleep";
874 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
875 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
877 vmmc-supply = <&vreg_l21a_2p95>;
878 vqmmc-supply = <&vreg_l13a_2p95>;
880 cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
884 grip_default: grip-default {
887 drive-strength = <6>;
891 grip_sleep: grip-sleep {
894 drive-strength = <2>;
898 hall_front_default: hall-front-default {
901 drive-strength = <2>;
905 hall_back_default: hall-back-default {
908 drive-strength = <2>;