1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
5 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
6 #include "qcom-msm8660.dtsi"
9 model = "Qualcomm APQ8060 Dragonboard";
10 compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
13 serial0 = &gsbi12_serial;
17 stdout-path = "serial0:115200n8";
21 compatible = "simple-bus";
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";
34 /* 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>;
41 gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&dragon_veth_gpios>;
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>;
57 /* 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>;
67 * Capella CM3605 light and proximity sensor mounted directly
68 * on the sensor board.
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>;
75 /* Trig on both edges - getting close or far away */
76 interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
77 /* 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>;
86 /* eMMMC pins, all 8 data lines connected */
87 dragon_sdcc1_pins: sdcc1 {
89 pins = "gpio159", "gpio160", "gpio161",
90 "gpio162", "gpio163", "gpio164",
91 "gpio165", "gpio166", "gpio167",
96 pins = "gpio167"; /* SDC1 CLK */
97 drive-strength = <16>;
101 pins = "gpio168"; /* SDC1 CMD */
102 drive-strength = <10>;
107 pins = "gpio159", "gpio160", "gpio161", "gpio162",
108 "gpio163", "gpio164", "gpio165", "gpio166";
109 drive-strength = <10>;
115 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
118 dragon_sdcc3_pins: sdcc3 {
121 drive-strength = <8>;
126 drive-strength = <8>;
131 drive-strength = <8>;
136 /* Second SD card slot pins */
137 dragon_sdcc5_pins: sdcc5 {
139 pins = "gpio95", "gpio96", "gpio97",
140 "gpio98", "gpio99", "gpio100";
144 pins = "gpio97"; /* SDC5 CLK */
145 drive-strength = <16>;
149 pins = "gpio95"; /* SDC5 CMD */
150 drive-strength = <10>;
155 pins = "gpio96", "gpio98", "gpio99", "gpio100";
156 drive-strength = <10>;
161 dragon_gsbi8_i2c_pins: gsbi8_i2c {
163 pins = "gpio64", "gpio65";
167 pins = "gpio64", "gpio65";
168 drive-strength = <16>;
169 /* These have external pull-up 2.2kOhm to 1.8V */
174 dragon_gsbi12_i2c_pins: gsbi12_i2c {
176 pins = "gpio115", "gpio116";
180 pins = "gpio115", "gpio116";
181 drive-strength = <16>;
182 /* These have external pull-up 4.7kOhm to 1.8V */
187 /* Primary serial port uart 0 pins */
188 dragon_gsbi12_serial_pins: gsbi12_serial {
190 pins = "gpio117", "gpio118";
195 drive-strength = <8>;
200 drive-strength = <2>;
205 dragon_ebi2_pins: ebi2 {
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.
213 /* "gpio39", CS1A_N this is not good to mux */
214 "gpio40", /* CS2A_N */
215 "gpio134"; /* CS0_N testpoint TP29 */
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 */
235 /* Interrupt line for the KXSD9 accelerometer */
236 dragon_kxsd9_gpios: kxsd9 {
238 pins = "gpio57"; /* IRQ line */
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)
271 keypad,num-rows = <6>;
272 keypad,num-columns = <5>;
276 dragon_ethernet_gpios: ethernet-gpios {
282 power-source = <PM8058_GPIO_S3>;
285 dragon_bmp085_gpios: bmp085-gpios {
291 power-source = <PM8058_GPIO_S3>;
294 dragon_mpu3050_gpios: mpu3050-gpios {
300 power-source = <PM8058_GPIO_S3>;
303 dragon_sdcc3_gpios: sdcc3-gpios {
309 power-source = <PM8058_GPIO_S3>;
312 dragon_sdcc5_gpios: sdcc5-gpios {
318 qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
319 power-source = <PM8058_GPIO_S3>;
322 dragon_ak8975_gpios: ak8975-gpios {
328 power-source = <PM8058_GPIO_S3>;
331 dragon_cm3605_gpios: cm3605-gpios {
332 /* Pin 34 connected to the proxy IRQ */
338 power-source = <PM8058_GPIO_S3>;
340 /* Pin 35 connected to ASET */
346 power-source = <PM8058_GPIO_S3>;
349 dragon_veth_gpios: veth-gpios {
360 dragon_cm3605_mpps: cm3605-mpps {
366 /* Let's use channel 5 */
367 qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
368 power-source = <PM8058_GPIO_S3>;
374 /* Reference voltage 2.2 V */
375 xoadc-ref-supply = <&pm8058_l18>;
377 /* Board-specific channels */
379 /* Connected to AOUT of ALS sensor */
383 /* Connected to test point TP43 */
387 /* Connected to battery thermistor */
391 /* Connected to battery ID detector */
395 /* Connected to XO thermistor */
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.
409 compatible = "qcom,pm8058-keypad-led";
411 label = "pm8058:infrared:proximitysensor";
412 default-state = "off";
413 linux,default-trigger = "cm3605";
416 compatible = "qcom,pm8058-led";
418 label = "pm8058:red";
419 default-state = "off";
423 * This is actually green too on my
424 * board, but documented as yellow.
426 compatible = "qcom,pm8058-led";
428 label = "pm8058:yellow";
429 default-state = "off";
430 linux,default-trigger = "mmc0";
433 compatible = "qcom,pm8058-led";
435 label = "pm8058:green";
436 default-state = "on";
437 linux,default-trigger = "heartbeat";
444 qcom,mode = <GSBI_PROT_I2C>;
448 pinctrl-names = "default";
449 pinctrl-0 = <&dragon_gsbi8_i2c_pins>;
452 /* A 16KiB Platform ID EEPROM on the CPU carrier board */
453 compatible = "atmel,24c128";
455 vcc-supply = <&pm8058_s3>;
459 /* This Woolfson Micro device has an unrouted interrupt line */
460 compatible = "wlf,wm8903";
463 AVDD-supply = <&pm8058_l16>;
464 CPVDD-supply = <&pm8058_l16>;
465 DBVDD-supply = <&pm8058_s3>;
466 DCVDD-supply = <&pm8058_l0>;
472 micdet-delay = <100>;
473 gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
480 qcom,mode = <GSBI_PROT_I2C_UART>;
484 pinctrl-names = "default";
485 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
490 pinctrl-names = "default";
491 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
494 compatible = "asahi-kasei,ak8975";
496 interrupt-parent = <&pm8058_gpio>;
497 interrupts = <33 IRQ_TYPE_EDGE_RISING>;
498 pinctrl-names = "default";
499 pinctrl-0 = <&dragon_ak8975_gpios>;
500 vid-supply = <&pm8058_lvs0>; // 1.8V
501 vdd-supply = <&pm8058_l14>; // 2.85V
504 compatible = "bosch,bmp085";
506 interrupt-parent = <&pm8058_gpio>;
507 interrupts = <16 IRQ_TYPE_EDGE_RISING>;
508 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
515 compatible = "invensense,mpu3050";
518 * GPIO17 is pulled high by a 10k
519 * resistor to VLOGIC so needs to be
520 * active low/falling edge.
522 interrupts-extended = <&pm8058_gpio 17 IRQ_TYPE_EDGE_FALLING>;
523 pinctrl-names = "default";
524 pinctrl-0 = <&dragon_mpu3050_gpios>;
525 vlogic-supply = <&pm8058_lvs0>; // 1.8V
526 vdd-supply = <&pm8058_l14>; // 2.85V
529 * The MPU-3050 acts as a hub for the
533 #address-cells = <1>;
537 compatible = "kionix,kxsd9";
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
551 external-bus@1a100000 {
552 /* The EBI2 will instantiate first, then populate its children */
554 pinctrl-names = "default";
555 pinctrl-0 = <&dragon_ebi2_pins>;
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.
564 compatible = "smsc,lan9221", "smsc,lan9115";
567 * The second interrupt is the PME interrupt
568 * for network wakeup, connected to the TLMM.
570 interrupts-extended = <&pm8058_gpio 7 IRQ_TYPE_EDGE_FALLING>,
571 <&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>;
579 smsc,force-external-phy;
583 * SLOW chipselect config
584 * Delay 9 cycles (140ns@64MHz) between SMSC
585 * LAN9221 Ethernet controller reads and writes
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>;
599 * Set up of the PMIC RPM regulators for this board
600 * PM8901 supplies "preliminary regulators" whatever
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>;
622 regulator-min-microvolt = <1200000>;
623 regulator-max-microvolt = <1200000>;
627 regulator-min-microvolt = <3300000>;
628 regulator-max-microvolt = <3300000>;
632 regulator-min-microvolt = <2850000>;
633 regulator-max-microvolt = <3300000>;
637 regulator-min-microvolt = <3300000>;
638 regulator-max-microvolt = <3300000>;
642 regulator-min-microvolt = <2600000>;
643 regulator-max-microvolt = <2600000>;
647 regulator-min-microvolt = <2850000>;
648 regulator-max-microvolt = <2850000>;
652 regulator-min-microvolt = <2200000>;
653 regulator-max-microvolt = <2200000>;
657 /* s0 and s1 are SAW regulators controlled over SPM */
659 regulator-min-microvolt = <1300000>;
660 regulator-max-microvolt = <1300000>;
661 qcom,switch-mode-frequency = <1600000>;
665 regulator-min-microvolt = <1100000>;
666 regulator-max-microvolt = <1100000>;
667 qcom,switch-mode-frequency = <1600000>;
671 regulator-min-microvolt = <1225000>;
672 regulator-max-microvolt = <1225000>;
673 qcom,switch-mode-frequency = <1600000>;
677 /* LVS0 thru 3 and mvs0 are just switches */
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>;
711 regulator-min-microvolt = <1200000>;
712 regulator-max-microvolt = <1200000>;
716 regulator-min-microvolt = <1200000>;
717 regulator-max-microvolt = <1200000>;
721 regulator-min-microvolt = <1800000>;
722 regulator-max-microvolt = <2600000>;
726 regulator-min-microvolt = <1800000>;
727 regulator-max-microvolt = <1800000>;
731 regulator-min-microvolt = <2850000>;
732 regulator-max-microvolt = <2850000>;
736 regulator-min-microvolt = <2850000>;
737 regulator-max-microvolt = <2850000>;
741 regulator-min-microvolt = <3000000>;
742 regulator-max-microvolt = <3600000>;
746 regulator-min-microvolt = <1800000>;
747 regulator-max-microvolt = <1800000>;
751 regulator-min-microvolt = <2900000>;
752 regulator-max-microvolt = <3050000>;
756 regulator-min-microvolt = <1800000>;
757 regulator-max-microvolt = <1800000>;
761 regulator-min-microvolt = <2600000>;
762 regulator-max-microvolt = <2600000>;
766 regulator-min-microvolt = <1500000>;
767 regulator-max-microvolt = <1500000>;
771 regulator-min-microvolt = <2900000>;
772 regulator-max-microvolt = <2900000>;
776 regulator-min-microvolt = <2050000>;
777 regulator-max-microvolt = <2050000>;
781 regulator-min-microvolt = <2850000>;
782 regulator-max-microvolt = <2850000>;
785 regulator-min-microvolt = <2850000>;
786 regulator-max-microvolt = <2850000>;
790 regulator-min-microvolt = <1800000>;
791 regulator-max-microvolt = <1800000>;
796 // 1.5V according to schematic
797 regulator-min-microvolt = <2600000>;
798 regulator-max-microvolt = <2600000>;
802 regulator-min-microvolt = <2200000>;
803 regulator-max-microvolt = <2200000>;
807 regulator-min-microvolt = <2500000>;
808 regulator-max-microvolt = <2500000>;
812 regulator-min-microvolt = <1800000>;
813 regulator-max-microvolt = <1800000>;
817 // 1.1 V according to schematic
818 regulator-min-microvolt = <1200000>;
819 regulator-max-microvolt = <1200000>;
824 // 1.2 V according to schematic
825 regulator-min-microvolt = <1150000>;
826 regulator-max-microvolt = <1150000>;
831 regulator-min-microvolt = <1200000>;
832 regulator-max-microvolt = <1200000>;
837 regulator-min-microvolt = <1200000>;
838 regulator-max-microvolt = <1200000>;
842 regulator-min-microvolt = <1200000>;
843 regulator-max-microvolt = <1200000>;
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>;
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>;
864 // 1.3 V according to schematic
865 regulator-min-microvolt = <1200000>;
866 regulator-max-microvolt = <1400000>;
867 qcom,switch-mode-frequency = <1600000>;
871 regulator-min-microvolt = <1800000>;
872 regulator-max-microvolt = <1800000>;
873 qcom,switch-mode-frequency = <1600000>;
878 regulator-min-microvolt = <2200000>;
879 regulator-max-microvolt = <2200000>;
880 qcom,switch-mode-frequency = <1600000>;
885 /* LVS0 and LVS1 are just switches */
894 regulator-min-microvolt = <1800000>;
895 regulator-max-microvolt = <1800000>;
896 qcom,switch-mode-frequency = <1600000>;
901 /* Internal 3.69 GiB eMMC */
904 pinctrl-names = "default";
905 pinctrl-0 = <&dragon_sdcc1_pins>;
906 vmmc-supply = <&pm8901_l5>;
907 vqmmc-supply = <&pm8901_lvs0>;
910 /* External micro SD card, directly connected, pulled up to 2.85 V */
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>;
922 * Second external micro SD card, using two TXB104RGYR levelshifters
923 * to lift from 1.8 V to 2.85 V
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>;