summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-02-13 10:13:46 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-02-13 10:13:46 +0100
commita7a9d5f2c602f7d435a0fd4e24824678c6d9d667 (patch)
tree3a8e3546c007d7679bacb4bed018d938cd854ee1 /arch
parent4e56981724278c967bf1220f2cdda31833ae50e4 (diff)
colibri_t20/30: integrate Fusion 7 and 10 multi-touch
This patch integrates multi-touch for the TouchRevolution Fusion 7 and 10 panels connected to Iris as follows: Iris X16-5, SODIMM pin 194, I2C SDA Iris X16-6, SODIMM pin 196, I2C SCL Iris X16-15, SODIMM pin 103, pen down interrupt Iris X16-16, SODIMM pin 101, reset The following kernel configuration needs to be enabled: Device Drivers -> Input device support -> Touchscreens -> TouchRevolution Fusion F0710A Touchscreens Please note that level shifters are required. Please further note that our current OpenEmbedded BSP does not yet integrate multi-touch support in the XInput as well as X server layers.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.c40
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30.c37
2 files changed, 73 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t20.c b/arch/arm/mach-tegra/board-colibri_t20.c
index 05075d385374..edf1e72d3cc1 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.c
+++ b/arch/arm/mach-tegra/board-colibri_t20.c
@@ -122,6 +122,9 @@ static struct tegra_clk_init_table colibri_t20_clk_init_table[] __initdata = {
#define FF_DCD TEGRA_GPIO_PC6 /* SODIMM 31 */
#define FF_DSR TEGRA_GPIO_PC1 /* SODIMM 29 */
+#define FUSION_PEN_DOWN TEGRA_GPIO_PL1 /* SODIMM 103 */
+#define FUSION_RESET TEGRA_GPIO_PL0 /* SODIMM 101 */
+
#define I2C_SCL TEGRA_GPIO_PC4 /* SODIMM 196 */
#define I2C_SDA TEGRA_GPIO_PC5 /* SODIMM 194 */
@@ -180,11 +183,14 @@ static struct gpio colibri_t20_gpios[] = {
{TEGRA_GPIO_PK4, GPIOF_IN, "SODIMM pin 106"},
// {TEGRA_GPIO_PK5, GPIOF_IN, "USBC_DET"},
#ifndef CONFIG_KEYBOARD_GPIO
+//conflicts with menu key
{TEGRA_GPIO_PK6, GPIOF_IN, "SODIMM pin 135"},
#endif
#ifndef COLIBRI_T20_VI
+#ifndef CONFIG_TOUCHSCREEN_FUSION_F0710A
{TEGRA_GPIO_PL0, GPIOF_IN, "SOD-101, Iris X16-16"},
{TEGRA_GPIO_PL1, GPIOF_IN, "SOD-103, Iris X16-15"},
+#endif /* !CONFIG_TOUCHSCREEN_FUSION_F0710A */
//conflicts with Ethernet interrupt on Protea
{TEGRA_GPIO_PL2, GPIOF_IN, "SODI-79, Iris X16-19"},
{TEGRA_GPIO_PL3, GPIOF_IN, "SODI-97, Iris X16-17"},
@@ -282,6 +288,12 @@ static struct i2c_board_info colibri_t20_i2c_bus1_board_info[] __initdata = {
I2C_BOARD_INFO("rtc-ds1307", 0x68),
.type = "m41t00",
},
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ {
+ /* TouchRevolution Fusion 7 and 10 multi-touch controller */
+ I2C_BOARD_INFO("fusion_F0710A", 0x10),
+ },
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
#ifdef CONFIG_VIDEO_ADV7180
{
I2C_BOARD_INFO("adv7180", 0x21),
@@ -358,8 +370,32 @@ static void colibri_t20_i2c_init(void)
platform_device_register(&tegra_i2c_device2);
platform_device_register(&tegra_i2c_device4);
- i2c_register_board_info(0, colibri_t20_i2c_bus1_board_info, ARRAY_SIZE(colibri_t20_i2c_bus1_board_info));
- i2c_register_board_info(4, colibri_t20_i2c_bus4_board_info, ARRAY_SIZE(colibri_t20_i2c_bus4_board_info));
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ if ((gpio_request(FUSION_PEN_DOWN, "103, Iris X16-15 Pen") == 0) &&
+ (gpio_direction_input(FUSION_PEN_DOWN) == 0)) {
+ gpio_export(FUSION_PEN_DOWN, 0);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion pen down\n");
+ return;
+ }
+
+ if ((gpio_request(FUSION_RESET, "101, Iris X16-16 RST") == 0) &&
+ (gpio_direction_output(FUSION_RESET, 1) == 0)) {
+ gpio_direction_output(FUSION_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(FUSION_RESET, 1);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion reset\n");
+ return;
+ }
+
+ colibri_t20_i2c_bus1_board_info[1].irq = gpio_to_irq(FUSION_PEN_DOWN);
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
+
+ i2c_register_board_info(0, colibri_t20_i2c_bus1_board_info,
+ ARRAY_SIZE(colibri_t20_i2c_bus1_board_info));
+ i2c_register_board_info(4, colibri_t20_i2c_bus4_board_info,
+ ARRAY_SIZE(colibri_t20_i2c_bus4_board_info));
}
/* Keys
diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index 4a2778dc5b1f..e9f5661fad8c 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -129,6 +129,9 @@ static struct tegra_clk_init_table colibri_t30_clk_init_table[] __initdata = {
#define EN_MIC_GND TEGRA_GPIO_PT1
+#define FUSION_PEN_DOWN TEGRA_GPIO_PY6 /* SODIMM 103 */
+#define FUSION_RESET TEGRA_GPIO_PY7 /* SODIMM 101 */
+
#define I2C_SCL TEGRA_GPIO_PC4 /* SODIMM 196 */
#define I2C_SDA TEGRA_GPIO_PC5 /* SODIMM 194 */
@@ -168,6 +171,12 @@ static struct i2c_board_info colibri_t30_i2c_bus1_board_info[] __initdata = {
I2C_BOARD_INFO("rtc-ds1307", 0x68),
.type = "m41t00",
},
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ {
+ /* TouchRevolution Fusion 7 and 10 multi-touch controller */
+ I2C_BOARD_INFO("fusion_F0710A", 0x10),
+ },
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
};
static struct tegra_i2c_platform_data colibri_t30_i2c1_platform_data = {
@@ -264,13 +273,37 @@ static void __init colibri_t30_i2c_init(void)
platform_device_register(&tegra_i2c_device4);
platform_device_register(&tegra_i2c_device5);
- i2c_register_board_info(0, colibri_t30_i2c_bus1_board_info, ARRAY_SIZE(colibri_t30_i2c_bus1_board_info));
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ if ((gpio_request(FUSION_PEN_DOWN, "103, Iris X16-15 Pen") == 0) &&
+ (gpio_direction_input(FUSION_PEN_DOWN) == 0)) {
+ gpio_export(FUSION_PEN_DOWN, 0);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion pen down\n");
+ return;
+ }
+
+ if ((gpio_request(FUSION_RESET, "101, Iris X16-16 RST") == 0) &&
+ (gpio_direction_output(FUSION_RESET, 1) == 0)) {
+ gpio_direction_output(FUSION_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(FUSION_RESET, 1);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion reset\n");
+ return;
+ }
+
+ colibri_t30_i2c_bus1_board_info[1].irq = gpio_to_irq(FUSION_PEN_DOWN);
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
+
+ i2c_register_board_info(0, colibri_t30_i2c_bus1_board_info,
+ ARRAY_SIZE(colibri_t30_i2c_bus1_board_info));
/* enable touch interrupt GPIO */
gpio_request(TOUCH_PEN_INT, "TOUCH_PEN_INT");
gpio_direction_input(TOUCH_PEN_INT);
- i2c_register_board_info(4, colibri_t30_i2c_bus5_board_info, ARRAY_SIZE(colibri_t30_i2c_bus5_board_info));
+ i2c_register_board_info(4, colibri_t30_i2c_bus5_board_info,
+ ARRAY_SIZE(colibri_t30_i2c_bus5_board_info));
}
/* Keys