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