1 // SPDX-License-Identifier: GPL-2.0-only
3 * Devicetree for the Samsung XCover 2 GT-S7710 also known as Skomer.
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>
16 model = "Samsung XCover 2 (GT-S7710)";
17 compatible = "samsung,skomer", "st-ericsson,u8500";
20 stdout-path = &serial2;
24 compatible = "samsung,eb485159lu";
27 /* TI TXS0206 level translator for 2.9 V */
28 sd_level_translator: regulator-gpio {
29 compatible = "regulator-fixed";
32 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
35 regulator-name = "sd-level-translator";
36 regulator-min-microvolt = <2900000>;
37 regulator-max-microvolt = <2900000>;
38 regulator-type = "voltage";
40 startup-delay-us = <200>;
42 pinctrl-names = "default";
43 pinctrl-0 = <&sd_level_translator_default>;
46 /* External LDO MIC5366-3.3YMT for eMMC */
47 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
48 compatible = "regulator-fixed";
49 regulator-name = "en-3v3-fixed-supply";
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
53 startup-delay-us = <5000>;
55 pinctrl-names = "default";
56 pinctrl-0 = <&emmc_ldo_en_default_mode>;
59 wlan_en: regulator-gpio-wlan-en {
60 compatible = "regulator-fixed";
61 regulator-name = "wl-reg-on";
62 regulator-min-microvolt = <3000000>;
63 regulator-max-microvolt = <3000000>;
64 startup-delay-us = <200000>;
66 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
68 pinctrl-names = "default";
69 pinctrl-0 = <&wlan_en_default_mode>;
73 compatible = "gpio-vibrator";
74 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
75 pinctrl-names = "default";
76 pinctrl-0 = <&vibrator_default>;
80 compatible = "gpio-keys";
81 pinctrl-names = "default";
82 pinctrl-0 = <&gpio_keys_default_mode>;
85 linux,code = <KEY_HOME>;
88 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_VOLUMEUP>;
94 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_VOLUMEDOWN>;
100 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
103 linux,code = <KEY_MENU>;
106 gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
109 linux,code = <KEY_BACK>;
112 gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
117 compatible = "kinetic,ktd253";
119 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
120 /* Default to 13/32 brightness */
121 default-brightness = <13>;
122 pinctrl-names = "default";
123 pinctrl-0 = <&gpio_backlight_default_mode>;
126 /* Richtek RT8515GQW Flash LED Driver IC */
128 compatible = "richtek,rt8515";
130 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
132 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
134 * RFS is 16 kOhm and RTS is 100 kOhm giving
135 * the flash max current 343mA and torch max
138 richtek,rfs-ohms = <16000>;
139 richtek,rts-ohms = <100000>;
140 pinctrl-names = "default";
141 pinctrl-0 = <&gpio_flash_default_mode>;
144 function = LED_FUNCTION_FLASH;
145 color = <LED_COLOR_ID_WHITE>;
146 flash-max-timeout-us = <250000>;
147 flash-max-microamp = <343750>;
148 led-max-microamp = <55000>;
153 compatible = "i2c-gpio";
154 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
155 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&i2c_gpio_0_default>;
158 #address-cells = <1>;
160 /* TODO: this should be used by the NCP6914 Camera power management unit */
164 compatible = "i2c-gpio";
165 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
166 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&i2c_gpio_1_default>;
169 #address-cells = <1>;
172 compatible = "alps,hscdtd008a";
174 avdd-supply = <&ab8500_ldo_aux1_reg>;
175 dvdd-supply = <&ab8500_ldo_aux8_reg>;
180 // External Micro SD slot
182 arm,primecell-periphid = <0x10480180>;
183 max-frequency = <100000000>;
187 /* All direction control is used */
190 vmmc-supply = <&ab8500_ldo_aux3_reg>;
191 vqmmc-supply = <&sd_level_translator>;
192 pinctrl-names = "default", "sleep";
193 pinctrl-0 = <&mc0_a_1_default>;
194 pinctrl-1 = <&mc0_a_1_sleep>;
200 arm,primecell-periphid = <0x10480180>;
201 max-frequency = <50000000>;
205 vmmc-supply = <&wlan_en>;
206 pinctrl-names = "default", "sleep";
207 pinctrl-0 = <&mc1_a_2_default>;
208 pinctrl-1 = <&mc1_a_2_sleep>;
210 #address-cells = <1>;
214 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
216 /* GPIO216 WL_HOST_WAKE */
217 interrupt-parent = <&gpio6>;
218 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
219 interrupt-names = "host-wake";
220 pinctrl-names = "default";
221 pinctrl-0 = <&wlan_default_mode>;
226 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
229 arm,primecell-periphid = <0x10480180>;
230 max-frequency = <100000000>;
237 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
238 post-power-on-delay-ms = <300>;
239 vmmc-supply = <&ldo_3v3_reg>;
240 pinctrl-names = "default", "sleep";
241 pinctrl-0 = <&mc2_a_1_default>;
242 pinctrl-1 = <&mc2_a_1_sleep>;
247 /* GBF (Bluetooth) UART */
249 pinctrl-names = "default", "sleep";
250 pinctrl-0 = <&u0_a_1_default>;
251 pinctrl-1 = <&u0_a_1_sleep>;
254 /* FIXME: not quite working yet, probably needs regulators */
256 /* BCM4334B0 actually */
257 compatible = "brcm,bcm4330-bt";
258 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
259 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
260 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
261 pinctrl-names = "default";
262 pinctrl-0 = <&bluetooth_default_mode>;
269 pinctrl-names = "default", "sleep";
270 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
271 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
274 /* Debugging console UART connected to AB8505 USB */
277 pinctrl-names = "default", "sleep";
278 pinctrl-0 = <&u2rxtx_c_1_default>;
279 pinctrl-1 = <&u2rxtx_c_1_sleep>;
285 pinctrl-names = "default", "sleep";
286 pinctrl-0 = <&usb_a_1_default>;
287 pinctrl-1 = <&usb_a_1_sleep>;
292 /* Used for VDD for sensors */
293 regulator-name = "AUX1";
294 regulator-min-microvolt = <3000000>;
295 regulator-max-microvolt = <3300000>;
299 /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
300 regulator-name = "AUX2";
301 regulator-min-microvolt = <3000000>;
302 regulator-max-microvolt = <3000000>;
306 /* Used for voltage for external MMC/SD card */
307 regulator-name = "AUX3";
308 regulator-min-microvolt = <1100000>;
309 regulator-max-microvolt = <3300000>;
313 regulator-name = "AUX4";
314 /* Hammer to 3.0V for the display */
315 regulator-min-microvolt = <3000000>;
316 regulator-max-microvolt = <3000000>;
320 regulator-name = "AUX5";
321 /* Intended for 1V8 for touchscreen but actually left unused */
322 regulator-min-microvolt = <1050000>;
323 regulator-max-microvolt = <2790000>;
327 regulator-name = "AUX6";
328 /* Hammer to 1.8V for the display */
329 regulator-min-microvolt = <1800000>;
330 regulator-max-microvolt = <1800000>;
334 /* Mostly VIO for sensors */
335 regulator-name = "AUX8";
345 pinctrl-names = "default", "sleep";
346 pinctrl-0 = <&i2c0_a_1_default>;
347 pinctrl-1 = <&i2c0_a_1_sleep>;
350 compatible = "sharp,gp2ap002s00f";
351 clock-frequency = <400000>;
354 interrupt-parent = <&gpio4>;
355 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
356 vdd-supply = <&ab8500_ldo_aux1_reg>;
357 vio-supply = <&ab8500_ldo_aux8_reg>;
358 pinctrl-names = "default";
359 pinctrl-0 = <&gp2ap002_skomer_default>;
360 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
361 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
370 pinctrl-names = "default", "sleep";
371 pinctrl-0 = <&i2c2_b_2_default>;
372 pinctrl-1 = <&i2c2_b_2_sleep>;
375 compatible = "bosch,bma254";
376 clock-frequency = <400000>;
379 /* GPIO224 used as "smart alert" interrupt */
380 interrupt-parent = <&gpio7>;
381 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
383 mount-matrix = "0", "-1", "0",
386 vdd-supply = <&ab8500_ldo_aux1_reg>;
387 vddio-supply = <&ab8500_ldo_aux8_reg>;
388 pinctrl-names = "default";
389 pinctrl-0 = <&bma254_skomer_default>;
397 pinctrl-names = "default", "sleep";
398 pinctrl-0 = <&i2c3_c_2_default>;
399 pinctrl-1 = <&i2c3_c_2_sleep>;
401 /* Cypress CY8CTMA140 touchscreen */
403 compatible = "cypress,cy8ctma140";
404 clock-frequency = <400000>;
407 touchscreen-size-x = <480>;
408 touchscreen-size-y = <800>;
409 touchscreen-max-pressure = <255>;
411 /* GPIO218 for IRQ */
412 interrupt-parent = <&gpio6>;
413 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
415 /* VDD is "digital supply" nominally 1.71-3.6V */
416 vdd-supply = <&ab8500_ldo_aux2_reg>;
417 /* VCPIN is "analog supply", 2.7-3.6 V */
418 vcpin-supply = <&ab8500_ldo_aux2_reg>;
420 pinctrl-names = "default";
421 pinctrl-0 = <&tma140_skomer_default>;
427 pinctrl-names = "default";
428 pinctrl-0 = <&dsi_default_mode>;
432 /* NT35510-based Hydis HVA40WV1 */
433 compatible = "hydis,hva40wv1", "novatek,nt35510";
435 /* v_lcd_3v0 2.3-4.8V */
436 vdd-supply = <&ab8500_ldo_aux4_reg>;
437 /* v_lcd_1v8 1.65-3.3V */
438 vddi-supply = <&ab8500_ldo_aux6_reg>;
440 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
441 pinctrl-names = "default";
442 pinctrl-0 = <&display_default_mode>;
443 backlight = <&ktd253>;
454 /* GPIO18, 19 & 20 unused so pull down */
455 ste,config = <&gpio_in_pd>;
460 /* This is a reset line for the eMMC */
464 pins = "GPIO130_C8"; /* FBCLK */
465 ste,config = <&gpio_in_pd>;
471 dsi_default_mode: dsi_default {
473 /* Mux in VSI0 used for DSI TE */
475 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
478 pins = "GPIO68_E1"; /* VSI0 */
479 ste,config = <&in_nopull>;
484 /* Two GPIO lines used by the display */
486 display_default_mode: display_default {
489 * OLED DETECT or check_pba, this appears to be high
490 * on "PBA" which I guess is "prototype board A".
493 ste,config = <&gpio_in_nopull>;
498 * MIPI_DSI0_RESET_N resets the display, leave high
499 * (de-asserted) so we only assert reset explicitly
500 * from the display driver.
502 ste,config = <&gpio_out_hi>;
507 gpio_backlight_default_mode: backlight_default {
509 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
510 ste,config = <&gpio_out_lo>;
515 gpio_flash_default_mode: flash_default {
517 pins = "GPIO140_B11", "GPIO141_C12";
518 ste,config = <&gpio_out_lo>;
522 /* GPIO that enables the 2.9V SD card level translator */
523 sd-level-translator {
524 sd_level_translator_default: sd_level_translator_default {
525 /* level shifter on GPIO87 */
528 ste,config = <&gpio_out_hi>;
532 /* GPIO that enables the LDO regulator for the eMMC */
534 emmc_ldo_en_default_mode: emmc_ldo_default {
535 /* LDO enable on GPIO223 */
537 pins = "GPIO223_AH9";
538 ste,config = <&gpio_out_hi>;
544 gpio_keys_default_mode: gpio_keys_default {
546 pins = "GPIO67_G2", /* VOL UP */
547 "GPIO91_B6", /* HOME */
548 "GPIO92_D6", /* VOL DOWN */
549 "GPIO204_AF23", /* MENU */
550 "GPIO205_AG23"; /* BACK */
551 ste,config = <&gpio_in_pu>;
555 /* Interrupt line for BMA254 */
557 bma254_skomer_default: bma254_skomer {
559 pins = "GPIO224_AG9";
560 ste,config = <&gpio_in_pd>;
564 /* Interrupt line for light/proximity sensor GP2AP002 */
566 gp2ap002_skomer_default: gp2ap002_skomer {
568 pins = "GPIO146_D13";
569 ste,config = <&gpio_in_nopull>;
573 /* GPIO-based I2C bus for NCP6914 */
575 i2c_gpio_0_default: i2c_gpio_0 {
577 pins = "GPIO143_D12", "GPIO144_B13";
578 ste,config = <&gpio_in_nopull>;
582 /* GPIO-based I2C bus for ALPS HSCD compass */
584 i2c_gpio_1_default: i2c_gpio_1 {
586 pins = "GPIO151_B17", "GPIO152_D16";
587 ste,config = <&gpio_in_nopull>;
592 wlan_default_mode: wlan_default {
594 pins = "GPIO216_AG12";
595 ste,config = <&gpio_in_pd>;
598 wlan_en_default_mode: wlan_en_default {
600 pins = "GPIO215_AH13";
601 ste,config = <&gpio_out_lo>;
606 bluetooth_default_mode: bluetooth_default {
608 pins = "GPIO199_AH23", "GPIO222_AJ9";
609 ste,config = <&gpio_out_lo>;
613 ste,config = <&gpio_in_nopull>;
618 vibrator_default: vibrator_default {
620 pins = "GPIO195_AG28"; /* MOT_EN */
621 ste,config = <&gpio_out_lo>;
625 /* Interrupt line for the Cypress TMA140 touchscreen */
627 tma140_skomer_default: tma140_skomer {
629 pins = "GPIO218_AH11";
630 ste,config = <&gpio_in_nopull>;
637 /* Hog a few default settings */
638 pinctrl-names = "default";
639 pinctrl-0 = <&gpio_default>;
642 gpio_default: gpio_default {
644 /* Change unused pins to GPIO mode */
646 groups = "gpio3_a_1", /* default: SysClkReq4 */
647 "gpio14_a_1"; /* default: PWMOut1 */
650 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";