xref: /linux/scripts/dtc/include-prefixes/arm/qcom/qcom-msm8226-microsoft-common.dtsi (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
124428155SRayyan Ansari// SPDX-License-Identifier: BSD-3-Clause
224428155SRayyan Ansari/*
324428155SRayyan Ansari * Common Board Device Tree for Microsoft MSM8x26-based Lumias
424428155SRayyan Ansari *
524428155SRayyan Ansari * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
624428155SRayyan Ansari * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
724428155SRayyan Ansari * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
824428155SRayyan Ansari * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
924428155SRayyan Ansari */
1024428155SRayyan Ansari
1124428155SRayyan Ansari#include "qcom-msm8226.dtsi"
129f1b26b4SBjorn Andersson#include "pm8226.dtsi"
1324428155SRayyan Ansari#include <dt-bindings/input/input.h>
1424428155SRayyan Ansari
1524428155SRayyan Ansari/*
1624428155SRayyan Ansari * Delete all generic (msm8226.dtsi) reserved
1724428155SRayyan Ansari * memory mappings which are different on these devices.
1824428155SRayyan Ansari */
1924428155SRayyan Ansari/delete-node/ &smem_region;
2024428155SRayyan Ansari
2124428155SRayyan Ansari/ {
2224428155SRayyan Ansari	aliases {
2324428155SRayyan Ansari		mmc0 = &sdhc_1; /* eMMC */
2424428155SRayyan Ansari		mmc1 = &sdhc_2; /* microSD */
2524428155SRayyan Ansari		display0 = &framebuffer;
2624428155SRayyan Ansari	};
2724428155SRayyan Ansari
2824428155SRayyan Ansari	chosen {
2924428155SRayyan Ansari		#address-cells = <1>;
3024428155SRayyan Ansari		#size-cells = <1>;
3124428155SRayyan Ansari		ranges;
3224428155SRayyan Ansari
3324428155SRayyan Ansari		stdout-path = "display0";
3424428155SRayyan Ansari
3524428155SRayyan Ansari		framebuffer: framebuffer@3200000 {
3624428155SRayyan Ansari			compatible = "simple-framebuffer";
3724428155SRayyan Ansari			reg = <0x3200000 0x800000>;
3824428155SRayyan Ansari			format = "a8r8g8b8";
3924428155SRayyan Ansari			width = <720>;
4024428155SRayyan Ansari			height = <1280>;
4124428155SRayyan Ansari			stride = <(720 * 4)>;
4224428155SRayyan Ansari
4324428155SRayyan Ansari			clocks = <&mmcc MDSS_AHB_CLK>,
4424428155SRayyan Ansari				 <&mmcc MDSS_AXI_CLK>,
4524428155SRayyan Ansari				 <&mmcc MDSS_BYTE0_CLK>,
4624428155SRayyan Ansari				 <&mmcc MDSS_MDP_CLK>,
4724428155SRayyan Ansari				 <&mmcc MDSS_PCLK0_CLK>,
4824428155SRayyan Ansari				 <&mmcc MDSS_VSYNC_CLK>;
4924428155SRayyan Ansari			power-domains = <&mmcc MDSS_GDSC>;
5024428155SRayyan Ansari		};
5124428155SRayyan Ansari	};
5224428155SRayyan Ansari
5324428155SRayyan Ansari	gpio_keys: gpio-keys {
5424428155SRayyan Ansari		compatible = "gpio-keys";
5524428155SRayyan Ansari
5624428155SRayyan Ansari		pinctrl-0 = <&gpio_keys_default>;
5724428155SRayyan Ansari		pinctrl-names = "default";
5824428155SRayyan Ansari
5924428155SRayyan Ansari		label = "GPIO Buttons";
6024428155SRayyan Ansari
6124428155SRayyan Ansari		key-volume-up {
6224428155SRayyan Ansari			label = "Volume Up";
6324428155SRayyan Ansari			gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
6424428155SRayyan Ansari			linux,code = <KEY_VOLUMEUP>;
6524428155SRayyan Ansari		};
6624428155SRayyan Ansari	};
6724428155SRayyan Ansari
6824428155SRayyan Ansari	/*
6924428155SRayyan Ansari	 * This device being a WP platform has a different
7024428155SRayyan Ansari	 * memory layout than other Android based devices.
7124428155SRayyan Ansari	 * This smem memory region is directly copied from
7224428155SRayyan Ansari	 * the original UEFI firmware.
7324428155SRayyan Ansari	 */
7424428155SRayyan Ansari	reserved-memory {
7524428155SRayyan Ansari		display_reserved: framebuffer@3200000 {
7624428155SRayyan Ansari			reg = <0x03200000 0x800000>;
7724428155SRayyan Ansari			no-map;
7824428155SRayyan Ansari		};
7924428155SRayyan Ansari
8024428155SRayyan Ansari		smem_region: smem@fa00000 {
8124428155SRayyan Ansari			reg = <0x0fa00000 0x100000>;
8224428155SRayyan Ansari			no-map;
8324428155SRayyan Ansari		};
8424428155SRayyan Ansari	};
8524428155SRayyan Ansari};
8624428155SRayyan Ansari
87*18042ad9SRayyan Ansari&blsp1_i2c2 {
88*18042ad9SRayyan Ansari	status = "okay";
89*18042ad9SRayyan Ansari
90*18042ad9SRayyan Ansari	magnetometer: magnetometer@c {
91*18042ad9SRayyan Ansari		compatible = "asahi-kasei,ak09911";
92*18042ad9SRayyan Ansari		reg = <0x0c>;
93*18042ad9SRayyan Ansari
94*18042ad9SRayyan Ansari		vdd-supply = <&pm8226_l15>;
95*18042ad9SRayyan Ansari		vid-supply = <&pm8226_l6>;
96*18042ad9SRayyan Ansari	};
97*18042ad9SRayyan Ansari
98*18042ad9SRayyan Ansari	accelerometer: accelerometer@1e {
99*18042ad9SRayyan Ansari		compatible = "kionix,kx022-1020";
100*18042ad9SRayyan Ansari		reg = <0x1e>;
101*18042ad9SRayyan Ansari
102*18042ad9SRayyan Ansari		interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_RISING>;
103*18042ad9SRayyan Ansari
104*18042ad9SRayyan Ansari		vdd-supply = <&pm8226_l15>;
105*18042ad9SRayyan Ansari		vddio-supply = <&pm8226_l6>;
106*18042ad9SRayyan Ansari
107*18042ad9SRayyan Ansari		mount-matrix = "1",  "0",  "0",
108*18042ad9SRayyan Ansari			       "0", "-1",  "0",
109*18042ad9SRayyan Ansari			       "0",  "0",  "1";
110*18042ad9SRayyan Ansari	};
111*18042ad9SRayyan Ansari};
112*18042ad9SRayyan Ansari
11324428155SRayyan Ansari&blsp1_i2c5 {
11424428155SRayyan Ansari	status = "okay";
11524428155SRayyan Ansari
11624428155SRayyan Ansari	touchscreen: touchscreen@4b {
11724428155SRayyan Ansari		compatible = "syna,rmi4-i2c";
11824428155SRayyan Ansari		reg = <0x4b>;
11924428155SRayyan Ansari
12024428155SRayyan Ansari		interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
12124428155SRayyan Ansari		vdd-supply = <&pm8226_l15>;
12224428155SRayyan Ansari		vio-supply = <&pm8226_l6>;
12324428155SRayyan Ansari
12424428155SRayyan Ansari		pinctrl-0 = <&touchscreen_default>;
12524428155SRayyan Ansari		pinctrl-names = "default";
12624428155SRayyan Ansari
12724428155SRayyan Ansari		#address-cells = <1>;
12824428155SRayyan Ansari		#size-cells = <0>;
12924428155SRayyan Ansari
13024428155SRayyan Ansari		rmi4-f01@1 {
13124428155SRayyan Ansari			reg = <0x01>;
13224428155SRayyan Ansari			syna,nosleep-mode = <1>;
13324428155SRayyan Ansari		};
13424428155SRayyan Ansari
13524428155SRayyan Ansari		rmi4-f11@11 {
13624428155SRayyan Ansari			reg = <0x11>;
13724428155SRayyan Ansari			syna,sensor-type = <1>;
13824428155SRayyan Ansari		};
13924428155SRayyan Ansari	};
14024428155SRayyan Ansari};
14124428155SRayyan Ansari
14224428155SRayyan Ansari&blsp1_uart3 {
14324428155SRayyan Ansari	status = "okay";
14424428155SRayyan Ansari};
14524428155SRayyan Ansari
14624428155SRayyan Ansari&pm8226_resin {
14724428155SRayyan Ansari	linux,code = <KEY_VOLUMEDOWN>;
14824428155SRayyan Ansari	status = "okay";
14924428155SRayyan Ansari};
15024428155SRayyan Ansari
15124428155SRayyan Ansari&pm8226_vib {
15224428155SRayyan Ansari	status = "okay";
15324428155SRayyan Ansari};
15424428155SRayyan Ansari
15524428155SRayyan Ansari&rpm_requests {
15624428155SRayyan Ansari	regulators {
15724428155SRayyan Ansari		compatible = "qcom,rpm-pm8226-regulators";
15824428155SRayyan Ansari
15924428155SRayyan Ansari		/* These values were taken from the original firmware DSDT */
16024428155SRayyan Ansari		pm8226_s1: s1 {
16124428155SRayyan Ansari			regulator-min-microvolt = <1050000>;
16224428155SRayyan Ansari			regulator-max-microvolt = <1050000>;
16324428155SRayyan Ansari		};
16424428155SRayyan Ansari
16524428155SRayyan Ansari		pm8226_s3: s3 {
16624428155SRayyan Ansari			regulator-min-microvolt = <1300000>;
16724428155SRayyan Ansari			regulator-max-microvolt = <1300000>;
16824428155SRayyan Ansari		};
16924428155SRayyan Ansari
17024428155SRayyan Ansari		pm8226_s4: s4 {
17124428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
17224428155SRayyan Ansari			regulator-max-microvolt = <2100000>;
17324428155SRayyan Ansari		};
17424428155SRayyan Ansari
17524428155SRayyan Ansari		pm8226_s5: s5 {
17624428155SRayyan Ansari			regulator-min-microvolt = <1150000>;
17724428155SRayyan Ansari			regulator-max-microvolt = <1150000>;
17824428155SRayyan Ansari		};
17924428155SRayyan Ansari
18024428155SRayyan Ansari		pm8226_l3: l3 {
18124428155SRayyan Ansari			regulator-min-microvolt = <750000>;
18224428155SRayyan Ansari			regulator-max-microvolt = <1150000>;
18324428155SRayyan Ansari		};
18424428155SRayyan Ansari
18524428155SRayyan Ansari		pm8226_l4: l4 {
18624428155SRayyan Ansari			regulator-min-microvolt = <1200000>;
18724428155SRayyan Ansari			regulator-max-microvolt = <1200000>;
18824428155SRayyan Ansari		};
18924428155SRayyan Ansari
19024428155SRayyan Ansari		pm8226_l5: l5 {
19124428155SRayyan Ansari			regulator-min-microvolt = <1200000>;
19224428155SRayyan Ansari			regulator-max-microvolt = <1200000>;
19324428155SRayyan Ansari		};
19424428155SRayyan Ansari
19524428155SRayyan Ansari		pm8226_l6: l6 {
19624428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
19724428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
19824428155SRayyan Ansari		};
19924428155SRayyan Ansari
20024428155SRayyan Ansari		pm8226_l7: l7 {
20124428155SRayyan Ansari			regulator-min-microvolt = <1850000>;
20224428155SRayyan Ansari			regulator-max-microvolt = <1850000>;
20324428155SRayyan Ansari		};
20424428155SRayyan Ansari
20524428155SRayyan Ansari		pm8226_l8: l8 {
20624428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
20724428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
20824428155SRayyan Ansari			regulator-always-on;
20924428155SRayyan Ansari		};
21024428155SRayyan Ansari
21124428155SRayyan Ansari		pm8226_l9: l9 {
21224428155SRayyan Ansari			regulator-min-microvolt = <2050000>;
21324428155SRayyan Ansari			regulator-max-microvolt = <2050000>;
21424428155SRayyan Ansari		};
21524428155SRayyan Ansari
21624428155SRayyan Ansari		pm8226_l10: l10 {
21724428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
21824428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
21924428155SRayyan Ansari		};
22024428155SRayyan Ansari
22124428155SRayyan Ansari		pm8226_l12: l12 {
22224428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
22324428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
22424428155SRayyan Ansari		};
22524428155SRayyan Ansari
22624428155SRayyan Ansari		pm8226_l14: l14 {
22724428155SRayyan Ansari			regulator-min-microvolt = <2750000>;
22824428155SRayyan Ansari			regulator-max-microvolt = <2750000>;
22924428155SRayyan Ansari		};
23024428155SRayyan Ansari
23124428155SRayyan Ansari		pm8226_l15: l15 {
23224428155SRayyan Ansari			regulator-min-microvolt = <2850000>;
23324428155SRayyan Ansari			regulator-max-microvolt = <2850000>;
23424428155SRayyan Ansari		};
23524428155SRayyan Ansari
23624428155SRayyan Ansari		pm8226_l16: l16 {
23724428155SRayyan Ansari			regulator-min-microvolt = <3000000>;
23824428155SRayyan Ansari			regulator-max-microvolt = <3000000>;
23924428155SRayyan Ansari		};
24024428155SRayyan Ansari
24124428155SRayyan Ansari		pm8226_l17: l17 {
24224428155SRayyan Ansari			regulator-min-microvolt = <2950000>;
24324428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
24424428155SRayyan Ansari			regulator-system-load = <200000>;
24524428155SRayyan Ansari			regulator-allow-set-load;
24624428155SRayyan Ansari		};
24724428155SRayyan Ansari
24824428155SRayyan Ansari		pm8226_l18: l18 {
24924428155SRayyan Ansari			regulator-min-microvolt = <2950000>;
25024428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
25124428155SRayyan Ansari			regulator-system-load = <200000>;
25224428155SRayyan Ansari			regulator-allow-set-load;
25324428155SRayyan Ansari		};
25424428155SRayyan Ansari
25524428155SRayyan Ansari		pm8226_l19: l19 {
25624428155SRayyan Ansari			regulator-min-microvolt = <2850000>;
25724428155SRayyan Ansari			regulator-max-microvolt = <2850000>;
25824428155SRayyan Ansari		};
25924428155SRayyan Ansari
26024428155SRayyan Ansari		pm8226_l20: l20 {
26124428155SRayyan Ansari			regulator-min-microvolt = <3075000>;
26224428155SRayyan Ansari			regulator-max-microvolt = <3075000>;
26324428155SRayyan Ansari		};
26424428155SRayyan Ansari
26524428155SRayyan Ansari		pm8226_l21: l21 {
26624428155SRayyan Ansari			regulator-min-microvolt = <1850000>;
26724428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
26824428155SRayyan Ansari		};
26924428155SRayyan Ansari
27024428155SRayyan Ansari		pm8226_l22: l22 {
27124428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
27224428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
27324428155SRayyan Ansari		};
27424428155SRayyan Ansari
27524428155SRayyan Ansari		pm8226_l23: l23 {
27624428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
27724428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
27824428155SRayyan Ansari		};
27924428155SRayyan Ansari
28024428155SRayyan Ansari		pm8226_l24: l24 {
28124428155SRayyan Ansari			regulator-min-microvolt = <1300000>;
28224428155SRayyan Ansari			regulator-max-microvolt = <1300000>;
28324428155SRayyan Ansari		};
28424428155SRayyan Ansari
28524428155SRayyan Ansari		pm8226_l25: l25 {
28624428155SRayyan Ansari			regulator-min-microvolt = <1775000>;
28724428155SRayyan Ansari			regulator-max-microvolt = <2075000>;
28824428155SRayyan Ansari		};
28924428155SRayyan Ansari
29024428155SRayyan Ansari		pm8226_l27: l27 {
29124428155SRayyan Ansari			regulator-min-microvolt = <2050000>;
29224428155SRayyan Ansari			regulator-max-microvolt = <2050000>;
29324428155SRayyan Ansari		};
29424428155SRayyan Ansari
29524428155SRayyan Ansari		pm8226_l28: l28 {
29624428155SRayyan Ansari			regulator-min-microvolt = <2000000>;
29724428155SRayyan Ansari			regulator-max-microvolt = <3000000>;
29824428155SRayyan Ansari		};
29924428155SRayyan Ansari	};
30024428155SRayyan Ansari};
30124428155SRayyan Ansari
30224428155SRayyan Ansari&sdhc_1 {
30324428155SRayyan Ansari	vmmc-supply = <&pm8226_l17>;
30424428155SRayyan Ansari	vqmmc-supply = <&pm8226_l6>;
30524428155SRayyan Ansari
30624428155SRayyan Ansari	status = "okay";
30724428155SRayyan Ansari};
30824428155SRayyan Ansari
30924428155SRayyan Ansari&sdhc_2 {
31024428155SRayyan Ansari	vmmc-supply = <&pm8226_l18>;
31124428155SRayyan Ansari	vqmmc-supply = <&pm8226_l21>;
31224428155SRayyan Ansari
31324428155SRayyan Ansari	status = "okay";
31424428155SRayyan Ansari};
31524428155SRayyan Ansari
31681a0a21bSRayyan Ansari&smbb {
31781a0a21bSRayyan Ansari	status = "okay";
31881a0a21bSRayyan Ansari};
31981a0a21bSRayyan Ansari
32024428155SRayyan Ansari&usb {
32124428155SRayyan Ansari	extcon = <&smbb>;
32224428155SRayyan Ansari	dr_mode = "peripheral";
32324428155SRayyan Ansari
32424428155SRayyan Ansari	status = "okay";
32524428155SRayyan Ansari};
32624428155SRayyan Ansari
32724428155SRayyan Ansari&usb_hs_phy {
32824428155SRayyan Ansari	extcon = <&smbb>;
32924428155SRayyan Ansari	v1p8-supply = <&pm8226_l10>;
33024428155SRayyan Ansari	v3p3-supply = <&pm8226_l20>;
33124428155SRayyan Ansari};
33224428155SRayyan Ansari
33324428155SRayyan Ansari&tlmm {
33424428155SRayyan Ansari	gpio_keys_default: gpio-keys-default-state {
33524428155SRayyan Ansari		pins = "gpio106", "gpio107", "gpio108";
33624428155SRayyan Ansari		function = "gpio";
33724428155SRayyan Ansari		drive-strength = <2>;
33824428155SRayyan Ansari		bias-pull-up;
33924428155SRayyan Ansari	};
34024428155SRayyan Ansari
34124428155SRayyan Ansari	touchscreen_default: touchscreen-default-state {
34224428155SRayyan Ansari		irq-pins {
34324428155SRayyan Ansari			pins = "gpio17";
34424428155SRayyan Ansari			function = "gpio";
34524428155SRayyan Ansari			drive-strength = <8>;
34624428155SRayyan Ansari			bias-pull-up;
34724428155SRayyan Ansari		};
34824428155SRayyan Ansari
34924428155SRayyan Ansari		reset-pins {
35024428155SRayyan Ansari			pins = "gpio16";
35124428155SRayyan Ansari			function = "gpio";
35224428155SRayyan Ansari			drive-strength = <8>;
35324428155SRayyan Ansari			bias-disable;
35424428155SRayyan Ansari			output-high;
35524428155SRayyan Ansari		};
35624428155SRayyan Ansari	};
35724428155SRayyan Ansari};
358