xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sa8295p-adp.dts (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Linaro Limited
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11#include <dt-bindings/spmi/spmi.h>
12
13#include "sa8540p.dtsi"
14
15/ {
16	model = "Qualcomm SA8295P ADP";
17	compatible = "qcom,sa8295p-adp", "qcom,sa8540p";
18
19	aliases {
20		serial0 = &qup2_uart17;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26};
27
28&apps_rsc {
29	pmm8540-a-regulators {
30		compatible = "qcom,pm8150-rpmh-regulators";
31		qcom,pmic-id = "a";
32
33		vreg_l3a: ldo3 {
34			regulator-name = "vreg_l3a";
35			regulator-min-microvolt = <1200000>;
36			regulator-max-microvolt = <1208000>;
37			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
38			regulator-allow-set-load;
39		};
40
41		vreg_l5a: ldo5 {
42			regulator-name = "vreg_l5a";
43			regulator-min-microvolt = <912000>;
44			regulator-max-microvolt = <912000>;
45			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
46			regulator-allow-set-load;
47		};
48
49		vreg_l7a: ldo7 {
50			regulator-name = "vreg_l7a";
51			regulator-min-microvolt = <1800000>;
52			regulator-max-microvolt = <1800000>;
53			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
54			regulator-allow-set-load;
55		};
56
57		vreg_l13a: ldo13 {
58			regulator-name = "vreg_l13a";
59			regulator-min-microvolt = <3072000>;
60			regulator-max-microvolt = <3072000>;
61			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
62			regulator-allow-set-load;
63		};
64	};
65
66	pmm8540-c-regulators {
67		compatible = "qcom,pm8150-rpmh-regulators";
68		qcom,pmic-id = "c";
69
70		vreg_l1c: ldo1 {
71			regulator-name = "vreg_l1c";
72			regulator-min-microvolt = <912000>;
73			regulator-max-microvolt = <912000>;
74			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
75			regulator-allow-set-load;
76		};
77
78		vreg_l2c: ldo2 {
79			regulator-name = "vreg_l2c";
80			regulator-min-microvolt = <3072000>;
81			regulator-max-microvolt = <3072000>;
82			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
83			regulator-allow-set-load;
84		};
85
86		vreg_l3c: ldo3 {
87			regulator-name = "vreg_l3c";
88			regulator-min-microvolt = <1200000>;
89			regulator-max-microvolt = <1200000>;
90			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
91			regulator-allow-set-load;
92		};
93
94		vreg_l4c: ldo4 {
95			regulator-name = "vreg_l4c";
96			regulator-min-microvolt = <1200000>;
97			regulator-max-microvolt = <1208000>;
98			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
99			regulator-allow-set-load;
100		};
101
102		vreg_l6c: ldo6 {
103			regulator-name = "vreg_l6c";
104			regulator-min-microvolt = <1200000>;
105			regulator-max-microvolt = <1200000>;
106			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
107			regulator-allow-set-load;
108		};
109
110		vreg_l7c: ldo7 {
111			regulator-name = "vreg_l7c";
112			regulator-min-microvolt = <1800000>;
113			regulator-max-microvolt = <1800000>;
114			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
115			regulator-allow-set-load;
116		};
117
118		vreg_l10c: ldo10 {
119			regulator-name = "vreg_l10c";
120			regulator-min-microvolt = <2504000>;
121			regulator-max-microvolt = <2504000>;
122			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
123			regulator-allow-set-load;
124		};
125
126		vreg_l17c: ldo17 {
127			regulator-name = "vreg_l17c";
128			regulator-min-microvolt = <2504000>;
129			regulator-max-microvolt = <2504000>;
130			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
131			regulator-allow-set-load;
132		};
133	};
134
135	pmm8540-g-regulators {
136		compatible = "qcom,pm8150-rpmh-regulators";
137		qcom,pmic-id = "g";
138
139		vreg_l3g: ldo3 {
140			regulator-name = "vreg_l3g";
141			regulator-min-microvolt = <1200000>;
142			regulator-max-microvolt = <1200000>;
143			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
144			regulator-allow-set-load;
145		};
146
147		vreg_l7g: ldo7 {
148			regulator-name = "vreg_l7g";
149			regulator-min-microvolt = <1800000>;
150			regulator-max-microvolt = <1800000>;
151			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
152			regulator-allow-set-load;
153		};
154
155		vreg_l8g: ldo8 {
156			regulator-name = "vreg_l8g";
157			regulator-min-microvolt = <880000>;
158			regulator-max-microvolt = <880000>;
159			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
160			regulator-allow-set-load;
161		};
162	};
163};
164
165&qup2 {
166	status = "okay";
167};
168
169&qup2_uart17 {
170	compatible = "qcom,geni-debug-uart";
171	status = "okay";
172};
173
174&remoteproc_adsp {
175	firmware-name = "qcom/sa8540p/adsp.mbn";
176	status = "okay";
177};
178
179&remoteproc_nsp0 {
180	firmware-name = "qcom/sa8540p/cdsp.mbn";
181	status = "okay";
182};
183
184&remoteproc_nsp1 {
185	firmware-name = "qcom/sa8540p/cdsp1.mbn";
186	status = "okay";
187};
188
189&spmi_bus {
190	pm8450a: pmic@0 {
191		compatible = "qcom,pm8150", "qcom,spmi-pmic";
192		reg = <0x0 SPMI_USID>;
193		#address-cells = <1>;
194		#size-cells = <0>;
195
196		pm8450a_gpios: gpio@c000 {
197			compatible = "qcom,pm8150-gpio";
198			reg = <0xc000>;
199			gpio-controller;
200			#gpio-cells = <2>;
201			interrupt-controller;
202			#interrupt-cells = <2>;
203		};
204	};
205
206	pm8450c: pmic@4 {
207		compatible = "qcom,pm8150", "qcom,spmi-pmic";
208		reg = <0x4 SPMI_USID>;
209		#address-cells = <1>;
210		#size-cells = <0>;
211
212		pm8450c_gpios: gpio@c000 {
213			compatible = "qcom,pm8150-gpio";
214			reg = <0xc000>;
215			gpio-controller;
216			#gpio-cells = <2>;
217			interrupt-controller;
218			#interrupt-cells = <2>;
219		};
220	};
221
222	pm8450e: pmic@8 {
223		compatible = "qcom,pm8150", "qcom,spmi-pmic";
224		reg = <0x8 SPMI_USID>;
225		#address-cells = <1>;
226		#size-cells = <0>;
227
228		pm8450e_gpios: gpio@c000 {
229			compatible = "qcom,pm8150-gpio";
230			reg = <0xc000>;
231			gpio-controller;
232			#gpio-cells = <2>;
233			interrupt-controller;
234			#interrupt-cells = <2>;
235		};
236	};
237
238	pm8450g: pmic@c {
239		compatible = "qcom,pm8150", "qcom,spmi-pmic";
240		reg = <0xc SPMI_USID>;
241		#address-cells = <1>;
242		#size-cells = <0>;
243
244		pm8450g_gpios: gpio@c000 {
245			compatible = "qcom,pm8150-gpio";
246			reg = <0xc000>;
247			gpio-controller;
248			#gpio-cells = <2>;
249			interrupt-controller;
250			#interrupt-cells = <2>;
251		};
252	};
253};
254
255&ufs_mem_hc {
256	reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
257
258	vcc-supply = <&vreg_l17c>;
259	vcc-max-microamp = <800000>;
260	vccq-supply = <&vreg_l6c>;
261	vccq-max-microamp = <900000>;
262
263	status = "okay";
264};
265
266&ufs_mem_phy {
267	vdda-phy-supply = <&vreg_l8g>;
268	vdda-pll-supply = <&vreg_l3g>;
269
270	status = "okay";
271};
272
273&ufs_card_hc {
274	reset-gpios = <&tlmm 229 GPIO_ACTIVE_LOW>;
275
276	vcc-supply = <&vreg_l10c>;
277	vcc-max-microamp = <800000>;
278	vccq-supply = <&vreg_l3c>;
279	vccq-max-microamp = <900000>;
280
281	status = "okay";
282};
283
284&ufs_card_phy {
285	vdda-phy-supply = <&vreg_l8g>;
286	vdda-pll-supply = <&vreg_l3g>;
287
288	status = "okay";
289};
290
291&usb_0 {
292	status = "okay";
293};
294
295&usb_0_dwc3 {
296	/* TODO: Define USB-C connector properly */
297	dr_mode = "peripheral";
298};
299
300&usb_0_hsphy {
301	vdda-pll-supply = <&vreg_l5a>;
302	vdda18-supply = <&vreg_l7a>;
303	vdda33-supply = <&vreg_l13a>;
304
305	status = "okay";
306};
307
308&usb_0_qmpphy {
309	vdda-phy-supply = <&vreg_l3a>;
310	vdda-pll-supply = <&vreg_l5a>;
311
312	status = "okay";
313};
314
315&usb_1 {
316	status = "okay";
317};
318
319&usb_1_dwc3 {
320	/* TODO: Define USB-C connector properly */
321	dr_mode = "host";
322};
323
324&usb_1_hsphy {
325	vdda-pll-supply = <&vreg_l1c>;
326	vdda18-supply = <&vreg_l7c>;
327	vdda33-supply = <&vreg_l2c>;
328
329	status = "okay";
330};
331
332&usb_1_qmpphy {
333	vdda-phy-supply = <&vreg_l4c>;
334	vdda-pll-supply = <&vreg_l1c>;
335
336	status = "okay";
337};
338
339&usb_2_hsphy0 {
340	vdda-pll-supply = <&vreg_l5a>;
341	vdda18-supply = <&vreg_l7g>;
342	vdda33-supply = <&vreg_l13a>;
343
344	status = "okay";
345};
346
347&usb_2_hsphy1 {
348	vdda-pll-supply = <&vreg_l5a>;
349	vdda18-supply = <&vreg_l7g>;
350	vdda33-supply = <&vreg_l13a>;
351
352	status = "okay";
353};
354
355&usb_2_hsphy2 {
356	vdda-pll-supply = <&vreg_l5a>;
357	vdda18-supply = <&vreg_l7g>;
358	vdda33-supply = <&vreg_l13a>;
359
360	status = "okay";
361};
362
363&usb_2_hsphy3 {
364	vdda-pll-supply = <&vreg_l5a>;
365	vdda18-supply = <&vreg_l7g>;
366	vdda33-supply = <&vreg_l13a>;
367
368	status = "okay";
369};
370
371&usb_2_qmpphy0 {
372	vdda-phy-supply = <&vreg_l3a>;
373	vdda-pll-supply = <&vreg_l5a>;
374
375	status = "okay";
376};
377
378&usb_2_qmpphy1 {
379	vdda-phy-supply = <&vreg_l3a>;
380	vdda-pll-supply = <&vreg_l5a>;
381
382	status = "okay";
383};
384
385&xo_board_clk {
386	clock-frequency = <38400000>;
387};
388
389/* PINCTRL */
390