xref: /freebsd-14-stable/sys/contrib/device-tree/src/arm/qcom-msm8974-fairphone-fp2.dts (revision e67e85659c0de33e617e5fbf1028c6e8b49eee53)
1#include "qcom-msm8974.dtsi"
2#include "qcom-pm8841.dtsi"
3#include "qcom-pm8941.dtsi"
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
7
8
9/ {
10	model = "Fairphone 2";
11	compatible = "fairphone,fp2", "qcom,msm8974";
12
13	aliases {
14		serial0 = &blsp1_uart2;
15	};
16
17	chosen {
18		stdout-path = "serial0:115200n8";
19	};
20
21	gpio-keys {
22		compatible = "gpio-keys";
23
24		pinctrl-names = "default";
25		pinctrl-0 = <&gpio_keys_pin_a>;
26
27		camera-snapshot {
28			label = "camera_snapshot";
29			gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>;
30			linux,code = <KEY_CAMERA>;
31			wakeup-source;
32			debounce-interval = <15>;
33		};
34
35		volume-down {
36			label = "volume_down";
37			gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
38			linux,code = <KEY_VOLUMEDOWN>;
39			wakeup-source;
40			debounce-interval = <15>;
41		};
42
43		volume-up {
44			label = "volume_up";
45			gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
46			linux,code = <KEY_VOLUMEUP>;
47			wakeup-source;
48			debounce-interval = <15>;
49		};
50	};
51
52	vibrator {
53		compatible = "gpio-vibrator";
54		enable-gpios = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
55		vcc-supply = <&pm8941_l18>;
56	};
57
58	smd {
59		rpm {
60			rpm_requests {
61				pm8841-regulators {
62					s1 {
63						regulator-min-microvolt = <675000>;
64						regulator-max-microvolt = <1050000>;
65					};
66
67					s2 {
68						regulator-min-microvolt = <500000>;
69						regulator-max-microvolt = <1050000>;
70					};
71
72					s3 {
73						regulator-min-microvolt = <1050000>;
74						regulator-max-microvolt = <1050000>;
75					};
76				};
77
78				pm8941-regulators {
79					vdd_l1_l3-supply = <&pm8941_s1>;
80					vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
81					vdd_l4_l11-supply = <&pm8941_s1>;
82					vdd_l5_l7-supply = <&pm8941_s2>;
83					vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
84					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
85					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
86					vdd_l21-supply = <&vreg_boost>;
87
88					s1 {
89						regulator-min-microvolt = <1300000>;
90						regulator-max-microvolt = <1300000>;
91
92						regulator-always-on;
93						regulator-boot-on;
94					};
95
96					s2 {
97						regulator-min-microvolt = <2150000>;
98						regulator-max-microvolt = <2150000>;
99
100						regulator-boot-on;
101					};
102
103					s3 {
104						regulator-min-microvolt = <1800000>;
105						regulator-max-microvolt = <1800000>;
106
107						regulator-always-on;
108						regulator-boot-on;
109					};
110
111					l1 {
112						regulator-min-microvolt = <1225000>;
113						regulator-max-microvolt = <1225000>;
114
115						regulator-always-on;
116						regulator-boot-on;
117					};
118
119					l2 {
120						regulator-min-microvolt = <1200000>;
121						regulator-max-microvolt = <1200000>;
122					};
123
124					l3 {
125						regulator-min-microvolt = <1225000>;
126						regulator-max-microvolt = <1225000>;
127					};
128
129					l4 {
130						regulator-min-microvolt = <1225000>;
131						regulator-max-microvolt = <1225000>;
132					};
133
134					l5 {
135						regulator-min-microvolt = <1800000>;
136						regulator-max-microvolt = <1800000>;
137					};
138
139					l6 {
140						regulator-min-microvolt = <1800000>;
141						regulator-max-microvolt = <1800000>;
142
143						regulator-boot-on;
144					};
145
146					l7 {
147						regulator-min-microvolt = <1800000>;
148						regulator-max-microvolt = <1800000>;
149
150						regulator-boot-on;
151					};
152
153					l8 {
154						regulator-min-microvolt = <1800000>;
155						regulator-max-microvolt = <1800000>;
156					};
157
158					l9 {
159						regulator-min-microvolt = <1800000>;
160						regulator-max-microvolt = <2950000>;
161					};
162
163					l10 {
164						regulator-min-microvolt = <1800000>;
165						regulator-max-microvolt = <2950000>;
166					};
167
168					l11 {
169						regulator-min-microvolt = <1225000>;
170						regulator-max-microvolt = <1350000>;
171					};
172
173					l12 {
174						regulator-min-microvolt = <1800000>;
175						regulator-max-microvolt = <1800000>;
176
177						regulator-always-on;
178						regulator-boot-on;
179					};
180
181					l13 {
182						regulator-min-microvolt = <1800000>;
183						regulator-max-microvolt = <2950000>;
184
185						regulator-boot-on;
186					};
187
188					l14 {
189						regulator-min-microvolt = <1800000>;
190						regulator-max-microvolt = <1800000>;
191					};
192
193					l15 {
194						regulator-min-microvolt = <2050000>;
195						regulator-max-microvolt = <2050000>;
196					};
197
198					l16 {
199						regulator-min-microvolt = <2700000>;
200						regulator-max-microvolt = <2700000>;
201					};
202
203					l17 {
204						regulator-min-microvolt = <2850000>;
205						regulator-max-microvolt = <2850000>;
206					};
207
208					l18 {
209						regulator-min-microvolt = <2850000>;
210						regulator-max-microvolt = <2850000>;
211					};
212
213					l19 {
214						regulator-min-microvolt = <2900000>;
215						regulator-max-microvolt = <3350000>;
216					};
217
218					l20 {
219						regulator-min-microvolt = <2950000>;
220						regulator-max-microvolt = <2950000>;
221
222						regulator-boot-on;
223						regulator-system-load = <200000>;
224						regulator-allow-set-load;
225					};
226
227					l21 {
228						regulator-min-microvolt = <2950000>;
229						regulator-max-microvolt = <2950000>;
230
231						regulator-boot-on;
232					};
233
234					l22 {
235						regulator-min-microvolt = <3000000>;
236						regulator-max-microvolt = <3300000>;
237					};
238
239					l23 {
240						regulator-min-microvolt = <3000000>;
241						regulator-max-microvolt = <3000000>;
242					};
243
244					l24 {
245						regulator-min-microvolt = <3075000>;
246						regulator-max-microvolt = <3075000>;
247
248						regulator-boot-on;
249					};
250				};
251			};
252		};
253	};
254};
255
256&soc {
257	serial@f991e000 {
258		status = "okay";
259	};
260
261	remoteproc@fb21b000 {
262		status = "okay";
263
264		vddmx-supply = <&pm8841_s1>;
265		vddcx-supply = <&pm8841_s2>;
266
267		pinctrl-names = "default";
268		pinctrl-0 = <&wcnss_pin_a>;
269
270		smd-edge {
271			qcom,remote-pid = <4>;
272			label = "pronto";
273
274			wcnss {
275				status = "okay";
276			};
277		};
278	};
279
280	pinctrl@fd510000 {
281		sdhc1_pin_a: sdhc1-pin-active {
282			clk {
283				pins = "sdc1_clk";
284				drive-strength = <16>;
285				bias-disable;
286			};
287
288			cmd-data {
289				pins = "sdc1_cmd", "sdc1_data";
290				drive-strength = <10>;
291				bias-pull-up;
292			};
293		};
294
295		sdhc2_pin_a: sdhc2-pin-active {
296			clk {
297				pins = "sdc2_clk";
298				drive-strength = <10>;
299				bias-disable;
300			};
301
302			cmd-data {
303				pins = "sdc2_cmd", "sdc2_data";
304				drive-strength = <6>;
305				bias-pull-up;
306			};
307		};
308
309		wcnss_pin_a: wcnss-pin-active {
310			wlan {
311				pins =  "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
312				function = "wlan";
313
314				drive-strength = <6>;
315				bias-pull-down;
316			};
317
318			bt {
319				pins = "gpio35", "gpio43", "gpio44";
320				function = "bt";
321
322				drive-strength = <2>;
323				bias-pull-down;
324			};
325
326			fm {
327				pins = "gpio41", "gpio42";
328				function = "fm";
329
330				drive-strength = <2>;
331				bias-pull-down;
332			};
333		};
334	};
335
336	sdhci@f9824900 {
337		status = "okay";
338
339		vmmc-supply = <&pm8941_l20>;
340		vqmmc-supply = <&pm8941_s3>;
341
342		bus-width = <8>;
343		non-removable;
344
345		pinctrl-names = "default";
346		pinctrl-0 = <&sdhc1_pin_a>;
347	};
348
349	sdhci@f98a4900 {
350		status = "okay";
351
352		vmmc-supply = <&pm8941_l21>;
353		vqmmc-supply = <&pm8941_l13>;
354
355		bus-width = <4>;
356
357		pinctrl-names = "default";
358		pinctrl-0 = <&sdhc2_pin_a>;
359	};
360
361	usb@f9a55000 {
362		status = "okay";
363
364		phys = <&usb_hs1_phy>;
365		phy-select = <&tcsr 0xb000 0>;
366		extcon = <&smbb>, <&usb_id>;
367		vbus-supply = <&chg_otg>;
368
369		hnp-disable;
370		srp-disable;
371		adp-disable;
372
373		ulpi {
374			phy@a {
375				status = "okay";
376
377				v1p8-supply = <&pm8941_l6>;
378				v3p3-supply = <&pm8941_l24>;
379
380				extcon = <&smbb>;
381				qcom,init-seq = /bits/ 8 <0x1 0x64>;
382			};
383		};
384	};
385
386	imem@fe805000 {
387		status = "okay";
388
389		reboot-mode {
390			mode-normal	= <0x77665501>;
391			mode-bootloader	= <0x77665500>;
392			mode-recovery	= <0x77665502>;
393		};
394	};
395};
396
397&spmi_bus {
398	pm8941@0 {
399		gpios@c000 {
400			gpio_keys_pin_a: gpio-keys-active {
401				pins = "gpio1", "gpio2", "gpio5";
402				function = "normal";
403
404				bias-pull-up;
405				power-source = <PM8941_GPIO_S3>;
406			};
407		};
408	};
409};
410