1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2020-2021, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
9#include "sm8350.dtsi"
10
11/ {
12	model = "Qualcomm Technologies, Inc. SM8350 HDK";
13	compatible = "qcom,sm8350-hdk", "qcom,sm8350";
14
15	aliases {
16		serial0 = &uart2;
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&adsp {
35	status = "okay";
36	firmware-name = "qcom/sm8350/adsp.mbn";
37};
38
39&apps_rsc {
40	pm8350-rpmh-regulators {
41		compatible = "qcom,pm8350-rpmh-regulators";
42		qcom,pmic-id = "b";
43
44		vdd-s1-supply = <&vph_pwr>;
45		vdd-s2-supply = <&vph_pwr>;
46		vdd-s3-supply = <&vph_pwr>;
47		vdd-s4-supply = <&vph_pwr>;
48		vdd-s5-supply = <&vph_pwr>;
49		vdd-s6-supply = <&vph_pwr>;
50		vdd-s7-supply = <&vph_pwr>;
51		vdd-s8-supply = <&vph_pwr>;
52		vdd-s9-supply = <&vph_pwr>;
53		vdd-s10-supply = <&vph_pwr>;
54		vdd-s11-supply = <&vph_pwr>;
55		vdd-s12-supply = <&vph_pwr>;
56
57		vdd-l1-l4-supply = <&vreg_s11b_0p95>;
58		vdd-l2-l7-supply = <&vreg_bob>;
59		vdd-l3-l5-supply = <&vreg_bob>;
60		vdd-l6-l9-l10-supply = <&vreg_s11b_0p95>;
61
62		vreg_s10b_1p8: smps10 {
63			regulator-name = "vreg_s10b_1p8";
64			regulator-min-microvolt = <1800000>;
65			regulator-max-microvolt = <1800000>;
66			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
67		};
68
69		vreg_s11b_0p95: smps11 {
70			regulator-name = "vreg_s11b_0p95";
71			regulator-min-microvolt = <952000>;
72			regulator-max-microvolt = <952000>;
73			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
74		};
75
76		vreg_s12b_1p25: smps12 {
77			regulator-name = "vreg_s12b_1p25";
78			regulator-min-microvolt = <1256000>;
79			regulator-max-microvolt = <1256000>;
80			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
81		};
82
83		vreg_l1b_0p88: ldo1 {
84			regulator-name = "vreg_l1b_0p88";
85			regulator-min-microvolt = <912000>;
86			regulator-max-microvolt = <920000>;
87			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
88		};
89
90		vreg_l2b_3p07: ldo2 {
91			regulator-name = "vreg_l2b_3p07";
92			regulator-min-microvolt = <3072000>;
93			regulator-max-microvolt = <3072000>;
94			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
95		};
96
97		vreg_l3b_0p9: ldo3 {
98			regulator-name = "vreg_l3b_0p9";
99			regulator-min-microvolt = <904000>;
100			regulator-max-microvolt = <904000>;
101			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
102		};
103
104		vreg_l5b_0p88: ldo5 {
105			regulator-name = "vreg_l5b_0p88";
106			regulator-min-microvolt = <880000>;
107			regulator-max-microvolt = <888000>;
108			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
109			regulator-allow-set-load;
110		};
111
112		vreg_l6b_1p2: ldo6 {
113			regulator-name = "vreg_l6b_1p2";
114			regulator-min-microvolt = <1200000>;
115			regulator-max-microvolt = <1208000>;
116			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
117			regulator-allow-set-load;
118		};
119
120		vreg_l7b_2p96: ldo7 {
121			regulator-name = "vreg_l7b_2p96";
122			regulator-min-microvolt = <2504000>;
123			regulator-max-microvolt = <2504000>;
124			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
125			regulator-allow-set-load;
126		};
127
128		vreg_l9b_1p2: ldo9 {
129			regulator-name = "vreg_l9b_1p2";
130			regulator-min-microvolt = <1200000>;
131			regulator-max-microvolt = <1200000>;
132			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
133			regulator-allow-set-load;
134		};
135	};
136
137	pm8350c-rpmh-regulators {
138		compatible = "qcom,pm8350c-rpmh-regulators";
139		qcom,pmic-id = "c";
140
141		vdd-s1-supply = <&vph_pwr>;
142		vdd-s2-supply = <&vph_pwr>;
143		vdd-s3-supply = <&vph_pwr>;
144		vdd-s4-supply = <&vph_pwr>;
145		vdd-s5-supply = <&vph_pwr>;
146		vdd-s6-supply = <&vph_pwr>;
147		vdd-s7-supply = <&vph_pwr>;
148		vdd-s8-supply = <&vph_pwr>;
149		vdd-s9-supply = <&vph_pwr>;
150		vdd-s10-supply = <&vph_pwr>;
151
152		vdd-l1-l12-supply = <&vreg_s1c_1p86>;
153		vdd-l2-l8-supply = <&vreg_s1c_1p86>;
154		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
155		vdd-l6-l9-l11-supply = <&vreg_bob>;
156		vdd-l10-supply = <&vreg_s12b_1p25>;
157
158		vdd-bob-supply = <&vph_pwr>;
159
160		vreg_s1c_1p86: smps1 {
161			regulator-name = "vreg_s1c_1p86";
162			regulator-min-microvolt = <1856000>;
163			regulator-max-microvolt = <1880000>;
164			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
165		};
166
167		vreg_bob: bob {
168			regulator-name = "vreg_bob";
169			regulator-min-microvolt = <3008000>;
170			regulator-max-microvolt = <3960000>;
171			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
172		};
173
174		vreg_l1c_1p8: ldo1 {
175			regulator-name = "vreg_l1c_1p8";
176			regulator-min-microvolt = <1800000>;
177			regulator-max-microvolt = <1800000>;
178			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
179		};
180
181		vreg_l2c_1p8: ldo2 {
182			regulator-name = "vreg_l2c_1p8";
183			regulator-min-microvolt = <1800000>;
184			regulator-max-microvolt = <1800000>;
185			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
186		};
187
188		vreg_l6c_1p8: ldo6 {
189			regulator-name = "vreg_l6c_1p8";
190			regulator-min-microvolt = <1800000>;
191			regulator-max-microvolt = <2960000>;
192			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
193		};
194
195		vreg_l9c_2p96: ldo9 {
196			regulator-name = "vreg_l9c_2p96";
197			regulator-min-microvolt = <2960000>;
198			regulator-max-microvolt = <3008000>;
199			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
200		};
201
202		vreg_l10c_1p2: ldo10 {
203			regulator-name = "vreg_l10c_1p2";
204			regulator-min-microvolt = <1200000>;
205			regulator-max-microvolt = <1200000>;
206			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
207		};
208	};
209};
210
211&cdsp {
212	status = "okay";
213	firmware-name = "qcom/sm8350/cdsp.mbn";
214};
215
216&mpss {
217	status = "okay";
218	firmware-name = "qcom/sm8350/modem.mbn";
219};
220
221&qupv3_id_0 {
222	status = "okay";
223};
224
225&slpi {
226	status = "okay";
227	firmware-name = "qcom/sm8350/slpi.mbn";
228};
229
230&tlmm {
231	gpio-reserved-ranges = <52 8>;
232};
233
234&uart2 {
235	status = "okay";
236};
237
238&ufs_mem_hc {
239	status = "okay";
240
241	reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>;
242
243	vcc-supply = <&vreg_l7b_2p96>;
244	vcc-max-microamp = <800000>;
245	vccq-supply = <&vreg_l9b_1p2>;
246	vccq-max-microamp = <900000>;
247};
248
249&ufs_mem_phy {
250	status = "okay";
251
252	vdda-phy-supply = <&vreg_l5b_0p88>;
253	vdda-pll-supply = <&vreg_l6b_1p2>;
254};
255
256&usb_1 {
257	status = "okay";
258};
259
260&usb_1_dwc3 {
261	/* TODO: Define USB-C connector properly */
262	dr_mode = "peripheral";
263};
264
265&usb_1_hsphy {
266	status = "okay";
267
268	vdda-pll-supply = <&vreg_l5b_0p88>;
269	vdda18-supply = <&vreg_l1c_1p8>;
270	vdda33-supply = <&vreg_l2b_3p07>;
271};
272
273&usb_1_qmpphy {
274	status = "okay";
275
276	vdda-phy-supply = <&vreg_l6b_1p2>;
277	vdda-pll-supply = <&vreg_l1b_0p88>;
278};
279
280&usb_2 {
281	status = "okay";
282};
283
284&usb_2_dwc3 {
285	dr_mode = "host";
286
287	pinctrl-names = "default";
288	pinctrl-0 = <&usb_hub_enabled_state>;
289};
290
291&usb_2_hsphy {
292	status = "okay";
293
294	vdda-pll-supply = <&vreg_l5b_0p88>;
295	vdda18-supply = <&vreg_l1c_1p8>;
296	vdda33-supply = <&vreg_l2b_3p07>;
297};
298
299&usb_2_qmpphy {
300	status = "okay";
301
302	vdda-phy-supply = <&vreg_l6b_1p2>;
303	vdda-pll-supply = <&vreg_l5b_0p88>;
304};
305
306/* PINCTRL - additions to nodes defined in sm8350.dtsi */
307
308&tlmm {
309	usb_hub_enabled_state: usb-hub-enabled-state {
310		pins = "gpio42";
311		function = "gpio";
312
313		drive-strength = <2>;
314		output-low;
315	};
316};
317