xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi (revision 0d66206fff44f864ea8a4b220c3a53b4caa959a0)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * sc7280 IDP board device tree source (common between SKU1 and SKU2)
4 *
5 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
6 */
7
8#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
9#include <dt-bindings/input/linux-event-codes.h>
10#include "sc7280.dtsi"
11#include "pm7325.dtsi"
12#include "pm8350c.dtsi"
13#include "pmk8350.dtsi"
14
15#include "sc7280-chrome-common.dtsi"
16
17/ {
18	aliases {
19		bluetooth0 = &bluetooth;
20		serial1 = &uart7;
21	};
22
23	gpio-keys {
24		compatible = "gpio-keys";
25		label = "gpio-keys";
26
27		pinctrl-names = "default";
28		pinctrl-0 = <&key_vol_up_default>;
29
30		key-volume-up {
31			label = "volume_up";
32			gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
33			linux,input-type = <1>;
34			linux,code = <KEY_VOLUMEUP>;
35			gpio-key,wakeup;
36			debounce-interval = <15>;
37			linux,can-disable;
38		};
39	};
40
41	nvme_3v3_regulator: nvme-3v3-regulator {
42		compatible = "regulator-fixed";
43		regulator-name = "VLDO_3V3";
44
45		regulator-min-microvolt = <3300000>;
46		regulator-max-microvolt = <3300000>;
47
48		enable-active-high;
49		pinctrl-names = "default";
50		pinctrl-0 = <&nvme_pwren>;
51	};
52};
53
54&apps_rsc {
55	pm7325-regulators {
56		compatible = "qcom,pm7325-rpmh-regulators";
57		qcom,pmic-id = "b";
58
59		vreg_s1b_1p8: smps1 {
60			regulator-min-microvolt = <1856000>;
61			regulator-max-microvolt = <2040000>;
62		};
63
64		vreg_s7b_0p9: smps7 {
65			regulator-min-microvolt = <535000>;
66			regulator-max-microvolt = <1120000>;
67		};
68
69		vreg_s8b_1p2: smps8 {
70			regulator-min-microvolt = <1256000>;
71			regulator-max-microvolt = <1500000>;
72		};
73
74		vreg_l1b_0p8: ldo1 {
75			regulator-min-microvolt = <825000>;
76			regulator-max-microvolt = <925000>;
77		};
78
79		vreg_l2b_3p0: ldo2 {
80			regulator-min-microvolt = <2700000>;
81			regulator-max-microvolt = <3544000>;
82		};
83
84		vreg_l6b_1p2: ldo6 {
85			regulator-min-microvolt = <1140000>;
86			regulator-max-microvolt = <1260000>;
87		};
88
89		vreg_l7b_2p9: ldo7 {
90			regulator-min-microvolt = <2960000>;
91			regulator-max-microvolt = <2960000>;
92		};
93
94		vreg_l8b_0p9: ldo8 {
95			regulator-min-microvolt = <870000>;
96			regulator-max-microvolt = <970000>;
97		};
98
99		vreg_l9b_1p2: ldo9 {
100			regulator-min-microvolt = <1080000>;
101			regulator-max-microvolt = <1304000>;
102		};
103
104		vreg_l11b_1p7: ldo11 {
105			regulator-min-microvolt = <1504000>;
106			regulator-max-microvolt = <2000000>;
107		};
108
109		vreg_l12b_0p8: ldo12 {
110			regulator-min-microvolt = <751000>;
111			regulator-max-microvolt = <824000>;
112		};
113
114		vreg_l13b_0p8: ldo13 {
115			regulator-min-microvolt = <530000>;
116			regulator-max-microvolt = <824000>;
117		};
118
119		vreg_l14b_1p2: ldo14 {
120			regulator-min-microvolt = <1080000>;
121			regulator-max-microvolt = <1304000>;
122		};
123
124		vreg_l15b_0p8: ldo15 {
125			regulator-min-microvolt = <765000>;
126			regulator-max-microvolt = <1020000>;
127		};
128
129		vreg_l16b_1p2: ldo16 {
130			regulator-min-microvolt = <1100000>;
131			regulator-max-microvolt = <1300000>;
132		};
133
134		vreg_l17b_1p8: ldo17 {
135			regulator-min-microvolt = <1700000>;
136			regulator-max-microvolt = <1900000>;
137		};
138
139		vreg_l18b_1p8: ldo18 {
140			regulator-min-microvolt = <1800000>;
141			regulator-max-microvolt = <2000000>;
142		};
143
144		vreg_l19b_1p8: ldo19 {
145			regulator-min-microvolt = <1800000>;
146			regulator-max-microvolt = <1800000>;
147		};
148	};
149
150	pm8350c-regulators {
151		compatible = "qcom,pm8350c-rpmh-regulators";
152		qcom,pmic-id = "c";
153
154		vreg_s1c_2p2: smps1 {
155			regulator-min-microvolt = <2190000>;
156			regulator-max-microvolt = <2210000>;
157		};
158
159		vreg_s9c_1p0: smps9 {
160			regulator-min-microvolt = <1010000>;
161			regulator-max-microvolt = <1170000>;
162		};
163
164		vreg_l1c_1p8: ldo1 {
165			regulator-min-microvolt = <1800000>;
166			regulator-max-microvolt = <1980000>;
167		};
168
169		vreg_l2c_1p8: ldo2 {
170			regulator-min-microvolt = <1620000>;
171			regulator-max-microvolt = <1980000>;
172		};
173
174		vreg_l3c_3p0: ldo3 {
175			regulator-min-microvolt = <2800000>;
176			regulator-max-microvolt = <3540000>;
177		};
178
179		vreg_l4c_1p8: ldo4 {
180			regulator-min-microvolt = <1620000>;
181			regulator-max-microvolt = <3300000>;
182		};
183
184		vreg_l5c_1p8: ldo5 {
185			regulator-min-microvolt = <1620000>;
186			regulator-max-microvolt = <3300000>;
187		};
188
189		vreg_l6c_2p9: ldo6 {
190			regulator-min-microvolt = <1800000>;
191			regulator-max-microvolt = <2950000>;
192		};
193
194		vreg_l7c_3p0: ldo7 {
195			regulator-min-microvolt = <3000000>;
196			regulator-max-microvolt = <3544000>;
197		};
198
199		vreg_l8c_1p8: ldo8 {
200			regulator-min-microvolt = <1620000>;
201			regulator-max-microvolt = <2000000>;
202		};
203
204		vreg_l9c_2p9: ldo9 {
205			regulator-min-microvolt = <2960000>;
206			regulator-max-microvolt = <2960000>;
207		};
208
209		vreg_l10c_0p8: ldo10 {
210			regulator-min-microvolt = <720000>;
211			regulator-max-microvolt = <1050000>;
212		};
213
214		vreg_l11c_2p8: ldo11 {
215			regulator-min-microvolt = <2800000>;
216			regulator-max-microvolt = <3544000>;
217		};
218
219		vreg_l12c_1p8: ldo12 {
220			regulator-min-microvolt = <1650000>;
221			regulator-max-microvolt = <2000000>;
222		};
223
224		vreg_l13c_3p0: ldo13 {
225			regulator-min-microvolt = <2700000>;
226			regulator-max-microvolt = <3544000>;
227		};
228
229		vreg_bob: bob {
230			regulator-min-microvolt = <3008000>;
231			regulator-max-microvolt = <3960000>;
232		};
233	};
234};
235
236&gpi_dma0 {
237	status = "okay";
238};
239
240&gpi_dma1 {
241	status = "okay";
242};
243
244&ipa {
245	status = "okay";
246	modem-init;
247};
248
249&pcie1 {
250	status = "okay";
251	perst-gpio = <&tlmm 2 GPIO_ACTIVE_LOW>;
252
253	vddpe-3v3-supply = <&nvme_3v3_regulator>;
254
255	pinctrl-names = "default";
256	pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>;
257};
258
259&pcie1_phy {
260	status = "okay";
261
262	vdda-phy-supply = <&vreg_l10c_0p8>;
263	vdda-pll-supply = <&vreg_l6b_1p2>;
264};
265
266&pmk8350_vadc {
267	pmk8350_die_temp {
268		reg = <PMK8350_ADC7_DIE_TEMP>;
269		label = "pmk8350_die_temp";
270		qcom,pre-scaling = <1 1>;
271	};
272};
273
274&qfprom {
275	vcc-supply = <&vreg_l1c_1p8>;
276};
277
278&qupv3_id_0 {
279	status = "okay";
280};
281
282&qupv3_id_1 {
283	status = "okay";
284};
285
286&sdhc_1 {
287	status = "okay";
288
289	non-removable;
290	no-sd;
291	no-sdio;
292
293	vmmc-supply = <&vreg_l7b_2p9>;
294	vqmmc-supply = <&vreg_l19b_1p8>;
295};
296
297&sdhc_2 {
298	status = "okay";
299
300	pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>, <&sd_cd>;
301	pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>, <&sd_cd>;
302
303	vmmc-supply = <&vreg_l9c_2p9>;
304	vqmmc-supply = <&vreg_l6c_2p9>;
305
306	cd-gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
307};
308
309&uart5 {
310	compatible = "qcom,geni-debug-uart";
311	status = "okay";
312};
313
314&usb_1 {
315	status = "okay";
316};
317
318&usb_1_dwc3 {
319	dr_mode = "host";
320};
321
322&usb_1_hsphy {
323	status = "okay";
324
325	vdda-pll-supply = <&vreg_l10c_0p8>;
326	vdda33-supply = <&vreg_l2b_3p0>;
327	vdda18-supply = <&vreg_l1c_1p8>;
328};
329
330&usb_1_qmpphy {
331	status = "okay";
332
333	vdda-phy-supply = <&vreg_l6b_1p2>;
334	vdda-pll-supply = <&vreg_l1b_0p8>;
335};
336
337&uart7 {
338	status = "okay";
339
340	/delete-property/interrupts;
341	interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
342				<&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
343	pinctrl-names = "default", "sleep";
344	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
345
346	bluetooth: bluetooth {
347		compatible = "qcom,wcn6750-bt";
348		pinctrl-names = "default";
349		pinctrl-0 = <&bt_en>, <&sw_ctrl>;
350		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
351		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
352		vddaon-supply = <&vreg_s7b_0p9>;
353		vddbtcxmx-supply = <&vreg_s7b_0p9>;
354		vddrfacmn-supply = <&vreg_s7b_0p9>;
355		vddrfa0p8-supply = <&vreg_s7b_0p9>;
356		vddrfa1p7-supply = <&vreg_s1b_1p8>;
357		vddrfa1p2-supply = <&vreg_s8b_1p2>;
358		vddrfa2p2-supply = <&vreg_s1c_2p2>;
359		vddasd-supply = <&vreg_l11c_2p8>;
360		max-speed = <3200000>;
361	};
362};
363
364/* PINCTRL - additions to nodes defined in sc7280.dtsi */
365
366&dp_hot_plug_det {
367	bias-disable;
368};
369
370&lpass_dmic01_clk {
371	drive-strength = <8>;
372	bias-disable;
373};
374
375&lpass_dmic01_clk_sleep {
376	drive-strength = <2>;
377};
378
379&lpass_dmic01_data {
380	bias-pull-down;
381};
382
383&lpass_dmic23_clk {
384	drive-strength = <8>;
385	bias-disable;
386};
387
388&lpass_dmic23_clk_sleep {
389	drive-strength = <2>;
390};
391
392&lpass_dmic23_data {
393	bias-pull-down;
394};
395
396&lpass_rx_swr_clk {
397	drive-strength = <2>;
398	slew-rate = <1>;
399	bias-disable;
400};
401
402&lpass_rx_swr_clk_sleep {
403	bias-pull-down;
404};
405
406&lpass_rx_swr_data {
407	drive-strength = <2>;
408	slew-rate = <1>;
409	bias-bus-hold;
410};
411
412&lpass_rx_swr_data_sleep {
413	bias-pull-down;
414};
415
416&lpass_tx_swr_clk {
417	drive-strength = <2>;
418	slew-rate = <1>;
419	bias-disable;
420};
421
422&lpass_tx_swr_clk_sleep {
423	bias-pull-down;
424};
425
426&lpass_tx_swr_data {
427	drive-strength = <2>;
428	slew-rate = <1>;
429	bias-bus-hold;
430};
431
432&mi2s1_data0 {
433	drive-strength = <6>;
434	bias-disable;
435};
436
437&mi2s1_sclk {
438	drive-strength = <6>;
439	bias-disable;
440};
441
442&mi2s1_ws {
443	drive-strength = <6>;
444};
445
446&pm7325_gpios {
447	key_vol_up_default: key-vol-up-state {
448		pins = "gpio6";
449		function = "normal";
450		input-enable;
451		bias-pull-up;
452		power-source = <0>;
453		qcom,drive-strength = <3>;
454	};
455};
456
457&pcie1_clkreq_n {
458	bias-pull-up;
459	drive-strength = <2>;
460};
461
462&qspi_cs0 {
463	bias-disable;
464};
465
466&qspi_clk {
467	bias-disable;
468};
469
470&qspi_data01 {
471	/* High-Z when no transfers; nice to park the lines */
472	bias-pull-up;
473};
474
475&qup_uart5_tx {
476	drive-strength = <2>;
477	bias-disable;
478};
479
480&qup_uart5_rx {
481	drive-strength = <2>;
482	bias-pull-up;
483};
484
485&qup_uart7_cts {
486	/*
487	 * Configure a bias-bus-hold on CTS to lower power
488	 * usage when Bluetooth is turned off. Bus hold will
489	 * maintain a low power state regardless of whether
490	 * the Bluetooth module drives the pin in either
491	 * direction or leaves the pin fully unpowered.
492	 */
493	bias-bus-hold;
494};
495
496&qup_uart7_rts {
497	/* We'll drive RTS, so no pull */
498	drive-strength = <2>;
499	bias-disable;
500};
501
502&qup_uart7_tx {
503	/* We'll drive TX, so no pull */
504	drive-strength = <2>;
505	bias-disable;
506};
507
508&qup_uart7_rx {
509	/*
510	 * Configure a pull-up on RX. This is needed to avoid
511	 * garbage data when the TX pin of the Bluetooth module is
512	 * in tri-state (module powered off or not driving the
513	 * signal yet).
514	 */
515	bias-pull-up;
516};
517
518&sdc1_clk {
519	bias-disable;
520	drive-strength = <16>;
521};
522
523&sdc1_cmd {
524	bias-pull-up;
525	drive-strength = <10>;
526};
527
528&sdc1_data {
529	bias-pull-up;
530	drive-strength = <10>;
531};
532
533&sdc1_rclk {
534	bias-pull-down;
535};
536
537&sdc2_clk {
538	bias-disable;
539	drive-strength = <16>;
540};
541
542&sdc2_cmd {
543	bias-pull-up;
544	drive-strength = <10>;
545};
546
547&sdc2_data {
548	bias-pull-up;
549	drive-strength = <10>;
550};
551
552&tlmm {
553	bt_en: bt-en {
554		pins = "gpio85";
555		function = "gpio";
556		output-low;
557		bias-disable;
558	};
559
560	nvme_pwren: nvme-pwren {
561		function = "gpio";
562	};
563
564	pcie1_reset_n: pcie1-reset-n {
565		pins = "gpio2";
566		function = "gpio";
567
568		drive-strength = <16>;
569		output-low;
570		bias-disable;
571	};
572
573	pcie1_wake_n: pcie1-wake-n {
574		pins = "gpio3";
575		function = "gpio";
576
577		drive-strength = <2>;
578		bias-pull-up;
579	};
580
581	qup_uart7_sleep_cts: qup-uart7-sleep-cts {
582		pins = "gpio28";
583		function = "gpio";
584		/*
585		 * Configure a bias-bus-hold on CTS to lower power
586		 * usage when Bluetooth is turned off. Bus hold will
587		 * maintain a low power state regardless of whether
588		 * the Bluetooth module drives the pin in either
589		 * direction or leaves the pin fully unpowered.
590		 */
591		bias-bus-hold;
592	};
593
594	qup_uart7_sleep_rts: qup-uart7-sleep-rts {
595		pins = "gpio29";
596		function = "gpio";
597		/*
598		 * Configure pull-down on RTS. As RTS is active low
599		 * signal, pull it low to indicate the BT SoC that it
600		 * can wakeup the system anytime from suspend state by
601		 * pulling RX low (by sending wakeup bytes).
602		 */
603		bias-pull-down;
604	};
605
606	qup_uart7_sleep_tx: qup-uart7-sleep-tx {
607		pins = "gpio30";
608		function = "gpio";
609		/*
610		 * Configure pull-up on TX when it isn't actively driven
611		 * to prevent BT SoC from receiving garbage during sleep.
612		 */
613		bias-pull-up;
614	};
615
616	qup_uart7_sleep_rx: qup-uart7-sleep-rx {
617		pins = "gpio31";
618		function = "gpio";
619		/*
620		 * Configure a pull-up on RX. This is needed to avoid
621		 * garbage data when the TX pin of the Bluetooth module
622		 * is floating which may cause spurious wakeups.
623		 */
624		bias-pull-up;
625	};
626
627	sd_cd: sd-cd {
628		pins = "gpio91";
629		function = "gpio";
630		bias-pull-up;
631	};
632
633	sw_ctrl: sw-ctrl {
634		pins = "gpio86";
635		function = "gpio";
636		bias-pull-down;
637	};
638};
639