1// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) 2016, The Linux Foundation. All rights reserved. */
3
4/dts-v1/;
5
6#include "msm8998.dtsi"
7#include "pm8005.dtsi"
8#include "pm8998.dtsi"
9#include "pmi8998.dtsi"
10
11/ {
12	model = "Qualcomm Technologies, Inc. MSM8998 v1 MTP";
13	compatible = "qcom,msm8998-mtp", "qcom,msm8998";
14
15	qcom,board-id = <8 0>;
16
17	aliases {
18		serial0 = &blsp2_uart1;
19		serial1 = &blsp1_uart3;
20	};
21
22	chosen {
23		stdout-path = "serial0:115200n8";
24	};
25
26	vph_pwr: vph-pwr-regulator {
27		compatible = "regulator-fixed";
28		regulator-name = "vph_pwr";
29		regulator-always-on;
30		regulator-boot-on;
31	};
32};
33
34&blsp1_uart3 {
35	status = "okay";
36
37	bluetooth {
38		compatible = "qcom,wcn3990-bt";
39
40		vddio-supply = <&vreg_s4a_1p8>;
41		vddxo-supply = <&vreg_l7a_1p8>;
42		vddrf-supply = <&vreg_l17a_1p3>;
43		vddch0-supply = <&vreg_l25a_3p3>;
44		max-speed = <3200000>;
45	};
46};
47
48&blsp1_uart3_on {
49	rx-pins {
50		/delete-property/ bias-disable;
51		/*
52		 * Configure a pull-up on 45 (RX). This is needed to
53		 * avoid garbage data when the TX pin of the Bluetooth
54		 * module is in tri-state (module powered off or not
55		 * driving the signal yet).
56		 */
57		bias-pull-up;
58	};
59
60	cts-pins {
61		/delete-property/ bias-disable;
62		/*
63		 * Configure a pull-down on 47 (CTS) to match the pull
64		 * of the Bluetooth module.
65		 */
66		bias-pull-down;
67	};
68};
69
70&blsp2_uart1 {
71	status = "okay";
72};
73
74&etf {
75	status = "okay";
76};
77
78&etm1 {
79	status = "okay";
80};
81
82&etm2 {
83	status = "okay";
84};
85
86&etm3 {
87	status = "okay";
88};
89
90&etm4 {
91	status = "okay";
92};
93
94&etm5 {
95	status = "okay";
96};
97
98&etm6 {
99	status = "okay";
100};
101
102&etm7 {
103	status = "okay";
104};
105
106&etm8 {
107	status = "okay";
108};
109
110&etr {
111	status = "okay";
112};
113
114&funnel1 {
115	status = "okay";
116};
117
118&funnel2 {
119	status = "okay";
120};
121
122&funnel3 {
123	status = "okay";
124};
125
126&funnel4 {
127	/* FIXME: Figure out why clock late_initcall crashes the board with this enabled. */
128};
129
130&funnel5 {
131	/* FIXME: Figure out why clock late_initcall crashes the board with this enabled. */
132};
133
134&pcie0 {
135	status = "okay";
136};
137
138&pcie_phy {
139	status = "okay";
140};
141
142&pm8005_regulators {
143	vdd_s1-supply = <&vph_pwr>;
144
145	pm8005_s1: s1 { /* VDD_GFX supply */
146		regulator-min-microvolt = <524000>;
147		regulator-max-microvolt = <1100000>;
148		regulator-enable-ramp-delay = <500>;
149
150		/* Hack until we rig up the gpu consumer */
151		regulator-always-on;
152	};
153};
154
155&qusb2phy {
156	status = "okay";
157
158	vdda-pll-supply = <&vreg_l12a_1p8>;
159	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
160};
161
162&replicator1 {
163	status = "okay";
164};
165
166&rpm_requests {
167	regulators-0 {
168		compatible = "qcom,rpm-pm8998-regulators";
169
170		vdd_s1-supply = <&vph_pwr>;
171		vdd_s2-supply = <&vph_pwr>;
172		vdd_s3-supply = <&vph_pwr>;
173		vdd_s4-supply = <&vph_pwr>;
174		vdd_s5-supply = <&vph_pwr>;
175		vdd_s6-supply = <&vph_pwr>;
176		vdd_s7-supply = <&vph_pwr>;
177		vdd_s8-supply = <&vph_pwr>;
178		vdd_s9-supply = <&vph_pwr>;
179		vdd_s10-supply = <&vph_pwr>;
180		vdd_s11-supply = <&vph_pwr>;
181		vdd_s12-supply = <&vph_pwr>;
182		vdd_s13-supply = <&vph_pwr>;
183		vdd_l1_l27-supply = <&vreg_s7a_1p025>;
184		vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
185		vdd_l3_l11-supply = <&vreg_s7a_1p025>;
186		vdd_l4_l5-supply = <&vreg_s7a_1p025>;
187		vdd_l6-supply = <&vreg_s5a_2p04>;
188		vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
189		vdd_l9-supply = <&vreg_bob>;
190		vdd_l10_l23_l25-supply = <&vreg_bob>;
191		vdd_l13_l19_l21-supply = <&vreg_bob>;
192		vdd_l16_l28-supply = <&vreg_bob>;
193		vdd_l18_l22-supply = <&vreg_bob>;
194		vdd_l20_l24-supply = <&vreg_bob>;
195		vdd_l26-supply = <&vreg_s3a_1p35>;
196		vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
197
198		vreg_s3a_1p35: s3 {
199			regulator-min-microvolt = <1352000>;
200			regulator-max-microvolt = <1352000>;
201		};
202
203		vreg_s4a_1p8: s4 {
204			regulator-min-microvolt = <1800000>;
205			regulator-max-microvolt = <1800000>;
206			regulator-allow-set-load;
207		};
208
209		vreg_s5a_2p04: s5 {
210			regulator-min-microvolt = <1904000>;
211			regulator-max-microvolt = <2040000>;
212		};
213
214		vreg_s7a_1p025: s7 {
215			regulator-min-microvolt = <900000>;
216			regulator-max-microvolt = <1028000>;
217		};
218
219		vreg_l1a_0p875: l1 {
220			regulator-min-microvolt = <880000>;
221			regulator-max-microvolt = <880000>;
222		};
223
224		vreg_l2a_1p2: l2 {
225			regulator-min-microvolt = <1200000>;
226			regulator-max-microvolt = <1200000>;
227		};
228
229		vreg_l3a_1p0: l3 {
230			regulator-min-microvolt = <1000000>;
231			regulator-max-microvolt = <1000000>;
232		};
233
234		vreg_l5a_0p8: l5 {
235			regulator-min-microvolt = <800000>;
236			regulator-max-microvolt = <800000>;
237		};
238
239		vreg_l6a_1p8: l6 {
240			regulator-min-microvolt = <1808000>;
241			regulator-max-microvolt = <1808000>;
242		};
243
244		vreg_l7a_1p8: l7 {
245			regulator-min-microvolt = <1800000>;
246			regulator-max-microvolt = <1800000>;
247		};
248
249		vreg_l8a_1p2: l8 {
250			regulator-min-microvolt = <1200000>;
251			regulator-max-microvolt = <1200000>;
252		};
253
254		vreg_l9a_1p8: l9 {
255			regulator-min-microvolt = <1808000>;
256			regulator-max-microvolt = <2960000>;
257		};
258
259		vreg_l10a_1p8: l10 {
260			regulator-min-microvolt = <1808000>;
261			regulator-max-microvolt = <2960000>;
262		};
263
264		vreg_l11a_1p0: l11 {
265			regulator-min-microvolt = <1000000>;
266			regulator-max-microvolt = <1000000>;
267		};
268
269		vreg_l12a_1p8: l12 {
270			regulator-min-microvolt = <1800000>;
271			regulator-max-microvolt = <1800000>;
272		};
273
274		vreg_l13a_2p95: l13 {
275			regulator-min-microvolt = <1808000>;
276			regulator-max-microvolt = <2960000>;
277		};
278
279		vreg_l14a_1p88: l14 {
280			regulator-min-microvolt = <1880000>;
281			regulator-max-microvolt = <1880000>;
282		};
283
284		vreg_l15a_1p8: l15 {
285			regulator-min-microvolt = <1800000>;
286			regulator-max-microvolt = <1800000>;
287		};
288
289		vreg_l16a_2p7: l16 {
290			regulator-min-microvolt = <2704000>;
291			regulator-max-microvolt = <2704000>;
292		};
293
294		vreg_l17a_1p3: l17 {
295			regulator-min-microvolt = <1304000>;
296			regulator-max-microvolt = <1304000>;
297		};
298
299		vreg_l18a_2p7: l18 {
300			regulator-min-microvolt = <2704000>;
301			regulator-max-microvolt = <2704000>;
302		};
303
304		vreg_l19a_3p0: l19 {
305			regulator-min-microvolt = <3008000>;
306			regulator-max-microvolt = <3008000>;
307		};
308
309		vreg_l20a_2p95: l20 {
310			regulator-min-microvolt = <2960000>;
311			regulator-max-microvolt = <2960000>;
312			regulator-allow-set-load;
313		};
314
315		vreg_l21a_2p95: l21 {
316			regulator-min-microvolt = <2960000>;
317			regulator-max-microvolt = <2960000>;
318			regulator-system-load = <800000>;
319			regulator-allow-set-load;
320		};
321
322		vreg_l22a_2p85: l22 {
323			regulator-min-microvolt = <2864000>;
324			regulator-max-microvolt = <2864000>;
325		};
326
327		vreg_l23a_3p3: l23 {
328			regulator-min-microvolt = <3312000>;
329			regulator-max-microvolt = <3312000>;
330		};
331
332		vreg_l24a_3p075: l24 {
333			regulator-min-microvolt = <3088000>;
334			regulator-max-microvolt = <3088000>;
335		};
336
337		vreg_l25a_3p3: l25 {
338			regulator-min-microvolt = <3104000>;
339			regulator-max-microvolt = <3312000>;
340		};
341
342		vreg_l26a_1p2: l26 {
343			regulator-min-microvolt = <1200000>;
344			regulator-max-microvolt = <1200000>;
345			regulator-allow-set-load;
346		};
347
348		vreg_l28_3p0: l28 {
349			regulator-min-microvolt = <3008000>;
350			regulator-max-microvolt = <3008000>;
351		};
352
353		vreg_lvs1a_1p8: lvs1 {
354			regulator-min-microvolt = <1800000>;
355			regulator-max-microvolt = <1800000>;
356		};
357
358		vreg_lvs2a_1p8: lvs2 {
359			regulator-min-microvolt = <1800000>;
360			regulator-max-microvolt = <1800000>;
361		};
362
363	};
364
365	regulators-1 {
366		compatible = "qcom,rpm-pmi8998-regulators";
367
368		vdd_bob-supply = <&vph_pwr>;
369
370		vreg_bob: bob {
371			regulator-min-microvolt = <3312000>;
372			regulator-max-microvolt = <3600000>;
373		};
374	};
375};
376
377&remoteproc_adsp {
378	status = "okay";
379};
380
381&remoteproc_mss {
382	status = "okay";
383};
384
385&remoteproc_slpi {
386	status = "okay";
387};
388
389&tlmm {
390	gpio-reserved-ranges = <0 4>, <81 4>;
391};
392
393&sdhc2 {
394	status = "okay";
395	cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
396
397	vmmc-supply = <&vreg_l21a_2p95>;
398	vqmmc-supply = <&vreg_l13a_2p95>;
399
400	pinctrl-names = "default", "sleep";
401	pinctrl-0 = <&sdc2_on &sdc2_cd>;
402	pinctrl-1 = <&sdc2_off &sdc2_cd>;
403};
404
405&stm {
406	status = "okay";
407};
408
409&ufshc {
410	status = "okay";
411	vcc-supply = <&vreg_l20a_2p95>;
412	vccq-supply = <&vreg_l26a_1p2>;
413	vccq2-supply = <&vreg_s4a_1p8>;
414	vcc-max-microamp = <750000>;
415	vccq-max-microamp = <560000>;
416	vccq2-max-microamp = <750000>;
417};
418
419&ufsphy {
420	status = "okay";
421	vdda-phy-supply = <&vreg_l1a_0p875>;
422	vdda-pll-supply = <&vreg_l2a_1p2>;
423	vddp-ref-clk-supply = <&vreg_l26a_1p2>;
424};
425
426&usb3 {
427	status = "okay";
428};
429
430&usb3_dwc3 {
431	dr_mode = "host"; /* Force to host until we have Type-C hooked up */
432};
433
434&usb3phy {
435	status = "okay";
436
437	vdda-phy-supply = <&vreg_l1a_0p875>;
438	vdda-pll-supply = <&vreg_l2a_1p2>;
439};
440
441&wifi {
442	status = "okay";
443
444	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
445	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
446	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
447	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
448};
449