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 <dt-bindings/gpio/gpio.h>
10#include "sm8150.dtsi"
11#include "pm8150.dtsi"
12#include "pm8150b.dtsi"
13#include "pm8150l.dtsi"
14
15/ {
16	model = "Qualcomm Technologies, Inc. SM8150 HDK";
17	compatible = "qcom,sm8150-hdk", "qcom,sm8150";
18	chassis-type = "embedded";
19
20	aliases {
21		serial0 = &uart2;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27
28	vph_pwr: vph-pwr-regulator {
29		compatible = "regulator-fixed";
30		regulator-name = "vph_pwr";
31		regulator-min-microvolt = <3700000>;
32		regulator-max-microvolt = <3700000>;
33	};
34
35	vreg_s4a_1p8: pm8150-s4 {
36		compatible = "regulator-fixed";
37		regulator-name = "vreg_s4a_1p8";
38
39		regulator-min-microvolt = <1800000>;
40		regulator-max-microvolt = <1800000>;
41
42		regulator-always-on;
43		regulator-boot-on;
44
45		vin-supply = <&vph_pwr>;
46	};
47
48	gpio-keys {
49		compatible = "gpio-keys";
50
51		key-vol-up {
52			label = "Volume Up";
53			linux,code = <KEY_VOLUMEUP>;
54			gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
55		};
56	};
57};
58
59&apps_rsc {
60	regulators-0 {
61		compatible = "qcom,pm8150-rpmh-regulators";
62		qcom,pmic-id = "a";
63
64		vdd-s1-supply = <&vph_pwr>;
65		vdd-s2-supply = <&vph_pwr>;
66		vdd-s3-supply = <&vph_pwr>;
67		vdd-s4-supply = <&vph_pwr>;
68		vdd-s5-supply = <&vph_pwr>;
69		vdd-s6-supply = <&vph_pwr>;
70		vdd-s7-supply = <&vph_pwr>;
71		vdd-s8-supply = <&vph_pwr>;
72		vdd-s9-supply = <&vph_pwr>;
73		vdd-s10-supply = <&vph_pwr>;
74
75		vdd-l1-l8-l11-supply = <&vreg_s6a_0p9>;
76		vdd-l2-l10-supply = <&vreg_bob>;
77		vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p9>;
78		vdd-l6-l9-supply = <&vreg_s8c_1p3>;
79		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>;
80		vdd-l13-l16-l17-supply = <&vreg_bob>;
81
82		vreg_s5a_2p0: smps5 {
83			regulator-min-microvolt = <1904000>;
84			regulator-max-microvolt = <2000000>;
85		};
86
87		vreg_s6a_0p9: smps6 {
88			regulator-min-microvolt = <920000>;
89			regulator-max-microvolt = <1128000>;
90		};
91
92		vdda_wcss_pll:
93		vreg_l1a_0p75: ldo1 {
94			regulator-min-microvolt = <752000>;
95			regulator-max-microvolt = <752000>;
96			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
97		};
98
99		vdd_pdphy:
100		vdda_usb_hs_3p1:
101		vreg_l2a_3p1: ldo2 {
102			regulator-min-microvolt = <3072000>;
103			regulator-max-microvolt = <3072000>;
104			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
105		};
106
107		vreg_l3a_0p8: ldo3 {
108			regulator-min-microvolt = <480000>;
109			regulator-max-microvolt = <932000>;
110			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
111		};
112
113		vdd_usb_hs_core:
114		vdda_csi_0_0p9:
115		vdda_csi_1_0p9:
116		vdda_csi_2_0p9:
117		vdda_csi_3_0p9:
118		vdda_dsi_0_0p9:
119		vdda_dsi_1_0p9:
120		vdda_dsi_0_pll_0p9:
121		vdda_dsi_1_pll_0p9:
122		vdda_pcie_1ln_core:
123		vdda_pcie_2ln_core:
124		vdda_pll_hv_cc_ebi01:
125		vdda_pll_hv_cc_ebi23:
126		vdda_qrefs_0p875_5:
127		vdda_sp_sensor:
128		vdda_ufs_2ln_core_1:
129		vdda_ufs_2ln_core_2:
130		vdda_qlink_lv:
131		vdda_qlink_lv_ck:
132		vreg_l5a_0p875: ldo5 {
133			regulator-min-microvolt = <880000>;
134			regulator-max-microvolt = <880000>;
135			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
136		};
137
138		vreg_l6a_1p2: ldo6 {
139			regulator-min-microvolt = <1200000>;
140			regulator-max-microvolt = <1200000>;
141			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
142		};
143
144		vreg_l7a_1p8: ldo7 {
145			regulator-min-microvolt = <1800000>;
146			regulator-max-microvolt = <1800000>;
147			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
148		};
149
150		vddpx_10:
151		vreg_l9a_1p2: ldo9 {
152			regulator-min-microvolt = <1200000>;
153			regulator-max-microvolt = <1200000>;
154			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
155		};
156
157		vreg_l10a_2p5: ldo10 {
158			regulator-min-microvolt = <2504000>;
159			regulator-max-microvolt = <2960000>;
160			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
161		};
162
163		vreg_l11a_0p8: ldo11 {
164			regulator-min-microvolt = <800000>;
165			regulator-max-microvolt = <800000>;
166			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
167		};
168
169		vdd_qfprom:
170		vdd_qfprom_sp:
171		vdda_apc_cs_1p8:
172		vdda_gfx_cs_1p8:
173		vdda_usb_hs_1p8:
174		vdda_qrefs_vref_1p8:
175		vddpx_10_a:
176		vreg_l12a_1p8: ldo12 {
177			regulator-min-microvolt = <1800000>;
178			regulator-max-microvolt = <1800000>;
179			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
180		};
181
182		vreg_l13a_2p7: ldo13 {
183			regulator-min-microvolt = <2704000>;
184			regulator-max-microvolt = <2704000>;
185			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
186		};
187
188		vreg_l14a_1p8: ldo14 {
189			regulator-min-microvolt = <1800000>;
190			regulator-max-microvolt = <1880000>;
191			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
192		};
193
194		vreg_l15a_1p7: ldo15 {
195			regulator-min-microvolt = <1704000>;
196			regulator-max-microvolt = <1704000>;
197			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
198		};
199
200		vreg_l16a_2p7: ldo16 {
201			regulator-min-microvolt = <2704000>;
202			regulator-max-microvolt = <2960000>;
203			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
204		};
205
206		vreg_l17a_3p0: ldo17 {
207			regulator-min-microvolt = <2856000>;
208			regulator-max-microvolt = <3008000>;
209			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
210		};
211
212		vreg_l18a_0p8: ldo18 {
213			regulator-min-microvolt = <880000>;
214			regulator-max-microvolt = <880000>;
215			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
216		};
217	};
218
219	regulators-1 {
220		compatible = "qcom,pm8150l-rpmh-regulators";
221		qcom,pmic-id = "c";
222
223		vdd-s1-supply = <&vph_pwr>;
224		vdd-s2-supply = <&vph_pwr>;
225		vdd-s3-supply = <&vph_pwr>;
226		vdd-s4-supply = <&vph_pwr>;
227		vdd-s5-supply = <&vph_pwr>;
228		vdd-s6-supply = <&vph_pwr>;
229		vdd-s7-supply = <&vph_pwr>;
230		vdd-s8-supply = <&vph_pwr>;
231
232		vdd-l1-l8-supply = <&vreg_s4a_1p8>;
233		vdd-l2-l3-supply = <&vreg_s8c_1p3>;
234		vdd-l4-l5-l6-supply = <&vreg_bob>;
235		vdd-l7-l11-supply = <&vreg_bob>;
236		vdd-l9-l10-supply = <&vreg_bob>;
237
238		vdd-bob-supply = <&vph_pwr>;
239		vdd-flash-supply = <&vreg_bob>;
240		vdd-rgb-supply = <&vreg_bob>;
241
242		vreg_bob: bob {
243			regulator-min-microvolt = <3008000>;
244			regulator-max-microvolt = <4000000>;
245			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
246			regulator-allow-bypass;
247		};
248
249		vreg_s8c_1p3: smps8 {
250			regulator-min-microvolt = <1352000>;
251			regulator-max-microvolt = <1352000>;
252		};
253
254		vreg_l1c_1p8: ldo1 {
255			regulator-min-microvolt = <1800000>;
256			regulator-max-microvolt = <1800000>;
257			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
258		};
259
260		vdda_wcss_adcdac_1:
261		vdda_wcss_adcdac_22:
262		vreg_l2c_1p3: ldo2 {
263			regulator-min-microvolt = <1304000>;
264			regulator-max-microvolt = <1304000>;
265			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
266		};
267
268		vdda_hv_ebi0:
269		vdda_hv_ebi1:
270		vdda_hv_ebi2:
271		vdda_hv_ebi3:
272		vdda_hv_refgen0:
273		vdda_qlink_hv_ck:
274		vreg_l3c_1p2: ldo3 {
275			regulator-min-microvolt = <1200000>;
276			regulator-max-microvolt = <1200000>;
277			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
278		};
279
280		vddpx_5:
281		vreg_l4c_1p8: ldo4 {
282			regulator-min-microvolt = <1704000>;
283			regulator-max-microvolt = <2928000>;
284			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
285		};
286
287		vddpx_6:
288		vreg_l5c_1p8: ldo5 {
289			regulator-min-microvolt = <1704000>;
290			regulator-max-microvolt = <2928000>;
291			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
292		};
293
294		vddpx_2:
295		vreg_l6c_2p9: ldo6 {
296			regulator-min-microvolt = <1800000>;
297			regulator-max-microvolt = <2960000>;
298			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
299		};
300
301		vreg_l7c_3p0: ldo7 {
302			regulator-min-microvolt = <2856000>;
303			regulator-max-microvolt = <3104000>;
304			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
305		};
306
307		vreg_l8c_1p8: ldo8 {
308			regulator-min-microvolt = <1800000>;
309			regulator-max-microvolt = <1800000>;
310			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
311		};
312
313		vreg_l9c_2p9: ldo9 {
314			regulator-min-microvolt = <2704000>;
315			regulator-max-microvolt = <2960000>;
316			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
317		};
318
319		vreg_l10c_3p3: ldo10 {
320			regulator-min-microvolt = <3000000>;
321			regulator-max-microvolt = <3312000>;
322			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
323		};
324
325		vreg_l11c_3p3: ldo11 {
326			regulator-min-microvolt = <3000000>;
327			regulator-max-microvolt = <3312000>;
328			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
329		};
330	};
331
332	regulators-2 {
333		compatible = "qcom,pm8009-rpmh-regulators";
334		qcom,pmic-id = "f";
335
336		vdd-s1-supply = <&vph_pwr>;
337		vdd-s2-supply = <&vreg_bob>;
338
339		vdd-l2-supply = <&vreg_s8c_1p3>;
340		vdd-l5-l6-supply = <&vreg_bob>;
341
342		vreg_l2f_1p2: ldo2 {
343			regulator-min-microvolt = <1200000>;
344			regulator-max-microvolt = <1200000>;
345			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
346		};
347
348		vreg_l5f_2p85: ldo5 {
349			regulator-min-microvolt = <2800000>;
350			regulator-max-microvolt = <2800000>;
351			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
352		};
353
354		vreg_l6f_2p85: ldo6 {
355			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
356			regulator-min-microvolt = <2856000>;
357			regulator-max-microvolt = <2856000>;
358		};
359	};
360};
361
362&gmu {
363	status = "okay";
364};
365
366&gpu {
367	/*
368	 * NOTE: "amd,imageon" makes Adreno start in headless mode, remove it
369	 * after display support is added on this board.
370	 */
371	compatible = "qcom,adreno-640.1", "qcom,adreno", "amd,imageon";
372	status = "okay";
373};
374
375&pon_pwrkey {
376	status = "okay";
377};
378
379&pon_resin {
380	status = "okay";
381
382	linux,code = <KEY_VOLUMEDOWN>;
383};
384
385&qupv3_id_1 {
386	status = "okay";
387};
388
389&remoteproc_adsp {
390	status = "okay";
391
392	firmware-name = "qcom/sm8150/adsp.mbn";
393};
394
395&remoteproc_cdsp {
396	status = "okay";
397
398	firmware-name = "qcom/sm8150/cdsp.mbn";
399};
400
401&remoteproc_slpi {
402	status = "okay";
403
404	firmware-name = "qcom/sm8150/slpi.mbn";
405};
406
407&tlmm {
408	gpio-reserved-ranges = <0 4>, <126 4>;
409};
410
411&uart2 {
412	status = "okay";
413};
414
415&ufs_mem_hc {
416	status = "okay";
417
418	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
419
420	vcc-supply = <&vreg_l10a_2p5>;
421	vcc-max-microamp = <750000>;
422	vccq-supply = <&vreg_l9a_1p2>;
423	vccq-max-microamp = <700000>;
424	vccq2-supply = <&vreg_s4a_1p8>;
425	vccq2-max-microamp = <750000>;
426};
427
428&ufs_mem_phy {
429	status = "okay";
430
431	vdda-phy-supply = <&vdda_ufs_2ln_core_1>;
432	vdda-pll-supply = <&vreg_l3c_1p2>;
433};
434
435&usb_1_hsphy {
436	status = "okay";
437	vdda-pll-supply = <&vdd_usb_hs_core>;
438	vdda33-supply = <&vdda_usb_hs_3p1>;
439	vdda18-supply = <&vdda_usb_hs_1p8>;
440};
441
442&usb_2_hsphy {
443	status = "okay";
444	vdda-pll-supply = <&vdd_usb_hs_core>;
445	vdda33-supply = <&vdda_usb_hs_3p1>;
446	vdda18-supply = <&vdda_usb_hs_1p8>;
447};
448
449&usb_1_qmpphy {
450	status = "okay";
451	vdda-phy-supply = <&vreg_l3c_1p2>;
452	vdda-pll-supply = <&vreg_l18a_0p8>;
453};
454
455&usb_2_qmpphy {
456	status = "okay";
457	vdda-phy-supply = <&vreg_l3c_1p2>;
458	vdda-pll-supply = <&vreg_l5a_0p875>;
459};
460
461&usb_1 {
462	status = "okay";
463};
464
465&usb_2 {
466	status = "okay";
467};
468
469&usb_1_dwc3 {
470	dr_mode = "peripheral";
471};
472
473&usb_2_dwc3 {
474	dr_mode = "host";
475};
476