1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
9#include "sm8450.dtsi"
10
11/ {
12	model = "Qualcomm Technologies, Inc. SM8450 QRD";
13	compatible = "qcom,sm8450-qrd", "qcom,sm8450";
14
15	aliases {
16		serial0 = &uart7;
17	};
18
19	chosen {
20		stdout-path = "serial0:115200n8";
21	};
22
23	vph_pwr: vph-pwr-regulator {
24		compatible = "regulator-fixed";
25		regulator-name = "vph_pwr";
26		regulator-min-microvolt = <3700000>;
27		regulator-max-microvolt = <3700000>;
28
29		regulator-always-on;
30		regulator-boot-on;
31	};
32};
33
34&apps_rsc {
35	pm8350-rpmh-regulators {
36		compatible = "qcom,pm8350-rpmh-regulators";
37		qcom,pmic-id = "b";
38
39		vdd-s1-supply = <&vph_pwr>;
40		vdd-s2-supply = <&vph_pwr>;
41		vdd-s3-supply = <&vph_pwr>;
42		vdd-s4-supply = <&vph_pwr>;
43		vdd-s5-supply = <&vph_pwr>;
44		vdd-s6-supply = <&vph_pwr>;
45		vdd-s7-supply = <&vph_pwr>;
46		vdd-s8-supply = <&vph_pwr>;
47		vdd-s9-supply = <&vph_pwr>;
48		vdd-s10-supply = <&vph_pwr>;
49		vdd-s11-supply = <&vph_pwr>;
50		vdd-s12-supply = <&vph_pwr>;
51
52		vdd-l1-l4-supply = <&vreg_s11b_0p95>;
53		vdd-l2-l7-supply = <&vreg_bob>;
54		vdd-l3-l5-supply = <&vreg_bob>;
55		vdd-l6-l9-l10-supply = <&vreg_s12b_1p25>;
56		vdd-l8-supply = <&vreg_s2h_0p95>;
57
58		vreg_s10b_1p8: smps10 {
59			regulator-name = "vreg_s10b_1p8";
60			regulator-min-microvolt = <1800000>;
61			regulator-max-microvolt = <1800000>;
62		};
63
64		vreg_s11b_0p95: smps11 {
65			regulator-name = "vreg_s11b_0p95";
66			regulator-min-microvolt = <848000>;
67			regulator-max-microvolt = <1104000>;
68		};
69
70		vreg_s12b_1p25: smps12 {
71			regulator-name = "vreg_s12b_1p25";
72			regulator-min-microvolt = <1224000>;
73			regulator-max-microvolt = <1400000>;
74		};
75
76		vreg_l1b_0p91: ldo1 {
77			regulator-name = "vreg_l1b_0p91";
78			regulator-min-microvolt = <912000>;
79			regulator-max-microvolt = <920000>;
80			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
81		};
82
83		vreg_l2b_3p07: ldo2 {
84			regulator-name = "vreg_l2b_3p07";
85			regulator-min-microvolt = <3072000>;
86			regulator-max-microvolt = <3072000>;
87			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
88		};
89
90		vreg_l3b_0p9: ldo3 {
91			regulator-name = "vreg_l3b_0p9";
92			regulator-min-microvolt = <904000>;
93			regulator-max-microvolt = <904000>;
94			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
95		};
96
97		vreg_l5b_0p88: ldo5 {
98			regulator-name = "vreg_l5b_0p88";
99			regulator-min-microvolt = <880000>;
100			regulator-max-microvolt = <888000>;
101			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
102		};
103
104		vreg_l6b_1p2: ldo6 {
105			regulator-name = "vreg_l6b_1p2";
106			regulator-min-microvolt = <1200000>;
107			regulator-max-microvolt = <1200000>;
108			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109		};
110
111		vreg_l7b_2p5: ldo7 {
112			regulator-name = "vreg_l7b_2p5";
113			regulator-min-microvolt = <2504000>;
114			regulator-max-microvolt = <2504000>;
115			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
116		};
117
118		vreg_l9b_1p2: ldo9 {
119			regulator-name = "vreg_l9b_1p2";
120			regulator-min-microvolt = <1200000>;
121			regulator-max-microvolt = <1200000>;
122			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
123		};
124	};
125
126	pm8350c-rpmh-regulators {
127		compatible = "qcom,pm8350c-rpmh-regulators";
128		qcom,pmic-id = "c";
129
130		vdd-s1-supply = <&vph_pwr>;
131		vdd-s2-supply = <&vph_pwr>;
132		vdd-s3-supply = <&vph_pwr>;
133		vdd-s4-supply = <&vph_pwr>;
134		vdd-s5-supply = <&vph_pwr>;
135		vdd-s6-supply = <&vph_pwr>;
136		vdd-s7-supply = <&vph_pwr>;
137		vdd-s8-supply = <&vph_pwr>;
138		vdd-s9-supply = <&vph_pwr>;
139		vdd-s10-supply = <&vph_pwr>;
140
141		vdd-l1-l12-supply = <&vreg_bob>;
142		vdd-l2-l8-supply = <&vreg_bob>;
143		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
144		vdd-l6-l9-l11-supply = <&vreg_bob>;
145
146		vdd-bob-supply = <&vph_pwr>;
147
148		vreg_s1c_1p86: smps1 {
149			regulator-name = "vreg_s1c_1p86";
150			regulator-min-microvolt = <1800000>;
151			regulator-max-microvolt = <2024000>;
152		};
153
154		vreg_s10c_1p05: smps10 {
155			regulator-name = "vreg_s10c_1p05";
156			regulator-min-microvolt = <1000000>;
157			regulator-max-microvolt = <1100000>;
158		};
159
160		vreg_bob: bob {
161			regulator-name = "vreg_bob";
162			regulator-min-microvolt = <3008000>;
163			regulator-max-microvolt = <3960000>;
164			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
165		};
166
167		vreg_l1c_1p8: ldo1 {
168			regulator-name = "vreg_l1c_1p8";
169			regulator-min-microvolt = <1800000>;
170			regulator-max-microvolt = <1800000>;
171			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
172		};
173
174		vreg_l3c_3p0: ldo3 {
175			regulator-name = "vreg_l3c_3p0";
176			regulator-min-microvolt = <3296000>;
177			regulator-max-microvolt = <3304000>;
178			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
179		};
180
181		vreg_l4c_1p8: ldo4 {
182			regulator-name = "vreg_l4c_1p8";
183			regulator-min-microvolt = <1704000>;
184			regulator-max-microvolt = <3000000>;
185			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
186		};
187
188		vreg_l5c_1p8: ldo5 {
189			regulator-name = "vreg_l5c_1p8";
190			regulator-min-microvolt = <1704000>;
191			regulator-max-microvolt = <3000000>;
192			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
193		};
194
195		vreg_l6c_1p8: ldo6 {
196			regulator-name = "vreg_l6c_1p8";
197			regulator-min-microvolt = <1800000>;
198			regulator-max-microvolt = <3008000>;
199			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
200		};
201
202		vreg_l7c_3p0: ldo7 {
203			regulator-name = "vreg_l7c_3p0";
204			regulator-min-microvolt = <3008000>;
205			regulator-max-microvolt = <3008000>;
206			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
207		};
208
209		vreg_l8c_1p8: ldo8 {
210			regulator-name = "vreg_l8c_1p8";
211			regulator-min-microvolt = <1800000>;
212			regulator-max-microvolt = <1800000>;
213			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
214		};
215
216		vreg_l9c_2p96: ldo9 {
217			regulator-name = "vreg_l9c_2p96";
218			regulator-min-microvolt = <2960000>;
219			regulator-max-microvolt = <3008000>;
220			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
221		};
222
223		vreg_l12c_1p8: ldo12 {
224			regulator-name = "vreg_l12c_1p8";
225			regulator-min-microvolt = <1800000>;
226			regulator-max-microvolt = <1968000>;
227			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
228		};
229
230		vreg_l13c_3p0: ldo13 {
231			regulator-name = "vreg_l13c_3p0";
232			regulator-min-microvolt = <3000000>;
233			regulator-max-microvolt = <3000000>;
234			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
235		};
236	};
237
238	pm8450-rpmh-regulators {
239		compatible = "qcom,pm8450-rpmh-regulators";
240		qcom,pmic-id = "h";
241
242		vdd-s1-supply = <&vph_pwr>;
243		vdd-s2-supply = <&vph_pwr>;
244		vdd-s3-supply = <&vph_pwr>;
245		vdd-s4-supply = <&vph_pwr>;
246		vdd-s5-supply = <&vph_pwr>;
247		vdd-s6-supply = <&vph_pwr>;
248
249		vdd-l2-supply = <&vreg_bob>;
250		vdd-l3-supply = <&vreg_bob>;
251		vdd-l4-supply = <&vreg_bob>;
252
253		vreg_s2h_0p95: smps2 {
254			regulator-name = "vreg_s2h_0p95";
255			regulator-min-microvolt = <848000>;
256			regulator-max-microvolt = <1104000>;
257		};
258
259		vreg_s3h_0p5: smps3 {
260			regulator-name = "vreg_s3h_0p5";
261			regulator-min-microvolt = <500000>;
262			regulator-max-microvolt = <500000>;
263		};
264
265		vreg_l2h_0p91: ldo2 {
266			regulator-name = "vreg_l2h_0p91";
267			regulator-min-microvolt = <880000>;
268			regulator-max-microvolt = <912000>;
269			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
270		};
271
272		vreg_l3h_0p91: ldo3 {
273			regulator-name = "vreg_l3h_0p91";
274			regulator-min-microvolt = <912000>;
275			regulator-max-microvolt = <912000>;
276			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
277		};
278
279	};
280
281	pmr735a-rpmh-regulators {
282		compatible = "qcom,pmr735a-rpmh-regulators";
283		qcom,pmic-id = "e";
284
285		vdd-s1-supply = <&vph_pwr>;
286		vdd-s2-supply = <&vph_pwr>;
287		vdd-s3-supply = <&vph_pwr>;
288
289		vdd-l1-l2-supply = <&vreg_s2e_0p85>;
290		vdd-l3-supply = <&vreg_s1e_1p25>;
291		vdd-l4-supply = <&vreg_s1c_1p86>;
292		vdd-l5-l6-supply = <&vreg_s1c_1p86>;
293		vdd-l7-bob-supply = <&vreg_bob>;
294
295		vreg_s1e_1p25: smps1 {
296			regulator-name = "vreg_s1e_1p25";
297			regulator-min-microvolt = <1200000>;
298			regulator-max-microvolt = <1296000>;
299		};
300
301		vreg_s2e_0p85: smps2 {
302			regulator-name = "vreg_s2e_0p85";
303			regulator-min-microvolt = <500000>;
304			regulator-max-microvolt = <1040000>;
305		};
306
307		vreg_l1e_0p8: ldo1 {
308			regulator-name = "vreg_l1e_0p8";
309			regulator-min-microvolt = <800000>;
310			regulator-max-microvolt = <800000>;
311		};
312
313		vreg_l2e_0p8: ldo2 {
314			regulator-name = "vreg_l2e_0p8";
315			regulator-min-microvolt = <800000>;
316			regulator-max-microvolt = <800000>;
317		};
318
319		vreg_l3e_1p2: ldo3 {
320			regulator-name = "vreg_l3e_1p2";
321			regulator-min-microvolt = <1200000>;
322			regulator-max-microvolt = <1200000>;
323		};
324
325		vreg_l4e_1p7: ldo4 {
326			regulator-name = "vreg_l4e_1p7";
327			regulator-min-microvolt = <1776000>;
328			regulator-max-microvolt = <1776000>;
329		};
330
331		vreg_l5e_0p88: ldo5 {
332			regulator-name = "vreg_l5e_0p88";
333			regulator-min-microvolt = <880000>;
334			regulator-max-microvolt = <880000>;
335		};
336
337		vreg_l6e_1p2: ldo6 {
338			regulator-name = "vreg_l6e_1p2";
339			regulator-min-microvolt = <1200000>;
340			regulator-max-microvolt = <1200000>;
341		};
342	};
343};
344
345&pcie0 {
346	status = "okay";
347};
348
349&pcie0_phy {
350	status = "okay";
351	vdda-phy-supply = <&vreg_l5b_0p88>;
352	vdda-pll-supply = <&vreg_l6b_1p2>;
353};
354
355&gpi_dma0 {
356	status = "okay";
357};
358
359&i2c5 {
360	status = "okay";
361};
362
363&qupv3_id_0 {
364	status = "okay";
365};
366
367&qupv3_id_2 {
368	status = "okay";
369};
370
371&remoteproc_adsp {
372	status = "okay";
373	firmware-name = "qcom/sm8450/adsp.mbn";
374};
375
376&remoteproc_cdsp {
377	status = "okay";
378	firmware-name = "qcom/sm8450/cdsp.mbn";
379};
380
381&remoteproc_mpss {
382	status = "okay";
383	firmware-name = "qcom/sm8450/modem.mbn";
384};
385
386&remoteproc_slpi {
387	status = "okay";
388	firmware-name = "qcom/sm8450/slpi.mbn";
389};
390
391&sdhc_2 {
392	cd-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
393	pinctrl-names = "default", "sleep";
394	pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
395	pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>;
396	vmmc-supply = <&vreg_l9c_2p96>;
397	vqmmc-supply = <&vreg_l6c_1p8>;
398	no-sdio;
399	no-mmc;
400	status = "okay";
401};
402
403&spi4 {
404	status = "okay";
405};
406
407&spi18 {
408	status = "okay";
409};
410
411&spi19 {
412	status = "okay";
413};
414
415&tlmm {
416	gpio-reserved-ranges = <28 4>, <36 4>;
417
418	sdc2_card_det_n: sd-card-det-n-state {
419		pins = "gpio92";
420		function = "gpio";
421		drive-strength = <2>;
422		bias-pull-up;
423	};
424};
425
426&uart7 {
427	status = "okay";
428};
429
430&ufs_mem_hc {
431	status = "okay";
432
433	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
434
435	vcc-supply = <&vreg_l7b_2p5>;
436	vcc-max-microamp = <1100000>;
437	vccq-supply = <&vreg_l9b_1p2>;
438	vccq-max-microamp = <1200000>;
439};
440
441&ufs_mem_phy {
442	status = "okay";
443
444	vdda-phy-supply = <&vreg_l5b_0p88>;
445	vdda-pll-supply = <&vreg_l6b_1p2>;
446};
447
448&usb_1 {
449	status = "okay";
450};
451
452&usb_1_dwc3 {
453	dr_mode = "peripheral";
454};
455
456&usb_1_hsphy {
457	status = "okay";
458
459	vdda-pll-supply = <&vreg_l5b_0p88>;
460	vdda18-supply = <&vreg_l1c_1p8>;
461	vdda33-supply = <&vreg_l2b_3p07>;
462};
463
464&usb_1_qmpphy {
465	status = "okay";
466
467	vdda-phy-supply = <&vreg_l6b_1p2>;
468	vdda-pll-supply = <&vreg_l1b_0p91>;
469};
470