xref: /linux/arch/arm64/boot/dts/qcom/sa8295p-adp.dts (revision 0cac5ce06e524755b3dac1e0a060b05992076d93)
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#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
13
14#include "sa8540p.dtsi"
15#include "sa8540p-pmics.dtsi"
16
17/ {
18	model = "Qualcomm SA8295P ADP";
19	compatible = "qcom,sa8295p-adp", "qcom,sa8540p";
20
21	aliases {
22		serial0 = &uart17;
23	};
24
25	chosen {
26		stdout-path = "serial0:115200n8";
27	};
28
29	dp2-connector {
30		compatible = "dp-connector";
31		label = "DP2";
32		type = "mini";
33
34		hpd-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
35
36		port {
37			dp2_connector_in: endpoint {
38				remote-endpoint = <&mdss1_dp0_out>;
39			};
40		};
41	};
42
43	dp3-connector {
44		compatible = "dp-connector";
45		label = "DP3";
46		type = "mini";
47
48		hpd-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
49
50		port {
51			dp3_connector_in: endpoint {
52				remote-endpoint = <&mdss1_dp1_out>;
53			};
54		};
55	};
56
57	edp0-connector {
58		compatible = "dp-connector";
59		label = "EDP0";
60		type = "mini";
61
62		hpd-gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
63
64		port {
65			edp0_connector_in: endpoint {
66				remote-endpoint = <&mdss0_dp2_out>;
67			};
68		};
69	};
70
71	edp1-connector {
72		compatible = "dp-connector";
73		label = "EDP1";
74		type = "mini";
75
76		hpd-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
77
78		port {
79			edp1_connector_in: endpoint {
80				remote-endpoint = <&mdss0_dp3_out>;
81			};
82		};
83	};
84
85	edp2-connector {
86		compatible = "dp-connector";
87		label = "EDP2";
88		type = "mini";
89
90		hpd-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
91
92		port {
93			edp2_connector_in: endpoint {
94				remote-endpoint = <&mdss1_dp2_out>;
95			};
96		};
97	};
98
99	edp3-connector {
100		compatible = "dp-connector";
101		label = "EDP3";
102		type = "mini";
103
104		hpd-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
105
106		port {
107			edp3_connector_in: endpoint {
108				remote-endpoint = <&mdss1_dp3_out>;
109			};
110		};
111	};
112
113	regulator-usb2-vbus {
114		compatible = "regulator-fixed";
115		regulator-name = "USB2_VBUS";
116		gpio = <&pmm8540c_gpios 9 GPIO_ACTIVE_HIGH>;
117		pinctrl-0 = <&usb2_en>;
118		pinctrl-names = "default";
119		enable-active-high;
120		regulator-always-on;
121	};
122
123	regulator-usb3-vbus {
124		compatible = "regulator-fixed";
125		regulator-name = "USB3_VBUS";
126		gpio = <&pmm8540e_gpios 5 GPIO_ACTIVE_HIGH>;
127		pinctrl-0 = <&usb3_en>;
128		pinctrl-names = "default";
129		enable-active-high;
130		regulator-always-on;
131	};
132
133	regulator-usb4-vbus {
134		compatible = "regulator-fixed";
135		regulator-name = "USB4_VBUS";
136		gpio = <&pmm8540g_gpios 5 GPIO_ACTIVE_HIGH>;
137		pinctrl-0 = <&usb4_en>;
138		pinctrl-names = "default";
139		enable-active-high;
140		regulator-always-on;
141	};
142
143	regulator-usb5-vbus {
144		compatible = "regulator-fixed";
145		regulator-name = "USB5_VBUS";
146		gpio = <&pmm8540g_gpios 9 GPIO_ACTIVE_HIGH>;
147		pinctrl-0 = <&usb5_en>;
148		pinctrl-names = "default";
149		enable-active-high;
150		regulator-always-on;
151	};
152};
153
154&apps_rsc {
155	regulators-0 {
156		compatible = "qcom,pm8150-rpmh-regulators";
157		qcom,pmic-id = "a";
158
159		vreg_l3a: ldo3 {
160			regulator-name = "vreg_l3a";
161			regulator-min-microvolt = <1200000>;
162			regulator-max-microvolt = <1208000>;
163			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
164		};
165
166		vreg_l5a: ldo5 {
167			regulator-name = "vreg_l5a";
168			regulator-min-microvolt = <912000>;
169			regulator-max-microvolt = <912000>;
170			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
171		};
172
173		vreg_l7a: ldo7 {
174			regulator-name = "vreg_l7a";
175			regulator-min-microvolt = <1800000>;
176			regulator-max-microvolt = <1800000>;
177			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
178		};
179
180		vreg_l13a: ldo13 {
181			regulator-name = "vreg_l13a";
182			regulator-min-microvolt = <3072000>;
183			regulator-max-microvolt = <3072000>;
184			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
185		};
186
187		vreg_l11a: ldo11 {
188			regulator-name = "vreg_l11a";
189			regulator-min-microvolt = <880000>;
190			regulator-max-microvolt = <880000>;
191			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
192		};
193	};
194
195	regulators-1 {
196		compatible = "qcom,pm8150-rpmh-regulators";
197		qcom,pmic-id = "c";
198
199		vreg_l1c: ldo1 {
200			regulator-name = "vreg_l1c";
201			regulator-min-microvolt = <912000>;
202			regulator-max-microvolt = <912000>;
203			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
204		};
205
206		vreg_l2c: ldo2 {
207			regulator-name = "vreg_l2c";
208			regulator-min-microvolt = <3072000>;
209			regulator-max-microvolt = <3072000>;
210			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
211		};
212
213		vreg_l3c: ldo3 {
214			regulator-name = "vreg_l3c";
215			regulator-min-microvolt = <1200000>;
216			regulator-max-microvolt = <1200000>;
217			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
218			regulator-allow-set-load;
219			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
220						   RPMH_REGULATOR_MODE_HPM>;
221		};
222
223		vreg_l4c: ldo4 {
224			regulator-name = "vreg_l4c";
225			regulator-min-microvolt = <1200000>;
226			regulator-max-microvolt = <1208000>;
227			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
228		};
229
230		vreg_l6c: ldo6 {
231			regulator-name = "vreg_l6c";
232			regulator-min-microvolt = <1200000>;
233			regulator-max-microvolt = <1200000>;
234			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
235			regulator-allow-set-load;
236			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
237						   RPMH_REGULATOR_MODE_HPM>;
238		};
239
240		vreg_l7c: ldo7 {
241			regulator-name = "vreg_l7c";
242			regulator-min-microvolt = <1800000>;
243			regulator-max-microvolt = <1800000>;
244			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
245		};
246
247		vreg_l10c: ldo10 {
248			regulator-name = "vreg_l10c";
249			regulator-min-microvolt = <2504000>;
250			regulator-max-microvolt = <2504000>;
251			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
252			regulator-allow-set-load;
253			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
254						   RPMH_REGULATOR_MODE_HPM>;
255		};
256
257		vreg_l17c: ldo17 {
258			regulator-name = "vreg_l17c";
259			regulator-min-microvolt = <2504000>;
260			regulator-max-microvolt = <2504000>;
261			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
262			regulator-allow-set-load;
263			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
264						   RPMH_REGULATOR_MODE_HPM>;
265		};
266	};
267
268	regulators-2 {
269		compatible = "qcom,pm8150-rpmh-regulators";
270		qcom,pmic-id = "g";
271
272		vreg_l3g: ldo3 {
273			regulator-name = "vreg_l3g";
274			regulator-min-microvolt = <1200000>;
275			regulator-max-microvolt = <1200000>;
276			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
277		};
278
279		vreg_l7g: ldo7 {
280			regulator-name = "vreg_l7g";
281			regulator-min-microvolt = <1800000>;
282			regulator-max-microvolt = <1800000>;
283			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
284		};
285
286		vreg_l8g: ldo8 {
287			regulator-name = "vreg_l8g";
288			regulator-min-microvolt = <912000>;
289			regulator-max-microvolt = <912000>;
290			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
291		};
292
293		vreg_l11g: ldo11 {
294			regulator-name = "vreg_l11g";
295			regulator-min-microvolt = <912000>;
296			regulator-max-microvolt = <912000>;
297			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
298		};
299	};
300};
301
302&dispcc0 {
303	status = "okay";
304};
305
306&dispcc1 {
307	status = "okay";
308};
309
310&i2c12 {
311	pinctrl-0 = <&qup1_i2c4_state>;
312	pinctrl-names = "default";
313
314	status = "okay";
315
316	vdd_gfx: regulator@39 {
317		compatible = "maxim,max20411";
318		reg = <0x39>;
319
320		regulator-min-microvolt = <800000>;
321		regulator-max-microvolt = <800000>;
322
323		enable-gpios = <&pmm8540a_gpios 2 GPIO_ACTIVE_HIGH>;
324
325		pinctrl-0 = <&max20411_en>;
326		pinctrl-names = "default";
327	};
328};
329
330&gpucc {
331	vdd-gfx-supply = <&vdd_gfx>;
332	status = "okay";
333};
334
335&gmu {
336	status = "okay";
337};
338
339&gpu {
340	status = "okay";
341};
342
343&gpu_zap_shader {
344	firmware-name = "qcom/sa8295p/a690_zap.mbn";
345};
346
347&gpu_smmu {
348	status = "okay";
349};
350
351&mdss0 {
352	status = "okay";
353};
354
355&mdss0_dp2 {
356	status = "okay";
357};
358
359&mdss0_dp2_out {
360	data-lanes = <0 1 2 3>;
361	remote-endpoint = <&edp0_connector_in>;
362};
363
364&mdss0_dp2_phy {
365	vdda-phy-supply = <&vreg_l8g>;
366	vdda-pll-supply = <&vreg_l3g>;
367
368	status = "okay";
369};
370
371&mdss0_dp3 {
372	status = "okay";
373};
374
375&mdss0_dp3_out {
376	data-lanes = <0 1 2 3>;
377	remote-endpoint = <&edp1_connector_in>;
378};
379
380&mdss0_dp3_phy {
381	vdda-phy-supply = <&vreg_l8g>;
382	vdda-pll-supply = <&vreg_l3g>;
383
384	status = "okay";
385};
386
387&mdss1 {
388	status = "okay";
389};
390
391&mdss1_dp0 {
392	status = "okay";
393};
394
395&mdss1_dp0_out {
396	data-lanes = <0 1 2 3>;
397	remote-endpoint = <&dp2_connector_in>;
398};
399
400&mdss1_dp0_phy {
401	vdda-phy-supply = <&vreg_l11g>;
402	vdda-pll-supply = <&vreg_l3g>;
403
404	status = "okay";
405};
406
407&mdss1_dp1 {
408	status = "okay";
409};
410
411&mdss1_dp1_out {
412	data-lanes = <0 1 2 3>;
413	remote-endpoint = <&dp3_connector_in>;
414};
415
416&mdss1_dp1_phy {
417	vdda-phy-supply = <&vreg_l11g>;
418	vdda-pll-supply = <&vreg_l3g>;
419
420	status = "okay";
421};
422
423&mdss1_dp2 {
424	status = "okay";
425};
426
427&mdss1_dp2_out {
428	data-lanes = <0 1 2 3>;
429	remote-endpoint = <&edp2_connector_in>;
430};
431
432&mdss1_dp2_phy {
433	vdda-phy-supply = <&vreg_l11g>;
434	vdda-pll-supply = <&vreg_l3g>;
435
436	status = "okay";
437};
438
439&mdss1_dp3 {
440	status = "okay";
441};
442
443&mdss1_dp3_out {
444	data-lanes = <0 1 2 3>;
445	remote-endpoint = <&edp3_connector_in>;
446};
447
448&mdss1_dp3_phy {
449	vdda-phy-supply = <&vreg_l11g>;
450	vdda-pll-supply = <&vreg_l3g>;
451
452	status = "okay";
453};
454
455&pcie2a {
456	perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>;
457	wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>;
458
459	pinctrl-names = "default";
460	pinctrl-0 = <&pcie2a_default>;
461
462	status = "okay";
463};
464
465&pcie2a_phy {
466	vdda-phy-supply = <&vreg_l11a>;
467	vdda-pll-supply = <&vreg_l3a>;
468
469	status = "okay";
470};
471
472&pcie3a {
473	num-lanes = <2>;
474
475	perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
476	wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>;
477
478	pinctrl-names = "default";
479	pinctrl-0 = <&pcie3a_default>;
480
481	status = "okay";
482};
483
484&pcie3a_phy {
485	vdda-phy-supply = <&vreg_l11a>;
486	vdda-pll-supply = <&vreg_l3a>;
487
488	status = "okay";
489};
490
491&pcie3b {
492	perst-gpios = <&tlmm 153 GPIO_ACTIVE_LOW>;
493	wake-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
494
495	pinctrl-names = "default";
496	pinctrl-0 = <&pcie3b_default>;
497
498	status = "okay";
499};
500
501&pcie3b_phy {
502	vdda-phy-supply = <&vreg_l11a>;
503	vdda-pll-supply = <&vreg_l3a>;
504
505	status = "okay";
506};
507
508&pcie4 {
509	perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
510	wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
511
512	pinctrl-names = "default";
513	pinctrl-0 = <&pcie4_default>;
514
515	status = "okay";
516};
517
518&pcie4_phy {
519	vdda-phy-supply = <&vreg_l11a>;
520	vdda-pll-supply = <&vreg_l3a>;
521
522	status = "okay";
523};
524
525&qup1 {
526	status = "okay";
527};
528
529&qup2 {
530	status = "okay";
531};
532
533&remoteproc_adsp {
534	firmware-name = "qcom/sa8540p/adsp.mbn";
535	status = "okay";
536};
537
538&remoteproc_nsp0 {
539	firmware-name = "qcom/sa8540p/cdsp.mbn";
540	status = "okay";
541};
542
543&remoteproc_nsp1 {
544	firmware-name = "qcom/sa8540p/cdsp1.mbn";
545	status = "okay";
546};
547
548&uart17 {
549	compatible = "qcom,geni-debug-uart";
550	status = "okay";
551};
552
553&ufs_mem_hc {
554	reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
555
556	vcc-supply = <&vreg_l17c>;
557	vcc-max-microamp = <800000>;
558	vccq-supply = <&vreg_l6c>;
559	vccq-max-microamp = <900000>;
560
561	status = "okay";
562};
563
564&ufs_mem_phy {
565	vdda-phy-supply = <&vreg_l8g>;
566	vdda-pll-supply = <&vreg_l3g>;
567
568	status = "okay";
569};
570
571&ufs_card_hc {
572	reset-gpios = <&tlmm 229 GPIO_ACTIVE_LOW>;
573
574	vcc-supply = <&vreg_l10c>;
575	vcc-max-microamp = <800000>;
576	vccq-supply = <&vreg_l3c>;
577	vccq-max-microamp = <900000>;
578
579	status = "okay";
580};
581
582&ufs_card_phy {
583	vdda-phy-supply = <&vreg_l8g>;
584	vdda-pll-supply = <&vreg_l3g>;
585
586	status = "okay";
587};
588
589&usb_0 {
590	status = "okay";
591};
592
593&usb_0_dwc3 {
594	/* TODO: Define USB-C connector properly */
595	dr_mode = "peripheral";
596};
597
598&usb_0_hsphy {
599	vdda-pll-supply = <&vreg_l5a>;
600	vdda18-supply = <&vreg_l7a>;
601	vdda33-supply = <&vreg_l13a>;
602
603	status = "okay";
604};
605
606&usb_0_qmpphy {
607	vdda-phy-supply = <&vreg_l3a>;
608	vdda-pll-supply = <&vreg_l5a>;
609
610	status = "okay";
611};
612
613&usb_1 {
614	status = "okay";
615};
616
617&usb_1_dwc3 {
618	/* TODO: Define USB-C connector properly */
619	dr_mode = "host";
620};
621
622&usb_1_hsphy {
623	vdda-pll-supply = <&vreg_l1c>;
624	vdda18-supply = <&vreg_l7c>;
625	vdda33-supply = <&vreg_l2c>;
626
627	status = "okay";
628};
629
630&usb_1_qmpphy {
631	vdda-phy-supply = <&vreg_l4c>;
632	vdda-pll-supply = <&vreg_l1c>;
633
634	status = "okay";
635};
636
637&usb_2 {
638	status = "okay";
639};
640
641&usb_2_hsphy0 {
642	vdda-pll-supply = <&vreg_l5a>;
643	vdda18-supply = <&vreg_l7g>;
644	vdda33-supply = <&vreg_l13a>;
645
646	status = "okay";
647};
648
649&usb_2_hsphy1 {
650	vdda-pll-supply = <&vreg_l5a>;
651	vdda18-supply = <&vreg_l7g>;
652	vdda33-supply = <&vreg_l13a>;
653
654	status = "okay";
655};
656
657&usb_2_hsphy2 {
658	vdda-pll-supply = <&vreg_l5a>;
659	vdda18-supply = <&vreg_l7g>;
660	vdda33-supply = <&vreg_l13a>;
661
662	status = "okay";
663};
664
665&usb_2_hsphy3 {
666	vdda-pll-supply = <&vreg_l5a>;
667	vdda18-supply = <&vreg_l7g>;
668	vdda33-supply = <&vreg_l13a>;
669
670	status = "okay";
671};
672
673&usb_2_qmpphy0 {
674	vdda-phy-supply = <&vreg_l3a>;
675	vdda-pll-supply = <&vreg_l5a>;
676
677	status = "okay";
678};
679
680&usb_2_qmpphy1 {
681	vdda-phy-supply = <&vreg_l3a>;
682	vdda-pll-supply = <&vreg_l5a>;
683
684	status = "okay";
685};
686
687&xo_board_clk {
688	clock-frequency = <38400000>;
689};
690
691/* PINCTRL */
692
693&pmm8540a_gpios {
694	max20411_en: max20411-en-state {
695		pins = "gpio2";
696		function = "normal";
697		output-enable;
698	};
699};
700
701&pmm8540c_gpios {
702	usb2_en: usb2-en-state {
703		pins = "gpio9";
704		function = "normal";
705		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
706		output-enable;
707		power-source = <0>;
708	};
709};
710
711&pmm8540e_gpios {
712	usb3_en: usb3-en-state {
713		pins = "gpio5";
714		function = "normal";
715		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
716		output-enable;
717		power-source = <0>;
718	};
719};
720
721&pmm8540g_gpios {
722	usb4_en: usb4-en-state {
723		pins = "gpio5";
724		function = "normal";
725		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
726		output-enable;
727		power-source = <0>;
728	};
729
730	usb5_en: usb5-en-state {
731		pins = "gpio9";
732		function = "normal";
733		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
734		output-enable;
735		power-source = <0>;
736	};
737};
738
739&tlmm {
740	pcie2a_default: pcie2a-default-state {
741		clkreq-n-pins {
742			pins = "gpio142";
743			function = "pcie2a_clkreq";
744			drive-strength = <2>;
745			bias-pull-up;
746		};
747
748		perst-n-pins {
749			pins = "gpio143";
750			function = "gpio";
751			drive-strength = <2>;
752			bias-pull-down;
753		};
754
755		wake-n-pins {
756			pins = "gpio145";
757			function = "gpio";
758			drive-strength = <2>;
759			bias-pull-up;
760		};
761	};
762
763	pcie3a_default: pcie3a-default-state {
764		clkreq-n-pins {
765			pins = "gpio150";
766			function = "pcie3a_clkreq";
767			drive-strength = <2>;
768			bias-pull-up;
769		};
770
771		perst-n-pins {
772			pins = "gpio151";
773			function = "gpio";
774			drive-strength = <2>;
775			bias-pull-down;
776		};
777
778		wake-n-pins {
779			pins = "gpio56";
780			function = "gpio";
781			drive-strength = <2>;
782			bias-pull-up;
783		};
784	};
785
786	pcie3b_default: pcie3b-default-state {
787		clkreq-n-pins {
788			pins = "gpio152";
789			function = "pcie3b_clkreq";
790			drive-strength = <2>;
791			bias-pull-up;
792		};
793
794		perst-n-pins {
795			pins = "gpio153";
796			function = "gpio";
797			drive-strength = <2>;
798			bias-pull-down;
799		};
800
801		wake-n-pins {
802			pins = "gpio130";
803			function = "gpio";
804			drive-strength = <2>;
805			bias-pull-up;
806		};
807	};
808
809	pcie4_default: pcie4-default-state {
810		clkreq-n-pins {
811			pins = "gpio140";
812			function = "pcie4_clkreq";
813			drive-strength = <2>;
814			bias-pull-up;
815		};
816
817		perst-n-pins {
818			pins = "gpio141";
819			function = "gpio";
820			drive-strength = <2>;
821			bias-pull-down;
822		};
823
824		wake-n-pins {
825			pins = "gpio139";
826			function = "gpio";
827			drive-strength = <2>;
828			bias-pull-up;
829		};
830	};
831
832	qup1_i2c4_state: qup1-i2c4-state {
833		pins = "gpio0", "gpio1";
834		function = "qup12";
835		drive-strength = <2>;
836		bias-pull-up;
837	};
838};
839