#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
+#include <linux/input.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <linux/io.h>
+#include <linux/delay.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/board.h>
-#include <asm/arch/hsmmc.h>
-#include <asm/arch/usb-musb.h>
-#include <asm/arch/usb-ehci.h>
-#include <asm/arch/common.h>
-#include <asm/arch/mcspi.h>
+#include <mach/gpio.h>
+#include <mach/keypad.h>
+#include <mach/board.h>
+#include <mach/hsmmc.h>
+#include <mach/usb-musb.h>
+#include <mach/usb-ehci.h>
+#include <mach/common.h>
+#include <mach/mcspi.h>
+
+#include "sdram-micron-mt46h32m32lf-6.h"
static struct resource omap3evm_smc911x_resources[] = {
[0] = {
return 0;
}
-static struct omap_mmc_config omap3_evm_mmc_config __initdata = {
- .mmc [0] = {
- .enabled = 1,
- .wire4 = 1,
- },
-};
-
static struct platform_device omap3_evm_lcd_device = {
.name = "omap3evm_lcd",
.id = -1,
}
struct ads7846_platform_data ads7846_config = {
+ .x_max = 0x0fff,
+ .y_max = 0x0fff,
+ .x_plate_ohms = 180,
+ .pressure_max = 255,
+ .debounce_max = 10,
+ .debounce_tol = 3,
+ .debounce_rep = 1,
.get_pendown_state = ads7846_get_pendown_state,
.keep_vref_on = 1,
+ .settle_delay_usecs = 150,
};
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
},
};
+static int omap3evm_keymap[] = {
+ KEY(0, 0, KEY_LEFT),
+ KEY(0, 1, KEY_RIGHT),
+ KEY(0, 2, KEY_A),
+ KEY(0, 3, KEY_B),
+ KEY(1, 0, KEY_DOWN),
+ KEY(1, 1, KEY_UP),
+ KEY(1, 2, KEY_E),
+ KEY(1, 3, KEY_F),
+ KEY(2, 0, KEY_ENTER),
+ KEY(2, 1, KEY_I),
+ KEY(2, 2, KEY_J),
+ KEY(2, 3, KEY_K),
+ KEY(3, 0, KEY_M),
+ KEY(3, 1, KEY_N),
+ KEY(3, 2, KEY_O),
+ KEY(3, 3, KEY_P)
+};
+
+static struct omap_kp_platform_data omap3evm_kp_data = {
+ .rows = 4,
+ .cols = 4,
+ .keymap = omap3evm_keymap,
+ .keymapsize = ARRAY_SIZE(omap3evm_keymap),
+ .rep = 1,
+};
+
+static struct platform_device omap3evm_kp_device = {
+ .name = "omap_twl4030keypad",
+ .id = -1,
+ .dev = {
+ .platform_data = &omap3evm_kp_data,
+ },
+};
+
static void __init omap3_evm_init_irq(void)
{
- omap2_init_common_hw();
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params);
omap_init_irq();
omap_gpio_init();
omap3evm_init_smc911x();
static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
{ OMAP_TAG_UART, &omap3_evm_uart_config },
- { OMAP_TAG_MMC, &omap3_evm_mmc_config },
{ OMAP_TAG_LCD, &omap3_evm_lcd_config },
};
static struct platform_device *omap3_evm_devices[] __initdata = {
&omap3_evm_lcd_device,
+ &omap3evm_kp_device,
#ifdef CONFIG_RTC_DRV_TWL4030
&omap3_evm_twl4030rtc_device,
#endif