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";
29 /* This zone will be polled by the battery temperature code */
31 polling-delay-passive = <0>;
32 thermal-sensors = <&bat_therm>;
36 temperature = <70000>;
44 bat_therm: thermistor {
45 compatible = "samsung,1404-001221";
46 io-channels = <&gpadc 0x02>; /* BatTemp */
47 pullup-uv = <1800000>;
48 pullup-ohm = <230000>;
50 #thermal-sensor-cells = <0>;
53 /* TI TXS0206 level translator for 2.9 V */
54 sd_level_translator: regulator-gpio {
55 compatible = "regulator-fixed";
58 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
61 regulator-name = "sd-level-translator";
62 regulator-min-microvolt = <2900000>;
63 regulator-max-microvolt = <2900000>;
64 regulator-type = "voltage";
66 startup-delay-us = <200>;
68 pinctrl-names = "default";
69 pinctrl-0 = <&sd_level_translator_default>;
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>;
81 pinctrl-names = "default";
82 pinctrl-0 = <&emmc_ldo_en_default_mode>;
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>;
92 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
94 pinctrl-names = "default";
95 pinctrl-0 = <&wlan_en_default_mode>;
99 compatible = "gpio-vibrator";
100 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
101 pinctrl-names = "default";
102 pinctrl-0 = <&vibrator_default>;
106 compatible = "gpio-keys";
107 pinctrl-names = "default";
108 pinctrl-0 = <&gpio_keys_default_mode>;
111 linux,code = <KEY_HOME>;
114 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
117 linux,code = <KEY_VOLUMEUP>;
120 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
123 linux,code = <KEY_VOLUMEDOWN>;
126 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
129 linux,code = <KEY_MENU>;
132 gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
135 linux,code = <KEY_BACK>;
138 gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
143 compatible = "kinetic,ktd253";
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>;
152 /* Richtek RT8515GQW Flash LED Driver IC */
154 compatible = "richtek,rt8515";
156 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
158 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
160 * RFS is 16 kOhm and RTS is 100 kOhm giving
161 * the flash max current 343mA and torch max
164 richtek,rfs-ohms = <16000>;
165 richtek,rts-ohms = <100000>;
166 pinctrl-names = "default";
167 pinctrl-0 = <&gpio_flash_default_mode>;
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>;
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>;
186 /* TODO: this should be used by the NCP6914 Camera power management unit */
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>;
198 compatible = "alps,hscdtd008a";
200 avdd-supply = <&ab8500_ldo_aux1_reg>;
201 dvdd-supply = <&ab8500_ldo_aux8_reg>;
206 // External Micro SD slot
208 arm,primecell-periphid = <0x10480180>;
209 max-frequency = <100000000>;
213 /* All direction control is used */
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>;
226 arm,primecell-periphid = <0x10480180>;
227 max-frequency = <50000000>;
231 vmmc-supply = <&wlan_en>;
232 pinctrl-names = "default", "sleep";
233 pinctrl-0 = <&mc1_a_2_default>;
234 pinctrl-1 = <&mc1_a_2_sleep>;
236 #address-cells = <1>;
240 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
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>;
252 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
255 arm,primecell-periphid = <0x10480180>;
256 max-frequency = <100000000>;
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>;
273 /* GBF (Bluetooth) UART */
275 pinctrl-names = "default", "sleep";
276 pinctrl-0 = <&u0_a_1_default>;
277 pinctrl-1 = <&u0_a_1_sleep>;
280 /* FIXME: not quite working yet, probably needs regulators */
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>;
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>;
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>;
315 /* Debugging console UART connected to AB8505 USB */
318 pinctrl-names = "default", "sleep";
319 pinctrl-0 = <&u2rxtx_c_1_default>;
320 pinctrl-1 = <&u2rxtx_c_1_sleep>;
326 pinctrl-names = "default", "sleep";
327 pinctrl-0 = <&usb_a_1_default>;
328 pinctrl-1 = <&usb_a_1_sleep>;
332 line-impedance-micro-ohms = <16000>;
337 /* Used for VDD for sensors */
338 regulator-name = "AUX1";
339 regulator-min-microvolt = <3000000>;
340 regulator-max-microvolt = <3300000>;
344 /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
345 regulator-name = "AUX2";
346 regulator-min-microvolt = <3000000>;
347 regulator-max-microvolt = <3000000>;
351 /* Used for voltage for external MMC/SD card */
352 regulator-name = "AUX3";
353 regulator-min-microvolt = <1100000>;
354 regulator-max-microvolt = <3300000>;
358 regulator-name = "AUX4";
359 /* Hammer to 3.0V for the display */
360 regulator-min-microvolt = <3000000>;
361 regulator-max-microvolt = <3000000>;
365 regulator-name = "AUX5";
366 /* Intended for 1V8 for touchscreen but actually left unused */
367 regulator-min-microvolt = <1050000>;
368 regulator-max-microvolt = <2790000>;
372 regulator-name = "AUX6";
373 /* Hammer to 1.8V for the display */
374 regulator-min-microvolt = <1800000>;
375 regulator-max-microvolt = <1800000>;
379 /* Mostly VIO for sensors */
380 regulator-name = "AUX8";
390 pinctrl-names = "default", "sleep";
391 pinctrl-0 = <&i2c0_a_1_default>;
392 pinctrl-1 = <&i2c0_a_1_sleep>;
395 compatible = "sharp,gp2ap002s00f";
396 clock-frequency = <400000>;
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>;
415 pinctrl-names = "default", "sleep";
416 pinctrl-0 = <&i2c2_b_2_default>;
417 pinctrl-1 = <&i2c2_b_2_sleep>;
420 compatible = "bosch,bma254";
421 clock-frequency = <400000>;
424 /* GPIO224 used as "smart alert" interrupt */
425 interrupt-parent = <&gpio7>;
426 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
428 mount-matrix = "0", "-1", "0",
431 vdd-supply = <&ab8500_ldo_aux1_reg>;
432 vddio-supply = <&ab8500_ldo_aux8_reg>;
433 pinctrl-names = "default";
434 pinctrl-0 = <&bma254_skomer_default>;
442 pinctrl-names = "default", "sleep";
443 pinctrl-0 = <&i2c3_c_2_default>;
444 pinctrl-1 = <&i2c3_c_2_sleep>;
446 /* Cypress CY8CTMA140 touchscreen */
448 compatible = "cypress,cy8ctma140";
449 clock-frequency = <400000>;
452 touchscreen-size-x = <480>;
453 touchscreen-size-y = <800>;
454 touchscreen-max-pressure = <255>;
456 /* GPIO218 for IRQ */
457 interrupt-parent = <&gpio6>;
458 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
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>;
465 pinctrl-names = "default";
466 pinctrl-0 = <&tma140_skomer_default>;
472 pinctrl-names = "default";
473 pinctrl-0 = <&dsi_default_mode>;
477 /* NT35510-based Hydis HVA40WV1 */
478 compatible = "hydis,hva40wv1", "novatek,nt35510";
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>;
485 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
486 pinctrl-names = "default";
487 pinctrl-0 = <&display_default_mode>;
488 backlight = <&ktd253>;
499 /* GPIO18, 19 & 20 unused so pull down */
500 ste,config = <&gpio_in_pd>;
505 /* This is a reset line for the eMMC */
509 pins = "GPIO130_C8"; /* FBCLK */
510 ste,config = <&gpio_in_pd>;
516 dsi_default_mode: dsi_default {
518 /* Mux in VSI0 used for DSI TE */
520 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
523 pins = "GPIO68_E1"; /* VSI0 */
524 ste,config = <&in_nopull>;
529 /* Two GPIO lines used by the display */
531 display_default_mode: display_default {
534 * OLED DETECT or check_pba, this appears to be high
535 * on "PBA" which I guess is "prototype board A".
538 ste,config = <&gpio_in_nopull>;
543 * MIPI_DSI0_RESET_N resets the display, leave high
544 * (de-asserted) so we only assert reset explicitly
545 * from the display driver.
547 ste,config = <&gpio_out_hi>;
552 gpio_backlight_default_mode: backlight_default {
554 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
555 ste,config = <&gpio_out_lo>;
560 gpio_flash_default_mode: flash_default {
562 pins = "GPIO140_B11", "GPIO141_C12";
563 ste,config = <&gpio_out_lo>;
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 */
573 ste,config = <&gpio_out_hi>;
577 /* GPIO that enables the LDO regulator for the eMMC */
579 emmc_ldo_en_default_mode: emmc_ldo_default {
580 /* LDO enable on GPIO223 */
582 pins = "GPIO223_AH9";
583 ste,config = <&gpio_out_hi>;
589 gpio_keys_default_mode: gpio_keys_default {
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>;
600 /* Interrupt line for BMA254 */
602 bma254_skomer_default: bma254_skomer {
604 pins = "GPIO224_AG9";
605 ste,config = <&gpio_in_pd>;
609 /* Interrupt line for light/proximity sensor GP2AP002 */
611 gp2ap002_skomer_default: gp2ap002_skomer {
613 pins = "GPIO146_D13";
614 ste,config = <&gpio_in_nopull>;
618 /* GPIO-based I2C bus for NCP6914 */
620 i2c_gpio_0_default: i2c_gpio_0 {
622 pins = "GPIO143_D12", "GPIO144_B13";
623 ste,config = <&gpio_in_nopull>;
627 /* GPIO-based I2C bus for ALPS HSCD compass */
629 i2c_gpio_1_default: i2c_gpio_1 {
631 pins = "GPIO151_B17", "GPIO152_D16";
632 ste,config = <&gpio_in_nopull>;
637 wlan_default_mode: wlan_default {
639 pins = "GPIO216_AG12";
640 ste,config = <&gpio_in_pd>;
643 wlan_en_default_mode: wlan_en_default {
645 pins = "GPIO215_AH13";
646 ste,config = <&gpio_out_lo>;
651 bluetooth_default_mode: bluetooth_default {
653 pins = "GPIO199_AH23", "GPIO222_AJ9";
654 ste,config = <&gpio_out_lo>;
658 ste,config = <&gpio_in_nopull>;
663 vibrator_default: vibrator_default {
665 pins = "GPIO195_AG28"; /* MOT_EN */
666 ste,config = <&gpio_out_lo>;
670 /* Interrupt line for the Cypress TMA140 touchscreen */
672 tma140_skomer_default: tma140_skomer {
674 pins = "GPIO218_AH11";
675 ste,config = <&gpio_in_nopull>;
680 g05ta03_skomer_default: g05ta03 {
681 /* Reset line, start out de-asserted */
683 pins = "GPIO209_AG15";
684 ste,config = <&gpio_out_hi>;
686 /* GPS_ON_OFF, start out deasserted (off) */
689 ste,config = <&gpio_out_lo>;
696 /* Hog a few default settings */
697 pinctrl-names = "default";
698 pinctrl-0 = <&gpio_default>;
701 gpio_default: gpio_default {
703 /* Change unused pins to GPIO mode */
705 groups = "gpio3_a_1", /* default: SysClkReq4 */
706 "gpio14_a_1"; /* default: PWMOut1 */
709 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";