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 regulator-min-microvolt = <980000>;
547 regulator-max-microvolt = <980000>;
552 /* These values were taken from the original firmware ACPI tables */
553 pm8994_regulators: pm8994-regulators {
554 compatible = "qcom,rpm-pm8994-regulators";
556 vdd_s1-supply = <&vph_pwr>;
557 vdd_s2-supply = <&vph_pwr>;
558 vdd_s3-supply = <&vph_pwr>;
559 vdd_s4-supply = <&vph_pwr>;
560 vdd_s5-supply = <&vph_pwr>;
561 vdd_s6-supply = <&vph_pwr>;
562 vdd_s7-supply = <&vph_pwr>;
563 vdd_s8-supply = <&vph_pwr>;
564 vdd_s9-supply = <&vph_pwr>;
565 vdd_s10-supply = <&vph_pwr>;
566 vdd_s11-supply = <&vph_pwr>;
567 vdd_s12-supply = <&vph_pwr>;
568 vdd_l1-supply = <&vreg_s1b_1p0>;
569 vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
570 vdd_l3_l11-supply = <&vreg_s3a_1p3>;
571 vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
572 vdd_l5_l7-supply = <&vreg_s5a_2p15>;
573 vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
574 vdd_l8_l16_l30-supply = <&vph_pwr>;
575 vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>;
576 vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>;
577 vdd_l14_l15-supply = <&vreg_s5a_2p15>;
578 vdd_l17_l29-supply = <&vph_pwr_bbyp>;
579 vdd_l20_l21-supply = <&vph_pwr_bbyp>;
580 vdd_l25-supply = <&vreg_s5a_2p15>;
581 vdd_lvs1_2-supply = <&vreg_s4a_1p8>;
583 /* S1, S2, S6 and S12 are managed by RPMPD */
586 regulator-min-microvolt = <1300000>;
587 regulator-max-microvolt = <1300000>;
588 regulator-allow-set-load;
589 regulator-system-load = <300000>;
593 regulator-min-microvolt = <1800000>;
594 regulator-max-microvolt = <1800000>;
595 regulator-allow-set-load;
597 regulator-system-load = <325000>;
601 regulator-min-microvolt = <2150000>;
602 regulator-max-microvolt = <2150000>;
603 regulator-allow-set-load;
604 regulator-system-load = <325000>;
608 regulator-min-microvolt = <1000000>;
609 regulator-max-microvolt = <1000000>;
613 * S8 - SPMI-managed VDD_APC0
614 * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
618 regulator-min-microvolt = <1000000>;
619 regulator-max-microvolt = <1000000>;
623 regulator-min-microvolt = <1250000>;
624 regulator-max-microvolt = <1250000>;
625 regulator-allow-set-load;
626 regulator-system-load = <4160>;
630 regulator-min-microvolt = <1200000>;
631 regulator-max-microvolt = <1200000>;
633 regulator-allow-set-load;
634 regulator-system-load = <80000>;
638 regulator-min-microvolt = <1225000>;
639 regulator-max-microvolt = <1225000>;
642 /* L5 is inaccessible from RPM */
645 regulator-min-microvolt = <1800000>;
646 regulator-max-microvolt = <1800000>;
647 regulator-allow-set-load;
648 regulator-system-load = <1000>;
651 /* L7 is inaccessible from RPM */
654 regulator-min-microvolt = <1800000>;
655 regulator-max-microvolt = <1800000>;
659 regulator-min-microvolt = <1800000>;
660 regulator-max-microvolt = <1800000>;
664 regulator-min-microvolt = <1800000>;
665 regulator-max-microvolt = <1800000>;
669 regulator-min-microvolt = <1200000>;
670 regulator-max-microvolt = <1200000>;
672 regulator-allow-set-load;
673 regulator-system-load = <35000>;
677 regulator-min-microvolt = <1800000>;
678 regulator-max-microvolt = <1800000>;
680 regulator-allow-set-load;
681 regulator-system-load = <50000>;
684 vreg_l13a_2p95: l13 {
685 regulator-min-microvolt = <1850000>;
686 regulator-max-microvolt = <2950000>;
688 regulator-allow-set-load;
689 regulator-system-load = <22000>;
693 regulator-min-microvolt = <1800000>;
694 regulator-max-microvolt = <1800000>;
696 regulator-allow-set-load;
697 regulator-system-load = <52000>;
701 regulator-min-microvolt = <1800000>;
702 regulator-max-microvolt = <1800000>;
706 regulator-min-microvolt = <2700000>;
707 regulator-max-microvolt = <2700000>;
711 regulator-min-microvolt = <2800000>;
712 regulator-max-microvolt = <2800000>;
714 regulator-allow-set-load;
715 regulator-system-load = <300000>;
718 vreg_l18a_2p85: l18 {
719 regulator-min-microvolt = <2850000>;
720 regulator-max-microvolt = <2850000>;
722 regulator-allow-set-load;
723 regulator-system-load = <600000>;
727 regulator-min-microvolt = <3300000>;
728 regulator-max-microvolt = <3300000>;
730 regulator-allow-set-load;
731 regulator-system-load = <500000>;
734 vreg_l20a_2p95: l20 {
735 regulator-min-microvolt = <2950000>;
736 regulator-max-microvolt = <2950000>;
739 regulator-allow-set-load;
740 regulator-system-load = <570000>;
743 vreg_l21a_2p95: l21 {
744 regulator-min-microvolt = <2950000>;
745 regulator-max-microvolt = <2950000>;
747 regulator-allow-set-load;
748 regulator-system-load = <800000>;
752 regulator-min-microvolt = <3000000>;
753 regulator-max-microvolt = <3000000>;
755 regulator-allow-set-load;
756 regulator-system-load = <150000>;
760 regulator-min-microvolt = <2850000>;
761 regulator-max-microvolt = <2850000>;
763 regulator-allow-set-load;
764 regulator-system-load = <80000>;
767 vreg_l24a_3p075: l24 {
768 regulator-min-microvolt = <3075000>;
769 regulator-max-microvolt = <3150000>;
770 regulator-allow-set-load;
771 regulator-system-load = <5800>;
775 regulator-min-microvolt = <1150000>;
776 regulator-max-microvolt = <1150000>;
778 regulator-allow-set-load;
779 regulator-system-load = <80000>;
783 regulator-min-microvolt = <1000000>;
784 regulator-max-microvolt = <1000000>;
787 vreg_l27a_1p05: l27 {
788 regulator-min-microvolt = <1000000>;
789 regulator-max-microvolt = <1000000>;
791 regulator-allow-set-load;
792 regulator-system-load = <500000>;
796 regulator-min-microvolt = <1000000>;
797 regulator-max-microvolt = <1000000>;
799 regulator-allow-set-load;
800 regulator-system-load = <26000>;
804 regulator-min-microvolt = <2850000>;
805 regulator-max-microvolt = <2850000>;
807 regulator-allow-set-load;
808 regulator-system-load = <80000>;
812 regulator-min-microvolt = <1800000>;
813 regulator-max-microvolt = <1800000>;
815 regulator-allow-set-load;
816 regulator-system-load = <2500>;
820 regulator-min-microvolt = <1200000>;
821 regulator-max-microvolt = <1200000>;
823 regulator-allow-set-load;
824 regulator-system-load = <600000>;
828 regulator-min-microvolt = <1800000>;
829 regulator-max-microvolt = <1800000>;
832 vreg_lvs1a_1p8: lvs1 { };
834 vreg_lvs2a_1p8: lvs2 { };
837 pmi8994_regulators: pmi8994-regulators {
838 compatible = "qcom,rpm-pmi8994-regulators";
840 vdd_s1-supply = <&vph_pwr>;
841 vdd_bst_byp-supply = <&vph_pwr>;
844 regulator-min-microvolt = <1025000>;
845 regulator-max-microvolt = <1025000>;
848 /* S2 & S3 - VDD_GFX */
850 vph_pwr_bbyp: boost-bypass {
851 regulator-min-microvolt = <3300000>;
852 regulator-max-microvolt = <3300000>;
861 * This device is shipped with HS400 capabable eMMCs
862 * However various brands have been used in various product batches,
863 * including a Samsung eMMC (BGND3R) which features a quirk with HS400.
864 * Set the speed to HS200 as a safety measure.
872 pinctrl-names = "default", "sleep";
873 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
874 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
876 vmmc-supply = <&vreg_l21a_2p95>;
877 vqmmc-supply = <&vreg_l13a_2p95>;
879 cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
883 grip_default: grip-default {
886 drive-strength = <6>;
890 grip_sleep: grip-sleep {
893 drive-strength = <2>;
897 hall_front_default: hall-front-default {
900 drive-strength = <2>;
904 hall_back_default: hall-back-default {
907 drive-strength = <2>;