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 */
224 /* Interrupt line for the KXSD9 accelerometer */
225 dragon_kxsd9_gpios: kxsd9 {
227 pins = "gpio57"; /* IRQ line */
237 MATRIX_KEY(0, 0, KEY_MENU)
238 MATRIX_KEY(0, 2, KEY_1)
239 MATRIX_KEY(0, 3, KEY_4)
240 MATRIX_KEY(0, 4, KEY_7)
241 MATRIX_KEY(1, 0, KEY_UP)
242 MATRIX_KEY(1, 1, KEY_LEFT)
243 MATRIX_KEY(1, 2, KEY_DOWN)
244 MATRIX_KEY(1, 3, KEY_5)
245 MATRIX_KEY(1, 3, KEY_8)
246 MATRIX_KEY(2, 0, KEY_HOME)
247 MATRIX_KEY(2, 1, KEY_REPLY)
248 MATRIX_KEY(2, 2, KEY_2)
249 MATRIX_KEY(2, 3, KEY_6)
250 MATRIX_KEY(3, 0, KEY_VOLUMEUP)
251 MATRIX_KEY(3, 1, KEY_RIGHT)
252 MATRIX_KEY(3, 2, KEY_3)
253 MATRIX_KEY(3, 3, KEY_9)
254 MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
255 MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
256 MATRIX_KEY(4, 1, KEY_BACK)
257 MATRIX_KEY(4, 2, KEY_CAMERA)
258 MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
260 keypad,num-rows = <6>;
261 keypad,num-columns = <5>;
265 dragon_ethernet_gpios: ethernet-gpios {
271 power-source = <PM8058_GPIO_S3>;
274 dragon_bmp085_gpios: bmp085-gpios {
280 power-source = <PM8058_GPIO_S3>;
283 dragon_mpu3050_gpios: mpu3050-gpios {
289 power-source = <PM8058_GPIO_S3>;
292 dragon_sdcc3_gpios: sdcc3-gpios {
298 power-source = <PM8058_GPIO_S3>;
301 dragon_sdcc5_gpios: sdcc5-gpios {
307 qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
308 power-source = <PM8058_GPIO_S3>;
311 dragon_ak8975_gpios: ak8975-gpios {
317 power-source = <PM8058_GPIO_S3>;
320 dragon_veth_gpios: veth-gpios {
332 * The keypad LED @0x48 is routed to
333 * the sensor board where it is
334 * connected to an infrared LED
335 * SFH4650 (60mW, @850nm) next to the
336 * ambient light and proximity sensor
337 * Capella Microsystems CM3605.
339 compatible = "qcom,pm8058-keypad-led";
341 label = "pm8058:infrared:proximitysensor";
342 default-state = "off";
345 compatible = "qcom,pm8058-led";
347 label = "pm8058:red";
348 default-state = "off";
352 * This is actually green too on my
353 * board, but documented as yellow.
355 compatible = "qcom,pm8058-led";
357 label = "pm8058:yellow";
358 default-state = "off";
359 linux,default-trigger = "mmc0";
362 compatible = "qcom,pm8058-led";
364 label = "pm8058:green";
365 default-state = "on";
366 linux,default-trigger = "heartbeat";
373 qcom,mode = <GSBI_PROT_I2C_UART>;
377 pinctrl-names = "default";
378 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
383 pinctrl-names = "default";
384 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
387 compatible = "asahi-kasei,ak8975";
389 /* FIXME: GPIO33 has interrupt 224 on the PM8058 */
390 interrupt-parent = <&pm8058>;
391 interrupts = <224 IRQ_TYPE_EDGE_RISING>;
392 pinctrl-names = "default";
393 pinctrl-0 = <&dragon_ak8975_gpios>;
394 vid-supply = <&pm8058_lvs0>; // 1.8V
395 vdd-supply = <&pm8058_l14>; // 2.85V
398 compatible = "bosch,bmp085";
400 /* FIXME: GPIO16 has interrupt 207 on the PM8058 */
401 interrupt-parent = <&pm8058>;
402 interrupts = <207 IRQ_TYPE_EDGE_RISING>;
403 reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
404 pinctrl-names = "default";
405 pinctrl-0 = <&dragon_bmp085_gpios>;
406 vddd-supply = <&pm8058_lvs0>; // 1.8V
407 vdda-supply = <&pm8058_l14>; // 2.85V
410 compatible = "invensense,mpu3050";
413 * GPIO17 has interrupt 208 on the
414 * PM8058, it is pulled high by a 10k
415 * resistor to VLOGIC so needs to be
416 * active low/falling edge.
418 interrupts-extended = <&pm8058 208 IRQ_TYPE_EDGE_FALLING>;
419 pinctrl-names = "default";
420 pinctrl-0 = <&dragon_mpu3050_gpios>;
421 vlogic-supply = <&pm8058_lvs0>; // 1.8V
422 vdd-supply = <&pm8058_l14>; // 2.85V
425 * The MPU-3050 acts as a hub for the
429 #address-cells = <1>;
433 compatible = "kionix,kxsd9";
435 interrupt-parent = <&tlmm>;
436 interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
437 pinctrl-names = "default";
438 pinctrl-0 = <&dragon_kxsd9_gpios>;
439 iovdd-supply = <&pm8058_lvs0>; // 1.8V
440 vdd-supply = <&pm8058_l14>; // 2.85V
447 external-bus@1a100000 {
448 /* The EBI2 will instantiate first, then populate its children */
450 pinctrl-names = "default";
451 pinctrl-0 = <&dragon_ebi2_pins>;
454 * An on-board SMSC LAN9221 chip for "debug ethernet",
455 * which is actually just an ordinary ethernet on the
456 * EBI2. This has a 25MHz chrystal next to it, so no
457 * clocking is needed.
460 compatible = "smsc,lan9221", "smsc,lan9115";
463 * GPIO7 has interrupt 198 on the PM8058
464 * The second interrupt is the PME interrupt
465 * for network wakeup, connected to the TLMM.
467 interrupts-extended = <&pm8058 198 IRQ_TYPE_EDGE_FALLING>,
468 <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
469 reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
470 vdd33a-supply = <&dragon_veth>;
471 vddvario-supply = <&dragon_vario>;
472 pinctrl-names = "default";
473 pinctrl-0 = <&dragon_ethernet_gpios>;
476 smsc,force-external-phy;
477 /* IRQ on edge falling = active low */
482 * SLOW chipselect config
483 * Delay 9 cycles (140ns@64MHz) between SMSC
484 * LAN9221 Ethernet controller reads and writes
487 qcom,xmem-recovery-cycles = <0>;
488 qcom,xmem-write-hold-cycles = <3>;
489 qcom,xmem-write-delta-cycles = <31>;
490 qcom,xmem-read-delta-cycles = <28>;
491 qcom,xmem-write-wait-cycles = <9>;
492 qcom,xmem-read-wait-cycles = <9>;
498 * Set up of the PMIC RPM regulators for this board
499 * PM8901 supplies "preliminary regulators" whatever
503 vdd_l0-supply = <&pm8901_s4>;
504 vdd_l1-supply = <&vph>;
505 vdd_l2-supply = <&vph>;
506 vdd_l3-supply = <&vph>;
507 vdd_l4-supply = <&vph>;
508 vdd_l5-supply = <&vph>;
509 vdd_l6-supply = <&vph>;
510 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
511 vdd_s2-supply = <&vph>;
512 vdd_s3-supply = <&vph>;
513 vdd_s4-supply = <&vph>;
514 lvs0_in-supply = <&pm8058_s3>;
515 lvs1_in-supply = <&pm8901_s4>;
516 lvs2_in-supply = <&pm8058_l0>;
517 lvs3_in-supply = <&pm8058_s2>;
518 mvs_in-supply = <&pm8058_s3>;
521 regulator-min-microvolt = <1200000>;
522 regulator-max-microvolt = <1200000>;
526 regulator-min-microvolt = <3300000>;
527 regulator-max-microvolt = <3300000>;
531 regulator-min-microvolt = <2850000>;
532 regulator-max-microvolt = <3300000>;
536 regulator-min-microvolt = <3300000>;
537 regulator-max-microvolt = <3300000>;
541 regulator-min-microvolt = <2600000>;
542 regulator-max-microvolt = <2600000>;
546 regulator-min-microvolt = <2850000>;
547 regulator-max-microvolt = <2850000>;
551 regulator-min-microvolt = <2200000>;
552 regulator-max-microvolt = <2200000>;
556 /* s0 and s1 are SAW regulators controlled over SPM */
558 regulator-min-microvolt = <1300000>;
559 regulator-max-microvolt = <1300000>;
560 qcom,switch-mode-frequency = <1600000>;
564 regulator-min-microvolt = <1100000>;
565 regulator-max-microvolt = <1100000>;
566 qcom,switch-mode-frequency = <1600000>;
570 regulator-min-microvolt = <1225000>;
571 regulator-max-microvolt = <1225000>;
572 qcom,switch-mode-frequency = <1600000>;
576 /* LVS0 thru 3 and mvs0 are just switches */
588 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
589 vdd_l2_l11_l12-supply = <&vph>;
590 vdd_l3_l4_l5-supply = <&vph>;
591 vdd_l6_l7-supply = <&vph>;
592 vdd_l8-supply = <&vph>;
593 vdd_l9-supply = <&vph>;
594 vdd_l10-supply = <&vph>;
595 vdd_l13_l16-supply = <&pm8058_s4>;
596 vdd_l14_l15-supply = <&vph>;
597 vdd_l17_l18-supply = <&vph>;
598 vdd_l19_l20-supply = <&vph>;
599 vdd_l21-supply = <&pm8058_s3>;
600 vdd_l22-supply = <&pm8058_s3>;
601 vdd_l23_l24_l25-supply = <&pm8058_s3>;
602 vdd_s0-supply = <&vph>;
603 vdd_s1-supply = <&vph>;
604 vdd_s2-supply = <&vph>;
605 vdd_s3-supply = <&vph>;
606 vdd_s4-supply = <&vph>;
607 vdd_ncp-supply = <&vph>;
610 regulator-min-microvolt = <1200000>;
611 regulator-max-microvolt = <1200000>;
615 regulator-min-microvolt = <1200000>;
616 regulator-max-microvolt = <1200000>;
620 regulator-min-microvolt = <1800000>;
621 regulator-max-microvolt = <2600000>;
625 regulator-min-microvolt = <1800000>;
626 regulator-max-microvolt = <1800000>;
630 regulator-min-microvolt = <2850000>;
631 regulator-max-microvolt = <2850000>;
635 regulator-min-microvolt = <2850000>;
636 regulator-max-microvolt = <2850000>;
640 regulator-min-microvolt = <3000000>;
641 regulator-max-microvolt = <3600000>;
645 regulator-min-microvolt = <1800000>;
646 regulator-max-microvolt = <1800000>;
650 regulator-min-microvolt = <2900000>;
651 regulator-max-microvolt = <3050000>;
655 regulator-min-microvolt = <1800000>;
656 regulator-max-microvolt = <1800000>;
660 regulator-min-microvolt = <2600000>;
661 regulator-max-microvolt = <2600000>;
665 regulator-min-microvolt = <1500000>;
666 regulator-max-microvolt = <1500000>;
670 regulator-min-microvolt = <2900000>;
671 regulator-max-microvolt = <2900000>;
675 regulator-min-microvolt = <2050000>;
676 regulator-max-microvolt = <2050000>;
680 regulator-min-microvolt = <2850000>;
681 regulator-max-microvolt = <2850000>;
684 regulator-min-microvolt = <2850000>;
685 regulator-max-microvolt = <2850000>;
689 regulator-min-microvolt = <1800000>;
690 regulator-max-microvolt = <1800000>;
695 // 1.5V according to schematic
696 regulator-min-microvolt = <2600000>;
697 regulator-max-microvolt = <2600000>;
701 regulator-min-microvolt = <2200000>;
702 regulator-max-microvolt = <2200000>;
706 regulator-min-microvolt = <2500000>;
707 regulator-max-microvolt = <2500000>;
711 regulator-min-microvolt = <1800000>;
712 regulator-max-microvolt = <1800000>;
716 // 1.1 V according to schematic
717 regulator-min-microvolt = <1200000>;
718 regulator-max-microvolt = <1200000>;
723 // 1.2 V according to schematic
724 regulator-min-microvolt = <1150000>;
725 regulator-max-microvolt = <1150000>;
730 regulator-min-microvolt = <1200000>;
731 regulator-max-microvolt = <1200000>;
736 regulator-min-microvolt = <1200000>;
737 regulator-max-microvolt = <1200000>;
741 regulator-min-microvolt = <1200000>;
742 regulator-max-microvolt = <1200000>;
747 // regulator-min-microvolt = <500000>;
748 // regulator-max-microvolt = <1325000>;
749 regulator-min-microvolt = <1100000>;
750 regulator-max-microvolt = <1100000>;
751 qcom,switch-mode-frequency = <1600000>;
755 // regulator-min-microvolt = <500000>;
756 // regulator-max-microvolt = <1250000>;
757 regulator-min-microvolt = <1100000>;
758 regulator-max-microvolt = <1100000>;
759 qcom,switch-mode-frequency = <1600000>;
763 // 1.3 V according to schematic
764 regulator-min-microvolt = <1200000>;
765 regulator-max-microvolt = <1400000>;
766 qcom,switch-mode-frequency = <1600000>;
770 regulator-min-microvolt = <1800000>;
771 regulator-max-microvolt = <1800000>;
772 qcom,switch-mode-frequency = <1600000>;
777 regulator-min-microvolt = <2200000>;
778 regulator-max-microvolt = <2200000>;
779 qcom,switch-mode-frequency = <1600000>;
784 /* LVS0 and LVS1 are just switches */
793 regulator-min-microvolt = <1800000>;
794 regulator-max-microvolt = <1800000>;
795 qcom,switch-mode-frequency = <1600000>;
800 /* Internal 3.69 GiB eMMC */
803 pinctrl-names = "default";
804 pinctrl-0 = <&dragon_sdcc1_pins>;
805 vmmc-supply = <&pm8901_l5>;
806 vqmmc-supply = <&pm8901_lvs0>;
809 /* External micro SD card, directly connected, pulled up to 2.85 V */
812 /* Enable SSBI GPIO 22 as input, use for card detect */
813 pinctrl-names = "default";
814 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
815 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
816 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
817 vmmc-supply = <&pm8058_l14>;
821 * Second external micro SD card, using two TXB104RGYR levelshifters
822 * to lift from 1.8 V to 2.85 V
826 /* Enable SSBI GPIO 26 as input, use for card detect */
827 pinctrl-names = "default";
828 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
829 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
830 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
831 vmmc-supply = <&pm8058_l14>;
832 vqmmc-supply = <&dragon_vio_txb>;