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 /* This is a levelshifter for SDCC5 */
55 dragon_vio_txb: txb0104rgyr {
56 compatible = "regulator-fixed";
57 regulator-name = "Dragon SDCC levelshifter";
58 vin-supply = <&pm8058_l14>;
65 /* eMMMC pins, all 8 data lines connected */
66 dragon_sdcc1_pins: sdcc1 {
68 pins = "gpio159", "gpio160", "gpio161",
69 "gpio162", "gpio163", "gpio164",
70 "gpio165", "gpio166", "gpio167",
75 pins = "gpio167"; /* SDC5 CLK */
76 drive-strength = <16>;
80 pins = "gpio168"; /* SDC5 CMD */
81 drive-strength = <10>;
86 pins = "gpio159", "gpio160", "gpio161", "gpio162",
87 "gpio163", "gpio164", "gpio165", "gpio166";
88 drive-strength = <10>;
94 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
97 dragon_sdcc3_pins: sdcc3 {
100 drive-strength = <8>;
105 drive-strength = <8>;
110 drive-strength = <8>;
115 /* Second SD card slot pins */
116 dragon_sdcc5_pins: sdcc5 {
118 pins = "gpio95", "gpio96", "gpio97",
119 "gpio98", "gpio99", "gpio100";
123 pins = "gpio97"; /* SDC5 CLK */
124 drive-strength = <16>;
128 pins = "gpio95"; /* SDC5 CMD */
129 drive-strength = <10>;
134 pins = "gpio96", "gpio98", "gpio99", "gpio100";
135 drive-strength = <10>;
140 dragon_gsbi12_i2c_pins: gsbi12_i2c {
142 pins = "gpio115", "gpio116";
146 pins = "gpio115", "gpio116";
147 drive-strength = <16>;
148 /* These have external pull-up 4.7kOhm to 1.8V */
153 /* Primary serial port uart 0 pins */
154 dragon_gsbi12_serial_pins: gsbi12_serial {
156 pins = "gpio117", "gpio118";
161 drive-strength = <8>;
166 drive-strength = <2>;
176 MATRIX_KEY(0, 0, KEY_MENU)
177 MATRIX_KEY(0, 2, KEY_1)
178 MATRIX_KEY(0, 3, KEY_4)
179 MATRIX_KEY(0, 4, KEY_7)
180 MATRIX_KEY(1, 0, KEY_UP)
181 MATRIX_KEY(1, 1, KEY_LEFT)
182 MATRIX_KEY(1, 2, KEY_DOWN)
183 MATRIX_KEY(1, 3, KEY_5)
184 MATRIX_KEY(1, 3, KEY_8)
185 MATRIX_KEY(2, 0, KEY_HOME)
186 MATRIX_KEY(2, 1, KEY_REPLY)
187 MATRIX_KEY(2, 2, KEY_2)
188 MATRIX_KEY(2, 3, KEY_6)
189 MATRIX_KEY(3, 0, KEY_VOLUMEUP)
190 MATRIX_KEY(3, 1, KEY_RIGHT)
191 MATRIX_KEY(3, 2, KEY_3)
192 MATRIX_KEY(3, 3, KEY_9)
193 MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
194 MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
195 MATRIX_KEY(4, 1, KEY_BACK)
196 MATRIX_KEY(4, 2, KEY_CAMERA)
197 MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
199 keypad,num-rows = <6>;
200 keypad,num-columns = <5>;
204 dragon_bmp085_gpios: bmp085-gpios {
210 power-source = <PM8058_GPIO_S3>;
213 dragon_sdcc3_gpios: sdcc3-gpios {
219 power-source = <PM8058_GPIO_S3>;
222 dragon_sdcc5_gpios: sdcc5-gpios {
228 qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
229 power-source = <PM8058_GPIO_S3>;
232 dragon_ak8975_gpios: ak8975-gpios {
238 power-source = <PM8058_GPIO_S3>;
245 * The keypad LED @0x48 is routed to
246 * the sensor board where it is
247 * connected to an infrared LED
248 * SFH4650 (60mW, @850nm) next to the
249 * ambient light and proximity sensor
250 * Capella Microsystems CM3605.
252 compatible = "qcom,pm8058-keypad-led";
254 label = "pm8058:infrared:proximitysensor";
255 default-state = "off";
258 compatible = "qcom,pm8058-led";
260 label = "pm8058:red";
261 default-state = "off";
265 * This is actually green too on my
266 * board, but documented as yellow.
268 compatible = "qcom,pm8058-led";
270 label = "pm8058:yellow";
271 default-state = "off";
272 linux,default-trigger = "mmc0";
275 compatible = "qcom,pm8058-led";
277 label = "pm8058:green";
278 default-state = "on";
279 linux,default-trigger = "heartbeat";
286 qcom,mode = <GSBI_PROT_I2C_UART>;
290 pinctrl-names = "default";
291 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
296 pinctrl-names = "default";
297 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
300 compatible = "asahi-kasei,ak8975";
302 /* GPIO33 has interrupt 224 on the PM8058 */
303 interrupt-parent = <&pm8058_gpio>;
304 interrupts = <224 IRQ_TYPE_EDGE_RISING>;
305 pinctrl-names = "default";
306 pinctrl-0 = <&dragon_ak8975_gpios>;
307 vid-supply = <&pm8058_lvs0>; // 1.8V
308 vdd-supply = <&pm8058_l14>; // 2.85V
311 compatible = "bosch,bmp085";
313 /* GPIO16 has interrupt 207 on the PM8058 */
314 interrupt-parent = <&pm8058_gpio>;
315 interrupts = <207 IRQ_TYPE_EDGE_RISING>;
316 reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
317 pinctrl-names = "default";
318 pinctrl-0 = <&dragon_bmp085_gpios>;
319 vddd-supply = <&pm8058_lvs0>; // 1.8V
320 vdda-supply = <&pm8058_l14>; // 2.85V
327 * Set up of the PMIC RPM regulators for this board
328 * PM8901 supplies "preliminary regulators" whatever
332 vdd_l0-supply = <&pm8901_s4>;
333 vdd_l1-supply = <&vph>;
334 vdd_l2-supply = <&vph>;
335 vdd_l3-supply = <&vph>;
336 vdd_l4-supply = <&vph>;
337 vdd_l5-supply = <&vph>;
338 vdd_l6-supply = <&vph>;
339 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
340 vdd_s2-supply = <&vph>;
341 vdd_s3-supply = <&vph>;
342 vdd_s4-supply = <&vph>;
343 lvs0_in-supply = <&pm8058_s3>;
344 lvs1_in-supply = <&pm8901_s4>;
345 lvs2_in-supply = <&pm8058_l0>;
346 lvs3_in-supply = <&pm8058_s2>;
347 mvs_in-supply = <&pm8058_s3>;
350 regulator-min-microvolt = <1200000>;
351 regulator-max-microvolt = <1200000>;
355 regulator-min-microvolt = <3300000>;
356 regulator-max-microvolt = <3300000>;
360 regulator-min-microvolt = <2850000>;
361 regulator-max-microvolt = <3300000>;
365 regulator-min-microvolt = <3300000>;
366 regulator-max-microvolt = <3300000>;
370 regulator-min-microvolt = <2600000>;
371 regulator-max-microvolt = <2600000>;
375 regulator-min-microvolt = <2850000>;
376 regulator-max-microvolt = <2850000>;
380 regulator-min-microvolt = <2200000>;
381 regulator-max-microvolt = <2200000>;
385 /* s0 and s1 are SAW regulators controlled over SPM */
387 regulator-min-microvolt = <1300000>;
388 regulator-max-microvolt = <1300000>;
389 qcom,switch-mode-frequency = <1600000>;
393 regulator-min-microvolt = <1100000>;
394 regulator-max-microvolt = <1100000>;
395 qcom,switch-mode-frequency = <1600000>;
399 regulator-min-microvolt = <1225000>;
400 regulator-max-microvolt = <1225000>;
401 qcom,switch-mode-frequency = <1600000>;
405 /* LVS0 thru 3 and mvs0 are just switches */
417 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
418 vdd_l2_l11_l12-supply = <&vph>;
419 vdd_l3_l4_l5-supply = <&vph>;
420 vdd_l6_l7-supply = <&vph>;
421 vdd_l8-supply = <&vph>;
422 vdd_l9-supply = <&vph>;
423 vdd_l10-supply = <&vph>;
424 vdd_l13_l16-supply = <&pm8058_s4>;
425 vdd_l14_l15-supply = <&vph>;
426 vdd_l17_l18-supply = <&vph>;
427 vdd_l19_l20-supply = <&vph>;
428 vdd_l21-supply = <&pm8058_s3>;
429 vdd_l22-supply = <&pm8058_s3>;
430 vdd_l23_l24_l25-supply = <&pm8058_s3>;
431 vdd_s0-supply = <&vph>;
432 vdd_s1-supply = <&vph>;
433 vdd_s2-supply = <&vph>;
434 vdd_s3-supply = <&vph>;
435 vdd_s4-supply = <&vph>;
436 vdd_ncp-supply = <&vph>;
439 regulator-min-microvolt = <1200000>;
440 regulator-max-microvolt = <1200000>;
444 regulator-min-microvolt = <1200000>;
445 regulator-max-microvolt = <1200000>;
449 regulator-min-microvolt = <1800000>;
450 regulator-max-microvolt = <2600000>;
454 regulator-min-microvolt = <1800000>;
455 regulator-max-microvolt = <1800000>;
459 regulator-min-microvolt = <2850000>;
460 regulator-max-microvolt = <2850000>;
464 regulator-min-microvolt = <2850000>;
465 regulator-max-microvolt = <2850000>;
469 regulator-min-microvolt = <3000000>;
470 regulator-max-microvolt = <3600000>;
474 regulator-min-microvolt = <1800000>;
475 regulator-max-microvolt = <1800000>;
479 regulator-min-microvolt = <2900000>;
480 regulator-max-microvolt = <3050000>;
484 regulator-min-microvolt = <1800000>;
485 regulator-max-microvolt = <1800000>;
489 regulator-min-microvolt = <2600000>;
490 regulator-max-microvolt = <2600000>;
494 regulator-min-microvolt = <1500000>;
495 regulator-max-microvolt = <1500000>;
499 regulator-min-microvolt = <2900000>;
500 regulator-max-microvolt = <2900000>;
504 regulator-min-microvolt = <2050000>;
505 regulator-max-microvolt = <2050000>;
509 regulator-min-microvolt = <2850000>;
510 regulator-max-microvolt = <2850000>;
513 regulator-min-microvolt = <2850000>;
514 regulator-max-microvolt = <2850000>;
518 regulator-min-microvolt = <1800000>;
519 regulator-max-microvolt = <1800000>;
524 // 1.5V according to schematic
525 regulator-min-microvolt = <2600000>;
526 regulator-max-microvolt = <2600000>;
530 regulator-min-microvolt = <2200000>;
531 regulator-max-microvolt = <2200000>;
535 regulator-min-microvolt = <2500000>;
536 regulator-max-microvolt = <2500000>;
540 regulator-min-microvolt = <1800000>;
541 regulator-max-microvolt = <1800000>;
545 // 1.1 V according to schematic
546 regulator-min-microvolt = <1200000>;
547 regulator-max-microvolt = <1200000>;
552 // 1.2 V according to schematic
553 regulator-min-microvolt = <1150000>;
554 regulator-max-microvolt = <1150000>;
559 regulator-min-microvolt = <1200000>;
560 regulator-max-microvolt = <1200000>;
565 regulator-min-microvolt = <1200000>;
566 regulator-max-microvolt = <1200000>;
570 regulator-min-microvolt = <1200000>;
571 regulator-max-microvolt = <1200000>;
576 // regulator-min-microvolt = <500000>;
577 // regulator-max-microvolt = <1325000>;
578 regulator-min-microvolt = <1100000>;
579 regulator-max-microvolt = <1100000>;
580 qcom,switch-mode-frequency = <1600000>;
584 // regulator-min-microvolt = <500000>;
585 // regulator-max-microvolt = <1250000>;
586 regulator-min-microvolt = <1100000>;
587 regulator-max-microvolt = <1100000>;
588 qcom,switch-mode-frequency = <1600000>;
592 // 1.3 V according to schematic
593 regulator-min-microvolt = <1200000>;
594 regulator-max-microvolt = <1400000>;
595 qcom,switch-mode-frequency = <1600000>;
599 regulator-min-microvolt = <1800000>;
600 regulator-max-microvolt = <1800000>;
601 qcom,switch-mode-frequency = <1600000>;
606 regulator-min-microvolt = <2200000>;
607 regulator-max-microvolt = <2200000>;
608 qcom,switch-mode-frequency = <1600000>;
613 /* LVS0 and LVS1 are just switches */
622 regulator-min-microvolt = <1800000>;
623 regulator-max-microvolt = <1800000>;
624 qcom,switch-mode-frequency = <1600000>;
629 /* Internal 3.69 GiB eMMC */
632 pinctrl-names = "default";
633 pinctrl-0 = <&dragon_sdcc1_pins>;
634 vmmc-supply = <&pm8901_l5>;
635 vqmmc-supply = <&pm8901_lvs0>;
638 /* External micro SD card, directly connected, pulled up to 2.85 V */
641 /* Enable SSBI GPIO 22 as input, use for card detect */
642 pinctrl-names = "default";
643 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
644 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
645 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
646 vmmc-supply = <&pm8058_l14>;
650 * Second external micro SD card, using two TXB104RGYR levelshifters
651 * to lift from 1.8 V to 2.85 V
655 /* Enable SSBI GPIO 26 as input, use for card detect */
656 pinctrl-names = "default";
657 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
658 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
659 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
660 vmmc-supply = <&pm8058_l14>;
661 vqmmc-supply = <&dragon_vio_txb>;