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/ &res_hyp_mem;
27 /delete-node/ &rmtfs_mem;
28 /delete-node/ &smem_mem;
32 * Most Lumia 950/XL users use GRUB to load their kernels,
33 * hence there is no need for msm-id and friends.
37 * This enables graphical output via bootloader-enabled display.
38 * acpi=no is required due to WP platforms having ACPI support, but
39 * only for Windows-based OSes.
42 bootargs = "earlycon=efifb console=efifb acpi=no";
51 compatible = "fixed-clock";
54 clock-frequency = <32768>;
55 clock-output-names = "divclk4";
57 pinctrl-names = "default";
58 pinctrl-0 = <&divclk4_pin_a>;
63 compatible = "gpio-keys";
68 gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
69 linux,input-type = <1>;
70 linux,code = <KEY_VOLUMEUP>;
72 debounce-interval = <15>;
76 label = "Camera Snapshot";
77 gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
78 linux,input-type = <1>;
79 linux,code = <KEY_CAMERA>;
81 debounce-interval = <15>;
85 label = "Camera Focus";
86 gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
87 linux,input-type = <1>;
88 linux,code = <KEY_VOLUMEUP>;
90 debounce-interval = <15>;
95 compatible = "gpio-keys";
97 pinctrl-names = "default";
98 pinctrl-0 = <&hall_front_default &hall_back_default>;
100 label = "GPIO Hall Effect Sensor";
102 event-hall-front-sensor {
103 label = "Hall Effect Front Sensor";
104 gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
105 linux,input-type = <EV_SW>;
106 linux,code = <SW_LID>;
110 event-hall-back-sensor {
111 label = "Hall Effect Back Sensor";
112 gpios = <&tlmm 75 GPIO_ACTIVE_HIGH>;
113 linux,input-type = <EV_SW>;
114 linux,code = <SW_MACHINE_COVER>;
121 * This device being a WP platform has a very different
122 * memory layout than other Android based devices.
123 * This memory layout is directly copied from the original
124 * device UEFI firmware, and adapted based on observations
125 * using JTAG for the Qualcomm Peripheral Image regions.
128 uefi_mem: memory@200000 {
129 reg = <0 0x00200000 0 0x100000>;
133 mppark_mem: memory@300000 {
134 reg = <0 0x00300000 0 0x80000>;
138 fbpt_mem: memory@380000 {
139 reg = <0 0x00380000 0 0x1000>;
143 dbg2_mem: memory@381000 {
144 reg = <0 0x00381000 0 0x4000>;
148 capsule_mem: memory@385000 {
149 reg = <0 0x00385000 0 0x1000>;
153 tpmctrl_mem: memory@386000 {
154 reg = <0 0x00386000 0 0x3000>;
158 uefiinfo_mem: memory@389000 {
159 reg = <0 0x00389000 0 0x1000>;
163 reset_mem: memory@389000 {
164 reg = <0 0x00389000 0 0x1000>;
168 resuncached_mem: memory@38e000 {
169 reg = <0 0x0038e000 0 0x72000>;
173 disp_mem: memory@400000 {
174 reg = <0 0x00400000 0 0x800000>;
178 uefistack_mem: memory@c00000 {
179 reg = <0 0x00c00000 0 0x40000>;
183 cpuvect_mem: memory@c40000 {
184 reg = <0 0x00c40000 0 0x10000>;
188 rescached_mem: memory@400000 {
189 reg = <0 0x00c50000 0 0xb0000>;
193 tzapps_mem: memory@6500000 {
194 reg = <0 0x06500000 0 0x500000>;
198 smem_mem: memory@6a00000 {
199 reg = <0 0x06a00000 0 0x200000>;
203 hyp_mem: memory@6c00000 {
204 reg = <0 0x06c00000 0 0x100000>;
208 tz_mem: memory@6d00000 {
209 reg = <0 0x06d00000 0 0x160000>;
213 rfsa_adsp_mem: memory@6e60000 {
214 reg = <0 0x06e60000 0 0x10000>;
218 rfsa_mpss_mem: memory@6e70000 {
219 compatible = "qcom,rmtfs-mem";
220 reg = <0 0x06e70000 0 0x10000>;
223 qcom,client-id = <1>;
227 * Value obtained from the device original ACPI DSDT table
230 mba_mem: memory@6e80000 {
231 reg = <0 0x06e80000 0 0x180000>;
236 * Peripheral Image loader region begin!
237 * The region reserved for pil is 0x7000000-0xef00000
240 mpss_mem: memory@7000000 {
241 reg = <0 0x07000000 0 0x5a00000>;
245 adsp_mem: memory@ca00000 {
246 reg = <0 0x0ca00000 0 0x1800000>;
250 venus_mem: memory@e200000 {
251 reg = <0 0x0e200000 0 0x500000>;
255 pil_metadata_mem: memory@e700000 {
256 reg = <0 0x0e700000 0 0x4000>;
261 reg = <0 0x0e704000 0 0x7fc000>;
264 /* Peripheral Image loader region end */
266 cnss_mem: memory@ef00000 {
267 reg = <0 0x0ef00000 0 0x300000>;
277 compatible = "syna,rmi4-i2c";
279 #address-cells = <1>;
282 interrupt-parent = <&tlmm>;
283 interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
287 syna,nosleep-mode = <1>;
292 syna,sensor-type = <1>;
293 syna,clip-x-low = <0>;
294 syna,clip-x-high = <1440>;
295 syna,clip-y-low = <0>;
296 syna,clip-y-high = <2560>;
305 * This device uses the Texas Instruments TAS2553, however the TAS2552 driver
306 * seems to work here. In the future a proper driver might need to
307 * be written for this device.
309 tas2553: tas2553@40 {
310 compatible = "ti,tas2552";
313 vbat-supply = <&vph_pwr>;
314 iovdd-supply = <&vreg_s4a_1p8>;
315 avdd-supply = <&vreg_s4a_1p8>;
317 enable-gpio = <&pm8994_gpios 12 GPIO_ACTIVE_HIGH>;
324 ak09912: magnetometer@c {
325 compatible = "asahi-kasei,ak09912";
328 interrupt-parent = <&tlmm>;
329 interrupts = <26 IRQ_TYPE_EDGE_RISING>;
331 vdd-supply = <&vreg_l18a_2p85>;
332 vid-supply = <&vreg_lvs2a_1p8>;
335 zpa2326: barometer@5c {
336 compatible = "murata,zpa2326";
339 interrupt-parent = <&tlmm>;
340 interrupts = <74 IRQ_TYPE_EDGE_RISING>;
342 vdd-supply = <&vreg_lvs2a_1p8>;
345 mpu6050: accelerometer@68 {
346 compatible = "invensense,mpu6500";
349 interrupt-parent = <&tlmm>;
350 interrupts = <64 IRQ_TYPE_EDGE_RISING>;
352 vdd-supply = <&vreg_lvs2a_1p8>;
353 vddio-supply = <&vreg_lvs2a_1p8>;
361 compatible = "nxp,pn544-i2c";
365 interrupt-parent = <&tlmm>;
366 interrupts = <29 IRQ_TYPE_EDGE_RISING>;
368 enable-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
369 firmware-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
380 sideinteraction: ad7147_captouch@2c {
381 compatible = "ad,ad7147_captouch";
384 pinctrl-names = "default", "sleep";
385 pinctrl-0 = <&grip_default>;
386 pinctrl-1 = <&grip_sleep>;
388 interrupts = <&tlmm 96 IRQ_TYPE_EDGE_FALLING>;
395 vcc-supply = <&vreg_l18a_2p85>;
399 * The QPDS-T900/QPDS-T930 is a customized part built for Nokia
400 * by Avago. It is very similar to the Avago APDS-9930 with some
401 * minor differences. In the future a proper driver might need to
402 * be written for this device. For now this works fine.
404 qpdst900: qpdst900@39 {
405 compatible = "avago,apds9930";
408 interrupt-parent = <&tlmm>;
409 interrupts = <40 IRQ_TYPE_EDGE_FALLING>;
416 fm_radio: si4705@11 {
417 compatible = "silabs,si470x";
420 interrupt-parent = <&tlmm>;
421 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
422 reset-gpios = <&tlmm 93 GPIO_ACTIVE_HIGH>;
425 vreg_lpddr_1p1: fan53526a@6c {
426 compatible = "fcs,fan53526";
429 regulator-min-microvolt = <1100000>;
430 regulator-max-microvolt = <1100000>;
431 vin-supply = <&vph_pwr>;
432 fcs,suspend-voltage-selector = <1>;
433 regulator-always-on; /* Turning off DDR power doesn't sound good. */
436 /* ANX7816 HDMI bridge (needs MDSS HDMI) */
443 * This device is a Lattice UC120 USB-C PD PHY.
444 * It is actually a Lattice iCE40 FPGA pre-programmed by
445 * the device firmware with a specific bitstream
446 * enabling USB Type C PHY functionality.
447 * Communication is done via a proprietary protocol over SPI.
449 * TODO: Once a proper driver is available, replace this.
452 compatible = "lattice,ice40-fpga-mgr";
454 spi-max-frequency = <5000000>;
455 cdone-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
456 reset-gpios = <&pmi8994_gpios 4 GPIO_ACTIVE_LOW>;
463 qca6174_bt: bluetooth {
464 compatible = "qcom,qca6174-bt";
466 enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
472 bt_en_gpios: bt-en-gpios-state {
475 function = PMIC_GPIO_FUNC_NORMAL;
477 power-source = <PM8994_GPIO_S4>;
478 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
483 divclk4_pin_a: divclk4-state {
486 function = PMIC_GPIO_FUNC_FUNC2;
487 power-source = <PM8994_GPIO_S4>;
495 compatible = "qcom,pm8941-pwrkey";
496 interrupts = <0 8 0 IRQ_TYPE_EDGE_BOTH>;
498 linux,code = <KEY_POWER>;
502 compatible = "qcom,pm8941-resin";
503 interrupts = <0 8 1 IRQ_TYPE_EDGE_BOTH>;
505 linux,code = <KEY_VOLUMEDOWN>;
510 pinctrl-0 = <&hd3ss460_pol &hd3ss460_amsel &hd3ss460_en>;
511 pinctrl-names = "default";
514 * This device uses a TI HD3SS460 Type-C MUX
515 * As this device has no driver currently,
516 * the configuration for USB Face Up is set-up here.
518 * TODO: remove once a driver is available
519 * TODO: add VBUS GPIO 5
521 hd3ss460_pol: pol-low-state {
523 function = PMIC_GPIO_FUNC_NORMAL;
524 qcom,drive-strength = <3>;
528 hd3ss460_amsel: amsel-high-state {
530 function = PMIC_GPIO_FUNC_NORMAL;
531 qcom,drive-strength = <1>;
535 hd3ss460_en: en-high-state {
537 function = PMIC_GPIO_FUNC_NORMAL;
538 qcom,drive-strength = <1>;
543 &pmi8994_spmi_regulators {
545 regulator-min-microvolt = <980000>;
546 regulator-max-microvolt = <980000>;
551 /* These values were taken from the original firmware ACPI tables */
552 pm8994_regulators: regulators-0 {
553 compatible = "qcom,rpm-pm8994-regulators";
555 vdd_s1-supply = <&vph_pwr>;
556 vdd_s2-supply = <&vph_pwr>;
557 vdd_s3-supply = <&vph_pwr>;
558 vdd_s4-supply = <&vph_pwr>;
559 vdd_s5-supply = <&vph_pwr>;
560 vdd_s6-supply = <&vph_pwr>;
561 vdd_s7-supply = <&vph_pwr>;
562 vdd_s8-supply = <&vph_pwr>;
563 vdd_s9-supply = <&vph_pwr>;
564 vdd_s10-supply = <&vph_pwr>;
565 vdd_s11-supply = <&vph_pwr>;
566 vdd_s12-supply = <&vph_pwr>;
567 vdd_l1-supply = <&vreg_s1b_1p0>;
568 vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
569 vdd_l3_l11-supply = <&vreg_s3a_1p3>;
570 vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
571 vdd_l5_l7-supply = <&vreg_s5a_2p15>;
572 vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
573 vdd_l8_l16_l30-supply = <&vph_pwr>;
574 vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>;
575 vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>;
576 vdd_l14_l15-supply = <&vreg_s5a_2p15>;
577 vdd_l17_l29-supply = <&vph_pwr_bbyp>;
578 vdd_l20_l21-supply = <&vph_pwr_bbyp>;
579 vdd_l25-supply = <&vreg_s5a_2p15>;
580 vdd_lvs1_2-supply = <&vreg_s4a_1p8>;
582 /* S1, S2, S6 and S12 are managed by RPMPD */
585 regulator-min-microvolt = <1300000>;
586 regulator-max-microvolt = <1300000>;
587 regulator-allow-set-load;
588 regulator-system-load = <300000>;
592 regulator-min-microvolt = <1800000>;
593 regulator-max-microvolt = <1800000>;
594 regulator-allow-set-load;
596 regulator-system-load = <325000>;
600 regulator-min-microvolt = <2150000>;
601 regulator-max-microvolt = <2150000>;
602 regulator-allow-set-load;
603 regulator-system-load = <325000>;
607 regulator-min-microvolt = <1000000>;
608 regulator-max-microvolt = <1000000>;
612 * S8 - SPMI-managed VDD_APC0
613 * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
617 regulator-min-microvolt = <1000000>;
618 regulator-max-microvolt = <1000000>;
622 regulator-min-microvolt = <1250000>;
623 regulator-max-microvolt = <1250000>;
624 regulator-allow-set-load;
625 regulator-system-load = <4160>;
629 regulator-min-microvolt = <1200000>;
630 regulator-max-microvolt = <1200000>;
632 regulator-allow-set-load;
633 regulator-system-load = <80000>;
637 regulator-min-microvolt = <1225000>;
638 regulator-max-microvolt = <1225000>;
641 /* L5 is inaccessible from RPM */
644 regulator-min-microvolt = <1800000>;
645 regulator-max-microvolt = <1800000>;
646 regulator-allow-set-load;
647 regulator-system-load = <1000>;
650 /* L7 is inaccessible from RPM */
653 regulator-min-microvolt = <1800000>;
654 regulator-max-microvolt = <1800000>;
658 regulator-min-microvolt = <1800000>;
659 regulator-max-microvolt = <1800000>;
663 regulator-min-microvolt = <1800000>;
664 regulator-max-microvolt = <1800000>;
668 regulator-min-microvolt = <1200000>;
669 regulator-max-microvolt = <1200000>;
671 regulator-allow-set-load;
672 regulator-system-load = <35000>;
676 regulator-min-microvolt = <1800000>;
677 regulator-max-microvolt = <1800000>;
679 regulator-allow-set-load;
680 regulator-system-load = <50000>;
683 vreg_l13a_2p95: l13 {
684 regulator-min-microvolt = <1850000>;
685 regulator-max-microvolt = <2950000>;
687 regulator-allow-set-load;
688 regulator-system-load = <22000>;
692 regulator-min-microvolt = <1800000>;
693 regulator-max-microvolt = <1800000>;
695 regulator-allow-set-load;
696 regulator-system-load = <52000>;
700 regulator-min-microvolt = <1800000>;
701 regulator-max-microvolt = <1800000>;
705 regulator-min-microvolt = <2700000>;
706 regulator-max-microvolt = <2700000>;
710 regulator-min-microvolt = <2800000>;
711 regulator-max-microvolt = <2800000>;
713 regulator-allow-set-load;
714 regulator-system-load = <300000>;
717 vreg_l18a_2p85: l18 {
718 regulator-min-microvolt = <2850000>;
719 regulator-max-microvolt = <2850000>;
721 regulator-allow-set-load;
722 regulator-system-load = <600000>;
726 regulator-min-microvolt = <3300000>;
727 regulator-max-microvolt = <3300000>;
729 regulator-allow-set-load;
730 regulator-system-load = <500000>;
733 vreg_l20a_2p95: l20 {
734 regulator-min-microvolt = <2950000>;
735 regulator-max-microvolt = <2950000>;
738 regulator-allow-set-load;
739 regulator-system-load = <570000>;
742 vreg_l21a_2p95: l21 {
743 regulator-min-microvolt = <2950000>;
744 regulator-max-microvolt = <2950000>;
746 regulator-allow-set-load;
747 regulator-system-load = <800000>;
751 regulator-min-microvolt = <3000000>;
752 regulator-max-microvolt = <3000000>;
754 regulator-allow-set-load;
755 regulator-system-load = <150000>;
759 regulator-min-microvolt = <2850000>;
760 regulator-max-microvolt = <2850000>;
762 regulator-allow-set-load;
763 regulator-system-load = <80000>;
766 vreg_l24a_3p075: l24 {
767 regulator-min-microvolt = <3075000>;
768 regulator-max-microvolt = <3150000>;
769 regulator-allow-set-load;
770 regulator-system-load = <5800>;
774 regulator-min-microvolt = <1150000>;
775 regulator-max-microvolt = <1150000>;
777 regulator-allow-set-load;
778 regulator-system-load = <80000>;
782 regulator-min-microvolt = <1000000>;
783 regulator-max-microvolt = <1000000>;
786 vreg_l27a_1p05: l27 {
787 regulator-min-microvolt = <1000000>;
788 regulator-max-microvolt = <1000000>;
790 regulator-allow-set-load;
791 regulator-system-load = <500000>;
795 regulator-min-microvolt = <1000000>;
796 regulator-max-microvolt = <1000000>;
798 regulator-allow-set-load;
799 regulator-system-load = <26000>;
803 regulator-min-microvolt = <2850000>;
804 regulator-max-microvolt = <2850000>;
806 regulator-allow-set-load;
807 regulator-system-load = <80000>;
811 regulator-min-microvolt = <1800000>;
812 regulator-max-microvolt = <1800000>;
814 regulator-allow-set-load;
815 regulator-system-load = <2500>;
819 regulator-min-microvolt = <1200000>;
820 regulator-max-microvolt = <1200000>;
822 regulator-allow-set-load;
823 regulator-system-load = <600000>;
827 regulator-min-microvolt = <1800000>;
828 regulator-max-microvolt = <1800000>;
831 vreg_lvs1a_1p8: lvs1 { };
833 vreg_lvs2a_1p8: lvs2 { };
836 pmi8994_regulators: regulators-1 {
837 compatible = "qcom,rpm-pmi8994-regulators";
839 vdd_s1-supply = <&vph_pwr>;
840 vdd_bst_byp-supply = <&vph_pwr>;
843 regulator-min-microvolt = <1025000>;
844 regulator-max-microvolt = <1025000>;
847 /* S2 & S3 - VDD_GFX */
849 vph_pwr_bbyp: boost-bypass {
850 regulator-min-microvolt = <3300000>;
851 regulator-max-microvolt = <3300000>;
860 * This device is shipped with HS400 capabable eMMCs
861 * However various brands have been used in various product batches,
862 * including a Samsung eMMC (BGND3R) which features a quirk with HS400.
863 * Set the speed to HS200 as a safety measure.
871 pinctrl-names = "default", "sleep";
872 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
873 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
875 vmmc-supply = <&vreg_l21a_2p95>;
876 vqmmc-supply = <&vreg_l13a_2p95>;
878 cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
882 grip_default: grip-default-state {
885 drive-strength = <6>;
889 grip_sleep: grip-sleep-state {
892 drive-strength = <2>;
896 hall_front_default: hall-front-default-state {
899 drive-strength = <2>;
903 hall_back_default: hall-back-default-state {
906 drive-strength = <2>;