2 * Copyright 2016 Linaro Ltd
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:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
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
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 "qcom-msm8660.dtsi"
29 model = "Qualcomm APQ8060 Dragonboard";
30 compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
33 serial0 = &gsbi12_serial;
37 stdout-path = "serial0:115200n8";
41 compatible = "simple-bus";
43 /* Main power of the board: 3.7V */
44 vph: regulator-fixed {
45 compatible = "regulator-fixed";
46 regulator-min-microvolt = <3700000>;
47 regulator-max-microvolt = <3700000>;
48 regulator-name = "VPH";
49 regulator-type = "voltage";
54 /* GPIO controlled ethernet power regulator */
55 dragon_veth: xc622a331mrg {
56 compatible = "regulator-fixed";
57 regulator-name = "XC6222A331MR-G";
58 regulator-min-microvolt = <3300000>;
59 regulator-max-microvolt = <3300000>;
61 gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
63 pinctrl-names = "default";
64 pinctrl-0 = <&dragon_veth_gpios>;
68 /* VDDvario fixed regulator */
69 dragon_vario: nds332p {
70 compatible = "regulator-fixed";
71 regulator-name = "NDS332P";
72 regulator-min-microvolt = <1800000>;
73 regulator-max-microvolt = <1800000>;
74 vin-supply = <&pm8058_s3>;
77 /* This is a levelshifter for SDCC5 */
78 dragon_vio_txb: txb0104rgyr {
79 compatible = "regulator-fixed";
80 regulator-name = "Dragon SDCC levelshifter";
81 vin-supply = <&pm8058_l14>;
88 /* eMMMC pins, all 8 data lines connected */
89 dragon_sdcc1_pins: sdcc1 {
91 pins = "gpio159", "gpio160", "gpio161",
92 "gpio162", "gpio163", "gpio164",
93 "gpio165", "gpio166", "gpio167",
98 pins = "gpio167"; /* SDC5 CLK */
99 drive-strength = <16>;
103 pins = "gpio168"; /* SDC5 CMD */
104 drive-strength = <10>;
109 pins = "gpio159", "gpio160", "gpio161", "gpio162",
110 "gpio163", "gpio164", "gpio165", "gpio166";
111 drive-strength = <10>;
117 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
120 dragon_sdcc3_pins: sdcc3 {
123 drive-strength = <8>;
128 drive-strength = <8>;
133 drive-strength = <8>;
138 /* Second SD card slot pins */
139 dragon_sdcc5_pins: sdcc5 {
141 pins = "gpio95", "gpio96", "gpio97",
142 "gpio98", "gpio99", "gpio100";
146 pins = "gpio97"; /* SDC5 CLK */
147 drive-strength = <16>;
151 pins = "gpio95"; /* SDC5 CMD */
152 drive-strength = <10>;
157 pins = "gpio96", "gpio98", "gpio99", "gpio100";
158 drive-strength = <10>;
163 dragon_gsbi12_i2c_pins: gsbi12_i2c {
165 pins = "gpio115", "gpio116";
169 pins = "gpio115", "gpio116";
170 drive-strength = <16>;
171 /* These have external pull-up 4.7kOhm to 1.8V */
176 /* Primary serial port uart 0 pins */
177 dragon_gsbi12_serial_pins: gsbi12_serial {
179 pins = "gpio117", "gpio118";
184 drive-strength = <8>;
189 drive-strength = <2>;
194 dragon_ebi2_pins: ebi2 {
196 * Pins used by EBI2 on the Dragonboard, actually only
197 * CS2 is used by a real peripheral. CS0 is just
198 * routed to a test point.
202 /* "gpio39", CS1A_N this is not good to mux */
203 "gpio40", /* CS2A_N */
204 "gpio134"; /* CS0_N testpoint TP29 */
209 /* EBI2_ADDR_7 downto EBI2_ADDR_0 address bus */
210 "gpio123", "gpio124", "gpio125", "gpio126",
211 "gpio127", "gpio128", "gpio129", "gpio130",
212 /* EBI2_DATA_15 downto EBI2_DATA_0 data bus */
213 "gpio135", "gpio136", "gpio137", "gpio138",
214 "gpio139", "gpio140", "gpio141", "gpio142",
215 "gpio143", "gpio144", "gpio145", "gpio146",
216 "gpio147", "gpio148", "gpio149", "gpio150",
217 "gpio151", /* EBI2_OE_N */
218 "gpio153", /* EBI2_ADV */
219 "gpio157"; /* EBI2_WE_N */
229 MATRIX_KEY(0, 0, KEY_MENU)
230 MATRIX_KEY(0, 2, KEY_1)
231 MATRIX_KEY(0, 3, KEY_4)
232 MATRIX_KEY(0, 4, KEY_7)
233 MATRIX_KEY(1, 0, KEY_UP)
234 MATRIX_KEY(1, 1, KEY_LEFT)
235 MATRIX_KEY(1, 2, KEY_DOWN)
236 MATRIX_KEY(1, 3, KEY_5)
237 MATRIX_KEY(1, 3, KEY_8)
238 MATRIX_KEY(2, 0, KEY_HOME)
239 MATRIX_KEY(2, 1, KEY_REPLY)
240 MATRIX_KEY(2, 2, KEY_2)
241 MATRIX_KEY(2, 3, KEY_6)
242 MATRIX_KEY(3, 0, KEY_VOLUMEUP)
243 MATRIX_KEY(3, 1, KEY_RIGHT)
244 MATRIX_KEY(3, 2, KEY_3)
245 MATRIX_KEY(3, 3, KEY_9)
246 MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
247 MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
248 MATRIX_KEY(4, 1, KEY_BACK)
249 MATRIX_KEY(4, 2, KEY_CAMERA)
250 MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
252 keypad,num-rows = <6>;
253 keypad,num-columns = <5>;
257 dragon_ethernet_gpios: ethernet-gpios {
263 power-source = <PM8058_GPIO_S3>;
266 dragon_bmp085_gpios: bmp085-gpios {
272 power-source = <PM8058_GPIO_S3>;
275 dragon_sdcc3_gpios: sdcc3-gpios {
281 power-source = <PM8058_GPIO_S3>;
284 dragon_sdcc5_gpios: sdcc5-gpios {
290 qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
291 power-source = <PM8058_GPIO_S3>;
294 dragon_ak8975_gpios: ak8975-gpios {
300 power-source = <PM8058_GPIO_S3>;
303 dragon_veth_gpios: veth-gpios {
315 * The keypad LED @0x48 is routed to
316 * the sensor board where it is
317 * connected to an infrared LED
318 * SFH4650 (60mW, @850nm) next to the
319 * ambient light and proximity sensor
320 * Capella Microsystems CM3605.
322 compatible = "qcom,pm8058-keypad-led";
324 label = "pm8058:infrared:proximitysensor";
325 default-state = "off";
328 compatible = "qcom,pm8058-led";
330 label = "pm8058:red";
331 default-state = "off";
335 * This is actually green too on my
336 * board, but documented as yellow.
338 compatible = "qcom,pm8058-led";
340 label = "pm8058:yellow";
341 default-state = "off";
342 linux,default-trigger = "mmc0";
345 compatible = "qcom,pm8058-led";
347 label = "pm8058:green";
348 default-state = "on";
349 linux,default-trigger = "heartbeat";
356 qcom,mode = <GSBI_PROT_I2C_UART>;
360 pinctrl-names = "default";
361 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
366 pinctrl-names = "default";
367 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
370 compatible = "asahi-kasei,ak8975";
372 /* GPIO33 has interrupt 224 on the PM8058 */
373 interrupt-parent = <&pm8058_gpio>;
374 interrupts = <224 IRQ_TYPE_EDGE_RISING>;
375 pinctrl-names = "default";
376 pinctrl-0 = <&dragon_ak8975_gpios>;
377 vid-supply = <&pm8058_lvs0>; // 1.8V
378 vdd-supply = <&pm8058_l14>; // 2.85V
381 compatible = "bosch,bmp085";
383 /* GPIO16 has interrupt 207 on the PM8058 */
384 interrupt-parent = <&pm8058_gpio>;
385 interrupts = <207 IRQ_TYPE_EDGE_RISING>;
386 reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
387 pinctrl-names = "default";
388 pinctrl-0 = <&dragon_bmp085_gpios>;
389 vddd-supply = <&pm8058_lvs0>; // 1.8V
390 vdda-supply = <&pm8058_l14>; // 2.85V
395 external-bus@1a100000 {
396 /* The EBI2 will instantiate first, then populate its children */
398 pinctrl-names = "default";
399 pinctrl-0 = <&dragon_ebi2_pins>;
402 * An on-board SMSC LAN9221 chip for "debug ethernet",
403 * which is actually just an ordinary ethernet on the
404 * EBI2. This has a 25MHz chrystal next to it, so no
405 * clocking is needed.
408 compatible = "smsc,lan9221", "smsc,lan9115";
411 * GPIO7 has interrupt 198 on the PM8058
412 * The second interrupt is the PME interrupt
413 * for network wakeup, connected to the TLMM.
415 interrupts-extended = <&pmicintc 198 IRQ_TYPE_EDGE_FALLING>,
416 <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
417 reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
418 vdd33a-supply = <&dragon_veth>;
419 vddvario-supply = <&dragon_vario>;
420 pinctrl-names = "default";
421 pinctrl-0 = <&dragon_ethernet_gpios>;
424 smsc,force-external-phy;
425 /* IRQ on edge falling = active low */
430 * SLOW chipselect config
431 * Delay 9 cycles (140ns@64MHz) between SMSC
432 * LAN9221 Ethernet controller reads and writes
435 qcom,xmem-recovery-cycles = <0>;
436 qcom,xmem-write-hold-cycles = <3>;
437 qcom,xmem-write-delta-cycles = <31>;
438 qcom,xmem-read-delta-cycles = <28>;
439 qcom,xmem-write-wait-cycles = <9>;
440 qcom,xmem-read-wait-cycles = <9>;
446 * Set up of the PMIC RPM regulators for this board
447 * PM8901 supplies "preliminary regulators" whatever
451 vdd_l0-supply = <&pm8901_s4>;
452 vdd_l1-supply = <&vph>;
453 vdd_l2-supply = <&vph>;
454 vdd_l3-supply = <&vph>;
455 vdd_l4-supply = <&vph>;
456 vdd_l5-supply = <&vph>;
457 vdd_l6-supply = <&vph>;
458 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
459 vdd_s2-supply = <&vph>;
460 vdd_s3-supply = <&vph>;
461 vdd_s4-supply = <&vph>;
462 lvs0_in-supply = <&pm8058_s3>;
463 lvs1_in-supply = <&pm8901_s4>;
464 lvs2_in-supply = <&pm8058_l0>;
465 lvs3_in-supply = <&pm8058_s2>;
466 mvs_in-supply = <&pm8058_s3>;
469 regulator-min-microvolt = <1200000>;
470 regulator-max-microvolt = <1200000>;
474 regulator-min-microvolt = <3300000>;
475 regulator-max-microvolt = <3300000>;
479 regulator-min-microvolt = <2850000>;
480 regulator-max-microvolt = <3300000>;
484 regulator-min-microvolt = <3300000>;
485 regulator-max-microvolt = <3300000>;
489 regulator-min-microvolt = <2600000>;
490 regulator-max-microvolt = <2600000>;
494 regulator-min-microvolt = <2850000>;
495 regulator-max-microvolt = <2850000>;
499 regulator-min-microvolt = <2200000>;
500 regulator-max-microvolt = <2200000>;
504 /* s0 and s1 are SAW regulators controlled over SPM */
506 regulator-min-microvolt = <1300000>;
507 regulator-max-microvolt = <1300000>;
508 qcom,switch-mode-frequency = <1600000>;
512 regulator-min-microvolt = <1100000>;
513 regulator-max-microvolt = <1100000>;
514 qcom,switch-mode-frequency = <1600000>;
518 regulator-min-microvolt = <1225000>;
519 regulator-max-microvolt = <1225000>;
520 qcom,switch-mode-frequency = <1600000>;
524 /* LVS0 thru 3 and mvs0 are just switches */
536 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
537 vdd_l2_l11_l12-supply = <&vph>;
538 vdd_l3_l4_l5-supply = <&vph>;
539 vdd_l6_l7-supply = <&vph>;
540 vdd_l8-supply = <&vph>;
541 vdd_l9-supply = <&vph>;
542 vdd_l10-supply = <&vph>;
543 vdd_l13_l16-supply = <&pm8058_s4>;
544 vdd_l14_l15-supply = <&vph>;
545 vdd_l17_l18-supply = <&vph>;
546 vdd_l19_l20-supply = <&vph>;
547 vdd_l21-supply = <&pm8058_s3>;
548 vdd_l22-supply = <&pm8058_s3>;
549 vdd_l23_l24_l25-supply = <&pm8058_s3>;
550 vdd_s0-supply = <&vph>;
551 vdd_s1-supply = <&vph>;
552 vdd_s2-supply = <&vph>;
553 vdd_s3-supply = <&vph>;
554 vdd_s4-supply = <&vph>;
555 vdd_ncp-supply = <&vph>;
558 regulator-min-microvolt = <1200000>;
559 regulator-max-microvolt = <1200000>;
563 regulator-min-microvolt = <1200000>;
564 regulator-max-microvolt = <1200000>;
568 regulator-min-microvolt = <1800000>;
569 regulator-max-microvolt = <2600000>;
573 regulator-min-microvolt = <1800000>;
574 regulator-max-microvolt = <1800000>;
578 regulator-min-microvolt = <2850000>;
579 regulator-max-microvolt = <2850000>;
583 regulator-min-microvolt = <2850000>;
584 regulator-max-microvolt = <2850000>;
588 regulator-min-microvolt = <3000000>;
589 regulator-max-microvolt = <3600000>;
593 regulator-min-microvolt = <1800000>;
594 regulator-max-microvolt = <1800000>;
598 regulator-min-microvolt = <2900000>;
599 regulator-max-microvolt = <3050000>;
603 regulator-min-microvolt = <1800000>;
604 regulator-max-microvolt = <1800000>;
608 regulator-min-microvolt = <2600000>;
609 regulator-max-microvolt = <2600000>;
613 regulator-min-microvolt = <1500000>;
614 regulator-max-microvolt = <1500000>;
618 regulator-min-microvolt = <2900000>;
619 regulator-max-microvolt = <2900000>;
623 regulator-min-microvolt = <2050000>;
624 regulator-max-microvolt = <2050000>;
628 regulator-min-microvolt = <2850000>;
629 regulator-max-microvolt = <2850000>;
632 regulator-min-microvolt = <2850000>;
633 regulator-max-microvolt = <2850000>;
637 regulator-min-microvolt = <1800000>;
638 regulator-max-microvolt = <1800000>;
643 // 1.5V according to schematic
644 regulator-min-microvolt = <2600000>;
645 regulator-max-microvolt = <2600000>;
649 regulator-min-microvolt = <2200000>;
650 regulator-max-microvolt = <2200000>;
654 regulator-min-microvolt = <2500000>;
655 regulator-max-microvolt = <2500000>;
659 regulator-min-microvolt = <1800000>;
660 regulator-max-microvolt = <1800000>;
664 // 1.1 V according to schematic
665 regulator-min-microvolt = <1200000>;
666 regulator-max-microvolt = <1200000>;
671 // 1.2 V according to schematic
672 regulator-min-microvolt = <1150000>;
673 regulator-max-microvolt = <1150000>;
678 regulator-min-microvolt = <1200000>;
679 regulator-max-microvolt = <1200000>;
684 regulator-min-microvolt = <1200000>;
685 regulator-max-microvolt = <1200000>;
689 regulator-min-microvolt = <1200000>;
690 regulator-max-microvolt = <1200000>;
695 // regulator-min-microvolt = <500000>;
696 // regulator-max-microvolt = <1325000>;
697 regulator-min-microvolt = <1100000>;
698 regulator-max-microvolt = <1100000>;
699 qcom,switch-mode-frequency = <1600000>;
703 // regulator-min-microvolt = <500000>;
704 // regulator-max-microvolt = <1250000>;
705 regulator-min-microvolt = <1100000>;
706 regulator-max-microvolt = <1100000>;
707 qcom,switch-mode-frequency = <1600000>;
711 // 1.3 V according to schematic
712 regulator-min-microvolt = <1200000>;
713 regulator-max-microvolt = <1400000>;
714 qcom,switch-mode-frequency = <1600000>;
718 regulator-min-microvolt = <1800000>;
719 regulator-max-microvolt = <1800000>;
720 qcom,switch-mode-frequency = <1600000>;
725 regulator-min-microvolt = <2200000>;
726 regulator-max-microvolt = <2200000>;
727 qcom,switch-mode-frequency = <1600000>;
732 /* LVS0 and LVS1 are just switches */
741 regulator-min-microvolt = <1800000>;
742 regulator-max-microvolt = <1800000>;
743 qcom,switch-mode-frequency = <1600000>;
748 /* Internal 3.69 GiB eMMC */
751 pinctrl-names = "default";
752 pinctrl-0 = <&dragon_sdcc1_pins>;
753 vmmc-supply = <&pm8901_l5>;
754 vqmmc-supply = <&pm8901_lvs0>;
757 /* External micro SD card, directly connected, pulled up to 2.85 V */
760 /* Enable SSBI GPIO 22 as input, use for card detect */
761 pinctrl-names = "default";
762 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
763 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
764 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
765 vmmc-supply = <&pm8058_l14>;
769 * Second external micro SD card, using two TXB104RGYR levelshifters
770 * to lift from 1.8 V to 2.85 V
774 /* Enable SSBI GPIO 26 as input, use for card detect */
775 pinctrl-names = "default";
776 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
777 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
778 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
779 vmmc-supply = <&pm8058_l14>;
780 vqmmc-supply = <&dragon_vio_txb>;