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