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 bat_therm: thermistor {
51 compatible = "samsung,1404-001221";
52 io-channels = <&gpadc 0x02>; /* BatTemp */
53 pullup-uv = <1800000>;
54 pullup-ohm = <230000>;
56 #thermal-sensor-cells = <0>;
59 /* TI TXS0206 level translator for 2.9 V */
60 sd_level_translator: regulator-gpio {
61 compatible = "regulator-fixed";
64 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
67 regulator-name = "sd-level-translator";
68 regulator-min-microvolt = <2900000>;
69 regulator-max-microvolt = <2900000>;
70 regulator-type = "voltage";
72 startup-delay-us = <200>;
74 pinctrl-names = "default";
75 pinctrl-0 = <&sd_level_translator_default>;
78 /* External LDO MIC5366-3.3YMT for eMMC */
79 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
80 compatible = "regulator-fixed";
81 /* Supplied in turn by VBAT */
82 regulator-name = "VMEM_3V3";
83 regulator-min-microvolt = <3300000>;
84 regulator-max-microvolt = <3300000>;
85 gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
86 startup-delay-us = <5000>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&emmc_ldo_en_default_mode>;
93 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
94 * LCD_PWR_EN controls both the 3.0V output.
96 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
97 compatible = "regulator-fixed";
98 /* Supplied in turn by VBAT */
99 regulator-name = "VREG_LCD_3.0V";
100 regulator-min-microvolt = <3000000>;
101 regulator-max-microvolt = <3000000>;
102 /* GPIO219 controls this regulator */
103 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
105 pinctrl-names = "default";
106 pinctrl-0 = <&lcd_pwr_en_default_mode>;
110 * This regulator is a GPIO line that drives the Broadcom WLAN
111 * line WL_REG_ON high and enables the internal regulators
112 * inside the chip. Unfortunatley it is erroneously named
113 * WLAN_RST_N on the schematic but it is not a reset line.
115 * The voltage specified here is only used to determine the OCR mask,
116 * the for the SDIO connector, the chip is actually connected
119 wl_reg: regulator-gpio-wlan {
120 compatible = "regulator-fixed";
121 regulator-name = "WL_REG_ON";
122 regulator-min-microvolt = <3000000>;
123 regulator-max-microvolt = <3000000>;
124 startup-delay-us = <100000>;
125 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
126 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&wlan_ldo_en_default>;
133 compatible = "gpio-vibrator";
134 /* GPIO195 "MOT_EN" */
135 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&vibrator_default>;
141 compatible = "gpio-keys";
142 pinctrl-names = "default";
143 pinctrl-0 = <&gpio_keys_default_mode>;
146 linux,code = <KEY_HOME>;
149 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
152 linux,code = <KEY_VOLUMEUP>;
155 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
158 linux,code = <KEY_VOLUMEDOWN>;
161 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
166 compatible = "regulator-led";
167 vled-supply = <&ab8500_ldo_aux4_reg>; // 3.3V
168 default-state = "on";
169 function = LED_FUNCTION_KBD_BACKLIGHT;
170 color = <LED_COLOR_ID_WHITE>;
174 compatible = "kinetic,ktd253";
175 /* GPIO69 is used on Codina R0.4 and Codina TMO */
176 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
177 /* Default to 13/32 brightness */
178 default-brightness = <13>;
179 pinctrl-names = "default";
180 pinctrl-0 = <&ktd253_backlight_default_mode>;
183 /* Richtek RT8515GQW Flash LED Driver IC */
185 compatible = "richtek,rt8515";
187 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
189 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
191 * RFS is 16 kOhm and RTS is 100 kOhm giving
192 * the flash max current 343mA and torch max
195 richtek,rfs-ohms = <16000>;
196 richtek,rts-ohms = <100000>;
197 pinctrl-names = "default";
198 pinctrl-0 = <&gpio_flash_default_mode>;
201 function = LED_FUNCTION_FLASH;
202 color = <LED_COLOR_ID_WHITE>;
203 flash-max-timeout-us = <250000>;
204 flash-max-microamp = <343750>;
205 led-max-microamp = <55000>;
209 /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
211 compatible = "i2c-gpio";
212 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
213 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
214 pinctrl-names = "default";
215 pinctrl-0 = <&i2c_gpio_0_default>;
216 #address-cells = <1>;
219 /* TODO: this should also be used by the SM5103 Camera power management unit */
222 /* Bit-banged I2C on GPIO151 and GPIO152 also called "COMP I2C" */
224 compatible = "i2c-gpio";
225 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
226 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
227 pinctrl-names = "default";
228 pinctrl-0 = <&i2c_gpio_1_default>;
229 #address-cells = <1>;
233 compatible = "alps,hscdtd008a";
235 clock-frequency = <400000>;
237 avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
238 dvdd-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
243 compatible = "spi-gpio";
244 /* Clock on GPIO220, pin SCL */
245 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
246 /* MOSI on GPIO224, pin SDI "slave data in" */
247 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
248 /* MISO on GPIO225, pin SDO "slave data out" */
249 miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
250 /* Chip select on GPIO201 */
251 cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
252 num-chipselects = <1>;
254 pinctrl-names = "default";
255 pinctrl-0 = <&spi_gpio_0_default>;
256 #address-cells = <1>;
260 compatible = "samsung,s6d27a1";
261 spi-max-frequency = <1200000>;
262 /* TYPE 3: inverse clock polarity and phase */
267 vci-supply = <&lcd_3v0_reg>;
268 vccio-supply = <&ab8500_ldo_aux6_reg>;
270 /* Reset on GPIO139 */
271 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
272 /* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */
273 interrupt-parent = <&gpio2>;
274 interrupts = <29 IRQ_TYPE_EDGE_RISING>;
276 pinctrl-names = "default";
277 pinctrl-0 = <&panel_default_mode>;
278 backlight = <&ktd253>;
282 remote-endpoint = <&display_out>;
289 /* External Micro SD slot */
291 arm,primecell-periphid = <0x10480180>;
292 max-frequency = <100000000>;
298 /* MMC is powered by AUX3 1.2V .. 2.91V */
299 vmmc-supply = <&ab8500_ldo_aux3_reg>;
300 /* 2.9 V level translator is using AUX3 at 2.9 V as well */
301 vqmmc-supply = <&sd_level_translator>;
302 pinctrl-names = "default", "sleep";
303 pinctrl-0 = <&mc0_a_2_default>;
304 pinctrl-1 = <&mc0_a_2_sleep>;
305 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
309 /* WLAN SDIO channel */
311 arm,primecell-periphid = <0x10480180>;
312 max-frequency = <50000000>;
316 pinctrl-names = "default", "sleep";
317 pinctrl-0 = <&mc1_a_2_default>;
318 pinctrl-1 = <&mc1_a_2_sleep>;
320 * GPIO-controlled voltage enablement: this drives
321 * the WL_REG_ON line high when we use this device.
322 * Represented as regulator to fill OCR mask.
324 vmmc-supply = <&wl_reg>;
326 #address-cells = <1>;
331 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
333 /* GPIO216 WL_HOST_WAKE */
334 interrupt-parent = <&gpio6>;
335 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
336 interrupt-names = "host-wake";
337 pinctrl-names = "default";
338 pinctrl-0 = <&wlan_default_mode>;
344 arm,primecell-periphid = <0x10480180>;
345 max-frequency = <100000000>;
352 vmmc-supply = <&ldo_3v3_reg>;
353 pinctrl-names = "default", "sleep";
355 * GPIO130 will be set to input no pull-up resulting in a resistor
356 * pulling the reset high and taking the memory out of reset.
358 pinctrl-0 = <&mc2_a_1_default>;
359 pinctrl-1 = <&mc2_a_1_sleep>;
363 /* GBF (Bluetooth) UART */
365 pinctrl-names = "default", "sleep";
366 pinctrl-0 = <&u0_a_1_default>;
367 pinctrl-1 = <&u0_a_1_sleep>;
371 /* BCM4334B0 actually */
372 compatible = "brcm,bcm4330-bt";
373 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
374 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
375 /* BT_WAKE on GPIO199 */
376 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
377 /* BT_HOST_WAKE on GPIO97 */
378 /* FIXME: convert to interrupt */
379 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
380 /* BT_RST_N on GPIO209 */
381 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
382 pinctrl-names = "default";
383 pinctrl-0 = <&bluetooth_default_mode>;
390 pinctrl-names = "default", "sleep";
391 /* CTS/RTS is not used, CTS is repurposed as GPIO */
392 pinctrl-0 = <&u1rxtx_a_1_default>;
393 pinctrl-1 = <&u1rxtx_a_1_sleep>;
394 /* FIXME: add a device for the GPS here */
397 /* Debugging console UART connected to AB8505 */
400 pinctrl-names = "default", "sleep";
401 pinctrl-0 = <&u2rxtx_c_1_default>;
402 pinctrl-1 = <&u2rxtx_c_1_sleep>;
408 pinctrl-names = "default", "sleep";
409 pinctrl-0 = <&usb_a_1_default>;
410 pinctrl-1 = <&usb_a_1_sleep>;
414 line-impedance-micro-ohms = <36000>;
417 /* This is mostly identical to the Codina v0.4 regulators */
420 regulator-name = "v-sensors-vdd";
421 regulator-min-microvolt = <3000000>;
422 regulator-max-microvolt = <3300000>;
426 regulator-name = "v-aux2";
427 regulator-min-microvolt = <3300000>;
428 regulator-max-microvolt = <3300000>;
432 regulator-name = "v-mmc-sd";
436 regulator-name = "v-aux4";
438 * Providing some span here makes the touchkey
439 * LEDs actually dimmable.
441 regulator-min-microvolt = <1100000>;
442 regulator-max-microvolt = <3300000>;
446 regulator-name = "v-aux5";
447 regulator-min-microvolt = <1800000>;
448 regulator-max-microvolt = <1800000>;
452 /* 1.8 V to the display */
453 regulator-name = "v-aux6";
454 regulator-min-microvolt = <1800000>;
455 regulator-max-microvolt = <1800000>;
459 regulator-name = "v-sensors-vio";
465 /* I2C0 also known as "AGC I2C" */
468 pinctrl-names = "default", "sleep";
469 pinctrl-0 = <&i2c0_a_1_default>;
470 pinctrl-1 = <&i2c0_a_1_sleep>;
473 /* Codina has the Amstaos TMD2672 */
474 compatible = "amstaos,tmd2672";
475 clock-frequency = <400000>;
478 /* IRQ on GPIO146 "PS_INT" */
479 interrupt-parent = <&gpio4>;
480 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
481 vdd-supply = <&ab8500_ldo_aux1_reg>;
482 vddio-supply = <&ab8500_ldo_aux8_reg>;
483 pinctrl-names = "default";
484 pinctrl-0 = <&tmd2672_codina_default>;
488 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
491 pinctrl-names = "default", "sleep";
492 pinctrl-0 = <&i2c2_b_2_default>;
493 pinctrl-1 = <&i2c2_b_2_sleep>;
495 /* Bosch BMA254 accelerometer */
497 compatible = "bosch,bma254";
499 mount-matrix = "0", "1", "0",
502 vddio-supply = <&ab8500_ldo_aux8_reg>; // 1.8V
503 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
511 pinctrl-names = "default", "sleep";
512 pinctrl-0 = <&i2c3_c_2_default>;
513 pinctrl-1 = <&i2c3_c_2_sleep>;
515 /* TODO: write bindings and driver for this touchscreen */
517 /* Zinitix BT404 ISP part */
519 compatible = "zinitix,bt404-isp";
521 pinctrl-names = "default";
522 pinctrl-0 = <&tsp_default>;
525 /* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */
527 compatible = "zinitix,bt404";
529 /* GPIO218 (TSP_INT_1V8) */
530 interrupt-parent = <&gpio6>;
531 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
532 vcca-supply = <&ab8500_ldo_aux2_reg>; // 3.3V
533 vdd-supply = <&ab8500_ldo_aux5_reg>; // 1.8V
535 touchscreen-size-x = <480>;
536 touchscreen-size-y = <800>;
537 pinctrl-names = "default";
538 pinctrl-0 = <&tsp_default>;
544 pinctrl-names = "default";
545 pinctrl-0 = <&dpi_default_mode>;
548 display_out: endpoint {
549 remote-endpoint = <&panel_in>;
558 * This extends the MC0_A_2 default config to include
559 * the card detect GPIO217 line.
564 pins = "GPIO217_AH12"; /* card detect */
565 ste,config = <&gpio_in_pd>;
571 * GPIO130 should be set in GPIO mode and
572 * pulled down. (Not connected.)
576 pins = "GPIO130_C8"; /* FBCLK */
577 ste,config = <&gpio_in_pd>;
581 /* GPIO that enables the 2.9V SD card level translator */
582 sd-level-translator {
583 sd_level_translator_default: sd_level_translator_default {
584 /* level shifter on GPIO87 */
587 ste,config = <&gpio_out_hi>;
591 /* GPIO that enables the LDO regulator for the eMMC */
593 emmc_ldo_en_default_mode: emmc_ldo_default {
594 /* LDO enable on GPIO223 */
596 pins = "GPIO223_AH9";
597 ste,config = <&gpio_out_hi>;
601 /* GPIOs for panel control */
603 panel_default_mode: panel_default {
607 ste,config = <&gpio_out_lo>;
610 /* ESD IRQ line "LCD detect" */
612 ste,config = <&gpio_in_nopull>;
616 /* GPIO that enables the LDO regulator for the LCD display */
618 lcd_pwr_en_default_mode: lcd_pwr_en_default {
619 /* LCD_PWR_EN on GPIO219 */
621 pins = "GPIO219_AG10";
622 ste,config = <&gpio_out_hi>;
626 /* GPIO that enables the WLAN internal LDO regulators */
628 wlan_ldo_en_default: wlan_ldo_default {
629 /* GPIO215 named WLAN_RST_N */
631 pins = "GPIO215_AH13";
632 ste,config = <&gpio_out_lo>;
638 ktd253_backlight_default_mode: backlight_default {
640 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
641 ste,config = <&gpio_out_lo>;
645 /* Flash and torch */
647 gpio_flash_default_mode: flash_default {
649 pins = "GPIO140_B11", "GPIO141_C12";
650 ste,config = <&gpio_out_lo>;
656 gpio_keys_default_mode: gpio_keys_default {
658 pins = "GPIO67_G2", /* VOL UP */
659 "GPIO91_B6", /* HOME */
660 "GPIO92_D6"; /* VOL DOWN */
661 ste,config = <&gpio_in_pu>;
665 /* Interrupt line for the Zinitix BT404 touchscreen */
667 tsp_default: tsp_default {
669 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
670 ste,config = <&gpio_in_nopull>;
674 /* Interrupt line for light/proximity sensor TMD2672 */
676 tmd2672_codina_default: tmd2672_codina {
678 pins = "GPIO146_D13";
679 ste,config = <&gpio_in_nopull>;
683 /* GPIO-based I2C bus for subpmu */
685 i2c_gpio_0_default: i2c_gpio_0 {
687 pins = "GPIO143_D12", "GPIO144_B13";
688 ste,config = <&gpio_in_nopull>;
692 /* GPIO-based I2C bus for the NFC */
694 i2c_gpio_1_default: i2c_gpio_1 {
696 pins = "GPIO151_D17", "GPIO152_D16";
697 ste,config = <&gpio_in_nopull>;
701 /* GPIO-based SPI bus for the display */
703 spi_gpio_0_default: spi_gpio_0_d {
705 pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9";
706 ste,config = <&gpio_out_hi>;
709 pins = "GPIO225_AG8";
710 /* Needs pull down, no pull down resistor on board */
711 ste,config = <&gpio_in_pd>;
714 spi_gpio_0_sleep: spi_gpio_0_s {
716 pins = "GPIO220_AH10", "GPIO201_AF24",
717 "GPIO224_AG9", "GPIO225_AG8";
718 ste,config = <&gpio_out_hi>;
723 wlan_default_mode: wlan_default {
724 /* GPIO216 for WL_HOST_WAKE */
726 pins = "GPIO216_AG12";
727 ste,config = <&gpio_in_pd>;
732 bluetooth_default_mode: bluetooth_default {
733 /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
735 pins = "GPIO199_AH23", "GPIO222_AJ9";
736 ste,config = <&gpio_out_lo>;
738 /* GPIO97 BT_HOST_WAKE */
741 ste,config = <&gpio_in_nopull>;
743 /* GPIO209 BT_RST_N */
745 pins = "GPIO209_AG15";
746 ste,config = <&gpio_out_hi>;
751 vibrator_default: vibrator_default {
753 pins = "GPIO195_AG28"; /* MOT_EN */
754 ste,config = <&gpio_out_lo>;
759 dpi_default_mode: dpi_default {
761 /* Mux in all the data lines */
764 /* Data lines D0-D7 GPIO70..GPIO77 */
766 /* Data lines D8-D11 GPIO78..GPIO81 */
768 /* Data lines D12-D15 GPIO82..GPIO85 */
770 /* Data lines D16-D23 GPIO161..GPIO168 */
775 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
776 groups = "lcdaclk_b_1", "lcda_b_1";
778 /* Input, no pull-up is the default state for pins used for an alt function */
780 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
781 ste,config = <&in_nopull>;