Merge tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / arch / arm64 / boot / dts / qcom / sc7280-idp.dtsi
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                 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 &pm7325_gpios {
371         key_vol_up_default: key-vol-up-default {
372                 pins = "gpio6";
373                 function = "normal";
374                 input-enable;
375                 bias-pull-up;
376                 power-source = <0>;
377                 qcom,drive-strength = <3>;
378         };
379 };
380
381 &pcie1_clkreq_n {
382         bias-pull-up;
383         drive-strength = <2>;
384 };
385
386 &qspi_cs0 {
387         bias-disable;
388 };
389
390 &qspi_clk {
391         bias-disable;
392 };
393
394 &qspi_data01 {
395         /* High-Z when no transfers; nice to park the lines */
396         bias-pull-up;
397 };
398
399 &qup_uart5_tx {
400         drive-strength = <2>;
401         bias-disable;
402 };
403
404 &qup_uart5_rx {
405         drive-strength = <2>;
406         bias-pull-up;
407 };
408
409 &qup_uart7_cts {
410         /*
411          * Configure a bias-bus-hold on CTS to lower power
412          * usage when Bluetooth is turned off. Bus hold will
413          * maintain a low power state regardless of whether
414          * the Bluetooth module drives the pin in either
415          * direction or leaves the pin fully unpowered.
416          */
417         bias-bus-hold;
418 };
419
420 &qup_uart7_rts {
421         /* We'll drive RTS, so no pull */
422         drive-strength = <2>;
423         bias-disable;
424 };
425
426 &qup_uart7_tx {
427         /* We'll drive TX, so no pull */
428         drive-strength = <2>;
429         bias-disable;
430 };
431
432 &qup_uart7_rx {
433         /*
434          * Configure a pull-up on RX. This is needed to avoid
435          * garbage data when the TX pin of the Bluetooth module is
436          * in tri-state (module powered off or not driving the
437          * signal yet).
438          */
439         bias-pull-up;
440 };
441
442 &sdc1_clk {
443         bias-disable;
444         drive-strength = <16>;
445 };
446
447 &sdc1_cmd {
448         bias-pull-up;
449         drive-strength = <10>;
450 };
451
452 &sdc1_data {
453         bias-pull-up;
454         drive-strength = <10>;
455 };
456
457 &sdc1_rclk {
458         bias-pull-down;
459 };
460
461 &sdc2_clk {
462         bias-disable;
463         drive-strength = <16>;
464 };
465
466 &sdc2_cmd {
467         bias-pull-up;
468         drive-strength = <10>;
469 };
470
471 &sdc2_data {
472         bias-pull-up;
473         drive-strength = <10>;
474 };
475
476 &tlmm {
477         bt_en: bt-en {
478                 pins = "gpio85";
479                 function = "gpio";
480                 output-low;
481                 bias-disable;
482         };
483
484         nvme_pwren: nvme-pwren {
485                 function = "gpio";
486         };
487
488         pcie1_reset_n: pcie1-reset-n {
489                 pins = "gpio2";
490                 function = "gpio";
491
492                 drive-strength = <16>;
493                 output-low;
494                 bias-disable;
495         };
496
497         pcie1_wake_n: pcie1-wake-n {
498                 pins = "gpio3";
499                 function = "gpio";
500
501                 drive-strength = <2>;
502                 bias-pull-up;
503         };
504
505         qup_uart7_sleep_cts: qup-uart7-sleep-cts {
506                 pins = "gpio28";
507                 function = "gpio";
508                 /*
509                  * Configure a bias-bus-hold on CTS to lower power
510                  * usage when Bluetooth is turned off. Bus hold will
511                  * maintain a low power state regardless of whether
512                  * the Bluetooth module drives the pin in either
513                  * direction or leaves the pin fully unpowered.
514                  */
515                 bias-bus-hold;
516         };
517
518         qup_uart7_sleep_rts: qup-uart7-sleep-rts {
519                 pins = "gpio29";
520                 function = "gpio";
521                 /*
522                  * Configure pull-down on RTS. As RTS is active low
523                  * signal, pull it low to indicate the BT SoC that it
524                  * can wakeup the system anytime from suspend state by
525                  * pulling RX low (by sending wakeup bytes).
526                  */
527                 bias-pull-down;
528         };
529
530         qup_uart7_sleep_tx: qup-uart7-sleep-tx {
531                 pins = "gpio30";
532                 function = "gpio";
533                 /*
534                  * Configure pull-up on TX when it isn't actively driven
535                  * to prevent BT SoC from receiving garbage during sleep.
536                  */
537                 bias-pull-up;
538         };
539
540         qup_uart7_sleep_rx: qup-uart7-sleep-rx {
541                 pins = "gpio31";
542                 function = "gpio";
543                 /*
544                  * Configure a pull-up on RX. This is needed to avoid
545                  * garbage data when the TX pin of the Bluetooth module
546                  * is floating which may cause spurious wakeups.
547                  */
548                 bias-pull-up;
549         };
550
551         sd_cd: sd-cd {
552                 pins = "gpio91";
553                 function = "gpio";
554                 bias-pull-up;
555         };
556
557         sw_ctrl: sw-ctrl {
558                 pins = "gpio86";
559                 function = "gpio";
560                 bias-pull-down;
561         };
562 };
563
564 &remoteproc_wpss {
565         status = "okay";
566 };
567
568 &wifi {
569         status = "okay";
570         wifi-firmware {
571                 iommus = <&apps_smmu 0x1c02 0x1>;
572         };
573 };