arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / qcom / sdm630-sony-xperia-nile.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
4  * Copyright (c) 2020, AngeloGioacchino Del Regno
5  *                     <angelogioacchino.delregno@somainline.org>
6  */
7
8 #include "pm660.dtsi"
9 #include "pm660l.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/input/gpio-keys.h>
13
14 / {
15         /* required for bootloader to select correct board */
16         qcom,msm-id = <318 0>;
17         qcom,board-id = <8 1>;
18         qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;
19
20         /* This part enables graphical output via bootloader-enabled display */
21         chosen {
22                 bootargs = "earlycon=tty0 console=tty0";
23
24                 #address-cells = <2>;
25                 #size-cells = <2>;
26                 ranges;
27
28                 stdout-path = "framebuffer0";
29
30                 framebuffer0: framebuffer@9d400000 {
31                         compatible = "simple-framebuffer";
32                         reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
33                         width = <1080>;
34                         height = <1920>;
35                         stride = <(1080 * 4)>;
36                         format = "a8r8g8b8";
37                         status= "okay";
38                 };
39         };
40
41         board_vbat: vbat-regulator {
42                 compatible = "regulator-fixed";
43                 regulator-name = "VBAT";
44
45                 regulator-min-microvolt = <4000000>;
46                 regulator-max-microvolt = <4000000>;
47                 regulator-always-on;
48                 regulator-boot-on;
49         };
50
51         vph_pwr: vph-pwr-regulator {
52                 compatible = "regulator-fixed";
53                 regulator-name = "vph_pwr";
54
55                 regulator-always-on;
56                 regulator-boot-on;
57         };
58
59         cam_vdig_imx300_219_vreg: cam_vdig_imx300_219_vreg {
60                 compatible = "regulator-fixed";
61                 regulator-name = "cam_vdig_imx300_219_vreg";
62                 startup-delay-us = <0>;
63                 enable-active-high;
64                 gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>;
65                 pinctrl-names = "default";
66                 pinctrl-0 = <&cam_vdig_default>;
67         };
68
69         cam_vana_front_vreg: cam_vana_front_vreg {
70                 compatible = "regulator-fixed";
71                 regulator-name = "cam_vana_front_vreg";
72                 startup-delay-us = <0>;
73                 enable-active-high;
74                 gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
75                 pinctrl-names = "default";
76                 pinctrl-0 = <&imx219_vana_default>;
77         };
78
79         cam_vana_rear_vreg: cam_vana_rear_vreg {
80                 compatible = "regulator-fixed";
81                 regulator-name = "cam_vana_rear_vreg";
82                 startup-delay-us = <0>;
83                 enable-active-high;
84                 gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
85                 regulator-always-on;
86                 pinctrl-names = "default";
87                 pinctrl-0 = <&imx300_vana_default>;
88         };
89
90         gpio_keys {
91                 status = "okay";
92                 compatible = "gpio-keys";
93                 input-name = "gpio-keys";
94                 #address-cells = <1>;
95                 #size-cells = <0>;
96                 autorepeat;
97
98                 camera_focus {
99                         label = "Camera Focus";
100                         gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
101                         linux,input-type = <1>;
102                         linux,code = <KEY_CAMERA_FOCUS>;
103                         debounce-interval = <15>;
104                 };
105
106                 camera_snapshot {
107                         label = "Camera Snapshot";
108                         gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
109                         linux,input-type = <1>;
110                         linux,code = <KEY_CAMERA>;
111                         debounce-interval = <15>;
112                 };
113
114                 vol_down {
115                         label = "Volume Down";
116                         gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
117                         linux,input-type = <1>;
118                         linux,code = <KEY_VOLUMEDOWN>;
119                         gpio-key,wakeup;
120                         debounce-interval = <15>;
121                 };
122         };
123
124         reserved-memory {
125                 #address-cells = <2>;
126                 #size-cells = <2>;
127                 ranges;
128
129                 ramoops@ffc00000 {
130                         compatible = "ramoops";
131                         reg = <0x0 0xffc00000 0x0 0x100000>;
132                         record-size = <0x10000>;
133                         console-size = <0x60000>;
134                         ftrace-size = <0x10000>;
135                         pmsg-size = <0x20000>;
136                         ecc-size = <16>;
137                         status = "okay";
138                 };
139
140                 debug_region@ffb00000 {
141                         reg = <0x00 0xffb00000 0x00 0x100000>;
142                         no-map;
143                 };
144
145                 removed_region@85800000 {
146                         reg = <0x00 0x85800000 0x00 0x3700000>;
147                         no-map;
148                 };
149         };
150
151         /*
152          * Until we hook up type-c detection, we
153          * have to stick with this. But it works.
154          */
155         extcon_usb: extcon-usb {
156                 compatible = "linux,extcon-usb-gpio";
157                 id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
158         };
159 };
160
161 &adsp_pil {
162         firmware-name = "adsp.mdt";
163 };
164
165 &blsp_i2c1 {
166         status = "okay";
167
168         touchscreen: synaptics-rmi4-i2c@70 {
169                 compatible = "syna,rmi4-i2c";
170                 reg = <0x70>;
171                 #address-cells = <1>;
172                 #size-cells = <0>;
173                 interrupts-extended = <&tlmm 45 0x2008>;
174
175                 pinctrl-names = "default";
176                 pinctrl-0 = <&ts_int_active &ts_lcd_id_active>;
177
178                 syna,reset-delay-ms = <200>;
179                 syna,startup-delay-ms = <220>;
180
181                 rmi4-f01@1 {
182                         reg = <0x01>;
183                         syna,nosleep-mode = <1>;
184                 };
185
186                 rmi4-f11@11 {
187                         reg = <0x11>;
188                         syna,sensor-type = <1>;
189                 };
190         };
191 };
192
193 &blsp_i2c2 {
194         status = "okay";
195
196         /* SMB1351 charger */
197 };
198
199 /* I2C3, 4, 5, 7 and 8 are disabled on this board. */
200
201 &blsp_i2c6 {
202         status = "okay";
203
204         /* NXP NFC */
205 };
206
207 &blsp1_uart2 {
208         status = "okay";
209
210         /* MSM serial console */
211 };
212
213 &blsp2_uart1 {
214         status = "okay";
215
216         /* HCI Bluetooth */
217 };
218
219 &pon {
220         volup {
221                 compatible = "qcom,pm8941-resin";
222                 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
223                 debounce = <15625>;
224                 bias-pull-up;
225                 linux,code = <KEY_VOLUMEUP>;
226         };
227 };
228
229 &qusb2phy {
230         status = "okay";
231
232         vdd-supply = <&vreg_l1b_0p925>;
233         vdda-pll-supply = <&vreg_l10a_1p8>;
234         vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
235 };
236
237 &rpm_requests {
238         pm660l-regulators {
239                 compatible = "qcom,rpm-pm660l-regulators";
240
241                 vdd_s1-supply = <&vph_pwr>;
242                 vdd_s2-supply = <&vph_pwr>;
243                 vdd_s3_s4-supply = <&vph_pwr>;
244                 vdd_s5-supply = <&vph_pwr>;
245                 vdd_s6-supply = <&vph_pwr>;
246
247                 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
248                 vdd_l2-supply = <&vreg_bob>;
249                 vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
250                 vdd_l4_l6-supply = <&vreg_bob>;
251                 vdd_bob-supply = <&vph_pwr>;
252
253                 vreg_s1b_1p125: s1 {
254                         regulator-min-microvolt = <1125000>;
255                         regulator-max-microvolt = <1125000>;
256                         regulator-enable-ramp-delay = <200>;
257                         regulator-ramp-delay = <0>;
258                 };
259
260                 vreg_s2b_1p05: s2 {
261                         regulator-min-microvolt = <1050000>;
262                         regulator-max-microvolt = <1050000>;
263                         regulator-enable-ramp-delay = <200>;
264                         regulator-ramp-delay = <0>;
265                 };
266
267                 /*
268                  * At least on Nile's configuration, S3B/S4B (VDD_CX) and
269                  * S5B (VDD_MX) are managed only through RPM Power Domains.
270                  * Trying to set a voltage on the main supply will create
271                  * havoc and freeze the SoC.
272                  * In any case, reference voltages for these regulators are:
273                  * S3B/S4B: 0.870V
274                  * S5B: 0.915V
275                  */
276
277                 /* LDOs */
278                 vreg_l1b_0p925: l1 {
279                         regulator-min-microvolt = <920000>;
280                         regulator-max-microvolt = <928000>;
281                         regulator-enable-ramp-delay = <250>;
282                         regulator-ramp-delay = <0>;
283                         regulator-allow-set-load;
284                 };
285
286                 vreg_l2b_2p95: l2 {
287                         /*
288                          * This regulator supports 1.648 - 3.104V on this board
289                          * but we set a max voltage of anything less than 2.7V
290                          * to satisfy a condition in sdhci.c that will disable
291                          * 3.3V SDHCI signaling, which happens to be not really
292                          * supported on the Xperia Nile/Ganges platform.
293                          */
294                         regulator-min-microvolt = <1648000>;
295                         regulator-max-microvolt = <2696000>;
296                         regulator-enable-ramp-delay = <250>;
297                         regulator-ramp-delay = <0>;
298                         regulator-allow-set-load;
299                 };
300
301                 vreg_l3b_3p0: l3 {
302                         regulator-min-microvolt = <2800000>;
303                         regulator-max-microvolt = <2800000>;
304                         regulator-enable-ramp-delay = <250>;
305                         regulator-ramp-delay = <0>;
306                         regulator-min-microamp = <200>;
307                         regulator-max-microamp = <600000>;
308                         regulator-system-load = <100000>;
309                         regulator-allow-set-load;
310                 };
311
312                 vreg_l4b_29p5: l4 {
313                         regulator-min-microvolt = <2944000>;
314                         regulator-max-microvolt = <2952000>;
315                         regulator-enable-ramp-delay = <250>;
316                         regulator-ramp-delay = <0>;
317
318                         regulator-min-microamp = <200>;
319                         regulator-max-microamp = <600000>;
320                         regulator-system-load = <570000>;
321                         regulator-allow-set-load;
322                 };
323
324                 /*
325                  * Downstream specifies a range of 1721-3600mV,
326                  * but the only assigned consumers are SDHCI2 VMMC
327                  * and Coresight QPDI that both request pinned 2.95V.
328                  * Tighten the range to 1.8-3.328 (closest to 3.3) to
329                  * make the mmc driver happy.
330                  */
331                 vreg_l5b_29p5: l5 {
332                         regulator-min-microvolt = <1800000>;
333                         regulator-max-microvolt = <3328000>;
334                         regulator-enable-ramp-delay = <250>;
335                         regulator-ramp-delay = <0>;
336                         regulator-allow-set-load;
337                 };
338
339                 vreg_l6b_3p3: l6 {
340                         regulator-min-microvolt = <1704000>;
341                         regulator-max-microvolt = <3312000>;
342                         regulator-enable-ramp-delay = <250>;
343                         regulator-ramp-delay = <0>;
344                 };
345
346                 vreg_l7b_3p125: l7 {
347                         regulator-min-microvolt = <2704000>;
348                         regulator-max-microvolt = <3128000>;
349                         regulator-enable-ramp-delay = <250>;
350                         regulator-ramp-delay = <0>;
351                 };
352
353                 vreg_l8b_3p3: l8 {
354                         regulator-min-microvolt = <2800000>;
355                         regulator-max-microvolt = <3400000>;
356                         regulator-enable-ramp-delay = <250>;
357                         regulator-ramp-delay = <0>;
358                 };
359
360                 /* L9B (870mV) is currently unused */
361                 /* L10B (915mV) is currently unused */
362
363                 vreg_bob: bob {
364                         regulator-min-microvolt = <3304000>;
365                         regulator-max-microvolt = <3624000>;
366                         regulator-enable-ramp-delay = <500>;
367                         regulator-ramp-delay = <0>;
368                 };
369         };
370
371         pm660-regulators {
372                 compatible = "qcom,rpm-pm660-regulators";
373
374                 vdd_s1-supply = <&vph_pwr>;
375                 vdd_s2-supply = <&vph_pwr>;
376                 vdd_s3-supply = <&vph_pwr>;
377                 vdd_s4-supply = <&vph_pwr>;
378                 vdd_s5-supply = <&vph_pwr>;
379                 vdd_s6-supply = <&vph_pwr>;
380
381                 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
382                 vdd_l2_l3-supply = <&vreg_s2b_1p05>;
383                 vdd_l5-supply = <&vreg_s2b_1p05>;
384                 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
385                 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
386
387                 /*
388                  * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
389                  * by the Core Power Reduction hardened (CPRh) and the
390                  * Operating State Manager (OSM) HW automatically.
391                  */
392
393                 vreg_s4a_2p04: s4 {
394                         regulator-min-microvolt = <2040000>;
395                         regulator-max-microvolt = <2040000>;
396                         regulator-enable-ramp-delay = <200>;
397                         regulator-ramp-delay = <0>;
398                         regulator-always-on;
399                 };
400
401                 vreg_s5a_1p35: s5 {
402                         regulator-min-microvolt = <1224000>;
403                         regulator-max-microvolt = <1350000>;
404                         regulator-enable-ramp-delay = <200>;
405                         regulator-ramp-delay = <0>;
406                 };
407
408                 vreg_s6a_0p87: s6 {
409                         regulator-min-microvolt = <504000>;
410                         regulator-max-microvolt = <992000>;
411                         regulator-enable-ramp-delay = <150>;
412                         regulator-ramp-delay = <0>;
413                 };
414
415                 /* LDOs */
416                 vreg_l1a_1p225: l1 {
417                         regulator-min-microvolt = <1226000>;
418                         regulator-max-microvolt = <1250000>;
419                         regulator-enable-ramp-delay = <250>;
420                         regulator-ramp-delay = <0>;
421                         regulator-allow-set-load;
422                 };
423
424                 vreg_l2a_1p0: l2 {
425                         regulator-min-microvolt = <944000>;
426                         regulator-max-microvolt = <1008000>;
427                         regulator-enable-ramp-delay = <250>;
428                         regulator-ramp-delay = <0>;
429                 };
430
431                 vreg_l3a_1p0: l3 {
432                         regulator-min-microvolt = <944000>;
433                         regulator-max-microvolt = <1008000>;
434                         regulator-enable-ramp-delay = <250>;
435                         regulator-ramp-delay = <0>;
436                 };
437
438                 vreg_l5a_0p848: l5 {
439                         regulator-min-microvolt = <800000>;
440                         regulator-max-microvolt = <952000>;
441                         regulator-enable-ramp-delay = <250>;
442                         regulator-ramp-delay = <0>;
443                 };
444
445                 vreg_l6a_1p3: l6 {
446                         regulator-min-microvolt = <1304000>;
447                         regulator-max-microvolt = <1368000>;
448                         regulator-allow-set-load;
449                         regulator-enable-ramp-delay = <250>;
450                         regulator-ramp-delay = <0>;
451                 };
452
453                 vreg_l7a_1p2: l7 {
454                         regulator-min-microvolt = <1200000>;
455                         regulator-max-microvolt = <1200000>;
456                         regulator-enable-ramp-delay = <250>;
457                         regulator-ramp-delay = <0>;
458                 };
459
460                 vreg_l8a_1p8: l8 {
461                         regulator-min-microvolt = <1800000>;
462                         regulator-max-microvolt = <1800000>;
463                         regulator-enable-ramp-delay = <250>;
464                         regulator-ramp-delay = <0>;
465                         regulator-system-load = <325000>;
466                         regulator-allow-set-load;
467                 };
468
469                 vreg_l9a_1p8: l9 {
470                         regulator-min-microvolt = <1804000>;
471                         regulator-max-microvolt = <1896000>;
472                         regulator-enable-ramp-delay = <250>;
473                         regulator-ramp-delay = <0>;
474                         regulator-allow-set-load;
475                 };
476
477                 vreg_l10a_1p8: l10 {
478                         regulator-min-microvolt = <1800000>;
479                         regulator-max-microvolt = <1944000>;
480                         regulator-enable-ramp-delay = <250>;
481                         regulator-ramp-delay = <0>;
482                         regulator-allow-set-load;
483                 };
484
485                 vreg_l11a_1p8: l11 {
486                         regulator-min-microvolt = <1784000>;
487                         regulator-max-microvolt = <1944000>;
488                         regulator-enable-ramp-delay = <250>;
489                         regulator-ramp-delay = <0>;
490                 };
491
492                 vreg_l12a_1p8: l12 {
493                         regulator-min-microvolt = <1800000>;
494                         regulator-max-microvolt = <1944000>;
495                         regulator-enable-ramp-delay = <250>;
496                         regulator-ramp-delay = <0>;
497                 };
498
499                 /* This gives power to the LPDDR4: never turn it off! */
500                 vreg_l13a_1p8: l13 {
501                         regulator-min-microvolt = <1800000>;
502                         regulator-max-microvolt = <1944000>;
503                         regulator-enable-ramp-delay = <250>;
504                         regulator-ramp-delay = <0>;
505                         regulator-boot-on;
506                         regulator-always-on;
507                 };
508
509                 vreg_l14a_1p8: l14 {
510                         regulator-min-microvolt = <1710000>;
511                         regulator-max-microvolt = <1904000>;
512                         regulator-enable-ramp-delay = <250>;
513                         regulator-ramp-delay = <0>;
514                 };
515
516                 vreg_l15a_1p8: l15 {
517                         regulator-min-microvolt = <1648000>;
518                         regulator-max-microvolt = <2952000>;
519                         regulator-enable-ramp-delay = <250>;
520                         regulator-ramp-delay = <0>;
521                 };
522
523                 /* L16A (2.70V) is unused */
524
525                 vreg_l17a_1p8: l17 {
526                         regulator-min-microvolt = <1648000>;
527                         regulator-max-microvolt = <2952000>;
528                         regulator-enable-ramp-delay = <250>;
529                         regulator-ramp-delay = <0>;
530                 };
531
532                 vreg_l18a_1v8: l18 {
533                         regulator-min-microvolt = <1800000>;
534                         regulator-max-microvolt = <1800000>;
535                         regulator-enable-ramp-delay = <250>;
536                         regulator-ramp-delay = <10>;
537                         regulator-min-microamp = <200>;
538                         regulator-max-microamp = <50000>;
539                         regulator-system-load = <10000>;
540                         regulator-allow-set-load;
541                 };
542
543                 vreg_l19a_3p3: l19 {
544                         regulator-min-microvolt = <3312000>;
545                         regulator-max-microvolt = <3400000>;
546                         regulator-enable-ramp-delay = <250>;
547                         regulator-ramp-delay = <0>;
548                         regulator-allow-set-load;
549                 };
550         };
551 };
552
553 &sdhc_1 {
554         status = "okay";
555         supports-cqe;
556
557         /* SoMC Nile platform's eMMC doesn't support HS200 mode */
558         mmc-ddr-1_8v;
559         mmc-hs400-1_8v;
560         mmc-hs400-enhanced-strobe;
561
562         vmmc-supply = <&vreg_l4b_29p5>;
563         vqmmc-supply = <&vreg_l8a_1p8>;
564 };
565
566 &tlmm {
567         gpio-reserved-ranges = <8 4>;
568
569         ts_int_active: ts-int-active {
570                 pins = "gpio45";
571                 drive-strength = <8>;
572                 bias-pull-up;
573         };
574
575         ts_lcd_id_active: ts-lcd-id-active {
576                 pins = "gpio56";
577                 drive-strength = <8>;
578                 bias-disable;
579         };
580
581         imx300_vana_default: imx300-vana-default {
582                 pins = "gpio50";
583                 function = "gpio";
584                 bias-disable;
585                 drive-strength = <2>;
586         };
587
588         imx219_vana_default: imx219-vana-default {
589                 pins = "gpio51";
590                 function = "gpio";
591                 bias-disable;
592                 drive-strength = <2>;
593         };
594
595         cam_vdig_default: cam-vdig-default {
596                 pins = "gpio52";
597                 function = "gpio";
598                 bias-disable;
599                 drive-strength = <2>;
600         };
601 };
602
603 &usb3 {
604         status = "okay";
605 };
606
607 &usb3_dwc3 {
608         dr_mode = "peripheral";
609         extcon = <&extcon_usb>;
610 };