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&gpi_dma1 {
217	status = "okay";
218};
219
220&mpss {
221	status = "okay";
222	firmware-name = "qcom/sm8350/modem.mbn";
223};
224
225&qupv3_id_0 {
226	status = "okay";
227};
228
229&slpi {
230	status = "okay";
231	firmware-name = "qcom/sm8350/slpi.mbn";
232};
233
234&tlmm {
235	gpio-reserved-ranges = <52 8>;
236};
237
238&uart2 {
239	status = "okay";
240};
241
242&ufs_mem_hc {
243	status = "okay";
244
245	reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>;
246
247	vcc-supply = <&vreg_l7b_2p96>;
248	vcc-max-microamp = <800000>;
249	vccq-supply = <&vreg_l9b_1p2>;
250	vccq-max-microamp = <900000>;
251};
252
253&ufs_mem_phy {
254	status = "okay";
255
256	vdda-phy-supply = <&vreg_l5b_0p88>;
257	vdda-pll-supply = <&vreg_l6b_1p2>;
258};
259
260&usb_1 {
261	status = "okay";
262};
263
264&usb_1_dwc3 {
265	/* TODO: Define USB-C connector properly */
266	dr_mode = "peripheral";
267};
268
269&usb_1_hsphy {
270	status = "okay";
271
272	vdda-pll-supply = <&vreg_l5b_0p88>;
273	vdda18-supply = <&vreg_l1c_1p8>;
274	vdda33-supply = <&vreg_l2b_3p07>;
275};
276
277&usb_1_qmpphy {
278	status = "okay";
279
280	vdda-phy-supply = <&vreg_l6b_1p2>;
281	vdda-pll-supply = <&vreg_l1b_0p88>;
282};
283
284&usb_2 {
285	status = "okay";
286};
287
288&usb_2_dwc3 {
289	dr_mode = "host";
290
291	pinctrl-names = "default";
292	pinctrl-0 = <&usb_hub_enabled_state>;
293};
294
295&usb_2_hsphy {
296	status = "okay";
297
298	vdda-pll-supply = <&vreg_l5b_0p88>;
299	vdda18-supply = <&vreg_l1c_1p8>;
300	vdda33-supply = <&vreg_l2b_3p07>;
301};
302
303&usb_2_qmpphy {
304	status = "okay";
305
306	vdda-phy-supply = <&vreg_l6b_1p2>;
307	vdda-pll-supply = <&vreg_l5b_0p88>;
308};
309
310/* PINCTRL - additions to nodes defined in sm8350.dtsi */
311
312&tlmm {
313	usb_hub_enabled_state: usb-hub-enabled-state {
314		pins = "gpio42";
315		function = "gpio";
316
317		drive-strength = <2>;
318		output-low;
319	};
320};
321