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
|
// SPDX-License-Identifier: GPL-2.0-only
/*
* Devicetree for the Samsung XCover 2 GT-S7710 also known as Skomer.
*/
/dts-v1/;
#include "ste-db8500.dtsi"
#include "ste-ab8505.dtsi"
#include "ste-dbx5x0-pinctrl.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "Samsung XCover 2 (GT-S7710)";
compatible = "samsung,skomer", "st-ericsson,u8500";
chosen {
stdout-path = &serial2;
};
/* TI TXS0206 level translator for 2.9 V */
sd_level_translator: regulator-gpio {
compatible = "regulator-fixed";
/* GPIO87 EN */
gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-name = "sd-level-translator";
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
regulator-type = "voltage";
startup-delay-us = <200>;
pinctrl-names = "default";
pinctrl-0 = <&sd_level_translator_default>;
};
/* External LDO MIC5366-3.3YMT for eMMC */
ldo_3v3_reg: regulator-gpio-ldo-3v3 {
compatible = "regulator-fixed";
regulator-name = "en-3v3-fixed-supply";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
startup-delay-us = <5000>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&emmc_ldo_en_default_mode>;
};
wlan_en: regulator-gpio-wlan-en {
compatible = "regulator-fixed";
regulator-name = "wl-reg-on";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
startup-delay-us = <200000>;
/* GPIO215 WLAN_EN */
gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&wlan_en_default_mode>;
};
vibrator {
compatible = "gpio-vibrator";
enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vibrator_default>;
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_default_mode>;
button-home {
linux,code = <KEY_HOME>;
label = "HOME";
/* GPIO91 */
gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
};
button-volup {
linux,code = <KEY_VOLUMEUP>;
label = "VOL+";
/* GPIO67 */
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
button-voldown {
linux,code = <KEY_VOLUMEDOWN>;
label = "VOL-";
/* GPIO92 */
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
};
button-menu {
linux,code = <KEY_MENU>;
label = "MENU";
/* GPIO204 */
gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
};
button-back {
linux,code = <KEY_BACK>;
label = "BACK";
/* GPIO205 */
gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
};
};
/*
* FIXME: this is not quite GPIO backlight. This is a
* KTD253 one-wire GPIO-controlled backlight. It can
* work as a GPIO backlight.
*/
gpio_bl: backlight {
compatible = "gpio-backlight";
/* GPIO 69 */
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&gpio_backlight_default_mode>;
};
i2c-gpio-0 {
compatible = "i2c-gpio";
sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
pinctrl-names = "default";
pinctrl-0 = <&i2c_gpio_0_default>;
#address-cells = <1>;
#size-cells = <0>;
/* TODO: this should be used by the NCP6914 Camera power management unit */
};
i2c-gpio-1 {
compatible = "i2c-gpio";
sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
pinctrl-names = "default";
pinctrl-0 = <&i2c_gpio_1_default>;
#address-cells = <1>;
#size-cells = <0>;
magnetometer@c {
compatible = "alps,hscdtd008a";
reg = <0x0c>;
avdd-supply = <&ab8500_ldo_aux1_reg>;
dvdd-supply = <&ab8500_ldo_aux8_reg>;
};
};
soc {
// External Micro SD slot
sdi0_per1@80126000 {
arm,primecell-periphid = <0x10480180>;
max-frequency = <100000000>;
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
/* All direction control is used */
st,sig-dir-cmd;
st,sig-dir-dat0;
st,sig-dir-dat2;
st,sig-dir-dat31;
st,sig-pin-fbclk;
full-pwr-cycle;
vmmc-supply = <&ab8500_ldo_aux3_reg>;
vqmmc-supply = <&sd_level_translator>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc0_a_1_default>;
pinctrl-1 = <&mc0_a_1_sleep>;
status = "okay";
};
// WLAN SDIO channel
sdi1_per2@80118000 {
arm,primecell-periphid = <0x10480180>;
max-frequency = <50000000>;
bus-width = <4>;
non-removable;
cap-sd-highspeed;
vmmc-supply = <&wlan_en>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc1_a_2_default>;
pinctrl-1 = <&mc1_a_2_sleep>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
wifi@1 {
compatible = "brcm,bcm4329-fmac";
reg = <1>;
/* GPIO216 WL_HOST_WAKE */
interrupt-parent = <&gpio6>;
interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
interrupt-names = "host-wake";
pinctrl-names = "default";
pinctrl-0 = <&wlan_default_mode>;
};
};
// eMMC
sdi2_per3@80005000 {
arm,primecell-periphid = <0x10480180>;
max-frequency = <100000000>;
bus-width = <8>;
non-removable;
cap-mmc-highspeed;
mmc-ddr-1_8v;
vmmc-supply = <&ldo_3v3_reg>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc2_a_1_default>;
pinctrl-1 = <&mc2_a_1_sleep>;
status = "okay";
};
/* GBF (Bluetooth) UART */
uart@80120000 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&u0_a_1_default>;
pinctrl-1 = <&u0_a_1_sleep>;
status = "okay";
/* FIXME: not quite working yet, probably needs regulators */
bluetooth {
compatible = "brcm,bcm4330-bt";
shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&bluetooth_default_mode>;
};
};
/* GPF UART */
uart@80121000 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
};
/* Debugging console UART connected to AB8505 USB */
uart@80007000 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&u2rxtx_c_1_default>;
pinctrl-1 = <&u2rxtx_c_1_sleep>;
};
prcmu@80157000 {
ab8505 {
ab8500_usb {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&usb_a_1_default>;
pinctrl-1 = <&usb_a_1_sleep>;
};
ab8505-regulators {
ab8500_ldo_aux1 {
/* Used for VDD for sensors */
regulator-name = "AUX1";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
};
ab8500_ldo_aux2 {
/* Supplies the Cypress TMA140 touchscreen only with 3.3V */
regulator-name = "AUX2";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
ab8500_ldo_aux3 {
/* Used for voltage for external MMC/SD card */
regulator-name = "AUX3";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <3300000>;
};
ab8500_ldo_aux4 {
regulator-name = "AUX4";
/* Hammer to 3.0V for the display */
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
};
ab8500_ldo_aux5 {
regulator-name = "AUX5";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <2790000>;
regulator-always-on;
};
ab8500_ldo_aux6 {
regulator-name = "AUX6";
/* Hammer to 1.8V for the display */
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
ab8500_ldo_aux8 {
/* Mostly VIO for sensors */
regulator-name = "AUX8";
};
};
};
};
/* I2C0 */
i2c@80004000 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c0_a_1_default>;
pinctrl-1 = <&i2c0_a_1_sleep>;
proximity@44 {
compatible = "sharp,gp2ap002s00f";
clock-frequency = <400000>;
reg = <0x44>;
interrupt-parent = <&gpio4>;
interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
vdd-supply = <&ab8500_ldo_aux1_reg>;
vio-supply = <&ab8500_ldo_aux8_reg>;
pinctrl-names = "default";
pinctrl-0 = <&gp2ap002_skomer_default>;
sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
};
};
/* I2C2 */
i2c@80128000 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c2_b_2_default>;
pinctrl-1 = <&i2c2_b_2_sleep>;
accel@18 {
compatible = "bosch,bma254";
clock-frequency = <400000>;
reg = <0x18>;
/* GPIO224 used as "smart alert" interrupt */
interrupt-parent = <&gpio7>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
mount-matrix = "0", "1", "0",
"-1", "0", "0",
"0", "0", "1";
vdd-supply = <&ab8500_ldo_aux1_reg>;
vddio-supply = <&ab8500_ldo_aux8_reg>;
pinctrl-names = "default";
pinctrl-0 = <&bma254_skomer_default>;
};
};
/* I2C3 */
i2c@80110000 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c3_c_2_default>;
pinctrl-1 = <&i2c3_c_2_sleep>;
/* Cypress CY8CTMA140 touchscreen */
touchscreen@20 {
compatible = "cypress,cy8ctma140";
clock-frequency = <400000>;
reg = <0x20>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
touchscreen-max-pressure = <255>;
/* GPIO218 for IRQ */
interrupt-parent = <&gpio6>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
/* VDD is "digital supply" nominally 1.71-3.6V */
vdd-supply = <&ab8500_ldo_aux2_reg>;
/* VCPIN is "analog supply", 2.7-3.6 V */
vcpin-supply = <&ab8500_ldo_aux2_reg>;
pinctrl-names = "default";
pinctrl-0 = <&tma140_skomer_default>;
};
};
mcde@a0350000 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&dsi_default_mode>;
dsi-controller@a0351000 {
panel {
/* NT35510-based Hydis HVA40WV1 */
compatible = "hydis,hva40wv1", "novatek,nt35510";
reg = <0>;
/* v_lcd_3v0 2.3-4.8V */
vdd-supply = <&ab8500_ldo_aux4_reg>;
/* v_lcd_1v8 1.65-3.3V */
vddi-supply = <&ab8500_ldo_aux6_reg>;
/* GPIO 139 */
reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&display_default_mode>;
backlight = <&gpio_bl>;
};
};
};
};
};
&pinctrl {
/*
* This extends the MC0 default config to include DAT32DIR
* which is used by this machine. If we don't do this the
* SD card does not work.
*/
sdi0 {
mc0_a_1_default {
default_mux {
function = "mc0";
/* This machine uses the DAT31 pin */
groups = "mc0_a_1", "mc0dat31dir_a_1";
};
default_cfg5 {
pins = "GPIO21_AB3"; /* DAT31DIR */
ste,config = <&out_hi>;
};
};
};
mcde {
dsi_default_mode: dsi_default {
default_mux1 {
/* Mux in VSI0 used for DSI TE */
function = "lcd";
groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
};
default_cfg1 {
pins = "GPIO68_E1"; /* VSI0 */
ste,config = <&in_nopull>;
};
};
};
/* Two GPIO lines used by the display */
display {
display_default_mode: display_default {
skomer_cfg1 {
/*
* OLED DETECT or check_pba, this appears to be high
* on "PBA" which I guess is "prototype board A".
*/
pins = "GPIO93_B7";
ste,config = <&gpio_in_nopull>;
};
skomer_cfg2 {
pins = "GPIO139_C9";
/*
* MIPI_DSI0_RESET_N resets the display, leave high
* (de-asserted) so we only assert reset explicitly
* from the display driver.
*/
ste,config = <&gpio_out_hi>;
};
};
};
backlight {
gpio_backlight_default_mode: backlight_default {
skomer_cfg1 {
pins = "GPIO69_E2"; /* LCD_BL_CTRL */
ste,config = <&gpio_out_lo>;
};
};
};
/* GPIO that enables the 2.9V SD card level translator */
sd-level-translator {
sd_level_translator_default: sd_level_translator_default {
/* level shifter on GPIO87 */
skomer_cfg1 {
pins = "GPIO87_B3";
ste,config = <&gpio_out_hi>;
};
};
};
/* GPIO that enables the LDO regulator for the eMMC */
emmc-ldo {
emmc_ldo_en_default_mode: emmc_ldo_default {
/* LDO enable on GPIO223 */
skomer_cfg1 {
pins = "GPIO223_AH9";
ste,config = <&gpio_out_hi>;
};
};
};
/* GPIO keys */
gpio-keys {
gpio_keys_default_mode: gpio_keys_default {
skomer_cfg1 {
pins = "GPIO67_G2", /* VOL UP */
"GPIO91_B6", /* HOME */
"GPIO92_D6", /* VOL DOWN */
"GPIO204_AF23", /* MENU */
"GPIO205_AG23"; /* BACK */
ste,config = <&gpio_in_pu>;
};
};
};
/* Interrupt line for BMA254 */
bma254 {
bma254_skomer_default: bma254_skomer {
skomer_cfg1 {
pins = "GPIO224_AG9";
ste,config = <&gpio_in_pd>;
};
};
};
/* Interrupt line for light/proximity sensor GP2AP002 */
gp2ap002 {
gp2ap002_skomer_default: gp2ap002_skomer {
skomer_cfg1 {
pins = "GPIO146_D13";
ste,config = <&gpio_in_nopull>;
};
};
};
/* GPIO-based I2C bus for NCP6914 */
i2c-gpio-0 {
i2c_gpio_0_default: i2c_gpio_0 {
skomer_cfg1 {
pins = "GPIO143_D12", "GPIO144_B13";
ste,config = <&gpio_in_nopull>;
};
};
};
/* GPIO-based I2C bus for ALPS HSCD compass */
i2c-gpio-1 {
i2c_gpio_1_default: i2c_gpio_1 {
skomer_cfg1 {
pins = "GPIO151_B17", "GPIO152_D16";
ste,config = <&gpio_in_nopull>;
};
};
};
wlan {
wlan_default_mode: wlan_default {
skomer_cfg1 {
pins = "GPIO216_AG12";
ste,config = <&gpio_in_pd>;
};
};
wlan_en_default_mode: wlan_en_default {
skomer_cfg2 {
pins = "GPIO215_AH13";
ste,config = <&gpio_out_lo>;
};
};
};
bluetooth {
bluetooth_default_mode: bluetooth_default {
skomer_cfg1 {
pins = "GPIO199_AH23", "GPIO222_AJ9";
ste,config = <&gpio_out_lo>;
};
skomer_cfg2 {
pins = "GPIO97_D9";
ste,config = <&gpio_in_nopull>;
};
};
};
vibrator {
vibrator_default: vibrator_default {
skomer_cfg1 {
pins = "GPIO195_AG28"; /* MOT_EN */
ste,config = <&gpio_out_lo>;
};
};
};
/* Interrupt line for the Cypress TMA140 touchscreen */
touchscreen {
tma140_skomer_default: tma140_skomer {
skomer_cfg1 {
pins = "GPIO218_AH11";
ste,config = <&gpio_in_nopull>;
};
};
};
};
&ab8505_gpio {
/* Hog a few default settings */
pinctrl-names = "default";
pinctrl-0 = <&gpio_default>;
gpio {
gpio_default: gpio_default {
skomer_mux {
/* Change unused pins to GPIO mode */
function = "gpio";
groups = "gpio3_a_1", /* default: SysClkReq4 */
"gpio14_a_1"; /* default: PWMOut1 */
};
skomer_cfg1 {
pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
bias-disable;
};
};
};
};
|