Merge tag 'block-5.14-2021-08-07' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / arch / arm / boot / dts / qcom-apq8060-dragonboard.dts
1 /*
2  * Copyright 2016 Linaro Ltd
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22
23 #include <dt-bindings/input/input.h>
24 #include <dt-bindings/gpio/gpio.h>
25 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
26 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
27 #include "qcom-msm8660.dtsi"
28
29 / {
30         model = "Qualcomm APQ8060 Dragonboard";
31         compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
32
33         aliases {
34                 serial0 = &gsbi12_serial;
35         };
36
37         chosen {
38                 stdout-path = "serial0:115200n8";
39         };
40
41         regulators {
42                 compatible = "simple-bus";
43
44                 /* Main power of the board: 3.7V */
45                 vph: regulator-fixed {
46                         compatible = "regulator-fixed";
47                         regulator-min-microvolt = <3700000>;
48                         regulator-max-microvolt = <3700000>;
49                         regulator-name = "VPH";
50                         regulator-type = "voltage";
51                         regulator-always-on;
52                         regulator-boot-on;
53                 };
54
55                 /* GPIO controlled ethernet power regulator */
56                 dragon_veth: xc622a331mrg {
57                         compatible = "regulator-fixed";
58                         regulator-name = "XC6222A331MR-G";
59                         regulator-min-microvolt = <3300000>;
60                         regulator-max-microvolt = <3300000>;
61                         vin-supply = <&vph>;
62                         gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
63                         enable-active-high;
64                         pinctrl-names = "default";
65                         pinctrl-0 = <&dragon_veth_gpios>;
66                         regulator-always-on;
67                 };
68
69                 /* VDDvario fixed regulator */
70                 dragon_vario: nds332p {
71                         compatible = "regulator-fixed";
72                         regulator-name = "NDS332P";
73                         regulator-min-microvolt = <1800000>;
74                         regulator-max-microvolt = <1800000>;
75                         vin-supply = <&pm8058_s3>;
76                 };
77
78                 /* This is a levelshifter for SDCC5 */
79                 dragon_vio_txb: txb0104rgyr {
80                         compatible = "regulator-fixed";
81                         regulator-name = "Dragon SDCC levelshifter";
82                         vin-supply = <&pm8058_l14>;
83                         regulator-always-on;
84                 };
85         };
86
87         /*
88          * Capella CM3605 light and proximity sensor mounted directly
89          * on the sensor board.
90          */
91         cm3605 {
92                 compatible = "capella,cm3605";
93                 vdd-supply = <&pm8058_l14>; // 2.85V
94                 aset-gpios = <&pm8058_gpio 35 GPIO_ACTIVE_LOW>;
95                 capella,aset-resistance-ohms = <100000>;
96                 /* Trig on both edges - getting close or far away */
97                 interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
98                 /* MPP05 analog input to the XOADC */
99                 io-channels = <&xoadc 0x00 0x05>;
100                 io-channel-names = "aout";
101                 pinctrl-names = "default";
102                 pinctrl-0 = <&dragon_cm3605_gpios>, <&dragon_cm3605_mpps>;
103         };
104
105         soc {
106                 pinctrl@800000 {
107                         /* eMMMC pins, all 8 data lines connected */
108                         dragon_sdcc1_pins: sdcc1 {
109                                 mux {
110                                         pins = "gpio159", "gpio160", "gpio161",
111                                              "gpio162", "gpio163", "gpio164",
112                                              "gpio165", "gpio166", "gpio167",
113                                              "gpio168";
114                                              function = "sdc1";
115                                 };
116                                 clk {
117                                         pins = "gpio167"; /* SDC1 CLK */
118                                         drive-strength = <16>;
119                                         bias-disable;
120                                 };
121                                 cmd {
122                                         pins = "gpio168"; /* SDC1 CMD */
123                                         drive-strength = <10>;
124                                         bias-pull-up;
125                                 };
126                                 data {
127                                         /* SDC1 D0 to D7 */
128                                         pins = "gpio159", "gpio160", "gpio161", "gpio162",
129                                              "gpio163", "gpio164", "gpio165", "gpio166";
130                                         drive-strength = <10>;
131                                         bias-pull-up;
132                                 };
133                         };
134
135                         /*
136                          * The SDCC3 pins are hardcoded (non-muxable) but need some pin
137                          * configuration.
138                          */
139                         dragon_sdcc3_pins: sdcc3 {
140                                 clk {
141                                         pins = "sdc3_clk";
142                                         drive-strength = <8>;
143                                         bias-disable;
144                                 };
145                                 cmd {
146                                         pins = "sdc3_cmd";
147                                         drive-strength = <8>;
148                                         bias-pull-up;
149                                 };
150                                 data {
151                                         pins = "sdc3_data";
152                                         drive-strength = <8>;
153                                         bias-pull-up;
154                                 };
155                         };
156
157                         /* Second SD card slot pins */
158                         dragon_sdcc5_pins: sdcc5 {
159                                 mux {
160                                         pins = "gpio95", "gpio96", "gpio97",
161                                             "gpio98", "gpio99", "gpio100";
162                                         function = "sdc5";
163                                 };
164                                 clk {
165                                         pins = "gpio97"; /* SDC5 CLK */
166                                         drive-strength = <16>;
167                                         bias-disable;
168                                 };
169                                 cmd {
170                                         pins = "gpio95"; /* SDC5 CMD */
171                                         drive-strength = <10>;
172                                         bias-pull-up;
173                                 };
174                                 data {
175                                         /* SDC5 D0 to D3 */
176                                         pins = "gpio96", "gpio98", "gpio99", "gpio100";
177                                         drive-strength = <10>;
178                                         bias-pull-up;
179                                 };
180                         };
181
182                         dragon_gsbi8_i2c_pins: gsbi8_i2c {
183                                 mux {
184                                         pins = "gpio64", "gpio65";
185                                         function = "gsbi8";
186                                 };
187                                 pinconf {
188                                         pins = "gpio64", "gpio65";
189                                         drive-strength = <16>;
190                                         /* These have external pull-up 2.2kOhm to 1.8V */
191                                         bias-disable;
192                                 };
193                         };
194
195                         dragon_gsbi12_i2c_pins: gsbi12_i2c {
196                                 mux {
197                                         pins = "gpio115", "gpio116";
198                                         function = "gsbi12";
199                                 };
200                                 pinconf {
201                                         pins = "gpio115", "gpio116";
202                                         drive-strength = <16>;
203                                         /* These have external pull-up 4.7kOhm to 1.8V */
204                                         bias-disable;
205                                 };
206                         };
207
208                         /* Primary serial port uart 0 pins */
209                         dragon_gsbi12_serial_pins: gsbi12_serial {
210                                 mux {
211                                         pins = "gpio117", "gpio118";
212                                         function = "gsbi12";
213                                 };
214                                 tx {
215                                         pins = "gpio117";
216                                         drive-strength = <8>;
217                                         bias-disable;
218                                 };
219                                 rx {
220                                         pins = "gpio118";
221                                         drive-strength = <2>;
222                                         bias-pull-up;
223                                 };
224                         };
225
226                         dragon_ebi2_pins: ebi2 {
227                                 /*
228                                  * Pins used by EBI2 on the Dragonboard, actually only
229                                  * CS2 is used by a real peripheral. CS0 is just
230                                  * routed to a test point.
231                                  */
232                                 mux0 {
233                                         pins =
234                                             /* "gpio39", CS1A_N this is not good to mux */
235                                             "gpio40", /* CS2A_N */
236                                             "gpio134"; /* CS0_N testpoint TP29 */
237                                         function = "ebi2cs";
238                                 };
239                                 mux1 {
240                                         pins =
241                                             /* EBI2_ADDR_7 downto EBI2_ADDR_0 address bus */
242                                             "gpio123", "gpio124", "gpio125", "gpio126",
243                                             "gpio127", "gpio128", "gpio129", "gpio130",
244                                             /* EBI2_DATA_15 downto EBI2_DATA_0 data bus */
245                                             "gpio135", "gpio136", "gpio137", "gpio138",
246                                             "gpio139", "gpio140", "gpio141", "gpio142",
247                                             "gpio143", "gpio144", "gpio145", "gpio146",
248                                             "gpio147", "gpio148", "gpio149", "gpio150",
249                                             "gpio151", /* EBI2_OE_N */
250                                             "gpio153", /* EBI2_ADV */
251                                             "gpio157"; /* EBI2_WE_N */
252                                         function = "ebi2";
253                                 };
254                         };
255
256                         /* Interrupt line for the KXSD9 accelerometer */
257                         dragon_kxsd9_gpios: kxsd9 {
258                                 irq {
259                                         pins = "gpio57"; /* IRQ line */
260                                         bias-pull-up;
261                                 };
262                         };
263                 };
264
265                 qcom,ssbi@500000 {
266                         pmic@0 {
267                                 keypad@148 {
268                                         linux,keymap = <
269                                         MATRIX_KEY(0, 0, KEY_MENU)
270                                         MATRIX_KEY(0, 2, KEY_1)
271                                         MATRIX_KEY(0, 3, KEY_4)
272                                         MATRIX_KEY(0, 4, KEY_7)
273                                         MATRIX_KEY(1, 0, KEY_UP)
274                                         MATRIX_KEY(1, 1, KEY_LEFT)
275                                         MATRIX_KEY(1, 2, KEY_DOWN)
276                                         MATRIX_KEY(1, 3, KEY_5)
277                                         MATRIX_KEY(1, 3, KEY_8)
278                                         MATRIX_KEY(2, 0, KEY_HOME)
279                                         MATRIX_KEY(2, 1, KEY_REPLY)
280                                         MATRIX_KEY(2, 2, KEY_2)
281                                         MATRIX_KEY(2, 3, KEY_6)
282                                         MATRIX_KEY(3, 0, KEY_VOLUMEUP)
283                                         MATRIX_KEY(3, 1, KEY_RIGHT)
284                                         MATRIX_KEY(3, 2, KEY_3)
285                                         MATRIX_KEY(3, 3, KEY_9)
286                                         MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
287                                         MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
288                                         MATRIX_KEY(4, 1, KEY_BACK)
289                                         MATRIX_KEY(4, 2, KEY_CAMERA)
290                                         MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
291                                         >;
292                                         keypad,num-rows = <6>;
293                                         keypad,num-columns = <5>;
294                                 };
295
296                                 gpio@150 {
297                                         dragon_ethernet_gpios: ethernet-gpios {
298                                                 pinconf {
299                                                         pins = "gpio7";
300                                                         function = "normal";
301                                                         input-enable;
302                                                         bias-disable;
303                                                         power-source = <PM8058_GPIO_S3>;
304                                                 };
305                                         };
306                                         dragon_bmp085_gpios: bmp085-gpios {
307                                                 pinconf {
308                                                         pins = "gpio16";
309                                                         function = "normal";
310                                                         input-enable;
311                                                         bias-disable;
312                                                         power-source = <PM8058_GPIO_S3>;
313                                                 };
314                                         };
315                                         dragon_mpu3050_gpios: mpu3050-gpios {
316                                                 pinconf {
317                                                         pins = "gpio17";
318                                                         function = "normal";
319                                                         input-enable;
320                                                         bias-disable;
321                                                         power-source = <PM8058_GPIO_S3>;
322                                                 };
323                                         };
324                                         dragon_sdcc3_gpios: sdcc3-gpios {
325                                                 pinconf {
326                                                         pins = "gpio22";
327                                                         function = "normal";
328                                                         input-enable;
329                                                         bias-disable;
330                                                         power-source = <PM8058_GPIO_S3>;
331                                                 };
332                                         };
333                                         dragon_sdcc5_gpios: sdcc5-gpios {
334                                                 pinconf {
335                                                         pins = "gpio26";
336                                                         function = "normal";
337                                                         input-enable;
338                                                         bias-pull-up;
339                                                         qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
340                                                         power-source = <PM8058_GPIO_S3>;
341                                                 };
342                                         };
343                                         dragon_ak8975_gpios: ak8975-gpios {
344                                                 pinconf {
345                                                         pins = "gpio33";
346                                                         function = "normal";
347                                                         input-enable;
348                                                         bias-disable;
349                                                         power-source = <PM8058_GPIO_S3>;
350                                                 };
351                                         };
352                                         dragon_cm3605_gpios: cm3605-gpios {
353                                                 /* Pin 34 connected to the proxy IRQ */
354                                                 pinconf_gpio34 {
355                                                         pins = "gpio34";
356                                                         function = "normal";
357                                                         input-enable;
358                                                         bias-disable;
359                                                         power-source = <PM8058_GPIO_S3>;
360                                                 };
361                                                 /* Pin 35 connected to ASET */
362                                                 pinconf_gpio35 {
363                                                         pins = "gpio35";
364                                                         function = "normal";
365                                                         output-high;
366                                                         bias-disable;
367                                                         power-source = <PM8058_GPIO_S3>;
368                                                 };
369                                         };
370                                         dragon_veth_gpios: veth-gpios {
371                                                 pinconf {
372                                                         pins = "gpio40";
373                                                         function = "normal";
374                                                         bias-disable;
375                                                         drive-push-pull;
376                                                 };
377                                         };
378                                 };
379
380                                 mpps@50 {
381                                         dragon_cm3605_mpps: cm3605-mpps {
382                                                 pinconf {
383                                                         pins = "mpp5";
384                                                         function = "analog";
385                                                         input-enable;
386                                                         bias-high-impedance;
387                                                         /* Let's use channel 5 */
388                                                         qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
389                                                         power-source = <PM8058_GPIO_S3>;
390                                                 };
391                                         };
392                                 };
393
394                                 xoadc@197 {
395                                         /* Reference voltage 2.2 V */
396                                         xoadc-ref-supply = <&pm8058_l18>;
397
398                                         /* Board-specific channels */
399                                         mpp5@5 {
400                                                 /* Connected to AOUT of ALS sensor */
401                                                 reg = <0x00 0x05>;
402                                         };
403                                         mpp6@6 {
404                                                 /* Connected to test point TP43 */
405                                                 reg = <0x00 0x06>;
406                                         };
407                                         mpp7@7 {
408                                                 /* Connected to battery thermistor */
409                                                 reg = <0x00 0x07>;
410                                         };
411                                         mpp8@8 {
412                                                 /* Connected to battery ID detector */
413                                                 reg = <0x00 0x08>;
414                                         };
415                                         mpp9@9 {
416                                                 /* Connected to XO thermistor */
417                                                 reg = <0x00 0x09>;
418                                         };
419                                 };
420
421                                 led@48 {
422                                         /*
423                                          * The keypad LED @0x48 is routed to
424                                          * the sensor board where it is
425                                          * connected to an infrared LED
426                                          * SFH4650 (60mW, @850nm) next to the
427                                          * ambient light and proximity sensor
428                                          * Capella Microsystems CM3605.
429                                          */
430                                         compatible = "qcom,pm8058-keypad-led";
431                                         reg = <0x48>;
432                                         label = "pm8058:infrared:proximitysensor";
433                                         default-state = "off";
434                                         linux,default-trigger = "cm3605";
435                                 };
436                                 led@131 {
437                                         compatible = "qcom,pm8058-led";
438                                         reg = <0x131>;
439                                         label = "pm8058:red";
440                                         default-state = "off";
441                                 };
442                                 led@132 {
443                                         /*
444                                          * This is actually green too on my
445                                          * board, but documented as yellow.
446                                          */
447                                         compatible = "qcom,pm8058-led";
448                                         reg = <0x132>;
449                                         label = "pm8058:yellow";
450                                         default-state = "off";
451                                         linux,default-trigger = "mmc0";
452                                 };
453                                 led@133 {
454                                         compatible = "qcom,pm8058-led";
455                                         reg = <0x133>;
456                                         label = "pm8058:green";
457                                         default-state = "on";
458                                         linux,default-trigger = "heartbeat";
459                                 };
460                         };
461                 };
462
463                 gsbi@19800000 {
464                         status = "okay";
465                         qcom,mode = <GSBI_PROT_I2C>;
466
467                         i2c@19880000 {
468                                 status = "okay";
469                                 pinctrl-names = "default";
470                                 pinctrl-0 = <&dragon_gsbi8_i2c_pins>;
471
472                                 eeprom@52 {
473                                         /* A 16KiB Platform ID EEPROM on the CPU carrier board */
474                                         compatible = "atmel,24c128";
475                                         reg = <0x52>;
476                                         vcc-supply = <&pm8058_s3>;
477                                         pagesize = <64>;
478                                 };
479                                 wm8903: wm8903@1a {
480                                         /* This Woolfson Micro device has an unrouted interrupt line */
481                                         compatible = "wlf,wm8903";
482                                         reg = <0x1a>;
483
484                                         AVDD-supply = <&pm8058_l16>;
485                                         CPVDD-supply = <&pm8058_l16>;
486                                         DBVDD-supply = <&pm8058_s3>;
487                                         DCVDD-supply = <&pm8058_l0>;
488
489                                         gpio-controller;
490                                         #gpio-cells = <2>;
491
492                                         micdet-cfg = <0>;
493                                         micdet-delay = <100>;
494                                         gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
495                                 };
496                         };
497                 };
498
499                 gsbi@19c00000 {
500                         status = "okay";
501                         qcom,mode = <GSBI_PROT_I2C_UART>;
502
503                         serial@19c40000 {
504                                 status = "okay";
505                                 pinctrl-names = "default";
506                                 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
507                         };
508
509                         i2c@19c80000 {
510                                 status = "okay";
511                                 pinctrl-names = "default";
512                                 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
513
514                                 ak8975@c {
515                                         compatible = "asahi-kasei,ak8975";
516                                         reg = <0x0c>;
517                                         interrupt-parent = <&pm8058_gpio>;
518                                         interrupts = <33 IRQ_TYPE_EDGE_RISING>;
519                                         pinctrl-names = "default";
520                                         pinctrl-0 = <&dragon_ak8975_gpios>;
521                                         vid-supply = <&pm8058_lvs0>; // 1.8V
522                                         vdd-supply = <&pm8058_l14>; // 2.85V
523                                 };
524                                 bmp085@77 {
525                                         compatible = "bosch,bmp085";
526                                         reg = <0x77>;
527                                         interrupt-parent = <&pm8058_gpio>;
528                                         interrupts = <16 IRQ_TYPE_EDGE_RISING>;
529                                         reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
530                                         pinctrl-names = "default";
531                                         pinctrl-0 = <&dragon_bmp085_gpios>;
532                                         vddd-supply = <&pm8058_lvs0>; // 1.8V
533                                         vdda-supply = <&pm8058_l14>; // 2.85V
534                                 };
535                                 mpu3050@68 {
536                                         compatible = "invensense,mpu3050";
537                                         reg = <0x68>;
538                                         /*
539                                          * GPIO17 is pulled high by a 10k
540                                          * resistor to VLOGIC so needs to be
541                                          * active low/falling edge.
542                                          */
543                                         interrupts-extended = <&pm8058_gpio 17 IRQ_TYPE_EDGE_FALLING>;
544                                         pinctrl-names = "default";
545                                         pinctrl-0 = <&dragon_mpu3050_gpios>;
546                                         vlogic-supply = <&pm8058_lvs0>; // 1.8V
547                                         vdd-supply = <&pm8058_l14>; // 2.85V
548
549                                         /*
550                                          * The MPU-3050 acts as a hub for the
551                                          * accelerometer.
552                                          */
553                                         i2c-gate {
554                                                 #address-cells = <1>;
555                                                 #size-cells = <0>;
556
557                                                 kxsd9@18 {
558                                                         compatible = "kionix,kxsd9";
559                                                         reg = <0x18>;
560                                                         interrupt-parent = <&tlmm>;
561                                                         interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
562                                                         pinctrl-names = "default";
563                                                         pinctrl-0 = <&dragon_kxsd9_gpios>;
564                                                         iovdd-supply = <&pm8058_lvs0>; // 1.8V
565                                                         vdd-supply = <&pm8058_l14>; // 2.85V
566                                                 };
567                                         };
568                                 };
569                         };
570                 };
571
572                 external-bus@1a100000 {
573                         /* The EBI2 will instantiate first, then populate its children */
574                         status = "okay";
575                         pinctrl-names = "default";
576                         pinctrl-0 = <&dragon_ebi2_pins>;
577
578                         /*
579                          * An on-board SMSC LAN9221 chip for "debug ethernet",
580                          * which is actually just an ordinary ethernet on the
581                          * EBI2. This has a 25MHz chrystal next to it, so no
582                          * clocking is needed.
583                          */
584                         ethernet@2,0 {
585                                 compatible = "smsc,lan9221", "smsc,lan9115";
586                                 reg = <2 0x0 0x100>;
587                                 /*
588                                  * The second interrupt is the PME interrupt
589                                  * for network wakeup, connected to the TLMM.
590                                  */
591                                 interrupts-extended = <&pm8058_gpio 7 IRQ_TYPE_EDGE_FALLING>,
592                                                     <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
593                                 reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
594                                 vdd33a-supply = <&dragon_veth>;
595                                 vddvario-supply = <&dragon_vario>;
596                                 pinctrl-names = "default";
597                                 pinctrl-0 = <&dragon_ethernet_gpios>;
598                                 phy-mode = "mii";
599                                 reg-io-width = <2>;
600                                 smsc,force-external-phy;
601                                 smsc,irq-push-pull;
602
603                                 /*
604                                  * SLOW chipselect config
605                                  * Delay 9 cycles (140ns@64MHz) between SMSC
606                                  * LAN9221 Ethernet controller reads and writes
607                                  * on CS2.
608                                  */
609                                 qcom,xmem-recovery-cycles = <0>;
610                                 qcom,xmem-write-hold-cycles = <3>;
611                                 qcom,xmem-write-delta-cycles = <31>;
612                                 qcom,xmem-read-delta-cycles = <28>;
613                                 qcom,xmem-write-wait-cycles = <9>;
614                                 qcom,xmem-read-wait-cycles = <9>;
615                         };
616                 };
617
618                 rpm@104000 {
619                         /*
620                          * Set up of the PMIC RPM regulators for this board
621                          * PM8901 supplies "preliminary regulators" whatever
622                          * that means
623                          */
624                         pm8901-regulators {
625                                 vdd_l0-supply = <&pm8901_s4>;
626                                 vdd_l1-supply = <&vph>;
627                                 vdd_l2-supply = <&vph>;
628                                 vdd_l3-supply = <&vph>;
629                                 vdd_l4-supply = <&vph>;
630                                 vdd_l5-supply = <&vph>;
631                                 vdd_l6-supply = <&vph>;
632                                 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
633                                 vdd_s2-supply = <&vph>;
634                                 vdd_s3-supply = <&vph>;
635                                 vdd_s4-supply = <&vph>;
636                                 lvs0_in-supply = <&pm8058_s3>;
637                                 lvs1_in-supply = <&pm8901_s4>;
638                                 lvs2_in-supply = <&pm8058_l0>;
639                                 lvs3_in-supply = <&pm8058_s2>;
640                                 mvs_in-supply = <&pm8058_s3>;
641
642                                 l0 {
643                                         regulator-min-microvolt = <1200000>;
644                                         regulator-max-microvolt = <1200000>;
645                                         bias-pull-down;
646                                 };
647                                 l1 {
648                                         regulator-min-microvolt = <3300000>;
649                                         regulator-max-microvolt = <3300000>;
650                                         bias-pull-down;
651                                 };
652                                 l2 {
653                                         regulator-min-microvolt = <2850000>;
654                                         regulator-max-microvolt = <3300000>;
655                                         bias-pull-down;
656                                 };
657                                 l3 {
658                                         regulator-min-microvolt = <3300000>;
659                                         regulator-max-microvolt = <3300000>;
660                                         bias-pull-down;
661                                 };
662                                 l4 {
663                                         regulator-min-microvolt = <2600000>;
664                                         regulator-max-microvolt = <2600000>;
665                                         bias-pull-down;
666                                 };
667                                 l5 {
668                                         regulator-min-microvolt = <2850000>;
669                                         regulator-max-microvolt = <2850000>;
670                                         bias-pull-down;
671                                 };
672                                 l6 {
673                                         regulator-min-microvolt = <2200000>;
674                                         regulator-max-microvolt = <2200000>;
675                                         bias-pull-down;
676                                 };
677
678                                 /* s0 and s1 are SAW regulators controlled over SPM */
679                                 s2 {
680                                         regulator-min-microvolt = <1300000>;
681                                         regulator-max-microvolt = <1300000>;
682                                         qcom,switch-mode-frequency = <1600000>;
683                                         bias-pull-down;
684                                 };
685                                 s3 {
686                                         regulator-min-microvolt = <1100000>;
687                                         regulator-max-microvolt = <1100000>;
688                                         qcom,switch-mode-frequency = <1600000>;
689                                         bias-pull-down;
690                                 };
691                                 s4 {
692                                         regulator-min-microvolt = <1225000>;
693                                         regulator-max-microvolt = <1225000>;
694                                         qcom,switch-mode-frequency = <1600000>;
695                                         bias-pull-down;
696                                 };
697
698                                 /* LVS0 thru 3 and mvs0 are just switches */
699                                 lvs0 {
700                                         regulator-always-on;
701                                 };
702                                 lvs1 { };
703                                 lvs2 { };
704                                 lvs3 { };
705                                 mvs0 {};
706
707                         };
708
709                         pm8058-regulators {
710                                 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
711                                 vdd_l2_l11_l12-supply = <&vph>;
712                                 vdd_l3_l4_l5-supply = <&vph>;
713                                 vdd_l6_l7-supply = <&vph>;
714                                 vdd_l8-supply = <&vph>;
715                                 vdd_l9-supply = <&vph>;
716                                 vdd_l10-supply = <&vph>;
717                                 vdd_l13_l16-supply = <&pm8058_s4>;
718                                 vdd_l14_l15-supply = <&vph>;
719                                 vdd_l17_l18-supply = <&vph>;
720                                 vdd_l19_l20-supply = <&vph>;
721                                 vdd_l21-supply = <&pm8058_s3>;
722                                 vdd_l22-supply = <&pm8058_s3>;
723                                 vdd_l23_l24_l25-supply = <&pm8058_s3>;
724                                 vdd_s0-supply = <&vph>;
725                                 vdd_s1-supply = <&vph>;
726                                 vdd_s2-supply = <&vph>;
727                                 vdd_s3-supply = <&vph>;
728                                 vdd_s4-supply = <&vph>;
729                                 vdd_ncp-supply = <&vph>;
730
731                                 l0 {
732                                         regulator-min-microvolt = <1200000>;
733                                         regulator-max-microvolt = <1200000>;
734                                         bias-pull-down;
735                                 };
736                                 l1 {
737                                         regulator-min-microvolt = <1200000>;
738                                         regulator-max-microvolt = <1200000>;
739                                         bias-pull-down;
740                                 };
741                                 l2 {
742                                         regulator-min-microvolt = <1800000>;
743                                         regulator-max-microvolt = <2600000>;
744                                         bias-pull-down;
745                                 };
746                                 l3 {
747                                         regulator-min-microvolt = <1800000>;
748                                         regulator-max-microvolt = <1800000>;
749                                         bias-pull-down;
750                                 };
751                                 l4 {
752                                         regulator-min-microvolt = <2850000>;
753                                         regulator-max-microvolt = <2850000>;
754                                         bias-pull-down;
755                                 };
756                                 l5 {
757                                         regulator-min-microvolt = <2850000>;
758                                         regulator-max-microvolt = <2850000>;
759                                         bias-pull-down;
760                                 };
761                                 l6 {
762                                         regulator-min-microvolt = <3000000>;
763                                         regulator-max-microvolt = <3600000>;
764                                         bias-pull-down;
765                                 };
766                                 l7 {
767                                         regulator-min-microvolt = <1800000>;
768                                         regulator-max-microvolt = <1800000>;
769                                         bias-pull-down;
770                                 };
771                                 l8 {
772                                         regulator-min-microvolt = <2900000>;
773                                         regulator-max-microvolt = <3050000>;
774                                         bias-pull-down;
775                                 };
776                                 l9 {
777                                         regulator-min-microvolt = <1800000>;
778                                         regulator-max-microvolt = <1800000>;
779                                         bias-pull-down;
780                                 };
781                                 l10 {
782                                         regulator-min-microvolt = <2600000>;
783                                         regulator-max-microvolt = <2600000>;
784                                         bias-pull-down;
785                                 };
786                                 l11 {
787                                         regulator-min-microvolt = <1500000>;
788                                         regulator-max-microvolt = <1500000>;
789                                         bias-pull-down;
790                                 };
791                                 l12 {
792                                         regulator-min-microvolt = <2900000>;
793                                         regulator-max-microvolt = <2900000>;
794                                         bias-pull-down;
795                                 };
796                                 l13 {
797                                         regulator-min-microvolt = <2050000>;
798                                         regulator-max-microvolt = <2050000>;
799                                         bias-pull-down;
800                                 };
801                                 l14 {
802                                         regulator-min-microvolt = <2850000>;
803                                         regulator-max-microvolt = <2850000>;
804                                 };
805                                 l15 {
806                                         regulator-min-microvolt = <2850000>;
807                                         regulator-max-microvolt = <2850000>;
808                                         bias-pull-down;
809                                 };
810                                 l16 {
811                                         regulator-min-microvolt = <1800000>;
812                                         regulator-max-microvolt = <1800000>;
813                                         bias-pull-down;
814                                         regulator-always-on;
815                                 };
816                                 l17 {
817                                         // 1.5V according to schematic
818                                         regulator-min-microvolt = <2600000>;
819                                         regulator-max-microvolt = <2600000>;
820                                         bias-pull-down;
821                                 };
822                                 l18 {
823                                         regulator-min-microvolt = <2200000>;
824                                         regulator-max-microvolt = <2200000>;
825                                         bias-pull-down;
826                                 };
827                                 l19 {
828                                         regulator-min-microvolt = <2500000>;
829                                         regulator-max-microvolt = <2500000>;
830                                         bias-pull-down;
831                                 };
832                                 l20 {
833                                         regulator-min-microvolt = <1800000>;
834                                         regulator-max-microvolt = <1800000>;
835                                         bias-pull-down;
836                                 };
837                                 l21 {
838                                         // 1.1 V according to schematic
839                                         regulator-min-microvolt = <1200000>;
840                                         regulator-max-microvolt = <1200000>;
841                                         bias-pull-down;
842                                         regulator-always-on;
843                                 };
844                                 l22 {
845                                         // 1.2 V according to schematic
846                                         regulator-min-microvolt = <1150000>;
847                                         regulator-max-microvolt = <1150000>;
848                                         bias-pull-down;
849                                 };
850                                 l23 {
851                                         // Unused
852                                         regulator-min-microvolt = <1200000>;
853                                         regulator-max-microvolt = <1200000>;
854                                         bias-pull-down;
855                                 };
856                                 l24 {
857                                         // Unused
858                                         regulator-min-microvolt = <1200000>;
859                                         regulator-max-microvolt = <1200000>;
860                                         bias-pull-down;
861                                 };
862                                 l25 {
863                                         regulator-min-microvolt = <1200000>;
864                                         regulator-max-microvolt = <1200000>;
865                                         bias-pull-down;
866                                 };
867
868                                 s0 {
869                                         // regulator-min-microvolt = <500000>;
870                                         // regulator-max-microvolt = <1325000>;
871                                         regulator-min-microvolt = <1100000>;
872                                         regulator-max-microvolt = <1100000>;
873                                         qcom,switch-mode-frequency = <1600000>;
874                                         bias-pull-down;
875                                 };
876                                 s1 {
877                                         // regulator-min-microvolt = <500000>;
878                                         // regulator-max-microvolt = <1250000>;
879                                         regulator-min-microvolt = <1100000>;
880                                         regulator-max-microvolt = <1100000>;
881                                         qcom,switch-mode-frequency = <1600000>;
882                                         bias-pull-down;
883                                 };
884                                 s2 {
885                                         // 1.3 V according to schematic
886                                         regulator-min-microvolt = <1200000>;
887                                         regulator-max-microvolt = <1400000>;
888                                         qcom,switch-mode-frequency = <1600000>;
889                                         bias-pull-down;
890                                 };
891                                 s3 {
892                                         regulator-min-microvolt = <1800000>;
893                                         regulator-max-microvolt = <1800000>;
894                                         qcom,switch-mode-frequency = <1600000>;
895                                         regulator-always-on;
896                                         bias-pull-down;
897                                 };
898                                 s4 {
899                                         regulator-min-microvolt = <2200000>;
900                                         regulator-max-microvolt = <2200000>;
901                                         qcom,switch-mode-frequency = <1600000>;
902                                         regulator-always-on;
903                                         bias-pull-down;
904                                 };
905
906                                 /* LVS0 and LVS1 are just switches */
907                                 lvs0 {
908                                         bias-pull-down;
909                                 };
910                                 lvs1 {
911                                         bias-pull-down;
912                                 };
913
914                                 ncp {
915                                         regulator-min-microvolt = <1800000>;
916                                         regulator-max-microvolt = <1800000>;
917                                         qcom,switch-mode-frequency = <1600000>;
918                                 };
919                         };
920                 };
921                 amba {
922                         /* Internal 3.69 GiB eMMC */
923                         sdcc@12400000 {
924                                 status = "okay";
925                                 pinctrl-names = "default";
926                                 pinctrl-0 = <&dragon_sdcc1_pins>;
927                                 vmmc-supply = <&pm8901_l5>;
928                                 vqmmc-supply = <&pm8901_lvs0>;
929                         };
930
931                         /* External micro SD card, directly connected, pulled up to 2.85 V */
932                         sdcc@12180000 {
933                                 status = "okay";
934                                 /* Enable SSBI GPIO 22 as input, use for card detect */
935                                 pinctrl-names = "default";
936                                 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
937                                 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
938                                 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
939                                 vmmc-supply = <&pm8058_l14>;
940                         };
941
942                         /*
943                          * Second external micro SD card, using two TXB104RGYR levelshifters
944                          * to lift from 1.8 V to 2.85 V
945                          */
946                         sdcc@12200000 {
947                                 status = "okay";
948                                 /* Enable SSBI GPIO 26 as input, use for card detect */
949                                 pinctrl-names = "default";
950                                 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
951                                 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
952                                 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
953                                 vmmc-supply = <&pm8058_l14>;
954                                 vqmmc-supply = <&dragon_vio_txb>;
955                         };
956                 };
957         };
958 };