xref: /linux/scripts/dtc/include-prefixes/arm/qcom/qcom-msm8226-microsoft-common.dtsi (revision 244281556a11549501eb5093e9ab0ad8a87b7d4f)
1*24428155SRayyan Ansari// SPDX-License-Identifier: BSD-3-Clause
2*24428155SRayyan Ansari/*
3*24428155SRayyan Ansari * Common Board Device Tree for Microsoft MSM8x26-based Lumias
4*24428155SRayyan Ansari *
5*24428155SRayyan Ansari * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
6*24428155SRayyan Ansari * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
7*24428155SRayyan Ansari * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
8*24428155SRayyan Ansari * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
9*24428155SRayyan Ansari */
10*24428155SRayyan Ansari
11*24428155SRayyan Ansari#include "qcom-msm8226.dtsi"
12*24428155SRayyan Ansari#include "qcom-pm8226.dtsi"
13*24428155SRayyan Ansari#include <dt-bindings/input/input.h>
14*24428155SRayyan Ansari
15*24428155SRayyan Ansari/*
16*24428155SRayyan Ansari * Delete all generic (msm8226.dtsi) reserved
17*24428155SRayyan Ansari * memory mappings which are different on these devices.
18*24428155SRayyan Ansari */
19*24428155SRayyan Ansari/delete-node/ &smem_region;
20*24428155SRayyan Ansari
21*24428155SRayyan Ansari/ {
22*24428155SRayyan Ansari	aliases {
23*24428155SRayyan Ansari		mmc0 = &sdhc_1; /* eMMC */
24*24428155SRayyan Ansari		mmc1 = &sdhc_2; /* microSD */
25*24428155SRayyan Ansari		display0 = &framebuffer;
26*24428155SRayyan Ansari	};
27*24428155SRayyan Ansari
28*24428155SRayyan Ansari	chosen {
29*24428155SRayyan Ansari		#address-cells = <1>;
30*24428155SRayyan Ansari		#size-cells = <1>;
31*24428155SRayyan Ansari		ranges;
32*24428155SRayyan Ansari
33*24428155SRayyan Ansari		stdout-path = "display0";
34*24428155SRayyan Ansari
35*24428155SRayyan Ansari		framebuffer: framebuffer@3200000 {
36*24428155SRayyan Ansari			compatible = "simple-framebuffer";
37*24428155SRayyan Ansari			reg = <0x3200000 0x800000>;
38*24428155SRayyan Ansari			format = "a8r8g8b8";
39*24428155SRayyan Ansari			width = <720>;
40*24428155SRayyan Ansari			height = <1280>;
41*24428155SRayyan Ansari			stride = <(720 * 4)>;
42*24428155SRayyan Ansari
43*24428155SRayyan Ansari			clocks = <&mmcc MDSS_AHB_CLK>,
44*24428155SRayyan Ansari				 <&mmcc MDSS_AXI_CLK>,
45*24428155SRayyan Ansari				 <&mmcc MDSS_BYTE0_CLK>,
46*24428155SRayyan Ansari				 <&mmcc MDSS_MDP_CLK>,
47*24428155SRayyan Ansari				 <&mmcc MDSS_PCLK0_CLK>,
48*24428155SRayyan Ansari				 <&mmcc MDSS_VSYNC_CLK>;
49*24428155SRayyan Ansari			power-domains = <&mmcc MDSS_GDSC>;
50*24428155SRayyan Ansari		};
51*24428155SRayyan Ansari	};
52*24428155SRayyan Ansari
53*24428155SRayyan Ansari	gpio_keys: gpio-keys {
54*24428155SRayyan Ansari		compatible = "gpio-keys";
55*24428155SRayyan Ansari
56*24428155SRayyan Ansari		pinctrl-0 = <&gpio_keys_default>;
57*24428155SRayyan Ansari		pinctrl-names = "default";
58*24428155SRayyan Ansari
59*24428155SRayyan Ansari		label = "GPIO Buttons";
60*24428155SRayyan Ansari
61*24428155SRayyan Ansari		key-volume-up {
62*24428155SRayyan Ansari			label = "Volume Up";
63*24428155SRayyan Ansari			gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
64*24428155SRayyan Ansari			linux,code = <KEY_VOLUMEUP>;
65*24428155SRayyan Ansari		};
66*24428155SRayyan Ansari	};
67*24428155SRayyan Ansari
68*24428155SRayyan Ansari	/*
69*24428155SRayyan Ansari	 * This device being a WP platform has a different
70*24428155SRayyan Ansari	 * memory layout than other Android based devices.
71*24428155SRayyan Ansari	 * This smem memory region is directly copied from
72*24428155SRayyan Ansari	 * the original UEFI firmware.
73*24428155SRayyan Ansari	 */
74*24428155SRayyan Ansari	reserved-memory {
75*24428155SRayyan Ansari		display_reserved: framebuffer@3200000 {
76*24428155SRayyan Ansari			reg = <0x03200000 0x800000>;
77*24428155SRayyan Ansari			no-map;
78*24428155SRayyan Ansari		};
79*24428155SRayyan Ansari
80*24428155SRayyan Ansari		smem_region: smem@fa00000 {
81*24428155SRayyan Ansari			reg = <0x0fa00000 0x100000>;
82*24428155SRayyan Ansari			no-map;
83*24428155SRayyan Ansari		};
84*24428155SRayyan Ansari	};
85*24428155SRayyan Ansari};
86*24428155SRayyan Ansari
87*24428155SRayyan Ansari&blsp1_i2c5 {
88*24428155SRayyan Ansari	status = "okay";
89*24428155SRayyan Ansari
90*24428155SRayyan Ansari	touchscreen: touchscreen@4b {
91*24428155SRayyan Ansari		compatible = "syna,rmi4-i2c";
92*24428155SRayyan Ansari		reg = <0x4b>;
93*24428155SRayyan Ansari
94*24428155SRayyan Ansari		interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
95*24428155SRayyan Ansari		vdd-supply = <&pm8226_l15>;
96*24428155SRayyan Ansari		vio-supply = <&pm8226_l6>;
97*24428155SRayyan Ansari
98*24428155SRayyan Ansari		pinctrl-0 = <&touchscreen_default>;
99*24428155SRayyan Ansari		pinctrl-names = "default";
100*24428155SRayyan Ansari
101*24428155SRayyan Ansari		#address-cells = <1>;
102*24428155SRayyan Ansari		#size-cells = <0>;
103*24428155SRayyan Ansari
104*24428155SRayyan Ansari		rmi4-f01@1 {
105*24428155SRayyan Ansari			reg = <0x01>;
106*24428155SRayyan Ansari			syna,nosleep-mode = <1>;
107*24428155SRayyan Ansari		};
108*24428155SRayyan Ansari
109*24428155SRayyan Ansari		rmi4-f11@11 {
110*24428155SRayyan Ansari			reg = <0x11>;
111*24428155SRayyan Ansari			syna,sensor-type = <1>;
112*24428155SRayyan Ansari		};
113*24428155SRayyan Ansari	};
114*24428155SRayyan Ansari};
115*24428155SRayyan Ansari
116*24428155SRayyan Ansari&blsp1_uart3 {
117*24428155SRayyan Ansari	status = "okay";
118*24428155SRayyan Ansari};
119*24428155SRayyan Ansari
120*24428155SRayyan Ansari&pm8226_resin {
121*24428155SRayyan Ansari	linux,code = <KEY_VOLUMEDOWN>;
122*24428155SRayyan Ansari	status = "okay";
123*24428155SRayyan Ansari};
124*24428155SRayyan Ansari
125*24428155SRayyan Ansari&pm8226_vib {
126*24428155SRayyan Ansari	status = "okay";
127*24428155SRayyan Ansari};
128*24428155SRayyan Ansari
129*24428155SRayyan Ansari&rpm_requests {
130*24428155SRayyan Ansari	regulators {
131*24428155SRayyan Ansari		compatible = "qcom,rpm-pm8226-regulators";
132*24428155SRayyan Ansari
133*24428155SRayyan Ansari		/* These values were taken from the original firmware DSDT */
134*24428155SRayyan Ansari		pm8226_s1: s1 {
135*24428155SRayyan Ansari			regulator-min-microvolt = <1050000>;
136*24428155SRayyan Ansari			regulator-max-microvolt = <1050000>;
137*24428155SRayyan Ansari		};
138*24428155SRayyan Ansari
139*24428155SRayyan Ansari		pm8226_s3: s3 {
140*24428155SRayyan Ansari			regulator-min-microvolt = <1300000>;
141*24428155SRayyan Ansari			regulator-max-microvolt = <1300000>;
142*24428155SRayyan Ansari		};
143*24428155SRayyan Ansari
144*24428155SRayyan Ansari		pm8226_s4: s4 {
145*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
146*24428155SRayyan Ansari			regulator-max-microvolt = <2100000>;
147*24428155SRayyan Ansari		};
148*24428155SRayyan Ansari
149*24428155SRayyan Ansari		pm8226_s5: s5 {
150*24428155SRayyan Ansari			regulator-min-microvolt = <1150000>;
151*24428155SRayyan Ansari			regulator-max-microvolt = <1150000>;
152*24428155SRayyan Ansari		};
153*24428155SRayyan Ansari
154*24428155SRayyan Ansari		pm8226_l3: l3 {
155*24428155SRayyan Ansari			regulator-min-microvolt = <750000>;
156*24428155SRayyan Ansari			regulator-max-microvolt = <1150000>;
157*24428155SRayyan Ansari		};
158*24428155SRayyan Ansari
159*24428155SRayyan Ansari		pm8226_l4: l4 {
160*24428155SRayyan Ansari			regulator-min-microvolt = <1200000>;
161*24428155SRayyan Ansari			regulator-max-microvolt = <1200000>;
162*24428155SRayyan Ansari		};
163*24428155SRayyan Ansari
164*24428155SRayyan Ansari		pm8226_l5: l5 {
165*24428155SRayyan Ansari			regulator-min-microvolt = <1200000>;
166*24428155SRayyan Ansari			regulator-max-microvolt = <1200000>;
167*24428155SRayyan Ansari		};
168*24428155SRayyan Ansari
169*24428155SRayyan Ansari		pm8226_l6: l6 {
170*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
171*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
172*24428155SRayyan Ansari		};
173*24428155SRayyan Ansari
174*24428155SRayyan Ansari		pm8226_l7: l7 {
175*24428155SRayyan Ansari			regulator-min-microvolt = <1850000>;
176*24428155SRayyan Ansari			regulator-max-microvolt = <1850000>;
177*24428155SRayyan Ansari		};
178*24428155SRayyan Ansari
179*24428155SRayyan Ansari		pm8226_l8: l8 {
180*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
181*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
182*24428155SRayyan Ansari			regulator-always-on;
183*24428155SRayyan Ansari		};
184*24428155SRayyan Ansari
185*24428155SRayyan Ansari		pm8226_l9: l9 {
186*24428155SRayyan Ansari			regulator-min-microvolt = <2050000>;
187*24428155SRayyan Ansari			regulator-max-microvolt = <2050000>;
188*24428155SRayyan Ansari		};
189*24428155SRayyan Ansari
190*24428155SRayyan Ansari		pm8226_l10: l10 {
191*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
192*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
193*24428155SRayyan Ansari		};
194*24428155SRayyan Ansari
195*24428155SRayyan Ansari		pm8226_l12: l12 {
196*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
197*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
198*24428155SRayyan Ansari		};
199*24428155SRayyan Ansari
200*24428155SRayyan Ansari		pm8226_l14: l14 {
201*24428155SRayyan Ansari			regulator-min-microvolt = <2750000>;
202*24428155SRayyan Ansari			regulator-max-microvolt = <2750000>;
203*24428155SRayyan Ansari		};
204*24428155SRayyan Ansari
205*24428155SRayyan Ansari		pm8226_l15: l15 {
206*24428155SRayyan Ansari			regulator-min-microvolt = <2850000>;
207*24428155SRayyan Ansari			regulator-max-microvolt = <2850000>;
208*24428155SRayyan Ansari		};
209*24428155SRayyan Ansari
210*24428155SRayyan Ansari		pm8226_l16: l16 {
211*24428155SRayyan Ansari			regulator-min-microvolt = <3000000>;
212*24428155SRayyan Ansari			regulator-max-microvolt = <3000000>;
213*24428155SRayyan Ansari		};
214*24428155SRayyan Ansari
215*24428155SRayyan Ansari		pm8226_l17: l17 {
216*24428155SRayyan Ansari			regulator-min-microvolt = <2950000>;
217*24428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
218*24428155SRayyan Ansari			regulator-system-load = <200000>;
219*24428155SRayyan Ansari			regulator-allow-set-load;
220*24428155SRayyan Ansari		};
221*24428155SRayyan Ansari
222*24428155SRayyan Ansari		pm8226_l18: l18 {
223*24428155SRayyan Ansari			regulator-min-microvolt = <2950000>;
224*24428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
225*24428155SRayyan Ansari			regulator-system-load = <200000>;
226*24428155SRayyan Ansari			regulator-allow-set-load;
227*24428155SRayyan Ansari		};
228*24428155SRayyan Ansari
229*24428155SRayyan Ansari		pm8226_l19: l19 {
230*24428155SRayyan Ansari			regulator-min-microvolt = <2850000>;
231*24428155SRayyan Ansari			regulator-max-microvolt = <2850000>;
232*24428155SRayyan Ansari		};
233*24428155SRayyan Ansari
234*24428155SRayyan Ansari		pm8226_l20: l20 {
235*24428155SRayyan Ansari			regulator-min-microvolt = <3075000>;
236*24428155SRayyan Ansari			regulator-max-microvolt = <3075000>;
237*24428155SRayyan Ansari		};
238*24428155SRayyan Ansari
239*24428155SRayyan Ansari		pm8226_l21: l21 {
240*24428155SRayyan Ansari			regulator-min-microvolt = <1850000>;
241*24428155SRayyan Ansari			regulator-max-microvolt = <2950000>;
242*24428155SRayyan Ansari		};
243*24428155SRayyan Ansari
244*24428155SRayyan Ansari		pm8226_l22: l22 {
245*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
246*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
247*24428155SRayyan Ansari		};
248*24428155SRayyan Ansari
249*24428155SRayyan Ansari		pm8226_l23: l23 {
250*24428155SRayyan Ansari			regulator-min-microvolt = <1800000>;
251*24428155SRayyan Ansari			regulator-max-microvolt = <1800000>;
252*24428155SRayyan Ansari		};
253*24428155SRayyan Ansari
254*24428155SRayyan Ansari		pm8226_l24: l24 {
255*24428155SRayyan Ansari			regulator-min-microvolt = <1300000>;
256*24428155SRayyan Ansari			regulator-max-microvolt = <1300000>;
257*24428155SRayyan Ansari		};
258*24428155SRayyan Ansari
259*24428155SRayyan Ansari		pm8226_l25: l25 {
260*24428155SRayyan Ansari			regulator-min-microvolt = <1775000>;
261*24428155SRayyan Ansari			regulator-max-microvolt = <2075000>;
262*24428155SRayyan Ansari		};
263*24428155SRayyan Ansari
264*24428155SRayyan Ansari		pm8226_l27: l27 {
265*24428155SRayyan Ansari			regulator-min-microvolt = <2050000>;
266*24428155SRayyan Ansari			regulator-max-microvolt = <2050000>;
267*24428155SRayyan Ansari		};
268*24428155SRayyan Ansari
269*24428155SRayyan Ansari		pm8226_l28: l28 {
270*24428155SRayyan Ansari			regulator-min-microvolt = <2000000>;
271*24428155SRayyan Ansari			regulator-max-microvolt = <3000000>;
272*24428155SRayyan Ansari		};
273*24428155SRayyan Ansari	};
274*24428155SRayyan Ansari};
275*24428155SRayyan Ansari
276*24428155SRayyan Ansari&sdhc_1 {
277*24428155SRayyan Ansari	vmmc-supply = <&pm8226_l17>;
278*24428155SRayyan Ansari	vqmmc-supply = <&pm8226_l6>;
279*24428155SRayyan Ansari
280*24428155SRayyan Ansari	status = "okay";
281*24428155SRayyan Ansari};
282*24428155SRayyan Ansari
283*24428155SRayyan Ansari&sdhc_2 {
284*24428155SRayyan Ansari	vmmc-supply = <&pm8226_l18>;
285*24428155SRayyan Ansari	vqmmc-supply = <&pm8226_l21>;
286*24428155SRayyan Ansari
287*24428155SRayyan Ansari	status = "okay";
288*24428155SRayyan Ansari};
289*24428155SRayyan Ansari
290*24428155SRayyan Ansari&usb {
291*24428155SRayyan Ansari	extcon = <&smbb>;
292*24428155SRayyan Ansari	dr_mode = "peripheral";
293*24428155SRayyan Ansari
294*24428155SRayyan Ansari	status = "okay";
295*24428155SRayyan Ansari};
296*24428155SRayyan Ansari
297*24428155SRayyan Ansari&usb_hs_phy {
298*24428155SRayyan Ansari	extcon = <&smbb>;
299*24428155SRayyan Ansari	v1p8-supply = <&pm8226_l10>;
300*24428155SRayyan Ansari	v3p3-supply = <&pm8226_l20>;
301*24428155SRayyan Ansari};
302*24428155SRayyan Ansari
303*24428155SRayyan Ansari&tlmm {
304*24428155SRayyan Ansari	gpio_keys_default: gpio-keys-default-state {
305*24428155SRayyan Ansari		pins = "gpio106", "gpio107", "gpio108";
306*24428155SRayyan Ansari		function = "gpio";
307*24428155SRayyan Ansari		drive-strength = <2>;
308*24428155SRayyan Ansari		bias-pull-up;
309*24428155SRayyan Ansari	};
310*24428155SRayyan Ansari
311*24428155SRayyan Ansari	touchscreen_default: touchscreen-default-state {
312*24428155SRayyan Ansari		irq-pins {
313*24428155SRayyan Ansari			pins = "gpio17";
314*24428155SRayyan Ansari			function = "gpio";
315*24428155SRayyan Ansari			drive-strength = <8>;
316*24428155SRayyan Ansari			bias-pull-up;
317*24428155SRayyan Ansari		};
318*24428155SRayyan Ansari
319*24428155SRayyan Ansari		reset-pins {
320*24428155SRayyan Ansari			pins = "gpio16";
321*24428155SRayyan Ansari			function = "gpio";
322*24428155SRayyan Ansari			drive-strength = <8>;
323*24428155SRayyan Ansari			bias-disable;
324*24428155SRayyan Ansari			output-high;
325*24428155SRayyan Ansari		};
326*24428155SRayyan Ansari	};
327*24428155SRayyan Ansari};
328