From 034284c1c5b7330ed1c7c3d97778029bc5776a58 Mon Sep 17 00:00:00 2001 From: "ramesh.chandrasekaran" Date: Fri, 9 Nov 2012 12:11:40 +0530 Subject: mach-ux500: touchscreen: Add platform data and gpio setting Signed-off-by: ramesh.chandrasekaran --- arch/arm/mach-ux500/board-mop500.c | 25 ++++++++++++++++++++----- arch/arm/mach-ux500/devices-db8500.c | 10 +++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index ea703097be6..ec62f4fb2d5 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -140,17 +140,18 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { * Pin GPIO37 (ApeSpiCSn) * Pin GPIO38 (ApeSpiDout) * Pin GPIO39 (ApeSpiDin) are configured as GPIO - * GpioSel6 = 0x02 => Pin GPIO42 (SysClkReq5) is configured as GPIO + * GpioSel6 = 0x03 => Pin GPIO41 (ModSDA) is configured as GPIO + Pin GPIO42 (SysClkReq5) is configured as GPIO * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured * as GPIO then this register selectes the alternate fucntions */ - .config_reg = {0x0F, 0x9E, 0x80, 0x01, 0x78, 0x02, 0x00}, + .config_reg = {0x0F, 0x9E, 0x80, 0x01, 0x78, 0x03}, /* * config_direction allows for the initial GPIO direction to * be set. For Snowball we set GPIO26 to output. */ - .config_direction = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00}, + .config_direction = {0xA, 0x00, 0x00, 0x02, 0x00, 0x03}, /* * config_pullups allows for the intial configuration of the @@ -230,7 +231,7 @@ static struct gpio_keys_button snowball_key_array[] = { .debounce_interval = 50, .wakeup = 1, }, - { +/* { .gpio = 151, .type = EV_KEY, .code = KEY_2, @@ -239,6 +240,7 @@ static struct gpio_keys_button snowball_key_array[] = { .debounce_interval = 50, .wakeup = 1, }, +*/ { .gpio = 152, .type = EV_KEY, @@ -664,6 +666,16 @@ static struct i2c_board_info __initdata snowball_i2c0_devices[] = { #endif }; +#ifdef CONFIG_TOUCHSCREEN_STMT07 +static struct i2c_board_info __initdata snowball_i2c1_devices[] = { + { + /* STM TS controller */ + I2C_BOARD_INFO("ftk", 0x4B), + .irq = NOMADIK_GPIO_TO_IRQ(152), + }, +}; +#endif + static struct i2c_board_info __initdata mop500_i2c2_devices[] = { { /* lp5521 LED driver, 1st device */ @@ -1297,7 +1309,10 @@ static void __init snowball_init_machine(void) i2c_register_board_info(0, snowball_i2c0_devices, ARRAY_SIZE(snowball_i2c0_devices)); - +#ifdef CONFIG_TOUCHSCREEN_STMT07 + i2c_register_board_info(1, snowball_i2c1_devices, + ARRAY_SIZE(snowball_i2c1_devices)); +#endif /* This board has full regulator constraints */ regulator_has_full_constraints(); } diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index 28f6da58e1e..68e8b33418c 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c @@ -212,16 +212,16 @@ static int mcde_platform_set_display_clocks(void) static struct mcde_platform_data mcde_u8500_pdata = { /* - * [0] = 3: 24 bits DPI: connect LSB Ch B to D[0:7] - * [3] = 4: 24 bits DPI: connect MID Ch B to D[24:31] - * [4] = 5: 24 bits DPI: connect MSB Ch B to D[32:39] + * [0] = 5: 24 bits DPI: connect MSB Ch B to D[0:7] + * [3] = 4: 24 bits DPI: connect MID Ch B to D[15:8] + * [4] = 3: 24 bits DPI: connect LSB Ch B to D[31:24] * * [1] = 3: TV out : connect LSB Ch B to D[8:15] */ #define DONT_CARE 0 - .outmux = { 3, 3, DONT_CARE, 4, 5 }, + .outmux = { 5, 4, DONT_CARE, 3, DONT_CARE }, #undef DONT_CARE - .syncmux = 0x00, /* DPI channel A and B on output pins A and B resp */ + .syncmux = 0x40, #ifdef CONFIG_MCDE_DISPLAY_DSI .regulator_vana_id = "vdddsi1v2", #endif -- cgit v1.2.3