xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
10
11#include "sa8775p.dtsi"
12#include "sa8775p-pmics.dtsi"
13
14/ {
15	model = "Qualcomm SA8775P Ride";
16	compatible = "qcom,sa8775p-ride", "qcom,sa8775p";
17
18	aliases {
19		serial0 = &uart10;
20		serial1 = &uart12;
21		serial2 = &uart17;
22		i2c11 = &i2c11;
23		i2c18 = &i2c18;
24		spi16 = &spi16;
25		ufshc1 = &ufs_mem_hc;
26	};
27
28	chosen {
29		stdout-path = "serial0:115200n8";
30	};
31};
32
33&apps_rsc {
34	regulators-0 {
35		compatible = "qcom,pmm8654au-rpmh-regulators";
36		qcom,pmic-id = "a";
37
38		vreg_s4a: smps4 {
39			regulator-name = "vreg_s4a";
40			regulator-min-microvolt = <1800000>;
41			regulator-max-microvolt = <1816000>;
42			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
43		};
44
45		vreg_s5a: smps5 {
46			regulator-name = "vreg_s5a";
47			regulator-min-microvolt = <1850000>;
48			regulator-max-microvolt = <1996000>;
49			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
50		};
51
52		vreg_s9a: smps9 {
53			regulator-name = "vreg_s9a";
54			regulator-min-microvolt = <535000>;
55			regulator-max-microvolt = <1120000>;
56			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
57		};
58
59		vreg_l4a: ldo4 {
60			regulator-name = "vreg_l4a";
61			regulator-min-microvolt = <788000>;
62			regulator-max-microvolt = <1050000>;
63			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
64			regulator-allow-set-load;
65			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
66						   RPMH_REGULATOR_MODE_HPM>;
67		};
68
69		vreg_l5a: ldo5 {
70			regulator-name = "vreg_l5a";
71			regulator-min-microvolt = <870000>;
72			regulator-max-microvolt = <950000>;
73			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
74			regulator-allow-set-load;
75			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
76						   RPMH_REGULATOR_MODE_HPM>;
77		};
78
79		vreg_l6a: ldo6 {
80			regulator-name = "vreg_l6a";
81			regulator-min-microvolt = <870000>;
82			regulator-max-microvolt = <970000>;
83			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
84			regulator-allow-set-load;
85			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
86						   RPMH_REGULATOR_MODE_HPM>;
87		};
88
89		vreg_l7a: ldo7 {
90			regulator-name = "vreg_l7a";
91			regulator-min-microvolt = <720000>;
92			regulator-max-microvolt = <950000>;
93			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
94			regulator-allow-set-load;
95			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
96						   RPMH_REGULATOR_MODE_HPM>;
97		};
98
99		vreg_l8a: ldo8 {
100			regulator-name = "vreg_l8a";
101			regulator-min-microvolt = <2504000>;
102			regulator-max-microvolt = <3300000>;
103			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
104			regulator-allow-set-load;
105			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
106						   RPMH_REGULATOR_MODE_HPM>;
107		};
108
109		vreg_l9a: ldo9 {
110			regulator-name = "vreg_l9a";
111			regulator-min-microvolt = <2970000>;
112			regulator-max-microvolt = <3544000>;
113			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
114			regulator-allow-set-load;
115			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
116						   RPMH_REGULATOR_MODE_HPM>;
117		};
118	};
119
120	regulators-1 {
121		compatible = "qcom,pmm8654au-rpmh-regulators";
122		qcom,pmic-id = "c";
123
124		vreg_l1c: ldo1 {
125			regulator-name = "vreg_l1c";
126			regulator-min-microvolt = <1140000>;
127			regulator-max-microvolt = <1260000>;
128			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
129			regulator-allow-set-load;
130			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
131						   RPMH_REGULATOR_MODE_HPM>;
132		};
133
134		vreg_l2c: ldo2 {
135			regulator-name = "vreg_l2c";
136			regulator-min-microvolt = <900000>;
137			regulator-max-microvolt = <1100000>;
138			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
139			regulator-allow-set-load;
140			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
141						   RPMH_REGULATOR_MODE_HPM>;
142		};
143
144		vreg_l3c: ldo3 {
145			regulator-name = "vreg_l3c";
146			regulator-min-microvolt = <1100000>;
147			regulator-max-microvolt = <1300000>;
148			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
149			regulator-allow-set-load;
150			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
151						   RPMH_REGULATOR_MODE_HPM>;
152		};
153
154		vreg_l4c: ldo4 {
155			regulator-name = "vreg_l4c";
156			regulator-min-microvolt = <1200000>;
157			regulator-max-microvolt = <1200000>;
158			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
159			/*
160			 * FIXME: This should have regulator-allow-set-load but
161			 * we're getting an over-current fault from the PMIC
162			 * when switching to LPM.
163			 */
164		};
165
166		vreg_l5c: ldo5 {
167			regulator-name = "vreg_l5c";
168			regulator-min-microvolt = <1100000>;
169			regulator-max-microvolt = <1300000>;
170			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
171			regulator-allow-set-load;
172			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
173						   RPMH_REGULATOR_MODE_HPM>;
174		};
175
176		vreg_l6c: ldo6 {
177			regulator-name = "vreg_l6c";
178			regulator-min-microvolt = <1620000>;
179			regulator-max-microvolt = <1980000>;
180			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
181			regulator-allow-set-load;
182			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
183						   RPMH_REGULATOR_MODE_HPM>;
184		};
185
186		vreg_l7c: ldo7 {
187			regulator-name = "vreg_l7c";
188			regulator-min-microvolt = <1620000>;
189			regulator-max-microvolt = <2000000>;
190			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
191			regulator-allow-set-load;
192			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
193						   RPMH_REGULATOR_MODE_HPM>;
194		};
195
196		vreg_l8c: ldo8 {
197			regulator-name = "vreg_l8c";
198			regulator-min-microvolt = <2400000>;
199			regulator-max-microvolt = <3300000>;
200			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
201			regulator-allow-set-load;
202			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
203						   RPMH_REGULATOR_MODE_HPM>;
204		};
205
206		vreg_l9c: ldo9 {
207			regulator-name = "vreg_l9c";
208			regulator-min-microvolt = <1650000>;
209			regulator-max-microvolt = <2700000>;
210			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
211			regulator-allow-set-load;
212			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
213						   RPMH_REGULATOR_MODE_HPM>;
214		};
215	};
216
217	regulators-2 {
218		compatible = "qcom,pmm8654au-rpmh-regulators";
219		qcom,pmic-id = "e";
220
221		vreg_s4e: smps4 {
222			regulator-name = "vreg_s4e";
223			regulator-min-microvolt = <970000>;
224			regulator-max-microvolt = <1520000>;
225			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
226		};
227
228		vreg_s7e: smps7 {
229			regulator-name = "vreg_s7e";
230			regulator-min-microvolt = <1010000>;
231			regulator-max-microvolt = <1170000>;
232			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
233		};
234
235		vreg_s9e: smps9 {
236			regulator-name = "vreg_s9e";
237			regulator-min-microvolt = <300000>;
238			regulator-max-microvolt = <570000>;
239			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
240		};
241
242		vreg_l6e: ldo6 {
243			regulator-name = "vreg_l6e";
244			regulator-min-microvolt = <1280000>;
245			regulator-max-microvolt = <1450000>;
246			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
247			regulator-allow-set-load;
248			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
249						   RPMH_REGULATOR_MODE_HPM>;
250		};
251
252		vreg_l8e: ldo8 {
253			regulator-name = "vreg_l8e";
254			regulator-min-microvolt = <1800000>;
255			regulator-max-microvolt = <1950000>;
256			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
257			regulator-allow-set-load;
258			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
259						   RPMH_REGULATOR_MODE_HPM>;
260		};
261	};
262};
263
264&i2c11 {
265	clock-frequency = <400000>;
266	pinctrl-0 = <&qup_i2c11_default>;
267	pinctrl-names = "default";
268	status = "okay";
269};
270
271&i2c18 {
272	clock-frequency = <400000>;
273	pinctrl-0 = <&qup_i2c18_default>;
274	pinctrl-names = "default";
275	status = "okay";
276};
277
278&pmm8654au_0_gpios {
279	gpio-line-names = "DS_EN",
280			  "POFF_COMPLETE",
281			  "UFS0_VER_ID",
282			  "FAST_POFF",
283			  "DBU1_PON_DONE",
284			  "AOSS_SLEEP",
285			  "CAM_DES0_EN",
286			  "CAM_DES1_EN",
287			  "CAM_DES2_EN",
288			  "CAM_DES3_EN",
289			  "UEFI",
290			  "ANALOG_PON_OPT";
291};
292
293&pmm8654au_1_gpios {
294	gpio-line-names = "PMIC_C_ID0",
295			  "PMIC_C_ID1",
296			  "UFS1_VER_ID",
297			  "IPA_PWR",
298			  "",
299			  "WLAN_DBU4_EN",
300			  "WLAN_EN",
301			  "BT_EN",
302			  "USB2_PWR_EN",
303			  "USB2_FAULT";
304
305	usb2_en_state: usb2-en-state {
306		pins = "gpio9";
307		function = "normal";
308		output-high;
309		power-source = <0>;
310	};
311};
312
313&pmm8654au_2_gpios {
314	gpio-line-names = "PMIC_E_ID0",
315			  "PMIC_E_ID1",
316			  "USB0_PWR_EN",
317			  "USB0_FAULT",
318			  "SENSOR_IRQ_1",
319			  "SENSOR_IRQ_2",
320			  "SENSOR_RST",
321			  "SGMIIO0_RST",
322			  "SGMIIO1_RST",
323			  "USB1_PWR_ENABLE",
324			  "USB1_FAULT",
325			  "VMON_SPX8";
326
327	usb0_en_state: usb0-en-state {
328		pins = "gpio3";
329		function = "normal";
330		output-high;
331		power-source = <0>;
332	};
333
334	usb1_en_state: usb1-en-state {
335		pins = "gpio10";
336		function = "normal";
337		output-high;
338		power-source = <0>;
339	};
340};
341
342&pmm8654au_3_gpios {
343	gpio-line-names = "PMIC_G_ID0",
344			  "PMIC_G_ID1",
345			  "GNSS_RST",
346			  "GNSS_EN",
347			  "GNSS_BOOT_MODE";
348};
349
350&qupv3_id_1 {
351	status = "okay";
352};
353
354&qupv3_id_2 {
355	status = "okay";
356};
357
358&sleep_clk {
359	clock-frequency = <32764>;
360};
361
362&spi16 {
363	pinctrl-0 = <&qup_spi16_default>;
364	pinctrl-names = "default";
365	status = "okay";
366};
367
368&tlmm {
369	qup_uart10_default: qup-uart10-state {
370		pins = "gpio46", "gpio47";
371		function = "qup1_se3";
372	};
373
374	qup_spi16_default: qup-spi16-state {
375		pins = "gpio86", "gpio87", "gpio88", "gpio89";
376		function = "qup2_se2";
377		drive-strength = <6>;
378		bias-disable;
379	};
380
381	qup_i2c11_default: qup-i2c11-state {
382		pins = "gpio48", "gpio49";
383		function = "qup1_se4";
384		drive-strength = <2>;
385		bias-pull-up;
386	};
387
388	qup_i2c18_default: qup-i2c18-state {
389		pins = "gpio95", "gpio96";
390		function = "qup2_se4";
391		drive-strength = <2>;
392		bias-pull-up;
393	};
394
395	qup_uart12_default: qup-uart12-state {
396		qup_uart12_cts: qup-uart12-cts-pins {
397			pins = "gpio52";
398			function = "qup1_se5";
399			bias-disable;
400		};
401
402		qup_uart12_rts: qup-uart12-rts-pins {
403			pins = "gpio53";
404			function = "qup1_se5";
405			bias-pull-down;
406		};
407
408		qup_uart12_tx: qup-uart12-tx-pins {
409			pins = "gpio54";
410			function = "qup1_se5";
411			bias-pull-up;
412		};
413
414		qup_uart12_rx: qup-uart12-rx-pins {
415			pins = "gpio55";
416			function = "qup1_se5";
417			bias-pull-down;
418		};
419	};
420
421	qup_uart17_default: qup-uart17-state {
422		qup_uart17_cts: qup-uart17-cts-pins {
423			pins = "gpio91";
424			function = "qup2_se3";
425			bias-disable;
426		};
427
428		qup_uart17_rts: qup0-uart17-rts-pins {
429			pins = "gpio92";
430			function = "qup2_se3";
431			bias-pull-down;
432		};
433
434		qup_uart17_tx: qup0-uart17-tx-pins {
435			pins = "gpio93";
436			function = "qup2_se3";
437			bias-pull-up;
438		};
439
440		qup_uart17_rx: qup0-uart17-rx-pins {
441			pins = "gpio94";
442			function = "qup2_se3";
443			bias-pull-down;
444		};
445	};
446};
447
448&uart10 {
449	compatible = "qcom,geni-debug-uart";
450	pinctrl-0 = <&qup_uart10_default>;
451	pinctrl-names = "default";
452	status = "okay";
453};
454
455&uart12 {
456	pinctrl-0 = <&qup_uart12_default>;
457	pinctrl-names = "default";
458	status = "okay";
459};
460
461&uart17 {
462	pinctrl-0 = <&qup_uart17_default>;
463	pinctrl-names = "default";
464	status = "okay";
465};
466
467&ufs_mem_hc {
468	reset-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
469	vcc-supply = <&vreg_l8a>;
470	vcc-max-microamp = <1100000>;
471	vccq-supply = <&vreg_l4c>;
472	vccq-max-microamp = <1200000>;
473
474	status = "okay";
475};
476
477&ufs_mem_phy {
478	vdda-phy-supply = <&vreg_l4a>;
479	vdda-pll-supply = <&vreg_l1c>;
480
481	status = "okay";
482};
483
484&usb_0 {
485	pinctrl-names = "default";
486	pinctrl-0 = <&usb0_en_state>;
487
488	status = "okay";
489};
490
491&usb_0_dwc3 {
492	dr_mode = "peripheral";
493};
494
495&usb_0_hsphy {
496	vdda-pll-supply = <&vreg_l7a>;
497	vdda18-supply = <&vreg_l6c>;
498	vdda33-supply = <&vreg_l9a>;
499
500	status = "okay";
501};
502
503&usb_0_qmpphy {
504	vdda-phy-supply = <&vreg_l1c>;
505	vdda-pll-supply = <&vreg_l7a>;
506
507	status = "okay";
508};
509
510&usb_1 {
511	pinctrl-names = "default";
512	pinctrl-0 = <&usb1_en_state>;
513
514	status = "okay";
515};
516
517&usb_1_dwc3 {
518	dr_mode = "host";
519};
520
521&usb_1_hsphy {
522	vdda-pll-supply = <&vreg_l7a>;
523	vdda18-supply = <&vreg_l6c>;
524	vdda33-supply = <&vreg_l9a>;
525
526	status = "okay";
527};
528
529&usb_1_qmpphy {
530	vdda-phy-supply = <&vreg_l1c>;
531	vdda-pll-supply = <&vreg_l7a>;
532
533	status = "okay";
534};
535
536&usb_2 {
537	pinctrl-names = "default";
538	pinctrl-0 = <&usb2_en_state>;
539
540	status = "okay";
541};
542
543&usb_2_dwc3 {
544	dr_mode = "host";
545};
546
547&usb_2_hsphy {
548	vdda-pll-supply = <&vreg_l7a>;
549	vdda18-supply = <&vreg_l6c>;
550	vdda33-supply = <&vreg_l9a>;
551
552	status = "okay";
553};
554
555&xo_board_clk {
556	clock-frequency = <38400000>;
557};
558