X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=arch%2Farm%2Fmach-omap1%2Fboard-h3.c;h=c3ef1ee5f77bcd4a01fb9a5ecac297493c850651;hb=c6b349ed8a288f1f69fdd560d509d81351cafd89;hp=4167f3480974a268e21a15abbdeabf434c70ddba;hpb=92633b72d18ca4f25de1f28e436a882159491e7e;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4167f348097..c3ef1ee5f77 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -21,24 +21,29 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include #include +#include + #include #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -47,7 +52,7 @@ #include #include -extern int omap_gpio_init(void); +#define H3_TS_GPIO 48 static int h3_keymap[] = { KEY(0, 0, KEY_LEFT), @@ -176,7 +181,7 @@ static struct mtd_partition nand_partitions[] = { }; /* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ -static struct nand_platform_data nand_data = { +static struct omap_nand_platform_data nand_data = { .options = NAND_SAMSUNG_LP_OPTIONS, .parts = nand_partitions, .nr_parts = ARRAY_SIZE(nand_partitions), @@ -205,7 +210,7 @@ static struct resource smc91x_resources[] = { [1] = { .start = OMAP_GPIO_IRQ(40), .end = OMAP_GPIO_IRQ(40), - .flags = IORESOURCE_IRQ, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, }, }; @@ -371,6 +376,17 @@ static struct platform_device h3_lcd_device = { .id = -1, }; +static struct spi_board_info h3_spi_board_info[] __initdata = { + [0] = { + .modalias = "tsc2101", + .bus_num = 2, + .chip_select = 0, + .irq = OMAP_GPIO_IRQ(H3_TS_GPIO), + .max_speed_hz = 16000000, + /* .platform_data = &tsc_platform_data, */ + }, +}; + static struct omap_mcbsp_reg_cfg mcbsp_regs = { .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), .spcr1 = RINTM(3) | RRST, @@ -384,18 +400,18 @@ static struct omap_mcbsp_reg_cfg mcbsp_regs = { .srgr2 = GSYNC | CLKSP | FSGM | FPER(31), .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP, - //.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ + /*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */ }; static struct omap_alsa_codec_config alsa_config = { .name = "H3 TSC2101", .mcbsp_regs_alsa = &mcbsp_regs, - .codec_configure_dev = NULL, // tsc2101_configure, - .codec_set_samplerate = NULL, // tsc2101_set_samplerate, - .codec_clock_setup = NULL, // tsc2101_clock_setup, - .codec_clock_on = NULL, // tsc2101_clock_on, - .codec_clock_off = NULL, // tsc2101_clock_off, - .get_default_samplerate = NULL, // tsc2101_get_default_samplerate, + .codec_configure_dev = NULL, /* tsc2101_configure, */ + .codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */ + .codec_clock_setup = NULL, /* tsc2101_clock_setup, */ + .codec_clock_on = NULL, /* tsc2101_clock_on, */ + .codec_clock_off = NULL, /* tsc2101_clock_off, */ + .get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */ }; static struct platform_device h3_mcbsp1_device = { @@ -433,12 +449,13 @@ static struct omap_usb_config h3_usb_config __initdata = { static struct omap_mmc_config h3_mmc_config __initdata = { .mmc[0] = { - .enabled = 1, - .power_pin = -1, /* tps65010 GPIO4 */ - .switch_pin = OMAP_MPUIO(1), - }, + .enabled = 1, + .wire4 = 1, + }, }; +extern struct omap_mmc_platform_data h3_mmc_data; + static struct omap_uart_config h3_uart_config __initdata = { .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; @@ -447,16 +464,36 @@ static struct omap_lcd_config h3_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_board_config_kernel h3_config[] = { +static struct omap_board_config_kernel h3_config[] __initdata = { { OMAP_TAG_USB, &h3_usb_config }, { OMAP_TAG_MMC, &h3_mmc_config }, { OMAP_TAG_UART, &h3_uart_config }, { OMAP_TAG_LCD, &h3_lcd_config }, }; +static struct i2c_board_info __initdata h3_i2c_board_info[] = { + { + I2C_BOARD_INFO("tps65010", 0x48), + .type = "tps65013", + /* .irq = OMAP_GPIO_IRQ(??), */ + }, +}; + +static struct omap_gpio_switch h3_gpio_switches[] __initdata = { + { + .name = "mmc_slot", + .gpio = OMAP_MPUIO(1), + .type = OMAP_GPIO_SWITCH_TYPE_COVER, + .debounce_rising = 100, + .debounce_falling = 0, + .notify = h3_mmc_slot_cover_handler, + .notify_data = NULL, + }, +}; + #define H3_NAND_RB_GPIO_PIN 10 -static int nand_dev_ready(struct nand_platform_data *data) +static int nand_dev_ready(struct omap_nand_platform_data *data) { return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); } @@ -484,9 +521,14 @@ static void __init h3_init(void) omap_cfg_reg(V2_1710_GPIO10); platform_add_devices(devices, ARRAY_SIZE(devices)); + spi_register_board_info(h3_spi_board_info, + ARRAY_SIZE(h3_spi_board_info)); omap_board_config = h3_config; omap_board_config_size = ARRAY_SIZE(h3_config); omap_serial_init(); + omap_register_i2c_bus(1, 100, h3_i2c_board_info, + ARRAY_SIZE(h3_i2c_board_info)); + h3_mmc_init(); } static void __init h3_init_smc91x(void)