1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * SC7180 IDP board device tree source
4 *
5 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11#include "sc7180.dtsi"
12#include "pm6150.dtsi"
13#include "pm6150l.dtsi"
14
15/ {
16	model = "Qualcomm Technologies, Inc. SC7180 IDP";
17	compatible = "qcom,sc7180-idp", "qcom,sc7180";
18
19	aliases {
20		hsuart0 = &uart3;
21		serial0 = &uart8;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27};
28
29&apps_rsc {
30	pm6150-rpmh-regulators {
31		compatible = "qcom,pm6150-rpmh-regulators";
32		qcom,pmic-id = "a";
33
34		vreg_s1a_1p1: smps1 {
35			regulator-min-microvolt = <1128000>;
36			regulator-max-microvolt = <1128000>;
37		};
38
39		vreg_s4a_1p0: smps4 {
40			regulator-min-microvolt = <824000>;
41			regulator-max-microvolt = <1120000>;
42		};
43
44		vreg_s5a_2p0: smps5 {
45			regulator-min-microvolt = <1744000>;
46			regulator-max-microvolt = <2040000>;
47		};
48
49		vreg_l1a_1p2: ldo1 {
50			regulator-min-microvolt = <1178000>;
51			regulator-max-microvolt = <1256000>;
52			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
53		};
54
55		vreg_l2a_1p0: ldo2 {
56			regulator-min-microvolt = <944000>;
57			regulator-max-microvolt = <1056000>;
58			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
59		};
60
61		vreg_l3a_1p0: ldo3 {
62			regulator-min-microvolt = <968000>;
63			regulator-max-microvolt = <1064000>;
64			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
65		};
66
67		vreg_l4a_0p8: ldo4 {
68			regulator-min-microvolt = <824000>;
69			regulator-max-microvolt = <928000>;
70			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
71		};
72
73		vreg_l5a_2p7: ldo5 {
74			regulator-min-microvolt = <2496000>;
75			regulator-max-microvolt = <3000000>;
76			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
77		};
78
79		vreg_l6a_0p6: ldo6 {
80			regulator-min-microvolt = <568000>;
81			regulator-max-microvolt = <648000>;
82			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
83		};
84
85		vreg_l9a_0p6: ldo9 {
86			regulator-min-microvolt = <488000>;
87			regulator-max-microvolt = <800000>;
88			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
89		};
90
91		vreg_l10a_1p8: ldo10 {
92			regulator-min-microvolt = <1800000>;
93			regulator-max-microvolt = <1832000>;
94			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
95		};
96
97		vreg_l11a_1p8: ldo11 {
98			regulator-min-microvolt = <1696000>;
99			regulator-max-microvolt = <1904000>;
100			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
101		};
102
103		vreg_l12a_1p8: ldo12 {
104			regulator-min-microvolt = <1696000>;
105			regulator-max-microvolt = <1952000>;
106			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
107		};
108
109		vreg_l13a_1p8: ldo13 {
110			regulator-min-microvolt = <1696000>;
111			regulator-max-microvolt = <1904000>;
112			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
113		};
114
115		vreg_l14a_1p8: ldo14 {
116			regulator-min-microvolt = <1728000>;
117			regulator-max-microvolt = <1832000>;
118			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
119		};
120
121		vreg_l15a_1p8: ldo15 {
122			regulator-min-microvolt = <1696000>;
123			regulator-max-microvolt = <1904000>;
124			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
125		};
126
127		vreg_l16a_2p7: ldo16 {
128			regulator-min-microvolt = <2496000>;
129			regulator-max-microvolt = <3304000>;
130			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
131		};
132
133		vreg_l17a_3p0: ldo17 {
134			regulator-min-microvolt = <2920000>;
135			regulator-max-microvolt = <3232000>;
136			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
137		};
138
139		vreg_l18a_2p8: ldo18 {
140			regulator-min-microvolt = <2496000>;
141			regulator-max-microvolt = <3304000>;
142			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
143		};
144
145		vreg_l19a_2p9: ldo19 {
146			regulator-min-microvolt = <2696000>;
147			regulator-max-microvolt = <3304000>;
148			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
149		};
150	};
151
152	pm6150l-rpmh-regulators {
153		compatible = "qcom,pm6150l-rpmh-regulators";
154		qcom,pmic-id = "c";
155
156		vreg_s8c_1p3: smps8 {
157			regulator-min-microvolt = <1120000>;
158			regulator-max-microvolt = <1408000>;
159		};
160
161		vreg_l1c_1p8: ldo1 {
162			regulator-min-microvolt = <1616000>;
163			regulator-max-microvolt = <1984000>;
164			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
165		};
166
167		vreg_l2c_1p3: ldo2 {
168			regulator-min-microvolt = <1168000>;
169			regulator-max-microvolt = <1304000>;
170			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
171		};
172
173		vreg_l3c_1p2: ldo3 {
174			regulator-min-microvolt = <1144000>;
175			regulator-max-microvolt = <1304000>;
176			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
177		};
178
179		vreg_l4c_1p8: ldo4 {
180			regulator-min-microvolt = <1648000>;
181			regulator-max-microvolt = <3304000>;
182			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
183		};
184
185		vreg_l5c_1p8: ldo5 {
186			regulator-min-microvolt = <1648000>;
187			regulator-max-microvolt = <3304000>;
188			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
189		};
190
191		vreg_l6c_2p9: ldo6 {
192			regulator-min-microvolt = <2696000>;
193			regulator-max-microvolt = <3304000>;
194			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
195		};
196
197		vreg_l7c_3p0: ldo7 {
198			regulator-min-microvolt = <3000000>;
199			regulator-max-microvolt = <3312000>;
200			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
201		};
202
203		vreg_l8c_1p8: ldo8 {
204			regulator-min-microvolt = <1800000>;
205			regulator-max-microvolt = <1904000>;
206			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
207		};
208
209		vreg_l9c_2p9: ldo9 {
210			regulator-min-microvolt = <2952000>;
211			regulator-max-microvolt = <3304000>;
212			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
213		};
214
215		vreg_l10c_3p3: ldo10 {
216			regulator-min-microvolt = <3000000>;
217			regulator-max-microvolt = <3400000>;
218			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
219		};
220
221		vreg_l11c_3p3: ldo11 {
222			regulator-min-microvolt = <3000000>;
223			regulator-max-microvolt = <3400000>;
224			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
225		};
226
227		vreg_bob: bob {
228			regulator-min-microvolt = <3008000>;
229			regulator-max-microvolt = <3960000>;
230			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
231		};
232	};
233};
234
235&qspi {
236	status = "okay";
237	pinctrl-names = "default";
238	pinctrl-0 = <&qspi_clk &qspi_cs0 &qspi_data01>;
239
240	flash@0 {
241		compatible = "jedec,spi-nor";
242		reg = <0>;
243		spi-max-frequency = <25000000>;
244		spi-tx-bus-width = <2>;
245		spi-rx-bus-width = <2>;
246	};
247};
248
249&qupv3_id_0 {
250	status = "okay";
251};
252
253&qupv3_id_1 {
254	status = "okay";
255};
256
257&uart3 {
258	status = "okay";
259};
260
261&uart8 {
262	status = "okay";
263};
264
265&usb_1 {
266	status = "okay";
267};
268
269&usb_1_dwc3 {
270	dr_mode = "host";
271};
272
273&usb_1_hsphy {
274	status = "okay";
275	vdd-supply = <&vreg_l4a_0p8>;
276	vdda-pll-supply = <&vreg_l11a_1p8>;
277	vdda-phy-dpdm-supply = <&vreg_l17a_3p0>;
278	qcom,imp-res-offset-value = <8>;
279	qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
280	qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
281	qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
282};
283
284&usb_1_qmpphy {
285	status = "okay";
286	vdda-phy-supply = <&vreg_l3c_1p2>;
287	vdda-pll-supply = <&vreg_l4a_0p8>;
288};
289
290/* PINCTRL - additions to nodes defined in sc7180.dtsi */
291
292&qspi_clk {
293	pinconf {
294		pins = "gpio63";
295		bias-disable;
296	};
297};
298
299&qspi_cs0 {
300	pinconf {
301		pins = "gpio68";
302		bias-disable;
303	};
304};
305
306&qspi_data01 {
307	pinconf {
308		pins = "gpio64", "gpio65";
309
310		/* High-Z when no transfers; nice to park the lines */
311		bias-pull-up;
312	};
313};
314
315&qup_i2c2_default {
316	pinconf {
317		pins = "gpio15", "gpio16";
318		drive-strength = <2>;
319
320		/* Has external pullup */
321		bias-disable;
322	};
323};
324
325&qup_i2c4_default {
326	pinconf {
327		pins = "gpio115", "gpio116";
328		drive-strength = <2>;
329
330		/* Has external pullup */
331		bias-disable;
332	};
333};
334
335&qup_i2c7_default {
336	pinconf {
337		pins = "gpio6", "gpio7";
338		drive-strength = <2>;
339
340		/* Has external pullup */
341		bias-disable;
342	};
343};
344
345&qup_i2c9_default {
346	pinconf {
347		pins = "gpio46", "gpio47";
348		drive-strength = <2>;
349
350		/* Has external pullup */
351		bias-disable;
352	};
353};
354
355&qup_uart3_default {
356	pinconf-cts {
357		/*
358		 * Configure a pull-down on 38 (CTS) to match the pull of
359		 * the Bluetooth module.
360		 */
361		pins = "gpio38";
362		bias-pull-down;
363		output-high;
364	};
365
366	pinconf-rts {
367		/* We'll drive 39 (RTS), so no pull */
368		pins = "gpio39";
369		drive-strength = <2>;
370		bias-disable;
371	};
372
373	pinconf-tx {
374		/* We'll drive 40 (TX), so no pull */
375		pins = "gpio40";
376		drive-strength = <2>;
377		bias-disable;
378		output-high;
379	};
380
381	pinconf-rx {
382		/*
383		 * Configure a pull-up on 41 (RX). This is needed to avoid
384		 * garbage data when the TX pin of the Bluetooth module is
385		 * in tri-state (module powered off or not driving the
386		 * signal yet).
387		 */
388		pins = "gpio41";
389		bias-pull-up;
390	};
391};
392
393&qup_uart8_default {
394	pinconf-tx {
395		pins = "gpio44";
396		drive-strength = <2>;
397		bias-disable;
398	};
399
400	pinconf-rx {
401		pins = "gpio45";
402		drive-strength = <2>;
403		bias-pull-up;
404	};
405};
406
407&qup_spi0_default {
408	pinconf {
409		pins = "gpio34", "gpio35", "gpio36", "gpio37";
410		drive-strength = <2>;
411		bias-disable;
412	};
413};
414
415&qup_spi6_default {
416	pinconf {
417		pins = "gpio59", "gpio60", "gpio61", "gpio62";
418		drive-strength = <2>;
419		bias-disable;
420	};
421};
422
423&qup_spi10_default {
424	pinconf {
425		pins = "gpio86", "gpio87", "gpio88", "gpio89";
426		drive-strength = <2>;
427		bias-disable;
428	};
429};
430
431