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/leds/common.h>
5 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
6 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
7 #include "qcom-msm8660.dtsi"
10 model = "Qualcomm APQ8060 Dragonboard";
11 compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
14 serial0 = &gsbi12_serial;
18 stdout-path = "serial0:115200n8";
22 compatible = "simple-bus";
24 /* Main power of the board: 3.7V */
25 vph: regulator-fixed {
26 compatible = "regulator-fixed";
27 regulator-min-microvolt = <3700000>;
28 regulator-max-microvolt = <3700000>;
29 regulator-name = "VPH";
30 regulator-type = "voltage";
35 /* GPIO controlled ethernet power regulator */
36 dragon_veth: xc622a331mrg {
37 compatible = "regulator-fixed";
38 regulator-name = "XC6222A331MR-G";
39 regulator-min-microvolt = <3300000>;
40 regulator-max-microvolt = <3300000>;
42 gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
44 pinctrl-names = "default";
45 pinctrl-0 = <&dragon_veth_gpios>;
49 /* VDDvario fixed regulator */
50 dragon_vario: nds332p {
51 compatible = "regulator-fixed";
52 regulator-name = "NDS332P";
53 regulator-min-microvolt = <1800000>;
54 regulator-max-microvolt = <1800000>;
55 vin-supply = <&pm8058_s3>;
58 /* This is a levelshifter for SDCC5 */
59 dragon_vio_txb: txb0104rgyr {
60 compatible = "regulator-fixed";
61 regulator-name = "Dragon SDCC levelshifter";
62 vin-supply = <&pm8058_l14>;
68 * Capella CM3605 light and proximity sensor mounted directly
69 * on the sensor board.
72 compatible = "capella,cm3605";
73 vdd-supply = <&pm8058_l14>; // 2.85V
74 aset-gpios = <&pm8058_gpio 35 GPIO_ACTIVE_LOW>;
75 capella,aset-resistance-ohms = <100000>;
76 /* Trig on both edges - getting close or far away */
77 interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
78 /* MPP05 analog input to the XOADC */
79 io-channels = <&xoadc 0x00 0x05>;
80 io-channel-names = "aout";
81 pinctrl-names = "default";
82 pinctrl-0 = <&dragon_cm3605_gpios>, <&dragon_cm3605_mpps>;
87 /* The EBI2 will instantiate first, then populate its children */
88 pinctrl-names = "default";
89 pinctrl-0 = <&dragon_ebi2_pins>;
93 * An on-board SMSC LAN9221 chip for "debug ethernet",
94 * which is actually just an ordinary ethernet on the
95 * EBI2. This has a 25MHz chrystal next to it, so no
99 compatible = "smsc,lan9221", "smsc,lan9115";
102 * The second interrupt is the PME interrupt
103 * for network wakeup, connected to the TLMM.
105 interrupts-extended = <&pm8058_gpio 7 IRQ_TYPE_EDGE_FALLING>,
106 <&tlmm 29 IRQ_TYPE_EDGE_RISING>;
107 reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
108 vdd33a-supply = <&dragon_veth>;
109 vddvario-supply = <&dragon_vario>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&dragon_ethernet_gpios>;
114 smsc,force-external-phy;
118 * SLOW chipselect config
119 * Delay 9 cycles (140ns@64MHz) between SMSC
120 * LAN9221 Ethernet controller reads and writes
123 qcom,xmem-recovery-cycles = <0>;
124 qcom,xmem-write-hold-cycles = <3>;
125 qcom,xmem-write-delta-cycles = <31>;
126 qcom,xmem-read-delta-cycles = <28>;
127 qcom,xmem-write-wait-cycles = <9>;
128 qcom,xmem-read-wait-cycles = <9>;
133 qcom,mode = <GSBI_PROT_I2C>;
138 pinctrl-names = "default";
139 pinctrl-0 = <&dragon_gsbi3_i2c_pins>;
143 compatible = "cypress,cy8ctma340";
145 /* Certainly we can do at least 400 kHz */
146 clock-frequency = <400000>;
147 /* IRQ on GPIO61 called /CTP_INT */
148 interrupt-parent = <&tlmm>;
149 interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
151 * The I2C bus is using a PCA9306 level translator from L16A
152 * to L2B so these two voltages are needed and L16A is
153 * kind of the IO voltage, however L16Aisn't really fed to
154 * the TMA340, which relies entirely on L2B (PM8901 L2).
156 vcpin-supply = <&pm8058_l16>;
157 vdd-supply = <&pm8901_l2>;
158 /* GPIO58, called WAKE_CTP */
159 reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
160 touchscreen-size-x = <480>;
161 touchscreen-size-y = <800>;
162 active-interval-ms = <0>;
163 touch-timeout-ms = <255>;
164 lowpower-interval-ms = <10>;
165 bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;
166 pinctrl-names = "default";
167 pinctrl-0 = <&dragon_tma340_gpios>;
172 qcom,mode = <GSBI_PROT_I2C>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&dragon_gsbi8_i2c_pins>;
182 /* A 16KiB Platform ID EEPROM on the CPU carrier board */
183 compatible = "atmel,24c128";
185 vcc-supply = <&pm8058_s3>;
189 /* This Woolfson Micro device has an unrouted interrupt line */
190 compatible = "wlf,wm8903";
193 AVDD-supply = <&pm8058_l16>;
194 CPVDD-supply = <&pm8058_l16>;
195 DBVDD-supply = <&pm8058_s3>;
196 DCVDD-supply = <&pm8058_l0>;
202 micdet-delay = <100>;
203 gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
208 qcom,mode = <GSBI_PROT_I2C_UART>;
213 pinctrl-names = "default";
214 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
219 pinctrl-names = "default";
220 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
224 compatible = "asahi-kasei,ak8975";
226 interrupt-parent = <&pm8058_gpio>;
227 interrupts = <33 IRQ_TYPE_EDGE_RISING>;
228 pinctrl-names = "default";
229 pinctrl-0 = <&dragon_ak8975_gpios>;
230 vid-supply = <&pm8058_lvs0>; // 1.8V
231 vdd-supply = <&pm8058_l14>; // 2.85V
234 compatible = "bosch,bmp085";
236 interrupt-parent = <&pm8058_gpio>;
237 interrupts = <16 IRQ_TYPE_EDGE_RISING>;
238 reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
239 pinctrl-names = "default";
240 pinctrl-0 = <&dragon_bmp085_gpios>;
241 vddd-supply = <&pm8058_lvs0>; // 1.8V
242 vdda-supply = <&pm8058_l14>; // 2.85V
245 compatible = "invensense,mpu3050";
248 * GPIO17 is pulled high by a 10k
249 * resistor to VLOGIC so needs to be
250 * active low/falling edge.
252 interrupts-extended = <&pm8058_gpio 17 IRQ_TYPE_EDGE_FALLING>;
253 pinctrl-names = "default";
254 pinctrl-0 = <&dragon_mpu3050_gpios>;
255 vlogic-supply = <&pm8058_lvs0>; // 1.8V
256 vdd-supply = <&pm8058_l14>; // 2.85V
259 * The MPU-3050 acts as a hub for the
263 #address-cells = <1>;
267 compatible = "kionix,kxsd9";
269 interrupt-parent = <&tlmm>;
270 interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
271 pinctrl-names = "default";
272 pinctrl-0 = <&dragon_kxsd9_gpios>;
273 iovdd-supply = <&pm8058_lvs0>; // 1.8V
274 vdd-supply = <&pm8058_l14>; // 2.85V
281 dragon_ethernet_gpios: ethernet-state {
287 power-source = <PM8058_GPIO_S3>;
290 dragon_bmp085_gpios: bmp085-state {
296 power-source = <PM8058_GPIO_S3>;
299 dragon_mpu3050_gpios: mpu3050-state {
305 power-source = <PM8058_GPIO_S3>;
308 dragon_sdcc3_gpios: sdcc3-state {
314 power-source = <PM8058_GPIO_S3>;
317 dragon_sdcc5_gpios: sdcc5-state {
323 qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
324 power-source = <PM8058_GPIO_S3>;
327 dragon_ak8975_gpios: ak8975-state {
333 power-source = <PM8058_GPIO_S3>;
336 dragon_cm3605_gpios: cm3605-state {
337 /* Pin 34 connected to the proxy IRQ */
343 power-source = <PM8058_GPIO_S3>;
345 /* Pin 35 connected to ASET */
351 power-source = <PM8058_GPIO_S3>;
354 dragon_veth_gpios: veth-state {
366 MATRIX_KEY(0, 0, KEY_MENU)
367 MATRIX_KEY(0, 2, KEY_1)
368 MATRIX_KEY(0, 3, KEY_4)
369 MATRIX_KEY(0, 4, KEY_7)
370 MATRIX_KEY(1, 0, KEY_UP)
371 MATRIX_KEY(1, 1, KEY_LEFT)
372 MATRIX_KEY(1, 2, KEY_DOWN)
373 MATRIX_KEY(1, 3, KEY_5)
374 MATRIX_KEY(1, 3, KEY_8)
375 MATRIX_KEY(2, 0, KEY_HOME)
376 MATRIX_KEY(2, 1, KEY_REPLY)
377 MATRIX_KEY(2, 2, KEY_2)
378 MATRIX_KEY(2, 3, KEY_6)
379 MATRIX_KEY(3, 0, KEY_VOLUMEUP)
380 MATRIX_KEY(3, 1, KEY_RIGHT)
381 MATRIX_KEY(3, 2, KEY_3)
382 MATRIX_KEY(3, 3, KEY_9)
383 MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
384 MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
385 MATRIX_KEY(4, 1, KEY_BACK)
386 MATRIX_KEY(4, 2, KEY_CAMERA)
387 MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
389 keypad,num-rows = <6>;
390 keypad,num-columns = <5>;
395 * The keypad LED @0x48 is routed to
396 * the sensor board where it is
397 * connected to an infrared LED
398 * SFH4650 (60mW, @850nm) next to the
399 * ambient light and proximity sensor
400 * Capella Microsystems CM3605.
402 label = "pm8058:infrared:proximitysensor";
403 default-state = "off";
404 linux,default-trigger = "cm3605";
409 label = "pm8058:red";
410 color = <LED_COLOR_ID_RED>;
411 default-state = "off";
417 * This is actually green too on my
418 * board, but documented as yellow.
420 label = "pm8058:yellow";
421 color = <LED_COLOR_ID_YELLOW>;
422 default-state = "off";
423 linux,default-trigger = "mmc0";
428 label = "pm8058:green";
429 function = LED_FUNCTION_HEARTBEAT;
430 color = <LED_COLOR_ID_GREEN>;
431 default-state = "on";
432 linux,default-trigger = "heartbeat";
437 dragon_cm3605_mpps: cm3605-mpps-state {
443 /* Let's use channel 5 */
444 qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
445 power-source = <PM8058_GPIO_S3>;
452 * Set up of the PMIC RPM regulators for this board
453 * PM8901 supplies "preliminary regulators" whatever
457 vdd_l0-supply = <&pm8901_s4>;
458 vdd_l1-supply = <&vph>;
459 vdd_l2-supply = <&vph>;
460 vdd_l3-supply = <&vph>;
461 vdd_l4-supply = <&vph>;
462 vdd_l5-supply = <&vph>;
463 vdd_l6-supply = <&vph>;
464 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
465 vdd_s2-supply = <&vph>;
466 vdd_s3-supply = <&vph>;
467 vdd_s4-supply = <&vph>;
468 lvs0_in-supply = <&pm8058_s3>;
469 lvs1_in-supply = <&pm8901_s4>;
470 lvs2_in-supply = <&pm8058_l0>;
471 lvs3_in-supply = <&pm8058_s2>;
472 mvs_in-supply = <&pm8058_s3>;
475 regulator-min-microvolt = <1200000>;
476 regulator-max-microvolt = <1200000>;
480 regulator-min-microvolt = <3300000>;
481 regulator-max-microvolt = <3300000>;
485 /* TMA340 requires strictly 3.3V */
486 regulator-min-microvolt = <3300000>;
487 regulator-max-microvolt = <3300000>;
491 regulator-min-microvolt = <3300000>;
492 regulator-max-microvolt = <3300000>;
496 regulator-min-microvolt = <2600000>;
497 regulator-max-microvolt = <2600000>;
501 regulator-min-microvolt = <2850000>;
502 regulator-max-microvolt = <2850000>;
506 regulator-min-microvolt = <2200000>;
507 regulator-max-microvolt = <2200000>;
511 /* s0 and s1 are SAW regulators controlled over SPM */
513 regulator-min-microvolt = <1300000>;
514 regulator-max-microvolt = <1300000>;
515 qcom,switch-mode-frequency = <1600000>;
519 regulator-min-microvolt = <1100000>;
520 regulator-max-microvolt = <1100000>;
521 qcom,switch-mode-frequency = <1600000>;
525 regulator-min-microvolt = <1225000>;
526 regulator-max-microvolt = <1225000>;
527 qcom,switch-mode-frequency = <1600000>;
531 /* LVS0 thru 3 and mvs are just switches */
543 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
544 vdd_l2_l11_l12-supply = <&vph>;
545 vdd_l3_l4_l5-supply = <&vph>;
546 vdd_l6_l7-supply = <&vph>;
547 vdd_l8-supply = <&vph>;
548 vdd_l9-supply = <&vph>;
549 vdd_l10-supply = <&vph>;
550 vdd_l13_l16-supply = <&pm8058_s4>;
551 vdd_l14_l15-supply = <&vph>;
552 vdd_l17_l18-supply = <&vph>;
553 vdd_l19_l20-supply = <&vph>;
554 vdd_l21-supply = <&pm8058_s3>;
555 vdd_l22-supply = <&pm8058_s3>;
556 vdd_l23_l24_l25-supply = <&pm8058_s3>;
557 vdd_s0-supply = <&vph>;
558 vdd_s1-supply = <&vph>;
559 vdd_s2-supply = <&vph>;
560 vdd_s3-supply = <&vph>;
561 vdd_s4-supply = <&vph>;
562 vdd_ncp-supply = <&vph>;
565 regulator-min-microvolt = <1200000>;
566 regulator-max-microvolt = <1200000>;
570 regulator-min-microvolt = <1200000>;
571 regulator-max-microvolt = <1200000>;
575 regulator-min-microvolt = <1800000>;
576 regulator-max-microvolt = <2600000>;
580 regulator-min-microvolt = <1800000>;
581 regulator-max-microvolt = <1800000>;
585 regulator-min-microvolt = <2850000>;
586 regulator-max-microvolt = <2850000>;
590 regulator-min-microvolt = <2850000>;
591 regulator-max-microvolt = <2850000>;
595 regulator-min-microvolt = <3000000>;
596 regulator-max-microvolt = <3600000>;
600 regulator-min-microvolt = <1800000>;
601 regulator-max-microvolt = <1800000>;
605 regulator-min-microvolt = <2900000>;
606 regulator-max-microvolt = <3050000>;
610 regulator-min-microvolt = <1800000>;
611 regulator-max-microvolt = <1800000>;
615 regulator-min-microvolt = <2600000>;
616 regulator-max-microvolt = <2600000>;
620 regulator-min-microvolt = <1500000>;
621 regulator-max-microvolt = <1500000>;
625 regulator-min-microvolt = <2900000>;
626 regulator-max-microvolt = <2900000>;
630 regulator-min-microvolt = <2050000>;
631 regulator-max-microvolt = <2050000>;
635 regulator-min-microvolt = <2850000>;
636 regulator-max-microvolt = <2850000>;
639 regulator-min-microvolt = <2850000>;
640 regulator-max-microvolt = <2850000>;
644 regulator-min-microvolt = <1800000>;
645 regulator-max-microvolt = <1800000>;
650 // 1.5V according to schematic
651 regulator-min-microvolt = <2600000>;
652 regulator-max-microvolt = <2600000>;
656 regulator-min-microvolt = <2200000>;
657 regulator-max-microvolt = <2200000>;
661 regulator-min-microvolt = <2500000>;
662 regulator-max-microvolt = <2500000>;
666 regulator-min-microvolt = <1800000>;
667 regulator-max-microvolt = <1800000>;
671 // 1.1 V according to schematic
672 regulator-min-microvolt = <1200000>;
673 regulator-max-microvolt = <1200000>;
678 // 1.2 V according to schematic
679 regulator-min-microvolt = <1150000>;
680 regulator-max-microvolt = <1150000>;
685 regulator-min-microvolt = <1200000>;
686 regulator-max-microvolt = <1200000>;
691 regulator-min-microvolt = <1200000>;
692 regulator-max-microvolt = <1200000>;
696 regulator-min-microvolt = <1200000>;
697 regulator-max-microvolt = <1200000>;
702 // regulator-min-microvolt = <500000>;
703 // regulator-max-microvolt = <1325000>;
704 regulator-min-microvolt = <1100000>;
705 regulator-max-microvolt = <1100000>;
706 qcom,switch-mode-frequency = <1600000>;
710 // regulator-min-microvolt = <500000>;
711 // regulator-max-microvolt = <1250000>;
712 regulator-min-microvolt = <1100000>;
713 regulator-max-microvolt = <1100000>;
714 qcom,switch-mode-frequency = <1600000>;
718 // 1.3 V according to schematic
719 regulator-min-microvolt = <1200000>;
720 regulator-max-microvolt = <1400000>;
721 qcom,switch-mode-frequency = <1600000>;
725 regulator-min-microvolt = <1800000>;
726 regulator-max-microvolt = <1800000>;
727 qcom,switch-mode-frequency = <1600000>;
732 regulator-min-microvolt = <2200000>;
733 regulator-max-microvolt = <2200000>;
734 qcom,switch-mode-frequency = <1600000>;
739 /* LVS0 and LVS1 are just switches */
748 regulator-min-microvolt = <1800000>;
749 regulator-max-microvolt = <1800000>;
750 qcom,switch-mode-frequency = <1600000>;
755 /* Internal 3.69 GiB eMMC */
757 pinctrl-names = "default";
758 pinctrl-0 = <&dragon_sdcc1_pins>;
759 vmmc-supply = <&pm8901_l5>;
760 vqmmc-supply = <&pm8901_lvs0>;
764 /* External micro SD card, directly connected, pulled up to 2.85 V */
766 /* Enable SSBI GPIO 22 as input, use for card detect */
767 pinctrl-names = "default";
768 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
769 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
770 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
771 vmmc-supply = <&pm8058_l14>;
776 * Second external micro SD card, using two TXB104RGYR levelshifters
777 * to lift from 1.8 V to 2.85 V
780 /* Enable SSBI GPIO 26 as input, use for card detect */
781 pinctrl-names = "default";
782 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
783 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
784 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
785 vmmc-supply = <&pm8058_l14>;
786 vqmmc-supply = <&dragon_vio_txb>;
791 /* eMMC pins, all 8 data lines connected */
792 dragon_sdcc1_pins: sdcc1-state {
794 pins = "gpio167"; /* SDC1 CLK */
796 drive-strength = <16>;
800 pins = "gpio168"; /* SDC1 CMD */
802 drive-strength = <10>;
807 pins = "gpio159", "gpio160", "gpio161", "gpio162",
808 "gpio163", "gpio164", "gpio165", "gpio166";
810 drive-strength = <10>;
816 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
819 dragon_sdcc3_pins: sdcc3-state {
822 drive-strength = <8>;
827 drive-strength = <8>;
832 drive-strength = <8>;
837 /* Second SD card slot pins */
838 dragon_sdcc5_pins: sdcc5-state {
840 pins = "gpio97"; /* SDC5 CLK */
842 drive-strength = <16>;
846 pins = "gpio95"; /* SDC5 CMD */
848 drive-strength = <10>;
853 pins = "gpio96", "gpio98", "gpio99", "gpio100";
855 drive-strength = <10>;
860 dragon_gsbi3_i2c_pins: gsbi3-i2c-state {
861 pins = "gpio43", "gpio44";
863 drive-strength = <8>;
864 /* These have external pull-up 2.2kOhm to 1.8V */
868 dragon_gsbi8_i2c_pins: gsbi8-i2c-state {
869 pins = "gpio64", "gpio65";
871 drive-strength = <16>;
872 /* These have external pull-up 2.2kOhm to 1.8V */
876 dragon_gsbi12_i2c_pins: gsbi12-i2c-state {
877 pins = "gpio115", "gpio116";
879 drive-strength = <16>;
880 /* These have external pull-up 4.7kOhm to 1.8V */
884 /* Primary serial port uart 0 pins */
885 dragon_gsbi12_serial_pins: gsbi12-serial-state {
889 drive-strength = <8>;
895 drive-strength = <2>;
900 dragon_ebi2_pins: ebi2-state {
902 * Pins used by EBI2 on the Dragonboard, actually only
903 * CS2 is used by a real peripheral. CS0 is just
904 * routed to a test point.
908 /* "gpio39", CS1A_N this is not good to mux */
909 "gpio40", /* CS2A_N */
910 "gpio134"; /* CS0_N testpoint TP29 */
915 /* EBI2_ADDR_7 downto EBI2_ADDR_0 address bus */
916 "gpio123", "gpio124", "gpio125", "gpio126",
917 "gpio127", "gpio128", "gpio129", "gpio130",
918 /* EBI2_DATA_15 downto EBI2_DATA_0 data bus */
919 "gpio135", "gpio136", "gpio137", "gpio138",
920 "gpio139", "gpio140", "gpio141", "gpio142",
921 "gpio143", "gpio144", "gpio145", "gpio146",
922 "gpio147", "gpio148", "gpio149", "gpio150",
923 "gpio151", /* EBI2_OE_N */
924 "gpio153", /* EBI2_ADV */
925 "gpio157"; /* EBI2_WE_N */
930 /* Interrupt line for the KXSD9 accelerometer */
931 dragon_kxsd9_gpios: kxsd9-state {
932 pins = "gpio57"; /* IRQ line */
937 dragon_tma340_gpios: tma340-state {
939 /* RESET line, TS_ATTN, WAKE_CTP */
942 drive-strength = <6>;
946 pins = "gpio61"; /* IRQ line */
948 drive-strength = <2>;
955 /* Reference voltage 2.2 V */
956 xoadc-ref-supply = <&pm8058_l18>;
958 /* Board-specific channels */
960 /* Connected to AOUT of ALS sensor */
964 /* Connected to test point TP43 */
968 /* Connected to battery thermistor */
972 /* Connected to battery ID detector */
976 /* Connected to XO thermistor */