aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2011-06-22 00:43:39 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-07-20 10:17:39 -0400
commit0b398b69e1941fc00f9dd33f6ce05bd66843d534 (patch)
tree95e2d761a93b35604901d0a485ee290773324f22 /arch/arm
parentb908af44995d4a581477245de33e0d7ccc0b9a7a (diff)
ARM: EXYNOS4: Add qt602240 touch screen device on Universal_C210
This patch adds definitions to enable support for qt602240 touch screen driver for Universal C210 board. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-exynos4/Kconfig2
-rw-r--r--arch/arm/mach-exynos4/mach-universal_c210.c47
2 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 08482439acc3..14137782f289 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -162,9 +162,11 @@ config MACH_UNIVERSAL_C210
162 select S3C_DEV_HSMMC2 162 select S3C_DEV_HSMMC2
163 select S3C_DEV_HSMMC3 163 select S3C_DEV_HSMMC3
164 select S3C_DEV_I2C1 164 select S3C_DEV_I2C1
165 select S3C_DEV_I2C3
165 select S3C_DEV_I2C5 166 select S3C_DEV_I2C5
166 select S5P_DEV_ONENAND 167 select S5P_DEV_ONENAND
167 select EXYNOS4_SETUP_I2C1 168 select EXYNOS4_SETUP_I2C1
169 select EXYNOS4_SETUP_I2C3
168 select EXYNOS4_SETUP_I2C5 170 select EXYNOS4_SETUP_I2C5
169 select EXYNOS4_SETUP_SDHCI 171 select EXYNOS4_SETUP_SDHCI
170 help 172 help
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c
index 83c83cce2478..5d8b097bb697 100644
--- a/arch/arm/mach-exynos4/mach-universal_c210.c
+++ b/arch/arm/mach-exynos4/mach-universal_c210.c
@@ -20,6 +20,7 @@
20#include <linux/mmc/host.h> 20#include <linux/mmc/host.h>
21#include <linux/i2c-gpio.h> 21#include <linux/i2c-gpio.h>
22#include <linux/i2c/mcs.h> 22#include <linux/i2c/mcs.h>
23#include <linux/i2c/atmel_mxt_ts.h>
23 24
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
25#include <asm/mach-types.h> 26#include <asm/mach-types.h>
@@ -29,6 +30,7 @@
29#include <plat/cpu.h> 30#include <plat/cpu.h>
30#include <plat/devs.h> 31#include <plat/devs.h>
31#include <plat/iic.h> 32#include <plat/iic.h>
33#include <plat/gpio-cfg.h>
32#include <plat/sdhci.h> 34#include <plat/sdhci.h>
33 35
34#include <mach/map.h> 36#include <mach/map.h>
@@ -479,6 +481,46 @@ static struct i2c_board_info i2c5_devs[] __initdata = {
479 }, 481 },
480}; 482};
481 483
484/* I2C3 (TSP) */
485static struct mxt_platform_data qt602240_platform_data = {
486 .x_line = 19,
487 .y_line = 11,
488 .x_size = 800,
489 .y_size = 480,
490 .blen = 0x11,
491 .threshold = 0x28,
492 .voltage = 2800000, /* 2.8V */
493 .orient = MXT_DIAGONAL,
494};
495
496static struct i2c_board_info i2c3_devs[] __initdata = {
497 {
498 I2C_BOARD_INFO("qt602240_ts", 0x4a),
499 .platform_data = &qt602240_platform_data,
500 },
501};
502
503static void __init universal_tsp_init(void)
504{
505 int gpio;
506
507 /* TSP_LDO_ON: XMDMADDR_11 */
508 gpio = EXYNOS4_GPE2(3);
509 gpio_request(gpio, "TSP_LDO_ON");
510 gpio_direction_output(gpio, 1);
511 gpio_export(gpio, 0);
512
513 /* TSP_INT: XMDMADDR_7 */
514 gpio = EXYNOS4_GPE1(7);
515 gpio_request(gpio, "TSP_INT");
516
517 s5p_register_gpio_interrupt(gpio);
518 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
519 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
520 i2c3_devs[0].irq = gpio_to_irq(gpio);
521}
522
523
482/* GPIO I2C 12 (3 Touchkey) */ 524/* GPIO I2C 12 (3 Touchkey) */
483static uint32_t touchkey_keymap[] = { 525static uint32_t touchkey_keymap[] = {
484 /* MCS_KEY_MAP(value, keycode) */ 526 /* MCS_KEY_MAP(value, keycode) */
@@ -668,6 +710,7 @@ static struct platform_device *universal_devices[] __initdata = {
668 &s3c_device_hsmmc0, 710 &s3c_device_hsmmc0,
669 &s3c_device_hsmmc2, 711 &s3c_device_hsmmc2,
670 &s3c_device_hsmmc3, 712 &s3c_device_hsmmc3,
713 &s3c_device_i2c3,
671 &s3c_device_i2c5, 714 &s3c_device_i2c5,
672 715
673 /* Universal Devices */ 716 /* Universal Devices */
@@ -690,6 +733,10 @@ static void __init universal_machine_init(void)
690 i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); 733 i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
691 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); 734 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
692 735
736 universal_tsp_init();
737 s3c_i2c3_set_platdata(NULL);
738 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
739
693 s3c_i2c5_set_platdata(NULL); 740 s3c_i2c5_set_platdata(NULL);
694 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); 741 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
695 742