1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
9#include "sm8550.dtsi"
10#include "pm8010.dtsi"
11#include "pm8550.dtsi"
12#include "pm8550b.dtsi"
13#include "pm8550ve.dtsi"
14#include "pm8550vs.dtsi"
15#include "pmk8550.dtsi"
16#include "pmr735d.dtsi"
17
18/ {
19	model = "Qualcomm Technologies, Inc. SM8550 MTP";
20	compatible = "qcom,sm8550-mtp", "qcom,sm8550";
21
22	aliases {
23		serial0 = &uart7;
24	};
25
26	chosen {
27		stdout-path = "serial0:115200n8";
28	};
29
30	vph_pwr: vph-pwr-regulator {
31		compatible = "regulator-fixed";
32		regulator-name = "vph_pwr";
33		regulator-min-microvolt = <3700000>;
34		regulator-max-microvolt = <3700000>;
35
36		regulator-always-on;
37		regulator-boot-on;
38	};
39};
40
41&apps_rsc {
42	regulators-0 {
43		compatible = "qcom,pm8550-rpmh-regulators";
44		qcom,pmic-id = "b";
45
46		vdd-bob1-supply = <&vph_pwr>;
47		vdd-bob2-supply = <&vph_pwr>;
48		vdd-l2-l13-l14-supply = <&vreg_bob1>;
49		vdd-l3-supply = <&vreg_s4g_1p3>;
50		vdd-l5-l16-supply = <&vreg_bob1>;
51		vdd-l6-l7-supply = <&vreg_bob1>;
52		vdd-l8-l9-supply = <&vreg_bob1>;
53		vdd-l11-supply = <&vreg_s4g_1p3>;
54		vdd-l12-supply = <&vreg_s6g_1p8>;
55		vdd-l15-supply = <&vreg_s6g_1p8>;
56		vdd-l17-supply = <&vreg_bob2>;
57
58		vreg_bob1: bob1 {
59			regulator-name = "vreg_bob1";
60			regulator-min-microvolt = <3296000>;
61			regulator-max-microvolt = <3960000>;
62			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
63		};
64
65		vreg_bob2: bob2 {
66			regulator-name = "vreg_bob2";
67			regulator-min-microvolt = <2720000>;
68			regulator-max-microvolt = <3960000>;
69			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
70		};
71
72		vreg_l1b_1p8: ldo1 {
73			regulator-name = "vreg_l1b_1p8";
74			regulator-min-microvolt = <1800000>;
75			regulator-max-microvolt = <1800000>;
76			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
77		};
78
79		vreg_l2b_3p0: ldo2 {
80			regulator-name = "vreg_l2b_3p0";
81			regulator-min-microvolt = <3008000>;
82			regulator-max-microvolt = <3008000>;
83			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
84		};
85
86		vreg_l5b_3p1: ldo5 {
87			regulator-name = "vreg_l5b_3p1";
88			regulator-min-microvolt = <3104000>;
89			regulator-max-microvolt = <3104000>;
90			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
91		};
92
93		vreg_l6b_1p8: ldo6 {
94			regulator-name = "vreg_l6b_1p8";
95			regulator-min-microvolt = <1800000>;
96			regulator-max-microvolt = <3008000>;
97			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
98		};
99
100		vreg_l7b_1p8: ldo7 {
101			regulator-name = "vreg_l7b_1p8";
102			regulator-min-microvolt = <1800000>;
103			regulator-max-microvolt = <3008000>;
104			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
105		};
106
107		vreg_l8b_1p8: ldo8 {
108			regulator-name = "vreg_l8b_1p8";
109			regulator-min-microvolt = <1800000>;
110			regulator-max-microvolt = <3008000>;
111			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
112		};
113
114		vreg_l9b_2p9: ldo9 {
115			regulator-name = "vreg_l9b_2p9";
116			regulator-min-microvolt = <2960000>;
117			regulator-max-microvolt = <3008000>;
118			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
119		};
120
121		vreg_l11b_1p2: ldo11 {
122			regulator-name = "vreg_l11b_1p2";
123			regulator-min-microvolt = <1200000>;
124			regulator-max-microvolt = <1504000>;
125			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
126		};
127
128		vreg_l12b_1p8: ldo12 {
129			regulator-name = "vreg_l12b_1p8";
130			regulator-min-microvolt = <1800000>;
131			regulator-max-microvolt = <1800000>;
132			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
133		};
134
135		vreg_l13b_3p0: ldo13 {
136			regulator-name = "vreg_l13b_3p0";
137			regulator-min-microvolt = <3000000>;
138			regulator-max-microvolt = <3000000>;
139			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
140		};
141
142		vreg_l14b_3p2: ldo14 {
143			regulator-name = "vreg_l14b_3p2";
144			regulator-min-microvolt = <3200000>;
145			regulator-max-microvolt = <3200000>;
146			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
147		};
148
149		vreg_l15b_1p8: ldo15 {
150			regulator-name = "vreg_l15b_1p8";
151			regulator-min-microvolt = <1800000>;
152			regulator-max-microvolt = <1800000>;
153			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
154		};
155
156		vreg_l16b_2p8: ldo16 {
157			regulator-name = "vreg_l16b_2p8";
158			regulator-min-microvolt = <2800000>;
159			regulator-max-microvolt = <2800000>;
160			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
161		};
162
163		vreg_l17b_2p5: ldo17 {
164			regulator-name = "vreg_l17b_2p5";
165			regulator-min-microvolt = <2504000>;
166			regulator-max-microvolt = <2504000>;
167			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
168		};
169	};
170
171	regulators-1 {
172		compatible = "qcom,pm8550vs-rpmh-regulators";
173		qcom,pmic-id = "c";
174
175		vdd-l3-supply = <&vreg_s4e_0p9>;
176
177		vreg_l3c_0p91: ldo3 {
178			regulator-name = "vreg_l3c_0p9";
179			regulator-min-microvolt = <880000>;
180			regulator-max-microvolt = <912000>;
181			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
182		};
183	};
184
185	regulators-2 {
186		compatible = "qcom,pm8550vs-rpmh-regulators";
187		qcom,pmic-id = "d";
188
189		vdd-l1-supply = <&vreg_s4e_0p9>;
190
191		vreg_l1d_0p88: ldo1 {
192			regulator-name = "vreg_l1d_0p88";
193			regulator-min-microvolt = <880000>;
194			regulator-max-microvolt = <920000>;
195			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
196		};
197	};
198
199	regulators-3 {
200		compatible = "qcom,pm8550vs-rpmh-regulators";
201		qcom,pmic-id = "e";
202
203		vdd-l1-supply = <&vreg_s4e_0p9>;
204		vdd-l2-supply = <&vreg_s4e_0p9>;
205		vdd-l3-supply = <&vreg_s4g_1p3>;
206		vdd-s4-supply = <&vph_pwr>;
207		vdd-s5-supply = <&vph_pwr>;
208
209		vreg_s4e_0p9: smps4 {
210			regulator-name = "vreg_s4e_0p9";
211			regulator-min-microvolt = <904000>;
212			regulator-max-microvolt = <984000>;
213			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
214		};
215
216		vreg_s5e_1p1: smps5 {
217			regulator-name = "vreg_s5e_1p1";
218			regulator-min-microvolt = <1080000>;
219			regulator-max-microvolt = <1120000>;
220			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
221		};
222
223		vreg_l1e_0p88: ldo1 {
224			regulator-name = "vreg_l1e_0p88";
225			regulator-min-microvolt = <880000>;
226			regulator-max-microvolt = <880000>;
227			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
228		};
229
230		vreg_l2e_0p9: ldo2 {
231			regulator-name = "vreg_l2e_0p9";
232			regulator-min-microvolt = <904000>;
233			regulator-max-microvolt = <970000>;
234			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
235		};
236
237		vreg_l3e_1p2: ldo3 {
238			regulator-name = "vreg_l3e_1p2";
239			regulator-min-microvolt = <1200000>;
240			regulator-max-microvolt = <1200000>;
241			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
242		};
243	};
244
245	regulators-4 {
246		compatible = "qcom,pm8550ve-rpmh-regulators";
247		qcom,pmic-id = "f";
248
249		vdd-l1-supply = <&vreg_s4e_0p9>;
250		vdd-l2-supply = <&vreg_s4e_0p9>;
251		vdd-l3-supply = <&vreg_s4e_0p9>;
252		vdd-s4-supply = <&vph_pwr>;
253
254		vreg_s4f_0p5: smps4 {
255			regulator-name = "vreg_s4f_0p5";
256			regulator-min-microvolt = <500000>;
257			regulator-max-microvolt = <700000>;
258			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
259		};
260
261		vreg_l1f_0p9: ldo1 {
262			regulator-name = "vreg_l1f_0p9";
263			regulator-min-microvolt = <912000>;
264			regulator-max-microvolt = <912000>;
265			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
266		};
267
268		vreg_l2f_0p88: ldo2 {
269			regulator-name = "vreg_l2f_0p88";
270			regulator-min-microvolt = <880000>;
271			regulator-max-microvolt = <912000>;
272			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
273		};
274
275		vreg_l3f_0p91: ldo3 {
276			regulator-name = "vreg_l3f_0p91";
277			regulator-min-microvolt = <880000>;
278			regulator-max-microvolt = <912000>;
279			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
280		};
281	};
282
283	regulators-5 {
284		compatible = "qcom,pm8550vs-rpmh-regulators";
285		qcom,pmic-id = "g";
286
287		vdd-l1-supply = <&vreg_s4g_1p3>;
288		vdd-l2-supply = <&vreg_s4g_1p3>;
289		vdd-l3-supply = <&vreg_s4g_1p3>;
290		vdd-s1-supply = <&vph_pwr>;
291		vdd-s2-supply = <&vph_pwr>;
292		vdd-s3-supply = <&vph_pwr>;
293		vdd-s4-supply = <&vph_pwr>;
294		vdd-s5-supply = <&vph_pwr>;
295		vdd-s6-supply = <&vph_pwr>;
296
297		vreg_s1g_1p2: smps1 {
298			regulator-name = "vreg_s1g_1p2";
299			regulator-min-microvolt = <1200000>;
300			regulator-max-microvolt = <1300000>;
301			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
302		};
303
304		vreg_s2g_0p8: smps2 {
305			regulator-name = "vreg_s2g_0p8";
306			regulator-min-microvolt = <800000>;
307			regulator-max-microvolt = <1000000>;
308			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
309		};
310
311		vreg_s3g_0p7: smps3 {
312			regulator-name = "vreg_s3g_0p7";
313			regulator-min-microvolt = <300000>;
314			regulator-max-microvolt = <1004000>;
315			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
316		};
317
318		vreg_s4g_1p3: smps4 {
319			regulator-name = "vreg_s4g_1p3";
320			regulator-min-microvolt = <1200000>;
321			regulator-max-microvolt = <1352000>;
322			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
323		};
324
325		vreg_s5g_0p8: smps5 {
326			regulator-name = "vreg_s5g_0p8";
327			regulator-min-microvolt = <500000>;
328			regulator-max-microvolt = <1004000>;
329			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
330		};
331
332		vreg_s6g_1p8: smps6 {
333			regulator-name = "vreg_s6g_1p8";
334			regulator-min-microvolt = <1800000>;
335			regulator-max-microvolt = <2000000>;
336			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
337		};
338
339		vreg_l1g_1p2: ldo1 {
340			regulator-name = "vreg_l1g_1p2";
341			regulator-min-microvolt = <1200000>;
342			regulator-max-microvolt = <1200000>;
343			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
344		};
345
346		vreg_l2g_1p2: ldo2 {
347			regulator-name = "vreg_l2g_1p2";
348			regulator-min-microvolt = <1200000>;
349			regulator-max-microvolt = <1200000>;
350			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
351		};
352
353		vreg_l3g_1p2: ldo3 {
354			regulator-name = "vreg_l3g_1p2";
355			regulator-min-microvolt = <1200000>;
356			regulator-max-microvolt = <1200000>;
357			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
358		};
359	};
360};
361
362&dispcc {
363	status = "okay";
364};
365
366&mdss {
367	status = "okay";
368};
369
370&mdss_dsi0 {
371	vdda-supply = <&vreg_l3e_1p2>;
372	status = "okay";
373
374	panel@0 {
375		compatible = "visionox,vtdr6130";
376		reg = <0>;
377
378		pinctrl-names = "default", "sleep";
379		pinctrl-0 = <&sde_dsi_active>, <&sde_te_active>;
380		pinctrl-1 = <&sde_dsi_suspend>, <&sde_te_suspend>;
381
382		vddio-supply = <&vreg_l12b_1p8>;
383		vci-supply = <&vreg_l13b_3p0>;
384		vdd-supply = <&vreg_l11b_1p2>;
385
386		reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
387
388		port {
389			panel0_in: endpoint {
390				remote-endpoint = <&mdss_dsi0_out>;
391			};
392		};
393	};
394};
395
396&mdss_dsi0_out {
397	remote-endpoint = <&panel0_in>;
398	data-lanes = <0 1 2 3>;
399};
400
401&mdss_dsi0_phy {
402	vdds-supply = <&vreg_l1e_0p88>;
403	status = "okay";
404};
405
406&mdss_mdp {
407	status = "okay";
408};
409
410&pcie_1_phy_aux_clk {
411	clock-frequency = <1000>;
412};
413
414&pcie0 {
415	wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
416	perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
417	status = "okay";
418};
419
420&pcie0_phy {
421	vdda-phy-supply = <&vreg_l1e_0p88>;
422	vdda-pll-supply = <&vreg_l3e_1p2>;
423	status = "okay";
424};
425
426&pcie1 {
427	wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>;
428	perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>;
429	status = "okay";
430};
431
432&pcie1_phy {
433	vdda-phy-supply = <&vreg_l3c_0p91>;
434	vdda-pll-supply = <&vreg_l3e_1p2>;
435	vdda-qref-supply = <&vreg_l1e_0p88>;
436	status = "okay";
437};
438
439&pm8550_gpios {
440	sdc2_card_det_n: sdc2-card-det-state {
441		pins = "gpio12";
442		function = "normal";
443		input-enable;
444		output-disable;
445		bias-pull-up;
446		power-source = <1>; /* 1.8 V */
447	};
448};
449
450&qupv3_id_0 {
451	status = "okay";
452};
453
454&remoteproc_adsp {
455	firmware-name = "qcom/sm8550/adsp.mbn",
456			"qcom/sm8550/adsp_dtb.mbn";
457	status = "okay";
458};
459
460&remoteproc_cdsp {
461	firmware-name = "qcom/sm8550/cdsp.mbn",
462			"qcom/sm8550/cdsp_dtb.mbn";
463	status = "okay";
464};
465
466&remoteproc_mpss {
467	firmware-name = "qcom/sm8550/modem.mbn",
468			"qcom/sm8550/modem_dtb.mbn";
469	status = "okay";
470};
471
472&sdhc_2 {
473	cd-gpios = <&pm8550_gpios 12 GPIO_ACTIVE_LOW>;
474	pinctrl-names = "default", "sleep";
475	pinctrl-0 = <&sdc2_default &sdc2_card_det_n>;
476	pinctrl-1 = <&sdc2_sleep &sdc2_card_det_n>;
477	vmmc-supply = <&vreg_l9b_2p9>;
478	vqmmc-supply = <&vreg_l8b_1p8>;
479	bus-width = <4>;
480	no-sdio;
481	no-mmc;
482	status = "okay";
483};
484
485&sleep_clk {
486	clock-frequency = <32000>;
487};
488
489&tlmm {
490	gpio-reserved-ranges = <32 8>;
491
492	sde_dsi_active: sde-dsi-active-state {
493		pins = "gpio133";
494		function = "gpio";
495		drive-strength = <8>;
496		bias-disable;
497	};
498
499	sde_dsi_suspend: sde-dsi-suspend-state {
500		pins = "gpio133";
501		function = "gpio";
502		drive-strength = <2>;
503		bias-pull-down;
504	};
505
506	sde_te_active: sde-te-active-state {
507		pins = "gpio86";
508		function = "mdp_vsync";
509		drive-strength = <2>;
510		bias-pull-down;
511	};
512
513	sde_te_suspend: sde-te-suspend-state {
514		pins = "gpio86";
515		function = "mdp_vsync";
516		drive-strength = <2>;
517		bias-pull-down;
518	};
519};
520
521&uart7 {
522	status = "okay";
523};
524
525&ufs_mem_hc {
526	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
527	vcc-supply = <&vreg_l17b_2p5>;
528	vcc-max-microamp = <1300000>;
529	vccq-supply = <&vreg_l1g_1p2>;
530	vccq-max-microamp = <1200000>;
531	vccq2-supply = <&vreg_l3g_1p2>;
532	vccq2-max-microamp = <100>;
533
534	status = "okay";
535};
536
537&ufs_mem_phy {
538	vdda-phy-supply = <&vreg_l1d_0p88>;
539	vdda-pll-supply = <&vreg_l3e_1p2>;
540
541	status = "okay";
542};
543
544&usb_1 {
545	status = "okay";
546};
547
548&usb_1_dwc3 {
549	dr_mode = "peripheral";
550};
551
552&usb_1_hsphy {
553	vdd-supply = <&vreg_l1e_0p88>;
554	vdda12-supply = <&vreg_l3e_1p2>;
555
556	status = "okay";
557};
558
559&usb_dp_qmpphy {
560	vdda-phy-supply = <&vreg_l3e_1p2>;
561	vdda-pll-supply = <&vreg_l3f_0p91>;
562
563	status = "okay";
564};
565
566&xo_board {
567	clock-frequency = <76800000>;
568};
569