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 */
194 vmmc-supply = <&ab8500_ldo_aux3_reg>;
195 vqmmc-supply = <&sd_level_translator>;
196 pinctrl-names = "default", "sleep";
197 pinctrl-0 = <&mc0_a_1_default>;
198 pinctrl-1 = <&mc0_a_1_sleep>;
204 arm,primecell-periphid = <0x10480180>;
205 max-frequency = <50000000>;
209 vmmc-supply = <&wlan_en>;
210 pinctrl-names = "default", "sleep";
211 pinctrl-0 = <&mc1_a_2_default>;
212 pinctrl-1 = <&mc1_a_2_sleep>;
214 #address-cells = <1>;
218 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
220 /* GPIO216 WL_HOST_WAKE */
221 interrupt-parent = <&gpio6>;
222 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
223 interrupt-names = "host-wake";
224 pinctrl-names = "default";
225 pinctrl-0 = <&wlan_default_mode>;
230 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
233 arm,primecell-periphid = <0x10480180>;
234 max-frequency = <100000000>;
241 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
242 post-power-on-delay-ms = <300>;
243 vmmc-supply = <&ldo_3v3_reg>;
244 pinctrl-names = "default", "sleep";
245 pinctrl-0 = <&mc2_a_1_default>;
246 pinctrl-1 = <&mc2_a_1_sleep>;
251 /* GBF (Bluetooth) UART */
253 pinctrl-names = "default", "sleep";
254 pinctrl-0 = <&u0_a_1_default>;
255 pinctrl-1 = <&u0_a_1_sleep>;
258 /* FIXME: not quite working yet, probably needs regulators */
260 /* BCM4334B0 actually */
261 compatible = "brcm,bcm4330-bt";
262 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
263 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
264 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&bluetooth_default_mode>;
273 pinctrl-names = "default", "sleep";
274 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
275 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
278 /* Debugging console UART connected to AB8505 USB */
281 pinctrl-names = "default", "sleep";
282 pinctrl-0 = <&u2rxtx_c_1_default>;
283 pinctrl-1 = <&u2rxtx_c_1_sleep>;
289 pinctrl-names = "default", "sleep";
290 pinctrl-0 = <&usb_a_1_default>;
291 pinctrl-1 = <&usb_a_1_sleep>;
296 /* Used for VDD for sensors */
297 regulator-name = "AUX1";
298 regulator-min-microvolt = <3000000>;
299 regulator-max-microvolt = <3300000>;
303 /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
304 regulator-name = "AUX2";
305 regulator-min-microvolt = <3000000>;
306 regulator-max-microvolt = <3000000>;
310 /* Used for voltage for external MMC/SD card */
311 regulator-name = "AUX3";
312 regulator-min-microvolt = <1100000>;
313 regulator-max-microvolt = <3300000>;
317 regulator-name = "AUX4";
318 /* Hammer to 3.0V for the display */
319 regulator-min-microvolt = <3000000>;
320 regulator-max-microvolt = <3000000>;
324 regulator-name = "AUX5";
325 /* Intended for 1V8 for touchscreen but actually left unused */
326 regulator-min-microvolt = <1050000>;
327 regulator-max-microvolt = <2790000>;
331 regulator-name = "AUX6";
332 /* Hammer to 1.8V for the display */
333 regulator-min-microvolt = <1800000>;
334 regulator-max-microvolt = <1800000>;
338 /* Mostly VIO for sensors */
339 regulator-name = "AUX8";
349 pinctrl-names = "default", "sleep";
350 pinctrl-0 = <&i2c0_a_1_default>;
351 pinctrl-1 = <&i2c0_a_1_sleep>;
354 compatible = "sharp,gp2ap002s00f";
355 clock-frequency = <400000>;
358 interrupt-parent = <&gpio4>;
359 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
360 vdd-supply = <&ab8500_ldo_aux1_reg>;
361 vio-supply = <&ab8500_ldo_aux8_reg>;
362 pinctrl-names = "default";
363 pinctrl-0 = <&gp2ap002_skomer_default>;
364 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
365 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
374 pinctrl-names = "default", "sleep";
375 pinctrl-0 = <&i2c2_b_2_default>;
376 pinctrl-1 = <&i2c2_b_2_sleep>;
379 compatible = "bosch,bma254";
380 clock-frequency = <400000>;
383 /* GPIO224 used as "smart alert" interrupt */
384 interrupt-parent = <&gpio7>;
385 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
387 mount-matrix = "0", "-1", "0",
390 vdd-supply = <&ab8500_ldo_aux1_reg>;
391 vddio-supply = <&ab8500_ldo_aux8_reg>;
392 pinctrl-names = "default";
393 pinctrl-0 = <&bma254_skomer_default>;
401 pinctrl-names = "default", "sleep";
402 pinctrl-0 = <&i2c3_c_2_default>;
403 pinctrl-1 = <&i2c3_c_2_sleep>;
405 /* Cypress CY8CTMA140 touchscreen */
407 compatible = "cypress,cy8ctma140";
408 clock-frequency = <400000>;
411 touchscreen-size-x = <480>;
412 touchscreen-size-y = <800>;
413 touchscreen-max-pressure = <255>;
415 /* GPIO218 for IRQ */
416 interrupt-parent = <&gpio6>;
417 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
419 /* VDD is "digital supply" nominally 1.71-3.6V */
420 vdd-supply = <&ab8500_ldo_aux2_reg>;
421 /* VCPIN is "analog supply", 2.7-3.6 V */
422 vcpin-supply = <&ab8500_ldo_aux2_reg>;
424 pinctrl-names = "default";
425 pinctrl-0 = <&tma140_skomer_default>;
431 pinctrl-names = "default";
432 pinctrl-0 = <&dsi_default_mode>;
436 /* NT35510-based Hydis HVA40WV1 */
437 compatible = "hydis,hva40wv1", "novatek,nt35510";
439 /* v_lcd_3v0 2.3-4.8V */
440 vdd-supply = <&ab8500_ldo_aux4_reg>;
441 /* v_lcd_1v8 1.65-3.3V */
442 vddi-supply = <&ab8500_ldo_aux6_reg>;
444 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
445 pinctrl-names = "default";
446 pinctrl-0 = <&display_default_mode>;
447 backlight = <&ktd253>;
458 /* GPIO18, 19 & 20 unused so pull down */
459 ste,config = <&gpio_in_pd>;
464 /* This is a reset line for the eMMC */
468 pins = "GPIO130_C8"; /* FBCLK */
469 ste,config = <&gpio_in_pd>;
475 dsi_default_mode: dsi_default {
477 /* Mux in VSI0 used for DSI TE */
479 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
482 pins = "GPIO68_E1"; /* VSI0 */
483 ste,config = <&in_nopull>;
488 /* Two GPIO lines used by the display */
490 display_default_mode: display_default {
493 * OLED DETECT or check_pba, this appears to be high
494 * on "PBA" which I guess is "prototype board A".
497 ste,config = <&gpio_in_nopull>;
502 * MIPI_DSI0_RESET_N resets the display, leave high
503 * (de-asserted) so we only assert reset explicitly
504 * from the display driver.
506 ste,config = <&gpio_out_hi>;
511 gpio_backlight_default_mode: backlight_default {
513 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
514 ste,config = <&gpio_out_lo>;
519 gpio_flash_default_mode: flash_default {
521 pins = "GPIO140_B11", "GPIO141_C12";
522 ste,config = <&gpio_out_lo>;
526 /* GPIO that enables the 2.9V SD card level translator */
527 sd-level-translator {
528 sd_level_translator_default: sd_level_translator_default {
529 /* level shifter on GPIO87 */
532 ste,config = <&gpio_out_hi>;
536 /* GPIO that enables the LDO regulator for the eMMC */
538 emmc_ldo_en_default_mode: emmc_ldo_default {
539 /* LDO enable on GPIO223 */
541 pins = "GPIO223_AH9";
542 ste,config = <&gpio_out_hi>;
548 gpio_keys_default_mode: gpio_keys_default {
550 pins = "GPIO67_G2", /* VOL UP */
551 "GPIO91_B6", /* HOME */
552 "GPIO92_D6", /* VOL DOWN */
553 "GPIO204_AF23", /* MENU */
554 "GPIO205_AG23"; /* BACK */
555 ste,config = <&gpio_in_pu>;
559 /* Interrupt line for BMA254 */
561 bma254_skomer_default: bma254_skomer {
563 pins = "GPIO224_AG9";
564 ste,config = <&gpio_in_pd>;
568 /* Interrupt line for light/proximity sensor GP2AP002 */
570 gp2ap002_skomer_default: gp2ap002_skomer {
572 pins = "GPIO146_D13";
573 ste,config = <&gpio_in_nopull>;
577 /* GPIO-based I2C bus for NCP6914 */
579 i2c_gpio_0_default: i2c_gpio_0 {
581 pins = "GPIO143_D12", "GPIO144_B13";
582 ste,config = <&gpio_in_nopull>;
586 /* GPIO-based I2C bus for ALPS HSCD compass */
588 i2c_gpio_1_default: i2c_gpio_1 {
590 pins = "GPIO151_B17", "GPIO152_D16";
591 ste,config = <&gpio_in_nopull>;
596 wlan_default_mode: wlan_default {
598 pins = "GPIO216_AG12";
599 ste,config = <&gpio_in_pd>;
602 wlan_en_default_mode: wlan_en_default {
604 pins = "GPIO215_AH13";
605 ste,config = <&gpio_out_lo>;
610 bluetooth_default_mode: bluetooth_default {
612 pins = "GPIO199_AH23", "GPIO222_AJ9";
613 ste,config = <&gpio_out_lo>;
617 ste,config = <&gpio_in_nopull>;
622 vibrator_default: vibrator_default {
624 pins = "GPIO195_AG28"; /* MOT_EN */
625 ste,config = <&gpio_out_lo>;
629 /* Interrupt line for the Cypress TMA140 touchscreen */
631 tma140_skomer_default: tma140_skomer {
633 pins = "GPIO218_AH11";
634 ste,config = <&gpio_in_nopull>;
641 /* Hog a few default settings */
642 pinctrl-names = "default";
643 pinctrl-0 = <&gpio_default>;
646 gpio_default: gpio_default {
648 /* Change unused pins to GPIO mode */
650 groups = "gpio3_a_1", /* default: SysClkReq4 */
651 "gpio14_a_1"; /* default: PWMOut1 */
654 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";