summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-01-21 14:44:46 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-01-31 11:18:31 +0100
commitcba73bf21464f5e6be6c9b52302e868654eda0d7 (patch)
tree940e687ad6ae514cd775c17efeab69812bdd3eb7
parentd467c882598be7891d32a8452494fad9e9dca077 (diff)
colibri_vf: enable Fusion touchscreen
Enable Fusion touchscreen driver and provide platform data. Use the mux helper function to mux the pen down/reset GPIO pins.
-rw-r--r--arch/arm/configs/colibri_vf_defconfig1
-rw-r--r--arch/arm/mach-mvf/board-colibri_vf.c26
-rw-r--r--arch/arm/plat-mxc/devices/platform-mvf-dcu.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mvf.h9
4 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/configs/colibri_vf_defconfig b/arch/arm/configs/colibri_vf_defconfig
index c3a7ecc60d13..8a505ac4b565 100644
--- a/arch/arm/configs/colibri_vf_defconfig
+++ b/arch/arm/configs/colibri_vf_defconfig
@@ -187,6 +187,7 @@ CONFIG_TOUCHSCREEN_WM97XX=y
# CONFIG_TOUCHSCREEN_WM9705 is not set
# CONFIG_TOUCHSCREEN_WM9713 is not set
CONFIG_TOUCHSCREEN_COLIBRI_VF50=y
+CONFIG_TOUCHSCREEN_FUSION_F0710A=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
# CONFIG_SERIO is not set
diff --git a/arch/arm/mach-mvf/board-colibri_vf.c b/arch/arm/mach-mvf/board-colibri_vf.c
index 9355488fefea..1b537f2f7616 100644
--- a/arch/arm/mach-mvf/board-colibri_vf.c
+++ b/arch/arm/mach-mvf/board-colibri_vf.c
@@ -42,6 +42,7 @@
#include <linux/regulator/consumer.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
+#include <linux/input/fusion_F0710A.h>
#include <sound/pcm.h>
#include <mach/common.h>
@@ -352,6 +353,25 @@ struct platform_device *__init colibri_add_touchdev(
pdata, sizeof(*pdata));
}
+/*
+ * Fusion touch screen GPIOs (using Toradex display/touch adapater)
+ * Iris X16-38, SODIMM pin 28 (PWM B), pen down interrupt
+ * Iris X16-39, SODIMM pin 30 (PWM C), reset
+ */
+static int colibri_mux_fusion(void)
+{
+ mxc_iomux_v3_setup_pad(MVF600_PAD30_PTB8_INT);
+ mxc_iomux_v3_setup_pad(MVF600_PAD23_PTB1_RESET);
+
+ return 0;
+}
+
+static struct fusion_f0710a_init_data colibri_fusion_pdata = {
+ .pinmux_fusion_pins = &colibri_mux_fusion,
+ .gpio_int = 30, /* SO-DIMM 28: Pen down interrupt */
+ .gpio_reset = 23, /* SO-DIMM 30: Reset interrupt */
+};
+
static struct fec_platform_data fec_data __initdata = {
.phy = PHY_INTERFACE_MODE_RMII,
};
@@ -472,6 +492,11 @@ static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
I2C_BOARD_INFO("rtc-ds1307", 0x68),
.type = "m41t00",
},
+ {
+ /* TouchRevolution Fusion 7 and 10 multi-touch controller */
+ I2C_BOARD_INFO("fusion_F0710A", 0x10),
+ .platform_data = &colibri_fusion_pdata,
+ },
};
static struct mxc_nand_platform_data mvf_data __initdata = {
@@ -562,6 +587,7 @@ static void __init mvf_board_init(void)
mvf_add_sdhci_esdhc_imx(1, &mvfa5_sd1_data);
mvf_add_imx_i2c(0, &mvf600_i2c_data);
+
i2c_register_board_info(0, mxc_i2c0_board_info,
ARRAY_SIZE(mxc_i2c0_board_info));
diff --git a/arch/arm/plat-mxc/devices/platform-mvf-dcu.c b/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
index 0fe5099eca34..cba3d2552132 100644
--- a/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
+++ b/arch/arm/plat-mxc/devices/platform-mvf-dcu.c
@@ -26,12 +26,14 @@ int __init mvf_dcu_init(int id)
{
int ret = 0;
+#if !defined(CONFIG_COLIBRI_VF)
ret = gpio_request_one(DCU_LCD_ENABLE_PIN, GPIOF_OUT_INIT_LOW, "DCU");
if (ret)
printk(KERN_ERR "DCU: failed to request GPIO 30\n");
msleep(2);
gpio_set_value(DCU_LCD_ENABLE_PIN, 1);
+#endif
writel(0x20000000, MVF_IO_ADDRESS(MVF_TCON0_BASE_ADDR));
return ret;
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mvf.h b/arch/arm/plat-mxc/include/mach/iomux-mvf.h
index ebfc34746a5b..dc0c40b914d0 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mvf.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mvf.h
@@ -47,7 +47,8 @@ typedef enum iomux_config {
#define MVF600_ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \
PAD_CTL_DSE_50ohm)
-#define MVF600_I2C_PAD_CTRL (PAD_CTL_DSE_50ohm | PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH)
+#define MVF600_I2C_PAD_CTRL (PAD_CTL_DSE_37ohm | PAD_CTL_ODE | \
+ PAD_CTL_SPEED_HIGH)
#define MVF600_SAI_PAD_CTRL (PAD_CTL_DSE_50ohm | PAD_CTL_HYS | \
PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
@@ -395,6 +396,12 @@ typedef enum iomux_config {
IOMUX_PAD(0x0148, 0x0148, 2, 0x0384, 1, \
MVF600_UART_PAD_CTRL | PAD_CTL_IBE_ENABLE)
+/* SO-DIMM 28/30 used for touch interrupt/reset (also PWM-B/PWM-C) */
+#define MVF600_PAD23_PTB1_RESET \
+ IOMUX_PAD(0x005c, 0x005c, 0, 0x0000, 0, MVF600_FTM0_CH_CTRL)
+#define MVF600_PAD30_PTB8_INT \
+ IOMUX_PAD(0x0078, 0x0078, 0, 0x032C, 0, MVF600_FTM1_CH_CTRL)
+
/* FlexTimer channel pin */
#define MVF600_PAD22_PTB0_FTM0CH0 \
IOMUX_PAD(0x0058, 0x0058, 1, 0x0000, 0, MVF600_FTM0_CH_CTRL)