aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-12-10 20:35:53 -0500
committerTony Lindgren <tony@atomide.com>2008-12-10 20:35:53 -0500
commit2430c62e4b2e7604d749351393aaeefc478e4e36 (patch)
treebd810e53c4fc5513af238924af571fd04dee2748 /arch
parent944e1bffb6517590be48dd428d9b73da9fea801c (diff)
ARM: OMAP1: osk5912: Mistral eeprom support
List the 4 Kbit I2C EEPROM included on the Mistral board. Also add a comment about the hardware workaround needed to properly support the WAKE button. More info at http://elinux.org/OSK_Mistral_wakeup_button_mod Still no support for the (optional) camera sensor. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-osk.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 2f880958b83..4b7c1bcbed6 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -260,7 +260,6 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = {
260 }, 260 },
261 /* TODO when driver support is ready: 261 /* TODO when driver support is ready:
262 * - aic23 audio chip at 0x1a 262 * - aic23 audio chip at 0x1a
263 * - on Mistral, 24c04 eeprom at 0x50
264 * - optionally on Mistral, ov9640 camera sensor at 0x30 263 * - optionally on Mistral, ov9640 camera sensor at 0x30
265 */ 264 */
266}; 265};
@@ -337,11 +336,28 @@ static struct omap_board_config_kernel osk_config[] __initdata = {
337#ifdef CONFIG_OMAP_OSK_MISTRAL 336#ifdef CONFIG_OMAP_OSK_MISTRAL
338 337
339#include <linux/input.h> 338#include <linux/input.h>
339#include <linux/i2c/at24.h>
340#include <linux/spi/spi.h> 340#include <linux/spi/spi.h>
341#include <linux/spi/ads7846.h> 341#include <linux/spi/ads7846.h>
342 342
343#include <mach/keypad.h> 343#include <mach/keypad.h>
344 344
345static struct at24_platform_data at24c04 = {
346 .byte_len = SZ_4K / 8,
347 .page_size = 16,
348};
349
350static struct i2c_board_info __initdata mistral_i2c_board_info[] = {
351 {
352 /* NOTE: powered from LCD supply */
353 I2C_BOARD_INFO("24c04", 0x50),
354 .platform_data = &at24c04,
355 },
356 /* TODO when driver support is ready:
357 * - optionally ov9640 camera sensor at 0x30
358 */
359};
360
345static const int osk_keymap[] = { 361static const int osk_keymap[] = {
346 /* KEY(col, row, code) */ 362 /* KEY(col, row, code) */
347 KEY(0, 0, KEY_F1), /* SW4 */ 363 KEY(0, 0, KEY_F1), /* SW4 */
@@ -488,7 +504,13 @@ static void __init osk_mistral_init(void)
488 spi_register_board_info(mistral_boardinfo, 504 spi_register_board_info(mistral_boardinfo,
489 ARRAY_SIZE(mistral_boardinfo)); 505 ARRAY_SIZE(mistral_boardinfo));
490 506
491 /* the sideways button (SW1) is for use as a "wakeup" button */ 507 /* the sideways button (SW1) is for use as a "wakeup" button
508 *
509 * NOTE: The Mistral board has the wakeup button (SW1) wired
510 * to the LCD 3.3V rail, which is powered down during suspend.
511 * To allow this button to wake up the omap, work around this
512 * HW bug by rewiring SW1 to use the main 3.3V rail.
513 */
492 omap_cfg_reg(N15_1610_MPUIO2); 514 omap_cfg_reg(N15_1610_MPUIO2);
493 if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) { 515 if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
494 int ret = 0; 516 int ret = 0;
@@ -521,6 +543,9 @@ static void __init osk_mistral_init(void)
521 if (gpio_request(2, "lcd_pwr") == 0) 543 if (gpio_request(2, "lcd_pwr") == 0)
522 gpio_direction_output(2, 1); 544 gpio_direction_output(2, 1);
523 545
546 i2c_register_board_info(1, mistral_i2c_board_info,
547 ARRAY_SIZE(mistral_i2c_board_info));
548
524 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); 549 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
525} 550}
526#else 551#else