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>;
247 qcom,mode = <GSBI_PROT_I2C_UART>;
251 pinctrl-names = "default";
252 pinctrl-0 = <&dragon_gsbi12_serial_pins>;
257 pinctrl-names = "default";
258 pinctrl-0 = <&dragon_gsbi12_i2c_pins>;
261 compatible = "asahi-kasei,ak8975";
263 /* GPIO33 has interrupt 224 on the PM8058 */
264 interrupt-parent = <&pm8058_gpio>;
265 interrupts = <224 IRQ_TYPE_EDGE_RISING>;
266 pinctrl-names = "default";
267 pinctrl-0 = <&dragon_ak8975_gpios>;
268 vid-supply = <&pm8058_lvs0>; // 1.8V
269 vdd-supply = <&pm8058_l14>; // 2.85V
272 compatible = "bosch,bmp085";
274 /* GPIO16 has interrupt 207 on the PM8058 */
275 interrupt-parent = <&pm8058_gpio>;
276 interrupts = <207 IRQ_TYPE_EDGE_RISING>;
277 reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
278 pinctrl-names = "default";
279 pinctrl-0 = <&dragon_bmp085_gpios>;
280 vddd-supply = <&pm8058_lvs0>; // 1.8V
281 vdda-supply = <&pm8058_l14>; // 2.85V
288 * Set up of the PMIC RPM regulators for this board
289 * PM8901 supplies "preliminary regulators" whatever
293 vdd_l0-supply = <&pm8901_s4>;
294 vdd_l1-supply = <&vph>;
295 vdd_l2-supply = <&vph>;
296 vdd_l3-supply = <&vph>;
297 vdd_l4-supply = <&vph>;
298 vdd_l5-supply = <&vph>;
299 vdd_l6-supply = <&vph>;
300 /* vdd_s0-supply, vdd_s1-supply: SAW regulators */
301 vdd_s2-supply = <&vph>;
302 vdd_s3-supply = <&vph>;
303 vdd_s4-supply = <&vph>;
304 lvs0_in-supply = <&pm8058_s3>;
305 lvs1_in-supply = <&pm8901_s4>;
306 lvs2_in-supply = <&pm8058_l0>;
307 lvs3_in-supply = <&pm8058_s2>;
308 mvs_in-supply = <&pm8058_s3>;
311 regulator-min-microvolt = <1200000>;
312 regulator-max-microvolt = <1200000>;
316 regulator-min-microvolt = <3300000>;
317 regulator-max-microvolt = <3300000>;
321 regulator-min-microvolt = <2850000>;
322 regulator-max-microvolt = <3300000>;
326 regulator-min-microvolt = <3300000>;
327 regulator-max-microvolt = <3300000>;
331 regulator-min-microvolt = <2600000>;
332 regulator-max-microvolt = <2600000>;
336 regulator-min-microvolt = <2850000>;
337 regulator-max-microvolt = <2850000>;
341 regulator-min-microvolt = <2200000>;
342 regulator-max-microvolt = <2200000>;
346 /* s0 and s1 are SAW regulators controlled over SPM */
348 regulator-min-microvolt = <1300000>;
349 regulator-max-microvolt = <1300000>;
350 qcom,switch-mode-frequency = <1600000>;
354 regulator-min-microvolt = <1100000>;
355 regulator-max-microvolt = <1100000>;
356 qcom,switch-mode-frequency = <1600000>;
360 regulator-min-microvolt = <1225000>;
361 regulator-max-microvolt = <1225000>;
362 qcom,switch-mode-frequency = <1600000>;
366 /* LVS0 thru 3 and mvs0 are just switches */
378 vdd_l0_l1_lvs-supply = <&pm8058_s3>;
379 vdd_l2_l11_l12-supply = <&vph>;
380 vdd_l3_l4_l5-supply = <&vph>;
381 vdd_l6_l7-supply = <&vph>;
382 vdd_l8-supply = <&vph>;
383 vdd_l9-supply = <&vph>;
384 vdd_l10-supply = <&vph>;
385 vdd_l13_l16-supply = <&pm8058_s4>;
386 vdd_l14_l15-supply = <&vph>;
387 vdd_l17_l18-supply = <&vph>;
388 vdd_l19_l20-supply = <&vph>;
389 vdd_l21-supply = <&pm8058_s3>;
390 vdd_l22-supply = <&pm8058_s3>;
391 vdd_l23_l24_l25-supply = <&pm8058_s3>;
392 vdd_s0-supply = <&vph>;
393 vdd_s1-supply = <&vph>;
394 vdd_s2-supply = <&vph>;
395 vdd_s3-supply = <&vph>;
396 vdd_s4-supply = <&vph>;
397 vdd_ncp-supply = <&vph>;
400 regulator-min-microvolt = <1200000>;
401 regulator-max-microvolt = <1200000>;
405 regulator-min-microvolt = <1200000>;
406 regulator-max-microvolt = <1200000>;
410 regulator-min-microvolt = <1800000>;
411 regulator-max-microvolt = <2600000>;
415 regulator-min-microvolt = <1800000>;
416 regulator-max-microvolt = <1800000>;
420 regulator-min-microvolt = <2850000>;
421 regulator-max-microvolt = <2850000>;
425 regulator-min-microvolt = <2850000>;
426 regulator-max-microvolt = <2850000>;
430 regulator-min-microvolt = <3000000>;
431 regulator-max-microvolt = <3600000>;
435 regulator-min-microvolt = <1800000>;
436 regulator-max-microvolt = <1800000>;
440 regulator-min-microvolt = <2900000>;
441 regulator-max-microvolt = <3050000>;
445 regulator-min-microvolt = <1800000>;
446 regulator-max-microvolt = <1800000>;
450 regulator-min-microvolt = <2600000>;
451 regulator-max-microvolt = <2600000>;
455 regulator-min-microvolt = <1500000>;
456 regulator-max-microvolt = <1500000>;
460 regulator-min-microvolt = <2900000>;
461 regulator-max-microvolt = <2900000>;
465 regulator-min-microvolt = <2050000>;
466 regulator-max-microvolt = <2050000>;
470 regulator-min-microvolt = <2850000>;
471 regulator-max-microvolt = <2850000>;
474 regulator-min-microvolt = <2850000>;
475 regulator-max-microvolt = <2850000>;
479 regulator-min-microvolt = <1800000>;
480 regulator-max-microvolt = <1800000>;
485 // 1.5V according to schematic
486 regulator-min-microvolt = <2600000>;
487 regulator-max-microvolt = <2600000>;
491 regulator-min-microvolt = <2200000>;
492 regulator-max-microvolt = <2200000>;
496 regulator-min-microvolt = <2500000>;
497 regulator-max-microvolt = <2500000>;
501 regulator-min-microvolt = <1800000>;
502 regulator-max-microvolt = <1800000>;
506 // 1.1 V according to schematic
507 regulator-min-microvolt = <1200000>;
508 regulator-max-microvolt = <1200000>;
513 // 1.2 V according to schematic
514 regulator-min-microvolt = <1150000>;
515 regulator-max-microvolt = <1150000>;
520 regulator-min-microvolt = <1200000>;
521 regulator-max-microvolt = <1200000>;
526 regulator-min-microvolt = <1200000>;
527 regulator-max-microvolt = <1200000>;
531 regulator-min-microvolt = <1200000>;
532 regulator-max-microvolt = <1200000>;
537 // regulator-min-microvolt = <500000>;
538 // regulator-max-microvolt = <1325000>;
539 regulator-min-microvolt = <1100000>;
540 regulator-max-microvolt = <1100000>;
541 qcom,switch-mode-frequency = <1600000>;
545 // regulator-min-microvolt = <500000>;
546 // regulator-max-microvolt = <1250000>;
547 regulator-min-microvolt = <1100000>;
548 regulator-max-microvolt = <1100000>;
549 qcom,switch-mode-frequency = <1600000>;
553 // 1.3 V according to schematic
554 regulator-min-microvolt = <1200000>;
555 regulator-max-microvolt = <1400000>;
556 qcom,switch-mode-frequency = <1600000>;
560 regulator-min-microvolt = <1800000>;
561 regulator-max-microvolt = <1800000>;
562 qcom,switch-mode-frequency = <1600000>;
567 regulator-min-microvolt = <2200000>;
568 regulator-max-microvolt = <2200000>;
569 qcom,switch-mode-frequency = <1600000>;
574 /* LVS0 and LVS1 are just switches */
583 regulator-min-microvolt = <1800000>;
584 regulator-max-microvolt = <1800000>;
585 qcom,switch-mode-frequency = <1600000>;
590 /* Internal 3.69 GiB eMMC */
593 pinctrl-names = "default";
594 pinctrl-0 = <&dragon_sdcc1_pins>;
595 vmmc-supply = <&pm8901_l5>;
596 vqmmc-supply = <&pm8901_lvs0>;
599 /* External micro SD card, directly connected, pulled up to 2.85 V */
602 /* Enable SSBI GPIO 22 as input, use for card detect */
603 pinctrl-names = "default";
604 pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
605 cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
606 wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
607 vmmc-supply = <&pm8058_l14>;
611 * Second external micro SD card, using two TXB104RGYR levelshifters
612 * to lift from 1.8 V to 2.85 V
616 /* Enable SSBI GPIO 26 as input, use for card detect */
617 pinctrl-names = "default";
618 pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
619 cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
620 wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
621 vmmc-supply = <&pm8058_l14>;
622 vqmmc-supply = <&dragon_vio_txb>;