arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi
[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 &blsp_i2c1 {
162         status = "okay";
163
164         /* Synaptics touchscreen */
165 };
166
167 &blsp_i2c2 {
168         status = "okay";
169
170         /* SMB1351 charger */
171 };
172
173 /* I2C3, 4, 5, 7 and 8 are disabled on this board. */
174
175 &blsp_i2c6 {
176         status = "okay";
177
178         /* NXP NFC */
179 };
180
181 &blsp1_uart2 {
182         status = "okay";
183
184         /* MSM serial console */
185 };
186
187 &blsp2_uart1 {
188         status = "okay";
189
190         /* HCI Bluetooth */
191 };
192
193 &pon {
194         volup {
195                 compatible = "qcom,pm8941-resin";
196                 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
197                 debounce = <15625>;
198                 bias-pull-up;
199                 linux,code = <KEY_VOLUMEUP>;
200         };
201 };
202
203 &qusb2phy {
204         status = "okay";
205
206         vdd-supply = <&vreg_l1b_0p925>;
207         vdda-pll-supply = <&vreg_l10a_1p8>;
208         vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
209 };
210
211 &rpm_requests {
212         pm660l-regulators {
213                 compatible = "qcom,rpm-pm660l-regulators";
214
215                 vdd_s1-supply = <&vph_pwr>;
216                 vdd_s2-supply = <&vph_pwr>;
217                 vdd_s3_s4-supply = <&vph_pwr>;
218                 vdd_s5-supply = <&vph_pwr>;
219                 vdd_s6-supply = <&vph_pwr>;
220
221                 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
222                 vdd_l2-supply = <&vreg_bob>;
223                 vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
224                 vdd_l4_l6-supply = <&vreg_bob>;
225                 vdd_bob-supply = <&vph_pwr>;
226
227                 vreg_s1b_1p125: s1 {
228                         regulator-min-microvolt = <1125000>;
229                         regulator-max-microvolt = <1125000>;
230                         regulator-enable-ramp-delay = <200>;
231                         regulator-ramp-delay = <0>;
232                 };
233
234                 vreg_s2b_1p05: s2 {
235                         regulator-min-microvolt = <1050000>;
236                         regulator-max-microvolt = <1050000>;
237                         regulator-enable-ramp-delay = <200>;
238                         regulator-ramp-delay = <0>;
239                 };
240
241                 /*
242                  * At least on Nile's configuration, S3B/S4B (VDD_CX) and
243                  * S5B (VDD_MX) are managed only through RPM Power Domains.
244                  * Trying to set a voltage on the main supply will create
245                  * havoc and freeze the SoC.
246                  * In any case, reference voltages for these regulators are:
247                  * S3B/S4B: 0.870V
248                  * S5B: 0.915V
249                  */
250
251                 /* LDOs */
252                 vreg_l1b_0p925: l1 {
253                         regulator-min-microvolt = <920000>;
254                         regulator-max-microvolt = <928000>;
255                         regulator-enable-ramp-delay = <250>;
256                         regulator-ramp-delay = <0>;
257                         regulator-allow-set-load;
258                 };
259
260                 vreg_l2b_2p95: l2 {
261                         /*
262                          * This regulator supports 1.648 - 3.104V on this board
263                          * but we set a max voltage of anything less than 2.7V
264                          * to satisfy a condition in sdhci.c that will disable
265                          * 3.3V SDHCI signaling, which happens to be not really
266                          * supported on the Xperia Nile/Ganges platform.
267                          */
268                         regulator-min-microvolt = <1648000>;
269                         regulator-max-microvolt = <2696000>;
270                         regulator-enable-ramp-delay = <250>;
271                         regulator-ramp-delay = <0>;
272                         regulator-allow-set-load;
273                 };
274
275                 vreg_l3b_3p0: l3 {
276                         regulator-min-microvolt = <2800000>;
277                         regulator-max-microvolt = <2800000>;
278                         regulator-enable-ramp-delay = <250>;
279                         regulator-ramp-delay = <0>;
280                         regulator-min-microamp = <200>;
281                         regulator-max-microamp = <600000>;
282                         regulator-system-load = <100000>;
283                         regulator-allow-set-load;
284                 };
285
286                 vreg_l4b_29p5: l4 {
287                         regulator-min-microvolt = <2944000>;
288                         regulator-max-microvolt = <2952000>;
289                         regulator-enable-ramp-delay = <250>;
290                         regulator-ramp-delay = <0>;
291
292                         regulator-min-microamp = <200>;
293                         regulator-max-microamp = <600000>;
294                         regulator-system-load = <570000>;
295                         regulator-allow-set-load;
296                 };
297
298                 /*
299                  * Downstream specifies a range of 1721-3600mV,
300                  * but the only assigned consumers are SDHCI2 VMMC
301                  * and Coresight QPDI that both request pinned 2.95V.
302                  * Tighten the range to 1.8-3.328 (closest to 3.3) to
303                  * make the mmc driver happy.
304                  */
305                 vreg_l5b_29p5: l5 {
306                         regulator-min-microvolt = <1800000>;
307                         regulator-max-microvolt = <3328000>;
308                         regulator-enable-ramp-delay = <250>;
309                         regulator-ramp-delay = <0>;
310                         regulator-allow-set-load;
311                 };
312
313                 vreg_l6b_3p3: l6 {
314                         regulator-min-microvolt = <1704000>;
315                         regulator-max-microvolt = <3312000>;
316                         regulator-enable-ramp-delay = <250>;
317                         regulator-ramp-delay = <0>;
318                 };
319
320                 vreg_l7b_3p125: l7 {
321                         regulator-min-microvolt = <2704000>;
322                         regulator-max-microvolt = <3128000>;
323                         regulator-enable-ramp-delay = <250>;
324                         regulator-ramp-delay = <0>;
325                 };
326
327                 vreg_l8b_3p3: l8 {
328                         regulator-min-microvolt = <2800000>;
329                         regulator-max-microvolt = <3400000>;
330                         regulator-enable-ramp-delay = <250>;
331                         regulator-ramp-delay = <0>;
332                 };
333
334                 /* L9B (870mV) is currently unused */
335                 /* L10B (915mV) is currently unused */
336
337                 vreg_bob: bob {
338                         regulator-min-microvolt = <3304000>;
339                         regulator-max-microvolt = <3624000>;
340                         regulator-enable-ramp-delay = <500>;
341                         regulator-ramp-delay = <0>;
342                 };
343         };
344
345         pm660-regulators {
346                 compatible = "qcom,rpm-pm660-regulators";
347
348                 vdd_s1-supply = <&vph_pwr>;
349                 vdd_s2-supply = <&vph_pwr>;
350                 vdd_s3-supply = <&vph_pwr>;
351                 vdd_s4-supply = <&vph_pwr>;
352                 vdd_s5-supply = <&vph_pwr>;
353                 vdd_s6-supply = <&vph_pwr>;
354
355                 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
356                 vdd_l2_l3-supply = <&vreg_s2b_1p05>;
357                 vdd_l5-supply = <&vreg_s2b_1p05>;
358                 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
359                 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
360
361                 /*
362                  * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
363                  * by the Core Power Reduction hardened (CPRh) and the
364                  * Operating State Manager (OSM) HW automatically.
365                  */
366
367                 vreg_s4a_2p04: s4 {
368                         regulator-min-microvolt = <2040000>;
369                         regulator-max-microvolt = <2040000>;
370                         regulator-enable-ramp-delay = <200>;
371                         regulator-ramp-delay = <0>;
372                         regulator-always-on;
373                 };
374
375                 vreg_s5a_1p35: s5 {
376                         regulator-min-microvolt = <1224000>;
377                         regulator-max-microvolt = <1350000>;
378                         regulator-enable-ramp-delay = <200>;
379                         regulator-ramp-delay = <0>;
380                 };
381
382                 vreg_s6a_0p87: s6 {
383                         regulator-min-microvolt = <504000>;
384                         regulator-max-microvolt = <992000>;
385                         regulator-enable-ramp-delay = <150>;
386                         regulator-ramp-delay = <0>;
387                 };
388
389                 /* LDOs */
390                 vreg_l1a_1p225: l1 {
391                         regulator-min-microvolt = <1226000>;
392                         regulator-max-microvolt = <1250000>;
393                         regulator-enable-ramp-delay = <250>;
394                         regulator-ramp-delay = <0>;
395                         regulator-allow-set-load;
396                 };
397
398                 vreg_l2a_1p0: l2 {
399                         regulator-min-microvolt = <944000>;
400                         regulator-max-microvolt = <1008000>;
401                         regulator-enable-ramp-delay = <250>;
402                         regulator-ramp-delay = <0>;
403                 };
404
405                 vreg_l3a_1p0: l3 {
406                         regulator-min-microvolt = <944000>;
407                         regulator-max-microvolt = <1008000>;
408                         regulator-enable-ramp-delay = <250>;
409                         regulator-ramp-delay = <0>;
410                 };
411
412                 vreg_l5a_0p848: l5 {
413                         regulator-min-microvolt = <800000>;
414                         regulator-max-microvolt = <952000>;
415                         regulator-enable-ramp-delay = <250>;
416                         regulator-ramp-delay = <0>;
417                 };
418
419                 vreg_l6a_1p3: l6 {
420                         regulator-min-microvolt = <1304000>;
421                         regulator-max-microvolt = <1368000>;
422                         regulator-allow-set-load;
423                         regulator-enable-ramp-delay = <250>;
424                         regulator-ramp-delay = <0>;
425                 };
426
427                 vreg_l7a_1p2: l7 {
428                         regulator-min-microvolt = <1200000>;
429                         regulator-max-microvolt = <1200000>;
430                         regulator-enable-ramp-delay = <250>;
431                         regulator-ramp-delay = <0>;
432                 };
433
434                 vreg_l8a_1p8: l8 {
435                         regulator-min-microvolt = <1800000>;
436                         regulator-max-microvolt = <1800000>;
437                         regulator-enable-ramp-delay = <250>;
438                         regulator-ramp-delay = <0>;
439                         regulator-system-load = <325000>;
440                         regulator-allow-set-load;
441                 };
442
443                 vreg_l9a_1p8: l9 {
444                         regulator-min-microvolt = <1804000>;
445                         regulator-max-microvolt = <1896000>;
446                         regulator-enable-ramp-delay = <250>;
447                         regulator-ramp-delay = <0>;
448                         regulator-allow-set-load;
449                 };
450
451                 vreg_l10a_1p8: l10 {
452                         regulator-min-microvolt = <1800000>;
453                         regulator-max-microvolt = <1944000>;
454                         regulator-enable-ramp-delay = <250>;
455                         regulator-ramp-delay = <0>;
456                         regulator-allow-set-load;
457                 };
458
459                 vreg_l11a_1p8: l11 {
460                         regulator-min-microvolt = <1784000>;
461                         regulator-max-microvolt = <1944000>;
462                         regulator-enable-ramp-delay = <250>;
463                         regulator-ramp-delay = <0>;
464                 };
465
466                 vreg_l12a_1p8: l12 {
467                         regulator-min-microvolt = <1800000>;
468                         regulator-max-microvolt = <1944000>;
469                         regulator-enable-ramp-delay = <250>;
470                         regulator-ramp-delay = <0>;
471                 };
472
473                 /* This gives power to the LPDDR4: never turn it off! */
474                 vreg_l13a_1p8: l13 {
475                         regulator-min-microvolt = <1800000>;
476                         regulator-max-microvolt = <1944000>;
477                         regulator-enable-ramp-delay = <250>;
478                         regulator-ramp-delay = <0>;
479                         regulator-boot-on;
480                         regulator-always-on;
481                 };
482
483                 vreg_l14a_1p8: l14 {
484                         regulator-min-microvolt = <1710000>;
485                         regulator-max-microvolt = <1904000>;
486                         regulator-enable-ramp-delay = <250>;
487                         regulator-ramp-delay = <0>;
488                 };
489
490                 vreg_l15a_1p8: l15 {
491                         regulator-min-microvolt = <1648000>;
492                         regulator-max-microvolt = <2952000>;
493                         regulator-enable-ramp-delay = <250>;
494                         regulator-ramp-delay = <0>;
495                 };
496
497                 /* L16A (2.70V) is unused */
498
499                 vreg_l17a_1p8: l17 {
500                         regulator-min-microvolt = <1648000>;
501                         regulator-max-microvolt = <2952000>;
502                         regulator-enable-ramp-delay = <250>;
503                         regulator-ramp-delay = <0>;
504                 };
505
506                 vreg_l18a_1v8: l18 {
507                         regulator-min-microvolt = <1800000>;
508                         regulator-max-microvolt = <1800000>;
509                         regulator-enable-ramp-delay = <250>;
510                         regulator-ramp-delay = <10>;
511                         regulator-min-microamp = <200>;
512                         regulator-max-microamp = <50000>;
513                         regulator-system-load = <10000>;
514                         regulator-allow-set-load;
515                 };
516
517                 vreg_l19a_3p3: l19 {
518                         regulator-min-microvolt = <3312000>;
519                         regulator-max-microvolt = <3400000>;
520                         regulator-enable-ramp-delay = <250>;
521                         regulator-ramp-delay = <0>;
522                         regulator-allow-set-load;
523                 };
524         };
525 };
526
527 &sdhc_1 {
528         status = "okay";
529         supports-cqe;
530
531         /* SoMC Nile platform's eMMC doesn't support HS200 mode */
532         mmc-ddr-1_8v;
533         mmc-hs400-1_8v;
534         mmc-hs400-enhanced-strobe;
535
536         vmmc-supply = <&vreg_l4b_29p5>;
537         vqmmc-supply = <&vreg_l8a_1p8>;
538 };
539
540 &tlmm {
541         gpio-reserved-ranges = <8 4>;
542
543         imx300_vana_default: imx300-vana-default {
544                 pins = "gpio50";
545                 function = "gpio";
546                 bias-disable;
547                 drive-strength = <2>;
548         };
549
550         imx219_vana_default: imx219-vana-default {
551                 pins = "gpio51";
552                 function = "gpio";
553                 bias-disable;
554                 drive-strength = <2>;
555         };
556
557         cam_vdig_default: cam-vdig-default {
558                 pins = "gpio52";
559                 function = "gpio";
560                 bias-disable;
561                 drive-strength = <2>;
562         };
563 };
564
565 &usb3 {
566         status = "okay";
567 };
568
569 &usb3_dwc3 {
570         dr_mode = "peripheral";
571         extcon = <&extcon_usb>;
572 };