1 // SPDX-License-Identifier: GPL-2.0-only
3 * Devicetree for the Samsung Galaxy Exhibit SGH-T599 also known as Codina-TMO,
4 * the "TMO" shall be read "T-Mobile" as this phone was produced exlusively
5 * for T-Mobile in the United States.
7 * This phone is closely related to the Codina, but has:
8 * - No CPU speed cap, full ~1GHz rate
9 * - Different power management IC, AB8505
10 * - As AB8505 has a micro USB phy, no TI TSU6111
11 * - Different power routing such as the removal of the external LDO for the
12 * touchscreen in favor of using the AB8505
13 * - Using a regulator for the key backlight LED
14 * - Using the Samsung S6D27A1 panel by default
15 * - The panel is using one of the ordinary AB8505 regulators for 1.8V
16 * - WiFi/Bluetooth combi chip upgraded to BCM4334
17 * - GPIO for backlight control moved from 68 to 69
21 #include "ste-db8500.dtsi"
22 #include "ste-ab8505.dtsi"
23 #include "ste-dbx5x0-pinctrl.dtsi"
24 #include <dt-bindings/gpio/gpio.h>
25 #include <dt-bindings/leds/common.h>
26 #include <dt-bindings/input/input.h>
27 #include <dt-bindings/interrupt-controller/irq.h>
30 model = "Samsung Galaxy Exhibit (SGH-T599)";
31 compatible = "samsung,codina-tmo", "st-ericsson,u8500";
34 stdout-path = &serial2;
38 compatible = "samsung,eb425161lu";
43 /* This zone will be polled by the battery temperature code */
45 polling-delay-passive = <0>;
46 thermal-sensors = <&bat_therm>;
50 temperature = <70000>;
58 bat_therm: thermistor {
59 compatible = "samsung,1404-001221";
60 io-channels = <&gpadc 0x02>; /* BatTemp */
61 pullup-uv = <1800000>;
62 pullup-ohm = <230000>;
64 #thermal-sensor-cells = <0>;
67 /* TI TXS0206 level translator for 2.9 V */
68 sd_level_translator: regulator-gpio {
69 compatible = "regulator-fixed";
72 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
75 regulator-name = "sd-level-translator";
76 regulator-min-microvolt = <2900000>;
77 regulator-max-microvolt = <2900000>;
78 regulator-type = "voltage";
80 startup-delay-us = <200>;
82 pinctrl-names = "default";
83 pinctrl-0 = <&sd_level_translator_default>;
86 /* External LDO MIC5366-3.3YMT for eMMC */
87 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
88 compatible = "regulator-fixed";
89 /* Supplied in turn by VBAT */
90 regulator-name = "VMEM_3V3";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
93 gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
94 startup-delay-us = <5000>;
96 pinctrl-names = "default";
97 pinctrl-0 = <&emmc_ldo_en_default_mode>;
101 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
102 * LCD_PWR_EN controls both the 3.0V output.
104 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
105 compatible = "regulator-fixed";
106 /* Supplied in turn by VBAT */
107 regulator-name = "VREG_LCD_3.0V";
108 regulator-min-microvolt = <3000000>;
109 regulator-max-microvolt = <3000000>;
110 /* GPIO219 controls this regulator */
111 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
113 pinctrl-names = "default";
114 pinctrl-0 = <&lcd_pwr_en_default_mode>;
118 * This regulator is a GPIO line that drives the Broadcom WLAN
119 * line WL_REG_ON high and enables the internal regulators
120 * inside the chip. Unfortunatley it is erroneously named
121 * WLAN_RST_N on the schematic but it is not a reset line.
123 * The voltage specified here is only used to determine the OCR mask,
124 * the for the SDIO connector, the chip is actually connected
127 wl_reg: regulator-gpio-wlan {
128 compatible = "regulator-fixed";
129 regulator-name = "WL_REG_ON";
130 regulator-min-microvolt = <3000000>;
131 regulator-max-microvolt = <3000000>;
132 startup-delay-us = <100000>;
133 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
134 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&wlan_ldo_en_default>;
141 compatible = "gpio-vibrator";
142 /* GPIO195 "MOT_EN" */
143 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&vibrator_default>;
149 compatible = "gpio-keys";
150 pinctrl-names = "default";
151 pinctrl-0 = <&gpio_keys_default_mode>;
154 linux,code = <KEY_HOME>;
157 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
160 linux,code = <KEY_VOLUMEUP>;
163 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
166 linux,code = <KEY_VOLUMEDOWN>;
169 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
174 compatible = "regulator-led";
175 vled-supply = <&ab8500_ldo_aux4_reg>; // 3.3V
176 default-state = "on";
177 function = LED_FUNCTION_KBD_BACKLIGHT;
178 color = <LED_COLOR_ID_WHITE>;
182 compatible = "kinetic,ktd253";
183 /* GPIO69 is used on Codina R0.4 and Codina TMO */
184 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
185 /* Default to 13/32 brightness */
186 default-brightness = <13>;
187 pinctrl-names = "default";
188 pinctrl-0 = <&ktd253_backlight_default_mode>;
191 /* Richtek RT8515GQW Flash LED Driver IC */
193 compatible = "richtek,rt8515";
195 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
197 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
199 * RFS is 16 kOhm and RTS is 100 kOhm giving
200 * the flash max current 343mA and torch max
203 richtek,rfs-ohms = <16000>;
204 richtek,rts-ohms = <100000>;
205 pinctrl-names = "default";
206 pinctrl-0 = <&gpio_flash_default_mode>;
209 function = LED_FUNCTION_FLASH;
210 color = <LED_COLOR_ID_WHITE>;
211 flash-max-timeout-us = <250000>;
212 flash-max-microamp = <343750>;
213 led-max-microamp = <55000>;
217 /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
219 compatible = "i2c-gpio";
220 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
221 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
222 pinctrl-names = "default";
223 pinctrl-0 = <&i2c_gpio_0_default>;
224 #address-cells = <1>;
227 /* TODO: this should also be used by the SM5103 Camera power management unit */
230 /* Bit-banged I2C on GPIO151 and GPIO152 also called "COMP I2C" */
232 compatible = "i2c-gpio";
233 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
234 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
235 pinctrl-names = "default";
236 pinctrl-0 = <&i2c_gpio_1_default>;
237 #address-cells = <1>;
241 compatible = "alps,hscdtd008a";
243 clock-frequency = <400000>;
245 avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
246 dvdd-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
251 compatible = "spi-gpio";
252 /* Clock on GPIO220, pin SCL */
253 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
254 /* MOSI on GPIO224, pin SDI "slave data in" */
255 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
256 /* MISO on GPIO225, pin SDO "slave data out" */
257 miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
258 /* Chip select on GPIO201 */
259 cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
260 num-chipselects = <1>;
262 pinctrl-names = "default";
263 pinctrl-0 = <&spi_gpio_0_default>;
264 #address-cells = <1>;
268 compatible = "samsung,s6d27a1";
269 spi-max-frequency = <1200000>;
270 /* TYPE 3: inverse clock polarity and phase */
275 vci-supply = <&lcd_3v0_reg>;
276 vccio-supply = <&ab8500_ldo_aux6_reg>;
278 /* Reset on GPIO139 */
279 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
280 /* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */
281 interrupt-parent = <&gpio2>;
282 interrupts = <29 IRQ_TYPE_EDGE_RISING>;
284 pinctrl-names = "default";
285 pinctrl-0 = <&panel_default_mode>;
286 backlight = <&ktd253>;
290 remote-endpoint = <&display_out>;
297 /* External Micro SD slot */
299 arm,primecell-periphid = <0x10480180>;
300 max-frequency = <100000000>;
306 /* MMC is powered by AUX3 1.2V .. 2.91V */
307 vmmc-supply = <&ab8500_ldo_aux3_reg>;
308 /* 2.9 V level translator is using AUX3 at 2.9 V as well */
309 vqmmc-supply = <&sd_level_translator>;
310 pinctrl-names = "default", "sleep";
311 pinctrl-0 = <&mc0_a_2_default>;
312 pinctrl-1 = <&mc0_a_2_sleep>;
313 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
317 /* WLAN SDIO channel */
319 arm,primecell-periphid = <0x10480180>;
320 max-frequency = <50000000>;
324 pinctrl-names = "default", "sleep";
325 pinctrl-0 = <&mc1_a_2_default>;
326 pinctrl-1 = <&mc1_a_2_sleep>;
328 * GPIO-controlled voltage enablement: this drives
329 * the WL_REG_ON line high when we use this device.
330 * Represented as regulator to fill OCR mask.
332 vmmc-supply = <&wl_reg>;
334 #address-cells = <1>;
339 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
341 /* GPIO216 WL_HOST_WAKE */
342 interrupt-parent = <&gpio6>;
343 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
344 interrupt-names = "host-wake";
345 pinctrl-names = "default";
346 pinctrl-0 = <&wlan_default_mode>;
352 arm,primecell-periphid = <0x10480180>;
353 max-frequency = <100000000>;
360 vmmc-supply = <&ldo_3v3_reg>;
361 pinctrl-names = "default", "sleep";
363 * GPIO130 will be set to input no pull-up resulting in a resistor
364 * pulling the reset high and taking the memory out of reset.
366 pinctrl-0 = <&mc2_a_1_default>;
367 pinctrl-1 = <&mc2_a_1_sleep>;
371 /* GBF (Bluetooth) UART */
373 pinctrl-names = "default", "sleep";
374 pinctrl-0 = <&u0_a_1_default>;
375 pinctrl-1 = <&u0_a_1_sleep>;
379 /* BCM4334B0 actually */
380 compatible = "brcm,bcm4330-bt";
381 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
382 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
383 /* BT_WAKE on GPIO199 */
384 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
385 /* BT_HOST_WAKE on GPIO97 */
386 /* FIXME: convert to interrupt */
387 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
388 /* BT_RST_N on GPIO209 */
389 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
390 pinctrl-names = "default";
391 pinctrl-0 = <&bluetooth_default_mode>;
398 pinctrl-names = "default", "sleep";
399 /* CTS/RTS is not used, CTS is repurposed as GPIO */
400 pinctrl-0 = <&u1rxtx_a_1_default>;
401 pinctrl-1 = <&u1rxtx_a_1_sleep>;
402 /* FIXME: add a device for the GPS here */
405 /* Debugging console UART connected to AB8505 */
408 pinctrl-names = "default", "sleep";
409 pinctrl-0 = <&u2rxtx_c_1_default>;
410 pinctrl-1 = <&u2rxtx_c_1_sleep>;
416 pinctrl-names = "default", "sleep";
417 pinctrl-0 = <&usb_a_1_default>;
418 pinctrl-1 = <&usb_a_1_sleep>;
422 line-impedance-micro-ohms = <36000>;
425 /* This is mostly identical to the Codina v0.4 regulators */
428 regulator-name = "v-sensors-vdd";
429 regulator-min-microvolt = <3000000>;
430 regulator-max-microvolt = <3300000>;
434 regulator-name = "v-aux2";
435 regulator-min-microvolt = <3300000>;
436 regulator-max-microvolt = <3300000>;
440 regulator-name = "v-mmc-sd";
444 regulator-name = "v-aux4";
446 * Providing some span here makes the touchkey
447 * LEDs actually dimmable.
449 regulator-min-microvolt = <1100000>;
450 regulator-max-microvolt = <3300000>;
454 regulator-name = "v-aux5";
455 regulator-min-microvolt = <1800000>;
456 regulator-max-microvolt = <1800000>;
460 /* 1.8 V to the display */
461 regulator-name = "v-aux6";
462 regulator-min-microvolt = <1800000>;
463 regulator-max-microvolt = <1800000>;
467 regulator-name = "v-sensors-vio";
473 /* I2C0 also known as "AGC I2C" */
476 pinctrl-names = "default", "sleep";
477 pinctrl-0 = <&i2c0_a_1_default>;
478 pinctrl-1 = <&i2c0_a_1_sleep>;
481 /* Codina has the Amstaos TMD2672 */
482 compatible = "amstaos,tmd2672";
483 clock-frequency = <400000>;
486 /* IRQ on GPIO146 "PS_INT" */
487 interrupt-parent = <&gpio4>;
488 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
489 vdd-supply = <&ab8500_ldo_aux1_reg>;
490 vddio-supply = <&ab8500_ldo_aux8_reg>;
491 pinctrl-names = "default";
492 pinctrl-0 = <&tmd2672_codina_default>;
496 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
499 pinctrl-names = "default", "sleep";
500 pinctrl-0 = <&i2c2_b_2_default>;
501 pinctrl-1 = <&i2c2_b_2_sleep>;
503 /* Bosch BMA254 accelerometer */
505 compatible = "bosch,bma254";
507 mount-matrix = "0", "1", "0",
510 vddio-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
511 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
519 pinctrl-names = "default", "sleep";
520 pinctrl-0 = <&i2c3_c_2_default>;
521 pinctrl-1 = <&i2c3_c_2_sleep>;
523 /* TODO: write bindings and driver for this touchscreen */
525 /* Zinitix BT404 ISP part */
527 compatible = "zinitix,bt404-isp";
529 pinctrl-names = "default";
530 pinctrl-0 = <&tsp_default>;
533 /* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */
535 compatible = "zinitix,bt404";
537 /* GPIO218 (TSP_INT_1V8) */
538 interrupt-parent = <&gpio6>;
539 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
540 vcca-supply = <&ab8500_ldo_aux2_reg>; // 3.3V
541 vdd-supply = <&ab8500_ldo_aux5_reg>; // 1.8V
543 touchscreen-size-x = <480>;
544 touchscreen-size-y = <800>;
545 pinctrl-names = "default";
546 pinctrl-0 = <&tsp_default>;
552 pinctrl-names = "default";
553 pinctrl-0 = <&dpi_default_mode>;
556 display_out: endpoint {
557 remote-endpoint = <&panel_in>;
566 * This extends the MC0_A_2 default config to include
567 * the card detect GPIO217 line.
572 pins = "GPIO217_AH12"; /* card detect */
573 ste,config = <&gpio_in_pd>;
579 * GPIO130 should be set in GPIO mode and
580 * pulled down. (Not connected.)
584 pins = "GPIO130_C8"; /* FBCLK */
585 ste,config = <&gpio_in_pd>;
589 /* GPIO that enables the 2.9V SD card level translator */
590 sd-level-translator {
591 sd_level_translator_default: sd_level_translator_default {
592 /* level shifter on GPIO87 */
595 ste,config = <&gpio_out_hi>;
599 /* GPIO that enables the LDO regulator for the eMMC */
601 emmc_ldo_en_default_mode: emmc_ldo_default {
602 /* LDO enable on GPIO223 */
604 pins = "GPIO223_AH9";
605 ste,config = <&gpio_out_hi>;
609 /* GPIOs for panel control */
611 panel_default_mode: panel_default {
615 ste,config = <&gpio_out_lo>;
618 /* ESD IRQ line "LCD detect" */
620 ste,config = <&gpio_in_nopull>;
624 /* GPIO that enables the LDO regulator for the LCD display */
626 lcd_pwr_en_default_mode: lcd_pwr_en_default {
627 /* LCD_PWR_EN on GPIO219 */
629 pins = "GPIO219_AG10";
630 ste,config = <&gpio_out_hi>;
634 /* GPIO that enables the WLAN internal LDO regulators */
636 wlan_ldo_en_default: wlan_ldo_default {
637 /* GPIO215 named WLAN_RST_N */
639 pins = "GPIO215_AH13";
640 ste,config = <&gpio_out_lo>;
646 ktd253_backlight_default_mode: backlight_default {
648 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
649 ste,config = <&gpio_out_lo>;
653 /* Flash and torch */
655 gpio_flash_default_mode: flash_default {
657 pins = "GPIO140_B11", "GPIO141_C12";
658 ste,config = <&gpio_out_lo>;
664 gpio_keys_default_mode: gpio_keys_default {
666 pins = "GPIO67_G2", /* VOL UP */
667 "GPIO91_B6", /* HOME */
668 "GPIO92_D6"; /* VOL DOWN */
669 ste,config = <&gpio_in_pu>;
673 /* Interrupt line for the Zinitix BT404 touchscreen */
675 tsp_default: tsp_default {
677 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
678 ste,config = <&gpio_in_nopull>;
682 /* Interrupt line for light/proximity sensor TMD2672 */
684 tmd2672_codina_default: tmd2672_codina {
686 pins = "GPIO146_D13";
687 ste,config = <&gpio_in_nopull>;
691 /* GPIO-based I2C bus for subpmu */
693 i2c_gpio_0_default: i2c_gpio_0 {
695 pins = "GPIO143_D12", "GPIO144_B13";
696 ste,config = <&gpio_in_nopull>;
700 /* GPIO-based I2C bus for the NFC */
702 i2c_gpio_1_default: i2c_gpio_1 {
704 pins = "GPIO151_D17", "GPIO152_D16";
705 ste,config = <&gpio_in_nopull>;
709 /* GPIO-based SPI bus for the display */
711 spi_gpio_0_default: spi_gpio_0_d {
713 pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9";
714 ste,config = <&gpio_out_hi>;
717 pins = "GPIO225_AG8";
718 /* Needs pull down, no pull down resistor on board */
719 ste,config = <&gpio_in_pd>;
722 spi_gpio_0_sleep: spi_gpio_0_s {
724 pins = "GPIO220_AH10", "GPIO201_AF24",
725 "GPIO224_AG9", "GPIO225_AG8";
726 ste,config = <&gpio_out_hi>;
731 wlan_default_mode: wlan_default {
732 /* GPIO216 for WL_HOST_WAKE */
734 pins = "GPIO216_AG12";
735 ste,config = <&gpio_in_pd>;
740 bluetooth_default_mode: bluetooth_default {
741 /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
743 pins = "GPIO199_AH23", "GPIO222_AJ9";
744 ste,config = <&gpio_out_lo>;
746 /* GPIO97 BT_HOST_WAKE */
749 ste,config = <&gpio_in_nopull>;
751 /* GPIO209 BT_RST_N */
753 pins = "GPIO209_AG15";
754 ste,config = <&gpio_out_hi>;
759 vibrator_default: vibrator_default {
761 pins = "GPIO195_AG28"; /* MOT_EN */
762 ste,config = <&gpio_out_lo>;
767 dpi_default_mode: dpi_default {
769 /* Mux in all the data lines */
772 /* Data lines D0-D7 GPIO70..GPIO77 */
774 /* Data lines D8-D11 GPIO78..GPIO81 */
776 /* Data lines D12-D15 GPIO82..GPIO85 */
778 /* Data lines D16-D23 GPIO161..GPIO168 */
783 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
784 groups = "lcdaclk_b_1", "lcda_b_1";
786 /* Input, no pull-up is the default state for pins used for an alt function */
788 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
789 ste,config = <&in_nopull>;