summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
blob: 6c0038398ef280f6dad863f030b1c5ed9a5b5144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
/*
 * Copyright 2016 Linaro Ltd
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "qcom-msm8660.dtsi"

/ {
	model = "Qualcomm APQ8060 Dragonboard";
	compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";

	aliases {
		serial0 = &gsbi12_serial;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	regulators {
		compatible = "simple-bus";

		/* Main power of the board: 3.7V */
		vph: regulator-fixed {
			compatible = "regulator-fixed";
			regulator-min-microvolt = <3700000>;
			regulator-max-microvolt = <3700000>;
			regulator-name = "VPH";
			regulator-type = "voltage";
			regulator-always-on;
			regulator-boot-on;
		};

		/* This is a levelshifter for SDCC5 */
		dragon_vio_txb: txb0104rgyr {
			compatible = "regulator-fixed";
			regulator-name = "Dragon SDCC levelshifter";
			vin-supply = <&pm8058_l14>;
			regulator-always-on;
		};
	};

	soc {
		pinctrl@800000 {
			/* eMMMC pins, all 8 data lines connected */
			dragon_sdcc1_pins: sdcc1 {
				mux {
					pins = "gpio159", "gpio160", "gpio161",
					     "gpio162", "gpio163", "gpio164",
					     "gpio165", "gpio166", "gpio167",
					     "gpio168";
					     function = "sdc1";
				};
				clk {
					pins = "gpio167"; /* SDC5 CLK */
					drive-strength = <16>;
					bias-disable;
				};
				cmd {
					pins = "gpio168"; /* SDC5 CMD */
					drive-strength = <10>;
					bias-pull-up;
				};
				data {
					/* SDC5 D0 to D7 */
					pins = "gpio159", "gpio160", "gpio161", "gpio162",
					     "gpio163", "gpio164", "gpio165", "gpio166";
					drive-strength = <10>;
					bias-pull-up;
				};
			};

			/*
			 * The SDCC3 pins are hardcoded (non-muxable) but need some pin
			 * configuration.
			 */
			dragon_sdcc3_pins: sdcc3 {
				clk {
					pins = "sdc3_clk";
					drive-strength = <8>;
					bias-disable;
				};
				cmd {
					pins = "sdc3_cmd";
					drive-strength = <8>;
					bias-pull-up;
				};
				data {
					pins = "sdc3_data";
					drive-strength = <8>;
					bias-pull-up;
				};
			};

			/* Second SD card slot pins */
			dragon_sdcc5_pins: sdcc5 {
				mux {
					pins = "gpio95", "gpio96", "gpio97",
					    "gpio98", "gpio99", "gpio100";
					function = "sdc5";
				};
				clk {
					pins = "gpio97"; /* SDC5 CLK */
					drive-strength = <16>;
					bias-disable;
				};
				cmd {
					pins = "gpio95"; /* SDC5 CMD */
					drive-strength = <10>;
					bias-pull-up;
				};
				data {
					/* SDC5 D0 to D3 */
					pins = "gpio96", "gpio98", "gpio99", "gpio100";
					drive-strength = <10>;
					bias-pull-up;
				};
			};

			dragon_gsbi12_i2c_pins: gsbi12_i2c {
				mux {
					pins = "gpio115", "gpio116";
					function = "gsbi12";
				};
				pinconf {
					pins = "gpio115", "gpio116";
					drive-strength = <16>;
					/* These have external pull-up 4.7kOhm to 1.8V */
					bias-disable;
				};
			};

			/* Primary serial port uart 0 pins */
			dragon_gsbi12_serial_pins: gsbi12_serial {
				mux {
					pins = "gpio117", "gpio118";
					function = "gsbi12";
				};
				tx {
					pins = "gpio117";
					drive-strength = <8>;
					bias-disable;
				};
				rx {
					pins = "gpio118";
					drive-strength = <2>;
					bias-pull-up;
				};
			};
		};

		qcom,ssbi@500000 {
			pmic@0 {
				keypad@148 {
					linux,keymap = <
					MATRIX_KEY(0, 0, KEY_MENU)
					MATRIX_KEY(0, 2, KEY_1)
					MATRIX_KEY(0, 3, KEY_4)
					MATRIX_KEY(0, 4, KEY_7)
					MATRIX_KEY(1, 0, KEY_UP)
					MATRIX_KEY(1, 1, KEY_LEFT)
					MATRIX_KEY(1, 2, KEY_DOWN)
					MATRIX_KEY(1, 3, KEY_5)
					MATRIX_KEY(1, 3, KEY_8)
					MATRIX_KEY(2, 0, KEY_HOME)
					MATRIX_KEY(2, 1, KEY_REPLY)
					MATRIX_KEY(2, 2, KEY_2)
					MATRIX_KEY(2, 3, KEY_6)
					MATRIX_KEY(3, 0, KEY_VOLUMEUP)
					MATRIX_KEY(3, 1, KEY_RIGHT)
					MATRIX_KEY(3, 2, KEY_3)
					MATRIX_KEY(3, 3, KEY_9)
					MATRIX_KEY(3, 4, KEY_SWITCHVIDEOMODE)
					MATRIX_KEY(4, 0, KEY_VOLUMEDOWN)
					MATRIX_KEY(4, 1, KEY_BACK)
					MATRIX_KEY(4, 2, KEY_CAMERA)
					MATRIX_KEY(4, 3, KEY_KBDILLUMTOGGLE)
					>;
					keypad,num-rows = <6>;
					keypad,num-columns = <5>;
				};

				gpio@150 {
					dragon_bmp085_gpios: bmp085-gpios {
						pinconf {
							pins = "gpio16";
							function = "normal";
							input-enable;
							bias-disable;
							power-source = <PM8058_GPIO_S3>;
						};
					};
					dragon_sdcc3_gpios: sdcc3-gpios {
						pinconf {
							pins = "gpio22";
							function = "normal";
							input-enable;
							bias-disable;
							power-source = <PM8058_GPIO_S3>;
						};
					};
					dragon_sdcc5_gpios: sdcc5-gpios {
						pinconf {
							pins = "gpio26";
							function = "normal";
							input-enable;
							bias-pull-up;
							qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
							power-source = <PM8058_GPIO_S3>;
						};
					};
					dragon_ak8975_gpios: ak8975-gpios {
						pinconf {
							pins = "gpio33";
							function = "normal";
							input-enable;
							bias-disable;
							power-source = <PM8058_GPIO_S3>;
						};
					};
				};

				led@48 {
					/*
					 * The keypad LED @0x48 is routed to
					 * the sensor board where it is
					 * connected to an infrared LED
					 * SFH4650 (60mW, @850nm) next to the
					 * ambient light and proximity sensor
					 * Capella Microsystems CM3605.
					 */
					compatible = "qcom,pm8058-keypad-led";
					reg = <0x48>;
					label = "pm8058:infrared:proximitysensor";
					default-state = "off";
				};
				led@131 {
					compatible = "qcom,pm8058-led";
					reg = <0x131>;
					label = "pm8058:red";
					default-state = "off";
				};
				led@132 {
					/*
					 * This is actually green too on my
					 * board, but documented as yellow.
					 */
					compatible = "qcom,pm8058-led";
					reg = <0x132>;
					label = "pm8058:yellow";
					default-state = "off";
					linux,default-trigger = "mmc0";
				};
				led@133 {
					compatible = "qcom,pm8058-led";
					reg = <0x133>;
					label = "pm8058:green";
					default-state = "on";
					linux,default-trigger = "heartbeat";
				};
			};
		};

		gsbi@19c00000 {
			status = "ok";
			qcom,mode = <GSBI_PROT_I2C_UART>;

			serial@19c40000 {
				status = "ok";
				pinctrl-names = "default";
				pinctrl-0 = <&dragon_gsbi12_serial_pins>;
			};

			i2c@19c80000 {
				status = "ok";
				pinctrl-names = "default";
				pinctrl-0 = <&dragon_gsbi12_i2c_pins>;

				ak8975@0c {
					compatible = "asahi-kasei,ak8975";
					reg = <0x0c>;
					/* GPIO33 has interrupt 224 on the PM8058 */
					interrupt-parent = <&pm8058_gpio>;
					interrupts = <224 IRQ_TYPE_EDGE_RISING>;
					pinctrl-names = "default";
					pinctrl-0 = <&dragon_ak8975_gpios>;
					vid-supply = <&pm8058_lvs0>; // 1.8V
					vdd-supply = <&pm8058_l14>; // 2.85V
				};
				bmp085@77 {
					compatible = "bosch,bmp085";
					reg = <0x77>;
					/* GPIO16 has interrupt 207 on the PM8058 */
					interrupt-parent = <&pm8058_gpio>;
					interrupts = <207 IRQ_TYPE_EDGE_RISING>;
					reset-gpios = <&tlmm 86 GPIO_ACTIVE_LOW>;
					pinctrl-names = "default";
					pinctrl-0 = <&dragon_bmp085_gpios>;
					vddd-supply = <&pm8058_lvs0>; // 1.8V
					vdda-supply = <&pm8058_l14>; // 2.85V
				};
			};
		};

		rpm@104000 {
			/*
			 * Set up of the PMIC RPM regulators for this board
			 * PM8901 supplies "preliminary regulators" whatever
			 * that means
			 */
			pm8901-regulators {
				vdd_l0-supply = <&pm8901_s4>;
				vdd_l1-supply = <&vph>;
				vdd_l2-supply = <&vph>;
				vdd_l3-supply = <&vph>;
				vdd_l4-supply = <&vph>;
				vdd_l5-supply = <&vph>;
				vdd_l6-supply = <&vph>;
				/* vdd_s0-supply, vdd_s1-supply: SAW regulators */
				vdd_s2-supply = <&vph>;
				vdd_s3-supply = <&vph>;
				vdd_s4-supply = <&vph>;
				lvs0_in-supply = <&pm8058_s3>;
				lvs1_in-supply = <&pm8901_s4>;
				lvs2_in-supply = <&pm8058_l0>;
				lvs3_in-supply = <&pm8058_s2>;
				mvs_in-supply = <&pm8058_s3>;

				l0 {
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};
				l1 {
					regulator-min-microvolt = <3300000>;
					regulator-max-microvolt = <3300000>;
					bias-pull-down;
				};
				l2 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <3300000>;
					bias-pull-down;
				};
				l3 {
					regulator-min-microvolt = <3300000>;
					regulator-max-microvolt = <3300000>;
					bias-pull-down;
				};
				l4 {
					regulator-min-microvolt = <2600000>;
					regulator-max-microvolt = <2600000>;
					bias-pull-down;
				};
				l5 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
					bias-pull-down;
				};
				l6 {
					regulator-min-microvolt = <2200000>;
					regulator-max-microvolt = <2200000>;
					bias-pull-down;
				};

				/* s0 and s1 are SAW regulators controlled over SPM */
				s2 {
					regulator-min-microvolt = <1300000>;
					regulator-max-microvolt = <1300000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};
				s3 {
					regulator-min-microvolt = <1100000>;
					regulator-max-microvolt = <1100000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};
				s4 {
					regulator-min-microvolt = <1225000>;
					regulator-max-microvolt = <1225000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};

				/* LVS0 thru 3 and mvs0 are just switches */
				lvs0 {
					regulator-always-on;
				};
				lvs1 { };
				lvs2 { };
				lvs3 { };
				mvs0 {};

			};

			pm8058-regulators {
				vdd_l0_l1_lvs-supply = <&pm8058_s3>;
				vdd_l2_l11_l12-supply = <&vph>;
				vdd_l3_l4_l5-supply = <&vph>;
				vdd_l6_l7-supply = <&vph>;
				vdd_l8-supply = <&vph>;
				vdd_l9-supply = <&vph>;
				vdd_l10-supply = <&vph>;
				vdd_l13_l16-supply = <&pm8058_s4>;
				vdd_l14_l15-supply = <&vph>;
				vdd_l17_l18-supply = <&vph>;
				vdd_l19_l20-supply = <&vph>;
				vdd_l21-supply = <&pm8058_s3>;
				vdd_l22-supply = <&pm8058_s3>;
				vdd_l23_l24_l25-supply = <&pm8058_s3>;
				vdd_s0-supply = <&vph>;
				vdd_s1-supply = <&vph>;
				vdd_s2-supply = <&vph>;
				vdd_s3-supply = <&vph>;
				vdd_s4-supply = <&vph>;
				vdd_ncp-supply = <&vph>;

				l0 {
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};
				l1 {
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};
				l2 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <2600000>;
					bias-pull-down;
				};
				l3 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					bias-pull-down;
				};
				l4 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
					bias-pull-down;
				};
				l5 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
					bias-pull-down;
				};
				l6 {
					regulator-min-microvolt = <3000000>;
					regulator-max-microvolt = <3600000>;
					bias-pull-down;
				};
				l7 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					bias-pull-down;
				};
				l8 {
					regulator-min-microvolt = <2900000>;
					regulator-max-microvolt = <3050000>;
					bias-pull-down;
				};
				l9 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					bias-pull-down;
				};
				l10 {
					regulator-min-microvolt = <2600000>;
					regulator-max-microvolt = <2600000>;
					bias-pull-down;
				};
				l11 {
					regulator-min-microvolt = <1500000>;
					regulator-max-microvolt = <1500000>;
					bias-pull-down;
				};
				l12 {
					regulator-min-microvolt = <2900000>;
					regulator-max-microvolt = <2900000>;
					bias-pull-down;
				};
				l13 {
					regulator-min-microvolt = <2050000>;
					regulator-max-microvolt = <2050000>;
					bias-pull-down;
				};
				l14 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
				};
				l15 {
					regulator-min-microvolt = <2850000>;
					regulator-max-microvolt = <2850000>;
					bias-pull-down;
				};
				l16 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					bias-pull-down;
					regulator-always-on;
				};
				l17 {
					// 1.5V according to schematic
					regulator-min-microvolt = <2600000>;
					regulator-max-microvolt = <2600000>;
					bias-pull-down;
				};
				l18 {
					regulator-min-microvolt = <2200000>;
					regulator-max-microvolt = <2200000>;
					bias-pull-down;
				};
				l19 {
					regulator-min-microvolt = <2500000>;
					regulator-max-microvolt = <2500000>;
					bias-pull-down;
				};
				l20 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					bias-pull-down;
				};
				l21 {
					// 1.1 V according to schematic
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
					regulator-always-on;
				};
				l22 {
					// 1.2 V according to schematic
					regulator-min-microvolt = <1150000>;
					regulator-max-microvolt = <1150000>;
					bias-pull-down;
				};
				l23 {
					// Unused
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};
				l24 {
					// Unused
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};
				l25 {
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1200000>;
					bias-pull-down;
				};

				s0 {
					// regulator-min-microvolt = <500000>;
					// regulator-max-microvolt = <1325000>;
					regulator-min-microvolt = <1100000>;
					regulator-max-microvolt = <1100000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};
				s1 {
					// regulator-min-microvolt = <500000>;
					// regulator-max-microvolt = <1250000>;
					regulator-min-microvolt = <1100000>;
					regulator-max-microvolt = <1100000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};
				s2 {
					// 1.3 V according to schematic
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <1400000>;
					qcom,switch-mode-frequency = <1600000>;
					bias-pull-down;
				};
				s3 {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					qcom,switch-mode-frequency = <1600000>;
					regulator-always-on;
					bias-pull-down;
				};
				s4 {
					regulator-min-microvolt = <2200000>;
					regulator-max-microvolt = <2200000>;
					qcom,switch-mode-frequency = <1600000>;
					regulator-always-on;
					bias-pull-down;
				};

				/* LVS0 and LVS1 are just switches */
				lvs0 {
					bias-pull-down;
				};
				lvs1 {
					bias-pull-down;
				};

				ncp {
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <1800000>;
					qcom,switch-mode-frequency = <1600000>;
				};
			};
		};
		amba {
			/* Internal 3.69 GiB eMMC */
			sdcc@12400000 {
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <&dragon_sdcc1_pins>;
				vmmc-supply = <&pm8901_l5>;
				vqmmc-supply = <&pm8901_lvs0>;
			};

			/* External micro SD card, directly connected, pulled up to 2.85 V */
			sdcc@12180000 {
				status = "okay";
				/* Enable SSBI GPIO 22 as input, use for card detect */
				pinctrl-names = "default";
				pinctrl-0 = <&dragon_sdcc3_pins>, <&dragon_sdcc3_gpios>;
				cd-gpios = <&pm8058_gpio 22 GPIO_ACTIVE_LOW>;
				wp-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
				vmmc-supply = <&pm8058_l14>;
			};

			/*
			 * Second external micro SD card, using two TXB104RGYR levelshifters
			 * to lift from 1.8 V to 2.85 V
			 */
			sdcc@12200000 {
				status = "okay";
				/* Enable SSBI GPIO 26 as input, use for card detect */
				pinctrl-names = "default";
				pinctrl-0 = <&dragon_sdcc5_pins>, <&dragon_sdcc5_gpios>;
				cd-gpios = <&pm8058_gpio 26 GPIO_ACTIVE_LOW>;
				wp-gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
				vmmc-supply = <&pm8058_l14>;
				vqmmc-supply = <&dragon_vio_txb>;
			};
		};
	};
};
OpenPOWER on IntegriCloud