summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-04-14 14:17:48 +0200
committerStefan Agner <stefan@agner.ch>2014-05-15 14:01:05 +0200
commit2eacc6f1101d197259cd6cb8200aaa8918905532 (patch)
tree1cdc6b6aaeba8c828ce59149187c3fea2264b50b /arch
parent477d8a5186bb5c4b9c8ec0acf1d4ce62f7edb97a (diff)
colibri-vf50-ts: GPIOs from pdata/support VF50 V1.1 and newer
In order to properly support VF50 V1.1 and older modules we need to move the GPIOs to platform data. This is anyway the cleaner and easier maintainable solution. Also raise pressure threshold to a reasonable level for our resistive touchscreens.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mvf/board-colibri_vf.c36
-rw-r--r--arch/arm/plat-mxc/include/mach/colibri-ts.h7
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mvf.h7
3 files changed, 44 insertions, 6 deletions
diff --git a/arch/arm/mach-mvf/board-colibri_vf.c b/arch/arm/mach-mvf/board-colibri_vf.c
index 02b0284e906b..83d0fe269513 100644
--- a/arch/arm/mach-mvf/board-colibri_vf.c
+++ b/arch/arm/mach-mvf/board-colibri_vf.c
@@ -303,7 +303,7 @@ static iomux_v3_cfg_t mvf600_pads[] = {
//IOMUXC_VIDEO_IN0_IPP_IND_DE_SELECT_INPUT: PTB5, PTB8 or PTB10 as ALT5
};
-static iomux_v3_cfg_t colibri_vf50_pads[] = {
+static iomux_v3_cfg_t colibri_vf50_v10_pads[] = {
/* Touchscreen */
MVF600_PAD4_PTA11,
MVF600_PAD5_PTA12,
@@ -315,6 +315,18 @@ static iomux_v3_cfg_t colibri_vf50_pads[] = {
MVF600_PAD24_PTB2_ADC1_SE2,
};
+static iomux_v3_cfg_t colibri_vf50_v11_pads[] = {
+ /* Touchscreen */
+ MVF600_PAD4_PTA11,
+ MVF600_PAD93_PTB23,
+ MVF600_PAD6_PTA16_ADC1_SE0,
+ MVF600_PAD8_PTA18_ADC0_SE0,
+ MVF600_PAD9_PTA19_ADC0_SE1,
+ MVF600_PAD12_PTA22,
+ MVF600_PAD13_PTA23,
+ MVF600_PAD24_PTB2_ADC1_SE2,
+};
+
static iomux_v3_cfg_t colibri_vf61_pads[] = {
/* SAI2: AC97/Touchscreen */
MVF600_PAD4_PTA11_WM9715L_PENDOWN, /* carefull also used for JTAG
@@ -403,11 +415,15 @@ static int colibri_ts_mux_adc(struct platform_device *pdev)
return 0;
}
-
static struct colibri_ts_platform_data colibri_ts_pdata = {
.mux_pen_interrupt = &colibri_ts_mux_pen_interrupt,
.mux_adc = &colibri_ts_mux_adc,
- .gpio_pen = 8, /* PAD8 */
+ .gpio_xp = 13,
+ .gpio_xm = 93,
+ .gpio_yp = 12,
+ .gpio_ym = 4,
+ .gpio_pen_detect = 8, /* PAD8 */
+ .gpio_pen_detect_pullup = 9,
};
struct platform_device *__init colibri_add_touchdev(
@@ -741,8 +757,18 @@ static void __init mvf_board_init(void)
static void __init colibri_vf50_init(void)
{
- mxc_iomux_v3_setup_multiple_pads(colibri_vf50_pads,
- ARRAY_SIZE(colibri_vf50_pads));
+ printk("System REV: %x\n", system_rev);
+ if (system_rev < 0x011a) {
+ /* Use GPIO 5 for XM... */
+ colibri_ts_pdata.gpio_xm = 5;
+ mxc_iomux_v3_setup_multiple_pads(colibri_vf50_v10_pads,
+ ARRAY_SIZE(colibri_vf50_v10_pads));
+
+ } else {
+ /* Leave default GPIO 93 for XM... */
+ mxc_iomux_v3_setup_multiple_pads(colibri_vf50_v11_pads,
+ ARRAY_SIZE(colibri_vf50_v11_pads));
+ }
mvf_board_init();
diff --git a/arch/arm/plat-mxc/include/mach/colibri-ts.h b/arch/arm/plat-mxc/include/mach/colibri-ts.h
index dde7c3ce8687..937502badaf2 100644
--- a/arch/arm/plat-mxc/include/mach/colibri-ts.h
+++ b/arch/arm/plat-mxc/include/mach/colibri-ts.h
@@ -22,9 +22,14 @@
struct colibri_ts_platform_data {
int (*init)(struct platform_device *pdev);
void (*exit)(struct platform_device *pdev);
- unsigned int gpio_pen;
int (*mux_pen_interrupt)(struct platform_device *pdev);
int (*mux_adc)(struct platform_device *pdev);
+ unsigned int gpio_xp;
+ unsigned int gpio_xm;
+ unsigned int gpio_yp;
+ unsigned int gpio_ym;
+ unsigned int gpio_pen_detect;
+ unsigned int gpio_pen_detect_pullup;
};
#endif
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mvf.h b/arch/arm/plat-mxc/include/mach/iomux-mvf.h
index 28a6ed1a185a..500f78b0d0be 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mvf.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mvf.h
@@ -484,9 +484,16 @@ typedef enum iomux_config {
#define MVF600_PAD4_PTA11 \
IOMUX_PAD(0x0010, 0x0010, 0, 0x0, 0, \
MVF600_TS_PAD_CTRL | PAD_CTL_OBE_ENABLE)
+
+/* Colirbi VF50 V1.0 */
#define MVF600_PAD5_PTA12 \
IOMUX_PAD(0x0014, 0x0014, 0, 0x0, 0, \
MVF600_TS_PAD_CTRL | PAD_CTL_OBE_ENABLE)
+/* Colibri VF50 V1.1 */
+#define MVF600_PAD93_PTB23 \
+ IOMUX_PAD(0x0174, 0x0174, 0, 0x0, 0, \
+ MVF600_TS_PAD_CTRL | PAD_CTL_OBE_ENABLE)
+
#define MVF600_PAD6_PTA16_ADC1_SE0 \
IOMUX_PAD(0x0018, 0x0018, 3, 0x0, 0, \
MVF600_TS_PAD_CTRL | PAD_CTL_IBE_ENABLE)