aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-h3.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-h3.c')
-rw-r--r--arch/arm/mach-omap1/board-h3.c75
1 files changed, 29 insertions, 46 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 056519860565..6fc516855a8c 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -42,6 +42,7 @@
42#include <asm/arch/irqs.h> 42#include <asm/arch/irqs.h>
43#include <asm/arch/mux.h> 43#include <asm/arch/mux.h>
44#include <asm/arch/tc.h> 44#include <asm/arch/tc.h>
45#include <asm/arch/nand.h>
45#include <asm/arch/irda.h> 46#include <asm/arch/irda.h>
46#include <asm/arch/usb.h> 47#include <asm/arch/usb.h>
47#include <asm/arch/keypad.h> 48#include <asm/arch/keypad.h>
@@ -50,8 +51,6 @@
50#include <asm/arch/mcbsp.h> 51#include <asm/arch/mcbsp.h>
51#include <asm/arch/omap-alsa.h> 52#include <asm/arch/omap-alsa.h>
52 53
53extern int omap_gpio_init(void);
54
55static int h3_keymap[] = { 54static int h3_keymap[] = {
56 KEY(0, 0, KEY_LEFT), 55 KEY(0, 0, KEY_LEFT),
57 KEY(0, 1, KEY_RIGHT), 56 KEY(0, 1, KEY_RIGHT),
@@ -179,7 +178,7 @@ static struct mtd_partition nand_partitions[] = {
179}; 178};
180 179
181/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ 180/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
182static struct nand_platform_data nand_data = { 181static struct omap_nand_platform_data nand_data = {
183 .options = NAND_SAMSUNG_LP_OPTIONS, 182 .options = NAND_SAMSUNG_LP_OPTIONS,
184 .parts = nand_partitions, 183 .parts = nand_partitions,
185 .nr_parts = ARRAY_SIZE(nand_partitions), 184 .nr_parts = ARRAY_SIZE(nand_partitions),
@@ -387,18 +386,18 @@ static struct omap_mcbsp_reg_cfg mcbsp_regs = {
387 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31), 386 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
388 387
389 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP, 388 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
390 //.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ 389 /*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
391}; 390};
392 391
393static struct omap_alsa_codec_config alsa_config = { 392static struct omap_alsa_codec_config alsa_config = {
394 .name = "H3 TSC2101", 393 .name = "H3 TSC2101",
395 .mcbsp_regs_alsa = &mcbsp_regs, 394 .mcbsp_regs_alsa = &mcbsp_regs,
396 .codec_configure_dev = NULL, // tsc2101_configure, 395 .codec_configure_dev = NULL, /* tsc2101_configure, */
397 .codec_set_samplerate = NULL, // tsc2101_set_samplerate, 396 .codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
398 .codec_clock_setup = NULL, // tsc2101_clock_setup, 397 .codec_clock_setup = NULL, /* tsc2101_clock_setup, */
399 .codec_clock_on = NULL, // tsc2101_clock_on, 398 .codec_clock_on = NULL, /* tsc2101_clock_on, */
400 .codec_clock_off = NULL, // tsc2101_clock_off, 399 .codec_clock_off = NULL, /* tsc2101_clock_off, */
401 .get_default_samplerate = NULL, // tsc2101_get_default_samplerate, 400 .get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
402}; 401};
403 402
404static struct platform_device h3_mcbsp1_device = { 403static struct platform_device h3_mcbsp1_device = {
@@ -436,12 +435,13 @@ static struct omap_usb_config h3_usb_config __initdata = {
436 435
437static struct omap_mmc_config h3_mmc_config __initdata = { 436static struct omap_mmc_config h3_mmc_config __initdata = {
438 .mmc[0] = { 437 .mmc[0] = {
439 .enabled = 1, 438 .enabled = 1,
440 .power_pin = -1, /* tps65010 GPIO4 */ 439 .wire4 = 1,
441 .switch_pin = OMAP_MPUIO(1), 440 },
442 },
443}; 441};
444 442
443extern struct omap_mmc_platform_data h3_mmc_data;
444
445static struct omap_uart_config h3_uart_config __initdata = { 445static struct omap_uart_config h3_uart_config __initdata = {
446 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), 446 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
447}; 447};
@@ -450,29 +450,28 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
450 .ctrl_name = "internal", 450 .ctrl_name = "internal",
451}; 451};
452 452
453static struct omap_board_config_kernel h3_config[] = { 453static struct omap_board_config_kernel h3_config[] __initdata = {
454 { OMAP_TAG_USB, &h3_usb_config }, 454 { OMAP_TAG_USB, &h3_usb_config },
455 { OMAP_TAG_MMC, &h3_mmc_config }, 455 { OMAP_TAG_MMC, &h3_mmc_config },
456 { OMAP_TAG_UART, &h3_uart_config }, 456 { OMAP_TAG_UART, &h3_uart_config },
457 { OMAP_TAG_LCD, &h3_lcd_config }, 457 { OMAP_TAG_LCD, &h3_lcd_config },
458}; 458};
459 459
460static struct i2c_board_info __initdata h3_i2c_board_info[] = { 460static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
461 { 461 {
462 I2C_BOARD_INFO("tps65010", 0x48), 462 .name = "mmc_slot",
463 .type = "tps65013", 463 .gpio = OMAP_MPUIO(1),
464 /* .irq = OMAP_GPIO_IRQ(??), */ 464 .type = OMAP_GPIO_SWITCH_TYPE_COVER,
465 .debounce_rising = 100,
466 .debounce_falling = 0,
467 .notify = h3_mmc_slot_cover_handler,
468 .notify_data = NULL,
465 }, 469 },
466 /* TODO when driver support is ready:
467 * - isp1301 OTG transceiver
468 * - optional ov9640 camera sensor at 0x30
469 * - ...
470 */
471}; 470};
472 471
473#define H3_NAND_RB_GPIO_PIN 10 472#define H3_NAND_RB_GPIO_PIN 10
474 473
475static int nand_dev_ready(struct nand_platform_data *data) 474static int nand_dev_ready(struct omap_nand_platform_data *data)
476{ 475{
477 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); 476 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
478} 477}
@@ -500,13 +499,14 @@ static void __init h3_init(void)
500 omap_cfg_reg(V2_1710_GPIO10); 499 omap_cfg_reg(V2_1710_GPIO10);
501 500
502 platform_add_devices(devices, ARRAY_SIZE(devices)); 501 platform_add_devices(devices, ARRAY_SIZE(devices));
502 spi_register_board_info(h3_spi_board_info,
503 ARRAY_SIZE(h3_spi_board_info));
503 omap_board_config = h3_config; 504 omap_board_config = h3_config;
504 omap_board_config_size = ARRAY_SIZE(h3_config); 505 omap_board_config_size = ARRAY_SIZE(h3_config);
505 omap_serial_init(); 506 omap_serial_init();
506 507 omap_register_i2c_bus(1, 100, h3_i2c_board_info,
507 /* FIXME setup irq for tps65013 chip */ 508 ARRAY_SIZE(h3_i2c_board_info));
508 i2c_register_board_info(1, h3_i2c_board_info, 509 h3_mmc_init();
509 ARRAY_SIZE(h3_i2c_board_info));
510} 510}
511 511
512static void __init h3_init_smc91x(void) 512static void __init h3_init_smc91x(void)
@@ -531,23 +531,6 @@ static void __init h3_map_io(void)
531 omap1_map_common_io(); 531 omap1_map_common_io();
532} 532}
533 533
534#ifdef CONFIG_TPS65010
535static int __init h3_tps_init(void)
536{
537 if (!machine_is_omap_h3())
538 return 0;
539
540 /* gpio4 for SD, gpio3 for VDD_DSP */
541 /* FIXME send power to DSP iff it's configured */
542
543 /* Enable LOW_PWR */
544 tps65013_set_low_pwr(ON);
545
546 return 0;
547}
548fs_initcall(h3_tps_init);
549#endif
550
551MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") 534MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
552 /* Maintainer: Texas Instruments, Inc. */ 535 /* Maintainer: Texas Instruments, Inc. */
553 .phys_io = 0xfff00000, 536 .phys_io = 0xfff00000,