xref: /linux/arch/arm64/boot/dts/qcom/sc7180-idp.dts (revision d206cef03c4827984e6ac88a9472b70c41f5b28d)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * SC7180 IDP board device tree source
4 *
5 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
12#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
13#include "sc7180.dtsi"
14#include "pm6150.dtsi"
15#include "pm6150l.dtsi"
16
17/ {
18	model = "Qualcomm Technologies, Inc. SC7180 IDP";
19	compatible = "qcom,sc7180-idp", "qcom,sc7180";
20
21	aliases {
22		bluetooth0 = &bluetooth;
23		hsuart0 = &uart3;
24		serial0 = &uart8;
25		wifi0 = &wifi;
26	};
27
28	chosen {
29		stdout-path = "serial0:115200n8";
30	};
31};
32
33/*
34 * Reserved memory changes
35 *
36 * Delete all unused memory nodes and define the peripheral memory regions
37 * required by the board dts.
38 *
39 */
40
41/delete-node/ &hyp_mem;
42/delete-node/ &xbl_mem;
43/delete-node/ &aop_mem;
44/delete-node/ &sec_apps_mem;
45/delete-node/ &tz_mem;
46
47/* Increase the size from 2MB to 8MB */
48&rmtfs_mem {
49	reg = <0x0 0x94600000 0x0 0x800000>;
50};
51
52/ {
53	reserved-memory {
54		atf_mem: memory@80b00000 {
55			reg = <0x0 0x80b00000 0x0 0x100000>;
56			no-map;
57		};
58
59		mpss_mem: memory@86000000 {
60			reg = <0x0 0x86000000 0x0 0x8c00000>;
61			no-map;
62		};
63
64		camera_mem: memory@8ec00000 {
65			reg = <0x0 0x8ec00000 0x0 0x500000>;
66			no-map;
67		};
68
69		venus_mem: memory@8f600000 {
70			reg = <0 0x8f600000 0 0x500000>;
71			no-map;
72		};
73
74		wlan_mem: memory@94100000 {
75			reg = <0x0 0x94100000 0x0 0x200000>;
76			no-map;
77		};
78
79		mba_mem: memory@94400000 {
80			reg = <0x0 0x94400000 0x0 0x200000>;
81			no-map;
82		};
83	};
84};
85
86&apps_rsc {
87	pm6150-rpmh-regulators {
88		compatible = "qcom,pm6150-rpmh-regulators";
89		qcom,pmic-id = "a";
90
91		vreg_s1a_1p1: smps1 {
92			regulator-min-microvolt = <1128000>;
93			regulator-max-microvolt = <1128000>;
94		};
95
96		vreg_s4a_1p0: smps4 {
97			regulator-min-microvolt = <824000>;
98			regulator-max-microvolt = <1120000>;
99		};
100
101		vreg_s5a_2p0: smps5 {
102			regulator-min-microvolt = <1744000>;
103			regulator-max-microvolt = <2040000>;
104		};
105
106		vreg_l1a_1p2: ldo1 {
107			regulator-min-microvolt = <1178000>;
108			regulator-max-microvolt = <1256000>;
109			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
110		};
111
112		vreg_l2a_1p0: ldo2 {
113			regulator-min-microvolt = <944000>;
114			regulator-max-microvolt = <1056000>;
115			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
116		};
117
118		vreg_l3a_1p0: ldo3 {
119			regulator-min-microvolt = <968000>;
120			regulator-max-microvolt = <1064000>;
121			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
122		};
123
124		vreg_l4a_0p8: ldo4 {
125			regulator-min-microvolt = <824000>;
126			regulator-max-microvolt = <928000>;
127			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
128		};
129
130		vreg_l5a_2p7: ldo5 {
131			regulator-min-microvolt = <2496000>;
132			regulator-max-microvolt = <3000000>;
133			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
134		};
135
136		vreg_l6a_0p6: ldo6 {
137			regulator-min-microvolt = <568000>;
138			regulator-max-microvolt = <648000>;
139			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
140		};
141
142		vreg_l9a_0p6: ldo9 {
143			regulator-min-microvolt = <488000>;
144			regulator-max-microvolt = <800000>;
145			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
146		};
147
148		vreg_l10a_1p8: ldo10 {
149			regulator-min-microvolt = <1800000>;
150			regulator-max-microvolt = <1832000>;
151			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
152		};
153
154		vreg_l11a_1p8: ldo11 {
155			regulator-min-microvolt = <1696000>;
156			regulator-max-microvolt = <1904000>;
157			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
158		};
159
160		vreg_l12a_1p8: ldo12 {
161			regulator-min-microvolt = <1800000>;
162			regulator-max-microvolt = <1800000>;
163			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
164		};
165
166		vreg_l13a_1p8: ldo13 {
167			regulator-min-microvolt = <1696000>;
168			regulator-max-microvolt = <1904000>;
169			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
170		};
171
172		vreg_l14a_1p8: ldo14 {
173			regulator-min-microvolt = <1728000>;
174			regulator-max-microvolt = <1832000>;
175			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
176		};
177
178		vreg_l15a_1p8: ldo15 {
179			regulator-min-microvolt = <1696000>;
180			regulator-max-microvolt = <1904000>;
181			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
182		};
183
184		vreg_l16a_2p7: ldo16 {
185			regulator-min-microvolt = <2496000>;
186			regulator-max-microvolt = <3304000>;
187			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
188		};
189
190		vreg_l17a_3p0: ldo17 {
191			regulator-min-microvolt = <2920000>;
192			regulator-max-microvolt = <3232000>;
193			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
194		};
195
196		vreg_l18a_2p8: ldo18 {
197			regulator-min-microvolt = <2496000>;
198			regulator-max-microvolt = <3304000>;
199			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
200		};
201
202		vreg_l19a_2p9: ldo19 {
203			regulator-min-microvolt = <2960000>;
204			regulator-max-microvolt = <2960000>;
205			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
206		};
207	};
208
209	pm6150l-rpmh-regulators {
210		compatible = "qcom,pm6150l-rpmh-regulators";
211		qcom,pmic-id = "c";
212
213		vreg_s8c_1p3: smps8 {
214			regulator-min-microvolt = <1120000>;
215			regulator-max-microvolt = <1408000>;
216		};
217
218		vreg_l1c_1p8: ldo1 {
219			regulator-min-microvolt = <1616000>;
220			regulator-max-microvolt = <1984000>;
221			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
222		};
223
224		vreg_l2c_1p3: ldo2 {
225			regulator-min-microvolt = <1168000>;
226			regulator-max-microvolt = <1304000>;
227			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
228		};
229
230		vreg_l3c_1p2: ldo3 {
231			regulator-min-microvolt = <1144000>;
232			regulator-max-microvolt = <1304000>;
233			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
234		};
235
236		vreg_l4c_1p8: ldo4 {
237			regulator-min-microvolt = <1648000>;
238			regulator-max-microvolt = <3304000>;
239			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
240		};
241
242		vreg_l5c_1p8: ldo5 {
243			regulator-min-microvolt = <1648000>;
244			regulator-max-microvolt = <3304000>;
245			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
246		};
247
248		vreg_l6c_2p9: ldo6 {
249			regulator-min-microvolt = <1800000>;
250			regulator-max-microvolt = <2950000>;
251			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
252		};
253
254		vreg_l7c_3p0: ldo7 {
255			regulator-min-microvolt = <3000000>;
256			regulator-max-microvolt = <3312000>;
257			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
258		};
259
260		vreg_l8c_1p8: ldo8 {
261			regulator-min-microvolt = <1800000>;
262			regulator-max-microvolt = <1904000>;
263			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
264		};
265
266		vreg_l9c_2p9: ldo9 {
267			regulator-min-microvolt = <2960000>;
268			regulator-max-microvolt = <2960000>;
269			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
270		};
271
272		vreg_l10c_3p3: ldo10 {
273			regulator-min-microvolt = <3000000>;
274			regulator-max-microvolt = <3400000>;
275			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
276		};
277
278		vreg_l11c_3p3: ldo11 {
279			regulator-min-microvolt = <3000000>;
280			regulator-max-microvolt = <3400000>;
281			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
282		};
283
284		vreg_bob: bob {
285			regulator-min-microvolt = <3008000>;
286			regulator-max-microvolt = <3960000>;
287			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
288		};
289	};
290};
291
292&dsi0 {
293	status = "okay";
294
295	vdda-supply = <&vreg_l3c_1p2>;
296
297	panel@0 {
298		compatible = "visionox,rm69299-1080p-display";
299		reg = <0>;
300
301		vdda-supply = <&vreg_l8c_1p8>;
302		vdd3p3-supply = <&vreg_l18a_2p8>;
303
304		pinctrl-names = "default";
305		pinctrl-0 = <&disp_pins>;
306
307		reset-gpios = <&pm6150l_gpio 3 GPIO_ACTIVE_HIGH>;
308
309		ports {
310			#address-cells = <1>;
311			#size-cells = <0>;
312			port@0 {
313				reg = <0>;
314				panel0_in: endpoint {
315					remote-endpoint = <&dsi0_out>;
316				};
317			};
318		};
319	};
320
321	ports {
322		port@1 {
323			endpoint {
324				remote-endpoint = <&panel0_in>;
325				data-lanes = <0 1 2 3>;
326			};
327		};
328	};
329};
330
331&dsi_phy {
332	status = "okay";
333	vdds-supply = <&vreg_l4a_0p8>;
334};
335
336&mdp {
337	status = "okay";
338};
339
340&mdss {
341	status = "okay";
342};
343
344&qfprom {
345	vcc-supply = <&vreg_l11a_1p8>;
346};
347
348&qspi {
349	status = "okay";
350	pinctrl-names = "default";
351	pinctrl-0 = <&qspi_clk &qspi_cs0 &qspi_data01>;
352
353	flash@0 {
354		compatible = "jedec,spi-nor";
355		reg = <0>;
356		spi-max-frequency = <25000000>;
357		spi-tx-bus-width = <2>;
358		spi-rx-bus-width = <2>;
359	};
360};
361
362&qupv3_id_0 {
363	status = "okay";
364};
365
366&qupv3_id_1 {
367	status = "okay";
368};
369
370&remoteproc_mpss {
371	status = "okay";
372	compatible = "qcom,sc7180-mss-pil";
373	iommus = <&apps_smmu 0x461 0x0>, <&apps_smmu 0x444 0x3>;
374	memory-region = <&mba_mem &mpss_mem>;
375};
376
377&sdhc_1 {
378	status = "okay";
379
380	pinctrl-names = "default", "sleep";
381	pinctrl-0 = <&sdc1_on>;
382	pinctrl-1 = <&sdc1_off>;
383	vmmc-supply = <&vreg_l19a_2p9>;
384	vqmmc-supply = <&vreg_l12a_1p8>;
385};
386
387&sdhc_2 {
388	status = "okay";
389
390	pinctrl-names = "default","sleep";
391	pinctrl-0 = <&sdc2_on>;
392	pinctrl-1 = <&sdc2_off>;
393	vmmc-supply = <&vreg_l9c_2p9>;
394	vqmmc-supply = <&vreg_l6c_2p9>;
395
396	cd-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
397};
398
399&uart3 {
400	status = "okay";
401
402	/delete-property/interrupts;
403	interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
404				<&tlmm 41 IRQ_TYPE_EDGE_FALLING>;
405
406	pinctrl-names = "default", "sleep";
407	pinctrl-1 = <&qup_uart3_sleep>;
408
409	bluetooth: wcn3990-bt {
410		compatible = "qcom,wcn3990-bt";
411		vddio-supply = <&vreg_l10a_1p8>;
412		vddxo-supply = <&vreg_l1c_1p8>;
413		vddrf-supply = <&vreg_l2c_1p3>;
414		vddch0-supply = <&vreg_l10c_3p3>;
415		max-speed = <3200000>;
416	};
417};
418
419&uart8 {
420	status = "okay";
421};
422
423&usb_1 {
424	status = "okay";
425};
426
427&usb_1_dwc3 {
428	dr_mode = "host";
429};
430
431&usb_1_hsphy {
432	status = "okay";
433	vdd-supply = <&vreg_l4a_0p8>;
434	vdda-pll-supply = <&vreg_l11a_1p8>;
435	vdda-phy-dpdm-supply = <&vreg_l17a_3p0>;
436	qcom,imp-res-offset-value = <8>;
437	qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_15_PERCENT>;
438	qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
439	qcom,bias-ctrl-value = <0x22>;
440	qcom,charge-ctrl-value = <3>;
441	qcom,hsdisc-trim-value = <0>;
442};
443
444&usb_1_qmpphy {
445	status = "okay";
446	vdda-phy-supply = <&vreg_l3c_1p2>;
447	vdda-pll-supply = <&vreg_l4a_0p8>;
448};
449
450&venus {
451	video-firmware {
452		iommus = <&apps_smmu 0x0c42 0x0>;
453	};
454};
455
456&wifi {
457	status = "okay";
458	vdd-0.8-cx-mx-supply = <&vreg_l9a_0p6>;
459	vdd-1.8-xo-supply = <&vreg_l1c_1p8>;
460	vdd-1.3-rfa-supply = <&vreg_l2c_1p3>;
461	vdd-3.3-ch0-supply = <&vreg_l10c_3p3>;
462	vdd-3.3-ch1-supply = <&vreg_l11c_3p3>;
463	wifi-firmware {
464		iommus = <&apps_smmu 0xc2 0x1>;
465	};
466};
467
468/* PINCTRL - additions to nodes defined in sc7180.dtsi */
469
470&pm6150l_gpio {
471	disp_pins: disp-state {
472		pinconf {
473			pins = "gpio3";
474			function = PMIC_GPIO_FUNC_FUNC1;
475			qcom,drive-strength = <PMIC_GPIO_STRENGTH_MED>;
476			power-source = <0>;
477			bias-disable;
478			output-low;
479		};
480	};
481};
482
483&qspi_clk {
484	pinconf {
485		pins = "gpio63";
486		bias-disable;
487	};
488};
489
490&qspi_cs0 {
491	pinconf {
492		pins = "gpio68";
493		bias-disable;
494	};
495};
496
497&qspi_data01 {
498	pinconf {
499		pins = "gpio64", "gpio65";
500
501		/* High-Z when no transfers; nice to park the lines */
502		bias-pull-up;
503	};
504};
505
506&qup_i2c2_default {
507	pinconf {
508		pins = "gpio15", "gpio16";
509		drive-strength = <2>;
510
511		/* Has external pullup */
512		bias-disable;
513	};
514};
515
516&qup_i2c4_default {
517	pinconf {
518		pins = "gpio115", "gpio116";
519		drive-strength = <2>;
520
521		/* Has external pullup */
522		bias-disable;
523	};
524};
525
526&qup_i2c7_default {
527	pinconf {
528		pins = "gpio6", "gpio7";
529		drive-strength = <2>;
530
531		/* Has external pullup */
532		bias-disable;
533	};
534};
535
536&qup_i2c9_default {
537	pinconf {
538		pins = "gpio46", "gpio47";
539		drive-strength = <2>;
540
541		/* Has external pullup */
542		bias-disable;
543	};
544};
545
546&qup_uart3_default {
547	pinconf-cts {
548		/*
549		 * Configure a pull-down on CTS to match the pull of
550		 * the Bluetooth module.
551		 */
552		pins = "gpio38";
553		bias-pull-down;
554	};
555
556	pinconf-rts {
557		/* We'll drive RTS, so no pull */
558		pins = "gpio39";
559		drive-strength = <2>;
560		bias-disable;
561	};
562
563	pinconf-tx {
564		/* We'll drive TX, so no pull */
565		pins = "gpio40";
566		drive-strength = <2>;
567		bias-disable;
568	};
569
570	pinconf-rx {
571		/*
572		 * Configure a pull-up on RX. This is needed to avoid
573		 * garbage data when the TX pin of the Bluetooth module is
574		 * in tri-state (module powered off or not driving the
575		 * signal yet).
576		 */
577		pins = "gpio41";
578		bias-pull-up;
579	};
580};
581
582&qup_uart8_default {
583	pinconf-tx {
584		pins = "gpio44";
585		drive-strength = <2>;
586		bias-disable;
587	};
588
589	pinconf-rx {
590		pins = "gpio45";
591		drive-strength = <2>;
592		bias-pull-up;
593	};
594};
595
596&qup_spi0_default {
597	pinconf {
598		pins = "gpio34", "gpio35", "gpio36", "gpio37";
599		drive-strength = <2>;
600		bias-disable;
601	};
602};
603
604&qup_spi6_default {
605	pinconf {
606		pins = "gpio59", "gpio60", "gpio61", "gpio62";
607		drive-strength = <2>;
608		bias-disable;
609	};
610};
611
612&qup_spi10_default {
613	pinconf {
614		pins = "gpio86", "gpio87", "gpio88", "gpio89";
615		drive-strength = <2>;
616		bias-disable;
617	};
618};
619
620&tlmm {
621	qup_uart3_sleep: qup-uart3-sleep {
622		pinmux {
623			pins = "gpio38", "gpio39",
624			       "gpio40", "gpio41";
625			function = "gpio";
626		};
627
628		pinconf-cts {
629			/*
630			 * Configure a pull-down on CTS to match the pull of
631			 * the Bluetooth module.
632			 */
633			pins = "gpio38";
634			bias-pull-down;
635		};
636
637		pinconf-rts {
638			/*
639			 * Configure pull-down on RTS. As RTS is active low
640			 * signal, pull it low to indicate the BT SoC that it
641			 * can wakeup the system anytime from suspend state by
642			 * pulling RX low (by sending wakeup bytes).
643			 */
644			 pins = "gpio39";
645			 bias-pull-down;
646		};
647
648		pinconf-tx {
649			/*
650			 * Configure pull-up on TX when it isn't actively driven
651			 * to prevent BT SoC from receiving garbage during sleep.
652			 */
653			pins = "gpio40";
654			bias-pull-up;
655		};
656
657		pinconf-rx {
658			/*
659			 * Configure a pull-up on RX. This is needed to avoid
660			 * garbage data when the TX pin of the Bluetooth module
661			 * is floating which may cause spurious wakeups.
662			 */
663			pins = "gpio41";
664			bias-pull-up;
665		};
666	};
667
668	sdc1_on: sdc1-on {
669		pinconf-clk {
670			pins = "sdc1_clk";
671			bias-disable;
672			drive-strength = <16>;
673		};
674
675		pinconf-cmd {
676			pins = "sdc1_cmd";
677			bias-pull-up;
678			drive-strength = <10>;
679		};
680
681		pinconf-data {
682			pins = "sdc1_data";
683			bias-pull-up;
684			drive-strength = <10>;
685		};
686
687		pinconf-rclk {
688			pins = "sdc1_rclk";
689			bias-pull-down;
690		};
691	};
692
693	sdc1_off: sdc1-off {
694		pinconf-clk {
695			pins = "sdc1_clk";
696			bias-disable;
697			drive-strength = <2>;
698		};
699
700		pinconf-cmd {
701			pins = "sdc1_cmd";
702			bias-pull-up;
703			drive-strength = <2>;
704		};
705
706		pinconf-data {
707			pins = "sdc1_data";
708			bias-pull-up;
709			drive-strength = <2>;
710		};
711
712		pinconf-rclk {
713			pins = "sdc1_rclk";
714			bias-pull-down;
715		};
716	};
717
718	sdc2_on: sdc2-on {
719		pinconf-clk {
720			pins = "sdc2_clk";
721			bias-disable;
722			drive-strength = <16>;
723		};
724
725		pinconf-cmd {
726			pins = "sdc2_cmd";
727			bias-pull-up;
728			drive-strength = <10>;
729		};
730
731		pinconf-data {
732			pins = "sdc2_data";
733			bias-pull-up;
734			drive-strength = <10>;
735		};
736
737		pinconf-sd-cd {
738			pins = "gpio69";
739			bias-pull-up;
740			drive-strength = <2>;
741		};
742	};
743
744	sdc2_off: sdc2-off {
745		pinconf-clk {
746			pins = "sdc2_clk";
747			bias-disable;
748			drive-strength = <2>;
749		};
750
751		pinconf-cmd {
752			pins = "sdc2_cmd";
753			bias-pull-up;
754			drive-strength = <2>;
755		};
756
757		pinconf-data {
758			pins = "sdc2_data";
759			bias-pull-up;
760			drive-strength = <2>;
761		};
762
763		pinconf-sd-cd {
764			pins = "gpio69";
765			bias-pull-up;
766			drive-strength = <2>;
767		};
768	};
769};
770