Loading...
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Devicetree for the Samsung XCover 2 GT-S7710 also known as Skomer.
4 */
5
6/dts-v1/;
7#include "ste-db8500.dtsi"
8#include "ste-ab8505.dtsi"
9#include "ste-dbx5x0-pinctrl.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/interrupt-controller/irq.h>
14
15/ {
16 model = "Samsung XCover 2 (GT-S7710)";
17 compatible = "samsung,skomer", "st-ericsson,u8500";
18
19 chosen {
20 stdout-path = &serial2;
21 };
22
23 battery: battery {
24 compatible = "samsung,eb485159lu";
25 };
26
27 thermal-zones {
28 battery-thermal {
29 /* This zone will be polled by the battery temperature code */
30 polling-delay = <0>;
31 polling-delay-passive = <0>;
32 thermal-sensors = <&bat_therm>;
33
34 trips {
35 battery-crit-hi {
36 temperature = <70000>;
37 hysteresis = <2000>;
38 type = "critical";
39 };
40 };
41 };
42 };
43
44 bat_therm: thermistor {
45 compatible = "samsung,1404-001221";
46 io-channels = <&gpadc 0x02>; /* BatTemp */
47 pullup-uv = <1800000>;
48 pullup-ohm = <230000>;
49 pulldown-ohm = <0>;
50 #thermal-sensor-cells = <0>;
51 };
52
53 /* TI TXS0206 level translator for 2.9 V */
54 sd_level_translator: regulator-gpio {
55 compatible = "regulator-fixed";
56
57 /* GPIO87 EN */
58 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
59 enable-active-high;
60
61 regulator-name = "sd-level-translator";
62 regulator-min-microvolt = <2900000>;
63 regulator-max-microvolt = <2900000>;
64 regulator-type = "voltage";
65
66 startup-delay-us = <200>;
67
68 pinctrl-names = "default";
69 pinctrl-0 = <&sd_level_translator_default>;
70 };
71
72 /* External LDO MIC5366-3.3YMT for eMMC */
73 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
74 compatible = "regulator-fixed";
75 regulator-name = "en-3v3-fixed-supply";
76 regulator-min-microvolt = <3300000>;
77 regulator-max-microvolt = <3300000>;
78 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
79 startup-delay-us = <5000>;
80 enable-active-high;
81 pinctrl-names = "default";
82 pinctrl-0 = <&emmc_ldo_en_default_mode>;
83 };
84
85 wlan_en: regulator-gpio-wlan-en {
86 compatible = "regulator-fixed";
87 regulator-name = "wl-reg-on";
88 regulator-min-microvolt = <3000000>;
89 regulator-max-microvolt = <3000000>;
90 startup-delay-us = <200000>;
91 /* GPIO215 WLAN_EN */
92 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
93 enable-active-high;
94 pinctrl-names = "default";
95 pinctrl-0 = <&wlan_en_default_mode>;
96 };
97
98 vibrator {
99 compatible = "gpio-vibrator";
100 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
101 pinctrl-names = "default";
102 pinctrl-0 = <&vibrator_default>;
103 };
104
105 gpio-keys {
106 compatible = "gpio-keys";
107 pinctrl-names = "default";
108 pinctrl-0 = <&gpio_keys_default_mode>;
109
110 button-home {
111 linux,code = <KEY_HOME>;
112 label = "HOME";
113 /* GPIO91 */
114 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
115 };
116 button-volup {
117 linux,code = <KEY_VOLUMEUP>;
118 label = "VOL+";
119 /* GPIO67 */
120 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
121 };
122 button-voldown {
123 linux,code = <KEY_VOLUMEDOWN>;
124 label = "VOL-";
125 /* GPIO92 */
126 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
127 };
128 button-menu {
129 linux,code = <KEY_MENU>;
130 label = "MENU";
131 /* GPIO204 */
132 gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
133 };
134 button-back {
135 linux,code = <KEY_BACK>;
136 label = "BACK";
137 /* GPIO205 */
138 gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
139 };
140 };
141
142 ktd253: backlight {
143 compatible = "kinetic,ktd253";
144 /* GPIO 69 */
145 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
146 /* Default to 13/32 brightness */
147 default-brightness = <13>;
148 pinctrl-names = "default";
149 pinctrl-0 = <&gpio_backlight_default_mode>;
150 };
151
152 /* Richtek RT8515GQW Flash LED Driver IC */
153 flash {
154 compatible = "richtek,rt8515";
155 /* GPIO 140 */
156 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
157 /* GPIO 141 */
158 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
159 /*
160 * RFS is 16 kOhm and RTS is 100 kOhm giving
161 * the flash max current 343mA and torch max
162 * current 55 mA.
163 */
164 richtek,rfs-ohms = <16000>;
165 richtek,rts-ohms = <100000>;
166 pinctrl-names = "default";
167 pinctrl-0 = <&gpio_flash_default_mode>;
168
169 led {
170 function = LED_FUNCTION_FLASH;
171 color = <LED_COLOR_ID_WHITE>;
172 flash-max-timeout-us = <250000>;
173 flash-max-microamp = <343750>;
174 led-max-microamp = <55000>;
175 };
176 };
177
178 i2c-gpio-0 {
179 compatible = "i2c-gpio";
180 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
181 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&i2c_gpio_0_default>;
184 #address-cells = <1>;
185 #size-cells = <0>;
186 /* TODO: this should be used by the NCP6914 Camera power management unit */
187 };
188
189 i2c-gpio-1 {
190 compatible = "i2c-gpio";
191 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
192 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
193 pinctrl-names = "default";
194 pinctrl-0 = <&i2c_gpio_1_default>;
195 #address-cells = <1>;
196 #size-cells = <0>;
197 magnetometer@c {
198 compatible = "alps,hscdtd008a";
199 reg = <0x0c>;
200 avdd-supply = <&ab8500_ldo_aux1_reg>;
201 dvdd-supply = <&ab8500_ldo_aux8_reg>;
202 };
203 };
204
205 soc {
206 // External Micro SD slot
207 mmc@80126000 {
208 arm,primecell-periphid = <0x10480180>;
209 max-frequency = <100000000>;
210 bus-width = <4>;
211 cap-sd-highspeed;
212 cap-mmc-highspeed;
213 /* All direction control is used */
214 st,sig-pin-fbclk;
215 full-pwr-cycle;
216 vmmc-supply = <&ab8500_ldo_aux3_reg>;
217 vqmmc-supply = <&sd_level_translator>;
218 pinctrl-names = "default", "sleep";
219 pinctrl-0 = <&mc0_a_1_default>;
220 pinctrl-1 = <&mc0_a_1_sleep>;
221 status = "okay";
222 };
223
224 // WLAN SDIO channel
225 mmc@80118000 {
226 arm,primecell-periphid = <0x10480180>;
227 max-frequency = <50000000>;
228 bus-width = <4>;
229 non-removable;
230 cap-sd-highspeed;
231 vmmc-supply = <&wlan_en>;
232 pinctrl-names = "default", "sleep";
233 pinctrl-0 = <&mc1_a_2_default>;
234 pinctrl-1 = <&mc1_a_2_sleep>;
235 status = "okay";
236 #address-cells = <1>;
237 #size-cells = <0>;
238
239 wifi@1 {
240 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
241 reg = <1>;
242 /* GPIO216 WL_HOST_WAKE */
243 interrupt-parent = <&gpio6>;
244 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
245 interrupt-names = "host-wake";
246 pinctrl-names = "default";
247 pinctrl-0 = <&wlan_default_mode>;
248 };
249 };
250
251 /*
252 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
253 */
254 mmc@80005000 {
255 arm,primecell-periphid = <0x10480180>;
256 max-frequency = <100000000>;
257 bus-width = <8>;
258 non-removable;
259 cap-mmc-highspeed;
260 mmc-ddr-1_8v;
261 no-sdio;
262 no-sd;
263 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
264 post-power-on-delay-ms = <300>;
265 vmmc-supply = <&ldo_3v3_reg>;
266 pinctrl-names = "default", "sleep";
267 pinctrl-0 = <&mc2_a_1_default>;
268 pinctrl-1 = <&mc2_a_1_sleep>;
269
270 status = "okay";
271 };
272
273 /* GBF (Bluetooth) UART */
274 uart@80120000 {
275 pinctrl-names = "default", "sleep";
276 pinctrl-0 = <&u0_a_1_default>;
277 pinctrl-1 = <&u0_a_1_sleep>;
278 status = "okay";
279
280 /* FIXME: not quite working yet, probably needs regulators */
281 bluetooth {
282 /* BCM4334B0 actually */
283 compatible = "brcm,bcm4330-bt";
284 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
285 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
286 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
287 pinctrl-names = "default";
288 pinctrl-0 = <&bluetooth_default_mode>;
289 };
290 };
291
292 /* GPS UART */
293 uart@80121000 {
294 status = "okay";
295 pinctrl-names = "default", "sleep";
296 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
297 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
298
299 gnss {
300 /* The CSRG05TA03-ICJE-R is a SirfStarV 5t chip */
301 compatible = "csr,csrg05ta03-icje-r";
302 /* GPS_RSTN on GPIO209 */
303 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
304 /* GPS_ON_OFF on GPIO86 */
305 sirf,onoff-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
306 /* GPS_1V8 (VSMPS2) */
307 vcc-supply = <&db8500_vsmps2_reg>;
308 pinctrl-names = "default";
309 pinctrl-0 = <&g05ta03_skomer_default>;
310 /* According to /etc/sirfgps.conf */
311 current-speed = <460800>;
312 };
313 };
314
315 /* Debugging console UART connected to AB8505 USB */
316 uart@80007000 {
317 status = "okay";
318 pinctrl-names = "default", "sleep";
319 pinctrl-0 = <&u2rxtx_c_1_default>;
320 pinctrl-1 = <&u2rxtx_c_1_sleep>;
321 };
322
323 prcmu@80157000 {
324 ab8505 {
325 phy {
326 pinctrl-names = "default", "sleep";
327 pinctrl-0 = <&usb_a_1_default>;
328 pinctrl-1 = <&usb_a_1_sleep>;
329 };
330
331 ab8500_fg {
332 line-impedance-micro-ohms = <16000>;
333 };
334
335 regulator {
336 ab8500_ldo_aux1 {
337 /* Used for VDD for sensors */
338 regulator-name = "AUX1";
339 regulator-min-microvolt = <3000000>;
340 regulator-max-microvolt = <3300000>;
341 };
342
343 ab8500_ldo_aux2 {
344 /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
345 regulator-name = "AUX2";
346 regulator-min-microvolt = <3000000>;
347 regulator-max-microvolt = <3000000>;
348 };
349
350 ab8500_ldo_aux3 {
351 /* Used for voltage for external MMC/SD card */
352 regulator-name = "AUX3";
353 regulator-min-microvolt = <1100000>;
354 regulator-max-microvolt = <3300000>;
355 };
356
357 ab8500_ldo_aux4 {
358 regulator-name = "AUX4";
359 /* Hammer to 3.0V for the display */
360 regulator-min-microvolt = <3000000>;
361 regulator-max-microvolt = <3000000>;
362 };
363
364 ab8500_ldo_aux5 {
365 regulator-name = "AUX5";
366 /* Intended for 1V8 for touchscreen but actually left unused */
367 regulator-min-microvolt = <1050000>;
368 regulator-max-microvolt = <2790000>;
369 };
370
371 ab8500_ldo_aux6 {
372 regulator-name = "AUX6";
373 /* Hammer to 1.8V for the display */
374 regulator-min-microvolt = <1800000>;
375 regulator-max-microvolt = <1800000>;
376 };
377
378 ab8500_ldo_aux8 {
379 /* Mostly VIO for sensors */
380 regulator-name = "AUX8";
381 };
382 };
383 };
384 };
385
386 /* I2C0 */
387 i2c@80004000 {
388 status = "okay";
389
390 pinctrl-names = "default", "sleep";
391 pinctrl-0 = <&i2c0_a_1_default>;
392 pinctrl-1 = <&i2c0_a_1_sleep>;
393
394 proximity@44 {
395 compatible = "sharp,gp2ap002s00f";
396 clock-frequency = <400000>;
397 reg = <0x44>;
398
399 interrupt-parent = <&gpio4>;
400 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
401 vdd-supply = <&ab8500_ldo_aux1_reg>;
402 vio-supply = <&ab8500_ldo_aux8_reg>;
403 pinctrl-names = "default";
404 pinctrl-0 = <&gp2ap002_skomer_default>;
405 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
406 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
407 };
408 };
409
410
411 /* I2C2 */
412 i2c@80128000 {
413 status = "okay";
414
415 pinctrl-names = "default", "sleep";
416 pinctrl-0 = <&i2c2_b_2_default>;
417 pinctrl-1 = <&i2c2_b_2_sleep>;
418
419 accel@18 {
420 compatible = "bosch,bma254";
421 clock-frequency = <400000>;
422 reg = <0x18>;
423
424 /* GPIO224 used as "smart alert" interrupt */
425 interrupt-parent = <&gpio7>;
426 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
427
428 mount-matrix = "0", "-1", "0",
429 "1", "0", "0",
430 "0", "0", "1";
431 vdd-supply = <&ab8500_ldo_aux1_reg>;
432 vddio-supply = <&ab8500_ldo_aux8_reg>;
433 pinctrl-names = "default";
434 pinctrl-0 = <&bma254_skomer_default>;
435 };
436 };
437
438 /* I2C3 */
439 i2c@80110000 {
440 status = "okay";
441
442 pinctrl-names = "default", "sleep";
443 pinctrl-0 = <&i2c3_c_2_default>;
444 pinctrl-1 = <&i2c3_c_2_sleep>;
445
446 /* Cypress CY8CTMA140 touchscreen */
447 touchscreen@20 {
448 compatible = "cypress,cy8ctma140";
449 clock-frequency = <400000>;
450 reg = <0x20>;
451
452 touchscreen-size-x = <480>;
453 touchscreen-size-y = <800>;
454 touchscreen-max-pressure = <255>;
455
456 /* GPIO218 for IRQ */
457 interrupt-parent = <&gpio6>;
458 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
459
460 /* VDD is "digital supply" nominally 1.71-3.6V */
461 vdd-supply = <&ab8500_ldo_aux2_reg>;
462 /* VCPIN is "analog supply", 2.7-3.6 V */
463 vcpin-supply = <&ab8500_ldo_aux2_reg>;
464
465 pinctrl-names = "default";
466 pinctrl-0 = <&tma140_skomer_default>;
467 };
468 };
469
470 mcde@a0350000 {
471 status = "okay";
472 pinctrl-names = "default";
473 pinctrl-0 = <&dsi_default_mode>;
474
475 dsi@a0351000 {
476 panel {
477 /* NT35510-based Hydis HVA40WV1 */
478 compatible = "hydis,hva40wv1", "novatek,nt35510";
479 reg = <0>;
480 /* v_lcd_3v0 2.3-4.8V */
481 vdd-supply = <&ab8500_ldo_aux4_reg>;
482 /* v_lcd_1v8 1.65-3.3V */
483 vddi-supply = <&ab8500_ldo_aux6_reg>;
484 /* GPIO 139 */
485 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
486 pinctrl-names = "default";
487 pinctrl-0 = <&display_default_mode>;
488 backlight = <&ktd253>;
489 };
490 };
491 };
492 };
493};
494
495&pinctrl {
496 sdi0 {
497 mc0_a_1_default {
498 default_cfg1 {
499 /* GPIO18, 19 & 20 unused so pull down */
500 ste,config = <&gpio_in_pd>;
501 };
502 };
503 };
504
505 /* This is a reset line for the eMMC */
506 sdi2 {
507 mc2_a_1_default {
508 default_cfg2 {
509 pins = "GPIO130_C8"; /* FBCLK */
510 ste,config = <&gpio_in_pd>;
511 };
512 };
513 };
514
515 mcde {
516 dsi_default_mode: dsi_default {
517 default_mux1 {
518 /* Mux in VSI0 used for DSI TE */
519 function = "lcd";
520 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
521 };
522 default_cfg1 {
523 pins = "GPIO68_E1"; /* VSI0 */
524 ste,config = <&in_nopull>;
525 };
526 };
527 };
528
529 /* Two GPIO lines used by the display */
530 display {
531 display_default_mode: display_default {
532 skomer_cfg1 {
533 /*
534 * OLED DETECT or check_pba, this appears to be high
535 * on "PBA" which I guess is "prototype board A".
536 */
537 pins = "GPIO93_B7";
538 ste,config = <&gpio_in_nopull>;
539 };
540 skomer_cfg2 {
541 pins = "GPIO139_C9";
542 /*
543 * MIPI_DSI0_RESET_N resets the display, leave high
544 * (de-asserted) so we only assert reset explicitly
545 * from the display driver.
546 */
547 ste,config = <&gpio_out_hi>;
548 };
549 };
550 };
551 backlight {
552 gpio_backlight_default_mode: backlight_default {
553 skomer_cfg1 {
554 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
555 ste,config = <&gpio_out_lo>;
556 };
557 };
558 };
559 flash {
560 gpio_flash_default_mode: flash_default {
561 skomer_cfg1 {
562 pins = "GPIO140_B11", "GPIO141_C12";
563 ste,config = <&gpio_out_lo>;
564 };
565 };
566 };
567 /* GPIO that enables the 2.9V SD card level translator */
568 sd-level-translator {
569 sd_level_translator_default: sd_level_translator_default {
570 /* level shifter on GPIO87 */
571 skomer_cfg1 {
572 pins = "GPIO87_B3";
573 ste,config = <&gpio_out_hi>;
574 };
575 };
576 };
577 /* GPIO that enables the LDO regulator for the eMMC */
578 emmc-ldo {
579 emmc_ldo_en_default_mode: emmc_ldo_default {
580 /* LDO enable on GPIO223 */
581 skomer_cfg1 {
582 pins = "GPIO223_AH9";
583 ste,config = <&gpio_out_hi>;
584 };
585 };
586 };
587 /* GPIO keys */
588 gpio-keys {
589 gpio_keys_default_mode: gpio_keys_default {
590 skomer_cfg1 {
591 pins = "GPIO67_G2", /* VOL UP */
592 "GPIO91_B6", /* HOME */
593 "GPIO92_D6", /* VOL DOWN */
594 "GPIO204_AF23", /* MENU */
595 "GPIO205_AG23"; /* BACK */
596 ste,config = <&gpio_in_pu>;
597 };
598 };
599 };
600 /* Interrupt line for BMA254 */
601 bma254 {
602 bma254_skomer_default: bma254_skomer {
603 skomer_cfg1 {
604 pins = "GPIO224_AG9";
605 ste,config = <&gpio_in_pd>;
606 };
607 };
608 };
609 /* Interrupt line for light/proximity sensor GP2AP002 */
610 gp2ap002 {
611 gp2ap002_skomer_default: gp2ap002_skomer {
612 skomer_cfg1 {
613 pins = "GPIO146_D13";
614 ste,config = <&gpio_in_nopull>;
615 };
616 };
617 };
618 /* GPIO-based I2C bus for NCP6914 */
619 i2c-gpio-0 {
620 i2c_gpio_0_default: i2c_gpio_0 {
621 skomer_cfg1 {
622 pins = "GPIO143_D12", "GPIO144_B13";
623 ste,config = <&gpio_in_nopull>;
624 };
625 };
626 };
627 /* GPIO-based I2C bus for ALPS HSCD compass */
628 i2c-gpio-1 {
629 i2c_gpio_1_default: i2c_gpio_1 {
630 skomer_cfg1 {
631 pins = "GPIO151_B17", "GPIO152_D16";
632 ste,config = <&gpio_in_nopull>;
633 };
634 };
635 };
636 wlan {
637 wlan_default_mode: wlan_default {
638 skomer_cfg1 {
639 pins = "GPIO216_AG12";
640 ste,config = <&gpio_in_pd>;
641 };
642 };
643 wlan_en_default_mode: wlan_en_default {
644 skomer_cfg2 {
645 pins = "GPIO215_AH13";
646 ste,config = <&gpio_out_lo>;
647 };
648 };
649 };
650 bluetooth {
651 bluetooth_default_mode: bluetooth_default {
652 skomer_cfg1 {
653 pins = "GPIO199_AH23", "GPIO222_AJ9";
654 ste,config = <&gpio_out_lo>;
655 };
656 skomer_cfg2 {
657 pins = "GPIO97_D9";
658 ste,config = <&gpio_in_nopull>;
659 };
660 };
661 };
662 vibrator {
663 vibrator_default: vibrator_default {
664 skomer_cfg1 {
665 pins = "GPIO195_AG28"; /* MOT_EN */
666 ste,config = <&gpio_out_lo>;
667 };
668 };
669 };
670 /* Interrupt line for the Cypress TMA140 touchscreen */
671 touchscreen {
672 tma140_skomer_default: tma140_skomer {
673 skomer_cfg1 {
674 pins = "GPIO218_AH11";
675 ste,config = <&gpio_in_nopull>;
676 };
677 };
678 };
679 g05ta03 {
680 g05ta03_skomer_default: g05ta03 {
681 /* Reset line, start out de-asserted */
682 skomer_cfg1 {
683 pins = "GPIO209_AG15";
684 ste,config = <&gpio_out_hi>;
685 };
686 /* GPS_ON_OFF, start out deasserted (off) */
687 skomer_cfg2 {
688 pins = "GPIO86_C6";
689 ste,config = <&gpio_out_lo>;
690 };
691 };
692 };
693};
694
695&ab8505_gpio {
696 /* Hog a few default settings */
697 pinctrl-names = "default";
698 pinctrl-0 = <&gpio_default>;
699
700 gpio {
701 gpio_default: gpio_default {
702 skomer_mux {
703 /* Change unused pins to GPIO mode */
704 function = "gpio";
705 groups = "gpio3_a_1", /* default: SysClkReq4 */
706 "gpio14_a_1"; /* default: PWMOut1 */
707 };
708 skomer_cfg1 {
709 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
710 bias-disable;
711 };
712 };
713 };
714};
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Devicetree for the Samsung XCover 2 GT-S7710 also known as Skomer.
4 */
5
6/dts-v1/;
7#include "ste-db8500.dtsi"
8#include "ste-ab8505.dtsi"
9#include "ste-dbx5x0-pinctrl.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13
14/ {
15 model = "Samsung XCover 2 (GT-S7710)";
16 compatible = "samsung,skomer", "st-ericsson,u8500";
17
18 chosen {
19 stdout-path = &serial2;
20 };
21
22 /* TI TXS0206 level translator for 2.9 V */
23 sd_level_translator: regulator-gpio {
24 compatible = "regulator-fixed";
25
26 /* GPIO87 EN */
27 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
28 enable-active-high;
29
30 regulator-name = "sd-level-translator";
31 regulator-min-microvolt = <2900000>;
32 regulator-max-microvolt = <2900000>;
33 regulator-type = "voltage";
34
35 startup-delay-us = <200>;
36
37 pinctrl-names = "default";
38 pinctrl-0 = <&sd_level_translator_default>;
39 };
40
41 /* External LDO MIC5366-3.3YMT for eMMC */
42 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
43 compatible = "regulator-fixed";
44 regulator-name = "en-3v3-fixed-supply";
45 regulator-min-microvolt = <3300000>;
46 regulator-max-microvolt = <3300000>;
47 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
48 startup-delay-us = <5000>;
49 enable-active-high;
50 pinctrl-names = "default";
51 pinctrl-0 = <&emmc_ldo_en_default_mode>;
52 };
53
54 wlan_en: regulator-gpio-wlan-en {
55 compatible = "regulator-fixed";
56 regulator-name = "wl-reg-on";
57 regulator-min-microvolt = <3000000>;
58 regulator-max-microvolt = <3000000>;
59 startup-delay-us = <200000>;
60 /* GPIO215 WLAN_EN */
61 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
62 enable-active-high;
63 pinctrl-names = "default";
64 pinctrl-0 = <&wlan_en_default_mode>;
65 };
66
67 vibrator {
68 compatible = "gpio-vibrator";
69 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
70 pinctrl-names = "default";
71 pinctrl-0 = <&vibrator_default>;
72 };
73
74 gpio-keys {
75 compatible = "gpio-keys";
76 pinctrl-names = "default";
77 pinctrl-0 = <&gpio_keys_default_mode>;
78
79 button-home {
80 linux,code = <KEY_HOME>;
81 label = "HOME";
82 /* GPIO91 */
83 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
84 };
85 button-volup {
86 linux,code = <KEY_VOLUMEUP>;
87 label = "VOL+";
88 /* GPIO67 */
89 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
90 };
91 button-voldown {
92 linux,code = <KEY_VOLUMEDOWN>;
93 label = "VOL-";
94 /* GPIO92 */
95 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
96 };
97 button-menu {
98 linux,code = <KEY_MENU>;
99 label = "MENU";
100 /* GPIO204 */
101 gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
102 };
103 button-back {
104 linux,code = <KEY_BACK>;
105 label = "BACK";
106 /* GPIO205 */
107 gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
108 };
109 };
110
111 /*
112 * FIXME: this is not quite GPIO backlight. This is a
113 * KTD253 one-wire GPIO-controlled backlight. It can
114 * work as a GPIO backlight.
115 */
116 gpio_bl: backlight {
117 compatible = "gpio-backlight";
118 /* GPIO 69 */
119 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
120 pinctrl-names = "default";
121 pinctrl-0 = <&gpio_backlight_default_mode>;
122 };
123
124 i2c-gpio-0 {
125 compatible = "i2c-gpio";
126 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
127 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&i2c_gpio_0_default>;
130 #address-cells = <1>;
131 #size-cells = <0>;
132 /* TODO: this should be used by the NCP6914 Camera power management unit */
133 };
134
135 i2c-gpio-1 {
136 compatible = "i2c-gpio";
137 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
138 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&i2c_gpio_1_default>;
141 #address-cells = <1>;
142 #size-cells = <0>;
143 magnetometer@c {
144 compatible = "alps,hscdtd008a";
145 reg = <0x0c>;
146 avdd-supply = <&ab8500_ldo_aux1_reg>;
147 dvdd-supply = <&ab8500_ldo_aux8_reg>;
148 };
149 };
150
151 soc {
152 // External Micro SD slot
153 sdi0_per1@80126000 {
154 arm,primecell-periphid = <0x10480180>;
155 max-frequency = <100000000>;
156 bus-width = <4>;
157 cap-sd-highspeed;
158 cap-mmc-highspeed;
159 /* All direction control is used */
160 st,sig-dir-cmd;
161 st,sig-dir-dat0;
162 st,sig-dir-dat2;
163 st,sig-dir-dat31;
164 st,sig-pin-fbclk;
165 full-pwr-cycle;
166 vmmc-supply = <&ab8500_ldo_aux3_reg>;
167 vqmmc-supply = <&sd_level_translator>;
168 pinctrl-names = "default", "sleep";
169 pinctrl-0 = <&mc0_a_1_default>;
170 pinctrl-1 = <&mc0_a_1_sleep>;
171 status = "okay";
172 };
173
174 // WLAN SDIO channel
175 sdi1_per2@80118000 {
176 arm,primecell-periphid = <0x10480180>;
177 max-frequency = <50000000>;
178 bus-width = <4>;
179 non-removable;
180 cap-sd-highspeed;
181 vmmc-supply = <&wlan_en>;
182 pinctrl-names = "default", "sleep";
183 pinctrl-0 = <&mc1_a_2_default>;
184 pinctrl-1 = <&mc1_a_2_sleep>;
185 status = "okay";
186 #address-cells = <1>;
187 #size-cells = <0>;
188
189 wifi@1 {
190 compatible = "brcm,bcm4329-fmac";
191 reg = <1>;
192 /* GPIO216 WL_HOST_WAKE */
193 interrupt-parent = <&gpio6>;
194 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
195 interrupt-names = "host-wake";
196 pinctrl-names = "default";
197 pinctrl-0 = <&wlan_default_mode>;
198 };
199 };
200
201 // eMMC
202 sdi2_per3@80005000 {
203 arm,primecell-periphid = <0x10480180>;
204 max-frequency = <100000000>;
205 bus-width = <8>;
206 non-removable;
207 cap-mmc-highspeed;
208 mmc-ddr-1_8v;
209 vmmc-supply = <&ldo_3v3_reg>;
210 pinctrl-names = "default", "sleep";
211 pinctrl-0 = <&mc2_a_1_default>;
212 pinctrl-1 = <&mc2_a_1_sleep>;
213
214 status = "okay";
215 };
216
217 /* GBF (Bluetooth) UART */
218 uart@80120000 {
219 pinctrl-names = "default", "sleep";
220 pinctrl-0 = <&u0_a_1_default>;
221 pinctrl-1 = <&u0_a_1_sleep>;
222 status = "okay";
223
224 /* FIXME: not quite working yet, probably needs regulators */
225 bluetooth {
226 compatible = "brcm,bcm4330-bt";
227 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
228 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
229 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
230 pinctrl-names = "default";
231 pinctrl-0 = <&bluetooth_default_mode>;
232 };
233 };
234
235 /* GPF UART */
236 uart@80121000 {
237 status = "okay";
238 pinctrl-names = "default", "sleep";
239 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
240 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
241 };
242
243 /* Debugging console UART connected to AB8505 USB */
244 uart@80007000 {
245 status = "okay";
246 pinctrl-names = "default", "sleep";
247 pinctrl-0 = <&u2rxtx_c_1_default>;
248 pinctrl-1 = <&u2rxtx_c_1_sleep>;
249 };
250
251 prcmu@80157000 {
252 ab8505 {
253 ab8500_usb {
254 pinctrl-names = "default", "sleep";
255 pinctrl-0 = <&usb_a_1_default>;
256 pinctrl-1 = <&usb_a_1_sleep>;
257 };
258
259 ab8505-regulators {
260 ab8500_ldo_aux1 {
261 /* Used for VDD for sensors */
262 regulator-name = "AUX1";
263 regulator-min-microvolt = <3000000>;
264 regulator-max-microvolt = <3300000>;
265 };
266
267 ab8500_ldo_aux2 {
268 /* Supplies the Cypress TMA140 touchscreen only with 3.3V */
269 regulator-name = "AUX2";
270 regulator-min-microvolt = <3300000>;
271 regulator-max-microvolt = <3300000>;
272 };
273
274 ab8500_ldo_aux3 {
275 /* Used for voltage for external MMC/SD card */
276 regulator-name = "AUX3";
277 regulator-min-microvolt = <1100000>;
278 regulator-max-microvolt = <3300000>;
279 };
280
281 ab8500_ldo_aux4 {
282 regulator-name = "AUX4";
283 /* Hammer to 3.0V for the display */
284 regulator-min-microvolt = <3000000>;
285 regulator-max-microvolt = <3000000>;
286 };
287
288 ab8500_ldo_aux5 {
289 regulator-name = "AUX5";
290 regulator-min-microvolt = <1050000>;
291 regulator-max-microvolt = <2790000>;
292 regulator-always-on;
293 };
294
295 ab8500_ldo_aux6 {
296 regulator-name = "AUX6";
297 /* Hammer to 1.8V for the display */
298 regulator-min-microvolt = <1800000>;
299 regulator-max-microvolt = <1800000>;
300 };
301
302 ab8500_ldo_aux8 {
303 /* Mostly VIO for sensors */
304 regulator-name = "AUX8";
305 };
306 };
307 };
308 };
309
310 /* I2C0 */
311 i2c@80004000 {
312 status = "okay";
313
314 pinctrl-names = "default", "sleep";
315 pinctrl-0 = <&i2c0_a_1_default>;
316 pinctrl-1 = <&i2c0_a_1_sleep>;
317
318 proximity@44 {
319 compatible = "sharp,gp2ap002s00f";
320 clock-frequency = <400000>;
321 reg = <0x44>;
322
323 interrupt-parent = <&gpio4>;
324 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
325 vdd-supply = <&ab8500_ldo_aux1_reg>;
326 vio-supply = <&ab8500_ldo_aux8_reg>;
327 pinctrl-names = "default";
328 pinctrl-0 = <&gp2ap002_skomer_default>;
329 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
330 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
331 };
332 };
333
334
335 /* I2C2 */
336 i2c@80128000 {
337 status = "okay";
338
339 pinctrl-names = "default", "sleep";
340 pinctrl-0 = <&i2c2_b_2_default>;
341 pinctrl-1 = <&i2c2_b_2_sleep>;
342
343 accel@18 {
344 compatible = "bosch,bma254";
345 clock-frequency = <400000>;
346 reg = <0x18>;
347
348 /* GPIO224 used as "smart alert" interrupt */
349 interrupt-parent = <&gpio7>;
350 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
351
352 mount-matrix = "0", "-1", "0",
353 "1", "0", "0",
354 "0", "0", "1";
355 vdd-supply = <&ab8500_ldo_aux1_reg>;
356 vddio-supply = <&ab8500_ldo_aux8_reg>;
357 pinctrl-names = "default";
358 pinctrl-0 = <&bma254_skomer_default>;
359 };
360 };
361
362 /* I2C3 */
363 i2c@80110000 {
364 status = "okay";
365
366 pinctrl-names = "default", "sleep";
367 pinctrl-0 = <&i2c3_c_2_default>;
368 pinctrl-1 = <&i2c3_c_2_sleep>;
369
370 /* Cypress CY8CTMA140 touchscreen */
371 touchscreen@20 {
372 compatible = "cypress,cy8ctma140";
373 clock-frequency = <400000>;
374 reg = <0x20>;
375
376 touchscreen-size-x = <480>;
377 touchscreen-size-y = <800>;
378 touchscreen-max-pressure = <255>;
379
380 /* GPIO218 for IRQ */
381 interrupt-parent = <&gpio6>;
382 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
383
384 /* VDD is "digital supply" nominally 1.71-3.6V */
385 vdd-supply = <&ab8500_ldo_aux2_reg>;
386 /* VCPIN is "analog supply", 2.7-3.6 V */
387 vcpin-supply = <&ab8500_ldo_aux2_reg>;
388
389 pinctrl-names = "default";
390 pinctrl-0 = <&tma140_skomer_default>;
391 };
392 };
393
394 mcde@a0350000 {
395 status = "okay";
396 pinctrl-names = "default";
397 pinctrl-0 = <&dsi_default_mode>;
398
399 dsi-controller@a0351000 {
400 panel {
401 /* NT35510-based Hydis HVA40WV1 */
402 compatible = "hydis,hva40wv1", "novatek,nt35510";
403 reg = <0>;
404 /* v_lcd_3v0 2.3-4.8V */
405 vdd-supply = <&ab8500_ldo_aux4_reg>;
406 /* v_lcd_1v8 1.65-3.3V */
407 vddi-supply = <&ab8500_ldo_aux6_reg>;
408 /* GPIO 139 */
409 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
410 pinctrl-names = "default";
411 pinctrl-0 = <&display_default_mode>;
412 backlight = <&gpio_bl>;
413 };
414 };
415 };
416 };
417};
418
419&pinctrl {
420 /*
421 * This extends the MC0 default config to include DAT32DIR
422 * which is used by this machine. If we don't do this the
423 * SD card does not work.
424 */
425 sdi0 {
426 mc0_a_1_default {
427 default_mux {
428 function = "mc0";
429 /* This machine uses the DAT31 pin */
430 groups = "mc0_a_1", "mc0dat31dir_a_1";
431 };
432 default_cfg5 {
433 pins = "GPIO21_AB3"; /* DAT31DIR */
434 ste,config = <&out_hi>;
435 };
436 };
437 };
438
439 mcde {
440 dsi_default_mode: dsi_default {
441 default_mux1 {
442 /* Mux in VSI0 used for DSI TE */
443 function = "lcd";
444 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
445 };
446 default_cfg1 {
447 pins = "GPIO68_E1"; /* VSI0 */
448 ste,config = <&in_nopull>;
449 };
450 };
451 };
452
453 /* Two GPIO lines used by the display */
454 display {
455 display_default_mode: display_default {
456 skomer_cfg1 {
457 /*
458 * OLED DETECT or check_pba, this appears to be high
459 * on "PBA" which I guess is "prototype board A".
460 */
461 pins = "GPIO93_B7";
462 ste,config = <&gpio_in_nopull>;
463 };
464 skomer_cfg2 {
465 pins = "GPIO139_C9";
466 /*
467 * MIPI_DSI0_RESET_N resets the display, leave high
468 * (de-asserted) so we only assert reset explicitly
469 * from the display driver.
470 */
471 ste,config = <&gpio_out_hi>;
472 };
473 };
474 };
475 backlight {
476 gpio_backlight_default_mode: backlight_default {
477 skomer_cfg1 {
478 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
479 ste,config = <&gpio_out_lo>;
480 };
481 };
482 };
483 /* GPIO that enables the 2.9V SD card level translator */
484 sd-level-translator {
485 sd_level_translator_default: sd_level_translator_default {
486 /* level shifter on GPIO87 */
487 skomer_cfg1 {
488 pins = "GPIO87_B3";
489 ste,config = <&gpio_out_hi>;
490 };
491 };
492 };
493 /* GPIO that enables the LDO regulator for the eMMC */
494 emmc-ldo {
495 emmc_ldo_en_default_mode: emmc_ldo_default {
496 /* LDO enable on GPIO223 */
497 skomer_cfg1 {
498 pins = "GPIO223_AH9";
499 ste,config = <&gpio_out_hi>;
500 };
501 };
502 };
503 /* GPIO keys */
504 gpio-keys {
505 gpio_keys_default_mode: gpio_keys_default {
506 skomer_cfg1 {
507 pins = "GPIO67_G2", /* VOL UP */
508 "GPIO91_B6", /* HOME */
509 "GPIO92_D6", /* VOL DOWN */
510 "GPIO204_AF23", /* MENU */
511 "GPIO205_AG23"; /* BACK */
512 ste,config = <&gpio_in_pu>;
513 };
514 };
515 };
516 /* Interrupt line for BMA254 */
517 bma254 {
518 bma254_skomer_default: bma254_skomer {
519 skomer_cfg1 {
520 pins = "GPIO224_AG9";
521 ste,config = <&gpio_in_pd>;
522 };
523 };
524 };
525 /* Interrupt line for light/proximity sensor GP2AP002 */
526 gp2ap002 {
527 gp2ap002_skomer_default: gp2ap002_skomer {
528 skomer_cfg1 {
529 pins = "GPIO146_D13";
530 ste,config = <&gpio_in_nopull>;
531 };
532 };
533 };
534 /* GPIO-based I2C bus for NCP6914 */
535 i2c-gpio-0 {
536 i2c_gpio_0_default: i2c_gpio_0 {
537 skomer_cfg1 {
538 pins = "GPIO143_D12", "GPIO144_B13";
539 ste,config = <&gpio_in_nopull>;
540 };
541 };
542 };
543 /* GPIO-based I2C bus for ALPS HSCD compass */
544 i2c-gpio-1 {
545 i2c_gpio_1_default: i2c_gpio_1 {
546 skomer_cfg1 {
547 pins = "GPIO151_B17", "GPIO152_D16";
548 ste,config = <&gpio_in_nopull>;
549 };
550 };
551 };
552 wlan {
553 wlan_default_mode: wlan_default {
554 skomer_cfg1 {
555 pins = "GPIO216_AG12";
556 ste,config = <&gpio_in_pd>;
557 };
558 };
559 wlan_en_default_mode: wlan_en_default {
560 skomer_cfg2 {
561 pins = "GPIO215_AH13";
562 ste,config = <&gpio_out_lo>;
563 };
564 };
565 };
566 bluetooth {
567 bluetooth_default_mode: bluetooth_default {
568 skomer_cfg1 {
569 pins = "GPIO199_AH23", "GPIO222_AJ9";
570 ste,config = <&gpio_out_lo>;
571 };
572 skomer_cfg2 {
573 pins = "GPIO97_D9";
574 ste,config = <&gpio_in_nopull>;
575 };
576 };
577 };
578 vibrator {
579 vibrator_default: vibrator_default {
580 skomer_cfg1 {
581 pins = "GPIO195_AG28"; /* MOT_EN */
582 ste,config = <&gpio_out_lo>;
583 };
584 };
585 };
586 /* Interrupt line for the Cypress TMA140 touchscreen */
587 touchscreen {
588 tma140_skomer_default: tma140_skomer {
589 skomer_cfg1 {
590 pins = "GPIO218_AH11";
591 ste,config = <&gpio_in_nopull>;
592 };
593 };
594 };
595};
596
597&ab8505_gpio {
598 /* Hog a few default settings */
599 pinctrl-names = "default";
600 pinctrl-0 = <&gpio_default>;
601
602 gpio {
603 gpio_default: gpio_default {
604 skomer_mux {
605 /* Change unused pins to GPIO mode */
606 function = "gpio";
607 groups = "gpio3_a_1", /* default: SysClkReq4 */
608 "gpio14_a_1"; /* default: PWMOut1 */
609 };
610 skomer_cfg1 {
611 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
612 bias-disable;
613 };
614 };
615 };
616};