1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
9#include "sm8250.dtsi"
10#include "pm8150.dtsi"
11#include "pm8150b.dtsi"
12#include "pm8150l.dtsi"
13
14/ {
15	model = "Qualcomm Technologies, Inc. SM8250 HDK";
16	compatible = "qcom,sm8250-hdk", "qcom,sm8250";
17	chassis-type = "embedded";
18
19	aliases {
20		serial0 = &uart12;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	vph_pwr: vph-pwr-regulator {
28		compatible = "regulator-fixed";
29		regulator-name = "vph_pwr";
30		regulator-min-microvolt = <3700000>;
31		regulator-max-microvolt = <3700000>;
32	};
33
34	vreg_s4a_1p8: pm8150-s4 {
35		compatible = "regulator-fixed";
36		regulator-name = "vreg_s4a_1p8";
37
38		regulator-min-microvolt = <1800000>;
39		regulator-max-microvolt = <1800000>;
40
41		regulator-always-on;
42		regulator-boot-on;
43
44		vin-supply = <&vph_pwr>;
45	};
46
47	vreg_s6c_0p88: smpc6-regulator {
48		compatible = "regulator-fixed";
49		regulator-name = "vreg_s6c_0p88";
50
51		regulator-min-microvolt = <880000>;
52		regulator-max-microvolt = <880000>;
53		regulator-always-on;
54		vin-supply = <&vph_pwr>;
55	};
56
57	gpio-keys {
58		compatible = "gpio-keys";
59
60		key-vol-up {
61			label = "Volume Up";
62			linux,code = <KEY_VOLUMEUP>;
63			gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
64		};
65	};
66};
67
68&apps_rsc {
69	regulators-0 {
70		compatible = "qcom,pm8150-rpmh-regulators";
71		qcom,pmic-id = "a";
72
73		vdd-s1-supply = <&vph_pwr>;
74		vdd-s2-supply = <&vph_pwr>;
75		vdd-s3-supply = <&vph_pwr>;
76		vdd-s4-supply = <&vph_pwr>;
77		vdd-s5-supply = <&vph_pwr>;
78		vdd-s6-supply = <&vph_pwr>;
79		vdd-s7-supply = <&vph_pwr>;
80		vdd-s8-supply = <&vph_pwr>;
81		vdd-s9-supply = <&vph_pwr>;
82		vdd-s10-supply = <&vph_pwr>;
83		vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>;
84		vdd-l2-l10-supply = <&vreg_bob>;
85		vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
86		vdd-l6-l9-supply = <&vreg_s8c_1p3>;
87		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
88		vdd-l13-l16-l17-supply = <&vreg_bob>;
89
90		vreg_s5a_1p9: smps5 {
91			regulator-name = "vreg_s5a_1p9";
92			regulator-min-microvolt = <1824000>;
93			regulator-max-microvolt = <2000000>;
94			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
95		};
96
97		vreg_s6a_0p95: smps6 {
98			regulator-name = "vreg_s6a_0p95";
99			regulator-min-microvolt = <600000>;
100			regulator-max-microvolt = <1128000>;
101			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
102		};
103
104		vreg_l2a_3p1: ldo2 {
105			regulator-name = "vreg_l2a_3p1";
106			regulator-min-microvolt = <3072000>;
107			regulator-max-microvolt = <3072000>;
108			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109		};
110
111		vreg_l3a_0p9: ldo3 {
112			regulator-name = "vreg_l3a_0p9";
113			regulator-min-microvolt = <928000>;
114			regulator-max-microvolt = <932000>;
115			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
116		};
117
118		vreg_l5a_0p88: ldo5 {
119			regulator-name = "vreg_l5a_0p88";
120			regulator-min-microvolt = <880000>;
121			regulator-max-microvolt = <880000>;
122			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
123		};
124
125		vreg_l6a_1p2: ldo6 {
126			regulator-name = "vreg_l6a_1p2";
127			regulator-min-microvolt = <1200000>;
128			regulator-max-microvolt = <1200000>;
129			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
130		};
131
132		vreg_l7a_1p7: ldo7 {
133			regulator-name = "vreg_l7a_1p7";
134			regulator-min-microvolt = <1704000>;
135			regulator-max-microvolt = <1800000>;
136			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
137		};
138
139		vreg_l9a_1p2: ldo9 {
140			regulator-name = "vreg_l9a_1p2";
141			regulator-min-microvolt = <1200000>;
142			regulator-max-microvolt = <1200000>;
143			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
144		};
145
146		vreg_l10a_1p8: ldo10 {
147			regulator-name = "vreg_l10a_1p8";
148			regulator-min-microvolt = <1800000>;
149			regulator-max-microvolt = <2960000>;
150			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
151		};
152
153		vreg_l12a_1p8: ldo12 {
154			regulator-name = "vreg_l12a_1p8";
155			regulator-min-microvolt = <1800000>;
156			regulator-max-microvolt = <1800000>;
157			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
158		};
159
160		vreg_l13a_ts_3p0: ldo13 {
161			regulator-name = "vreg_l13a_ts_3p0";
162			regulator-min-microvolt = <3008000>;
163			regulator-max-microvolt = <3008000>;
164			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
165		};
166
167		vreg_l14a_1p8: ldo14 {
168			regulator-name = "vreg_l14a_1p8";
169			regulator-min-microvolt = <1800000>;
170			regulator-max-microvolt = <1880000>;
171			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
172		};
173
174		vreg_l15a_1p8: ldo15 {
175			regulator-name = "vreg_l15a_1p8";
176			regulator-min-microvolt = <1800000>;
177			regulator-max-microvolt = <1800000>;
178			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
179		};
180
181		vreg_l16a_3p3: ldo16 {
182			regulator-name = "vreg_l16a_3p3";
183			regulator-min-microvolt = <3024000>;
184			regulator-max-microvolt = <3304000>;
185			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
186		};
187
188		vreg_l17a_2p96: ldo17 {
189			regulator-name = "vreg_l17a_2p96";
190			regulator-min-microvolt = <2496000>;
191			regulator-max-microvolt = <3008000>;
192			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
193		};
194
195		vreg_l18a_0p92: ldo18 {
196			regulator-name = "vreg_l18a_0p92";
197			regulator-min-microvolt = <800000>;
198			regulator-max-microvolt = <920000>;
199			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
200		};
201	};
202
203	regulators-1 {
204		compatible = "qcom,pm8150l-rpmh-regulators";
205		qcom,pmic-id = "c";
206
207		vdd-s1-supply = <&vph_pwr>;
208		vdd-s2-supply = <&vph_pwr>;
209		vdd-s3-supply = <&vph_pwr>;
210		vdd-s4-supply = <&vph_pwr>;
211		vdd-s5-supply = <&vph_pwr>;
212		vdd-s6-supply = <&vph_pwr>;
213		vdd-s7-supply = <&vph_pwr>;
214		vdd-s8-supply = <&vph_pwr>;
215		vdd-l1-l8-supply = <&vreg_s4a_1p8>;
216		vdd-l2-l3-supply = <&vreg_s8c_1p3>;
217		vdd-l4-l5-l6-supply = <&vreg_bob>;
218		vdd-l7-l11-supply = <&vreg_bob>;
219		vdd-l9-l10-supply = <&vreg_bob>;
220		vdd-bob-supply = <&vph_pwr>;
221
222		vreg_bob: bob {
223			regulator-name = "vreg_bob";
224			regulator-min-microvolt = <3008000>;
225			regulator-max-microvolt = <3960000>;
226			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
227		};
228
229		vreg_s8c_1p3: smps8 {
230			regulator-name = "vreg_s8c_1p3";
231			regulator-min-microvolt = <1200000>;
232			regulator-max-microvolt = <1400000>;
233			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
234		};
235
236		vreg_l1c_1p8: ldo1 {
237			regulator-name = "vreg_l1c_1p8";
238			regulator-min-microvolt = <1800000>;
239			regulator-max-microvolt = <1800000>;
240			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
241		};
242
243		vreg_l2c_1p2: ldo2 {
244			regulator-name = "vreg_l2c_1p2";
245			regulator-min-microvolt = <1200000>;
246			regulator-max-microvolt = <1304000>;
247			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
248		};
249
250		vreg_l3c_0p8: ldo3 {
251			regulator-name = "vreg_l3c_0p8";
252			regulator-min-microvolt = <800000>;
253			regulator-max-microvolt = <1200000>;
254			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
255		};
256
257		vreg_l4c_1p8: ldo4 {
258			regulator-name = "vreg_l4c_1p8";
259			regulator-min-microvolt = <1800000>;
260			regulator-max-microvolt = <2800000>;
261			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
262		};
263
264		vreg_l5c_1p8: ldo5 {
265			regulator-name = "vreg_l5c_1p8";
266			regulator-min-microvolt = <1800000>;
267			regulator-max-microvolt = <2800000>;
268			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
269		};
270
271		vreg_l6c_2p96: ldo6 {
272			regulator-name = "vreg_l6c_2p96";
273			regulator-min-microvolt = <1800000>;
274			regulator-max-microvolt = <2960000>;
275			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
276		};
277
278		vreg_l7c_cam_vcm0_2p85: ldo7 {
279			regulator-name = "vreg_l7c_cam_vcm0_2p85";
280			regulator-min-microvolt = <2856000>;
281			regulator-max-microvolt = <3104000>;
282			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
283		};
284
285		vreg_l8c_1p8: ldo8 {
286			regulator-name = "vreg_l8c_1p8";
287			regulator-min-microvolt = <1800000>;
288			regulator-max-microvolt = <1800000>;
289			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
290		};
291
292		vreg_l9c_2p96: ldo9 {
293			regulator-name = "vreg_l9c_2p96";
294			regulator-min-microvolt = <2704000>;
295			regulator-max-microvolt = <2960000>;
296			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
297		};
298
299		vreg_l10c_3p0: ldo10 {
300			regulator-name = "vreg_l10c_3p0";
301			regulator-min-microvolt = <3000000>;
302			regulator-max-microvolt = <3312000>;
303			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
304		};
305
306		vreg_l11c_3p3: ldo11 {
307			regulator-name = "vreg_l11c_3p3";
308			regulator-min-microvolt = <3104000>;
309			regulator-max-microvolt = <3312000>;
310			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
311		};
312	};
313
314	regulators-2 {
315		compatible = "qcom,pm8009-rpmh-regulators";
316		qcom,pmic-id = "f";
317
318		vdd-s1-supply = <&vph_pwr>;
319		vdd-s2-supply = <&vreg_bob>;
320		vdd-l2-supply = <&vreg_s8c_1p3>;
321		vdd-l5-l6-supply = <&vreg_bob>;
322		vdd-l7-supply = <&vreg_s4a_1p8>;
323
324		vreg_l1f_cam_dvdd1_1p1: ldo1 {
325			regulator-name = "vreg_l1f_cam_dvdd1_1p1";
326			regulator-min-microvolt = <1104000>;
327			regulator-max-microvolt = <1104000>;
328			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
329		};
330
331		vreg_l2f_cam_dvdd0_1p2: ldo2 {
332			regulator-name = "vreg_l2f_cam_dvdd0_1p2";
333			regulator-min-microvolt = <1200000>;
334			regulator-max-microvolt = <1200000>;
335			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
336		};
337
338		vreg_l3f_cam_dvdd2_1p05: ldo3 {
339			regulator-name = "vreg_l3f_cam_dvdd2_1p05";
340			regulator-min-microvolt = <1056000>;
341			regulator-max-microvolt = <1056000>;
342			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
343		};
344
345		vreg_l5f_cam_avdd0_2p85: ldo5 {
346			regulator-name = "vreg_l5f_cam_avdd0_2p85";
347			regulator-min-microvolt = <2800000>;
348			regulator-max-microvolt = <3000000>;
349			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
350		};
351
352		vreg_l6f_cam_avdd1_2p8: ldo6 {
353			regulator-name = "vreg_l6f_cam_avdd1_2p8";
354			regulator-min-microvolt = <2800000>;
355			regulator-max-microvolt = <3000000>;
356			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
357		};
358
359		vreg_l7f_1p8: ldo7 {
360			regulator-name = "vreg_l7f_1p8";
361			regulator-min-microvolt = <1800000>;
362			regulator-max-microvolt = <1800000>;
363			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
364		};
365	};
366};
367
368&gmu {
369	status = "okay";
370};
371
372&gpu {
373	status = "okay";
374};
375
376&pon_pwrkey {
377	status = "okay";
378};
379
380&pon_resin {
381	status = "okay";
382
383	linux,code = <KEY_VOLUMEDOWN>;
384};
385
386&qupv3_id_1 {
387	status = "okay";
388};
389
390&tlmm {
391	gpio-reserved-ranges = <28 4>, <40 4>;
392};
393
394&uart12 {
395	status = "okay";
396};
397
398&ufs_mem_hc {
399	status = "okay";
400
401	vcc-supply = <&vreg_l17a_2p96>;
402	vcc-max-microamp = <800000>;
403	vccq-supply = <&vreg_l6a_1p2>;
404	vccq-max-microamp = <800000>;
405	vccq2-supply = <&vreg_s4a_1p8>;
406	vccq2-max-microamp = <800000>;
407};
408
409&ufs_mem_phy {
410	status = "okay";
411
412	vdda-phy-supply = <&vreg_l5a_0p88>;
413	vdda-pll-supply = <&vreg_l9a_1p2>;
414};
415
416&usb_1_hsphy {
417	status = "okay";
418	vdda-pll-supply = <&vreg_l5a_0p88>;
419	vdda33-supply = <&vreg_l2a_3p1>;
420	vdda18-supply = <&vreg_l12a_1p8>;
421};
422
423&usb_2_hsphy {
424	status = "okay";
425	vdda-pll-supply = <&vreg_l5a_0p88>;
426	vdda33-supply = <&vreg_l2a_3p1>;
427	vdda18-supply = <&vreg_l12a_1p8>;
428};
429
430&usb_1_qmpphy {
431	status = "okay";
432	vdda-phy-supply = <&vreg_l9a_1p2>;
433	vdda-pll-supply = <&vreg_l18a_0p92>;
434};
435
436&usb_2_qmpphy {
437	status = "okay";
438	vdda-phy-supply = <&vreg_l9a_1p2>;
439	vdda-pll-supply = <&vreg_l18a_0p92>;
440};
441
442&usb_1 {
443	status = "okay";
444};
445
446&usb_2 {
447	status = "okay";
448};
449
450&usb_1_dwc3 {
451	dr_mode = "peripheral";
452};
453
454&usb_2_dwc3 {
455	dr_mode = "host";
456};
457
458&venus {
459	status = "okay";
460};
461