2 * board-devkit8000.c - TimLL Devkit8000
4 * Copyright (C) 2009 Kim Botherway
5 * Copyright (C) 2010 Thomas Weber
7 * Modified from mach-omap2/board-omap3beagle.c
9 * Initial code: Syed Mohammed Khasim
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
17 #include <linux/init.h>
18 #include <linux/platform_device.h>
19 #include <linux/delay.h>
20 #include <linux/err.h>
21 #include <linux/clk.h>
23 #include <linux/leds.h>
24 #include <linux/gpio.h>
25 #include <linux/input.h>
26 #include <linux/gpio_keys.h>
28 #include <linux/mtd/mtd.h>
29 #include <linux/mtd/partitions.h>
30 #include <linux/mtd/nand.h>
31 #include <linux/mmc/host.h>
33 #include <linux/regulator/machine.h>
34 #include <linux/i2c/twl.h>
36 #include <mach/hardware.h>
38 #include <asm/mach-types.h>
39 #include <asm/mach/arch.h>
40 #include <asm/mach/map.h>
41 #include <asm/mach/flash.h>
43 #include <plat/board.h>
44 #include <plat/common.h>
45 #include <plat/gpmc.h>
46 #include <plat/nand.h>
48 #include <plat/display.h>
49 #include <plat/panel-generic-dpi.h>
51 #include <plat/mcspi.h>
52 #include <linux/input/matrix_keypad.h>
53 #include <linux/spi/spi.h>
54 #include <linux/spi/ads7846.h>
55 #include <linux/dm9000.h>
56 #include <linux/interrupt.h>
58 #include "sdram-micron-mt46h32m32lf-6.h"
64 #define NAND_BLOCK_SIZE SZ_128K
66 #define OMAP_DM9000_GPIO_IRQ 25
67 #define OMAP3_DEVKIT_TS_GPIO 27
69 static struct mtd_partition devkit8000_nand_partitions
[] = {
70 /* All the partition sizes are listed in terms of NAND block size */
74 .size
= 4 * NAND_BLOCK_SIZE
,
75 .mask_flags
= MTD_WRITEABLE
, /* force read-only */
79 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x80000 */
80 .size
= 15 * NAND_BLOCK_SIZE
,
81 .mask_flags
= MTD_WRITEABLE
, /* force read-only */
85 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x260000 */
86 .size
= 1 * NAND_BLOCK_SIZE
,
90 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x280000 */
91 .size
= 32 * NAND_BLOCK_SIZE
,
94 .name
= "File System",
95 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x680000 */
96 .size
= MTDPART_SIZ_FULL
,
100 static struct omap_nand_platform_data devkit8000_nand_data
= {
101 .options
= NAND_BUSWIDTH_16
,
102 .parts
= devkit8000_nand_partitions
,
103 .nr_parts
= ARRAY_SIZE(devkit8000_nand_partitions
),
104 .dma_channel
= -1, /* disable DMA in OMAP NAND driver */
107 static struct omap2_hsmmc_info mmc
[] = {
110 .caps
= MMC_CAP_4_BIT_DATA
| MMC_CAP_8_BIT_DATA
,
116 static int devkit8000_panel_enable_lcd(struct omap_dss_device
*dssdev
)
118 twl_i2c_write_u8(TWL4030_MODULE_GPIO
, 0x80, REG_GPIODATADIR1
);
119 twl_i2c_write_u8(TWL4030_MODULE_LED
, 0x0, 0x0);
121 if (gpio_is_valid(dssdev
->reset_gpio
))
122 gpio_set_value_cansleep(dssdev
->reset_gpio
, 1);
126 static void devkit8000_panel_disable_lcd(struct omap_dss_device
*dssdev
)
128 if (gpio_is_valid(dssdev
->reset_gpio
))
129 gpio_set_value_cansleep(dssdev
->reset_gpio
, 0);
132 static int devkit8000_panel_enable_dvi(struct omap_dss_device
*dssdev
)
134 if (gpio_is_valid(dssdev
->reset_gpio
))
135 gpio_set_value_cansleep(dssdev
->reset_gpio
, 1);
139 static void devkit8000_panel_disable_dvi(struct omap_dss_device
*dssdev
)
141 if (gpio_is_valid(dssdev
->reset_gpio
))
142 gpio_set_value_cansleep(dssdev
->reset_gpio
, 0);
145 static struct regulator_consumer_supply devkit8000_vmmc1_supply
=
146 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
150 static struct regulator_consumer_supply devkit8000_vio_supply
=
151 REGULATOR_SUPPLY("vcc", "spi2.0");
153 static struct panel_generic_dpi_data lcd_panel
= {
155 .platform_enable
= devkit8000_panel_enable_lcd
,
156 .platform_disable
= devkit8000_panel_disable_lcd
,
159 static struct omap_dss_device devkit8000_lcd_device
= {
161 .type
= OMAP_DISPLAY_TYPE_DPI
,
162 .driver_name
= "generic_dpi_panel",
164 .phy
.dpi
.data_lines
= 24,
167 static struct panel_generic_dpi_data dvi_panel
= {
169 .platform_enable
= devkit8000_panel_enable_dvi
,
170 .platform_disable
= devkit8000_panel_disable_dvi
,
173 static struct omap_dss_device devkit8000_dvi_device
= {
175 .type
= OMAP_DISPLAY_TYPE_DPI
,
176 .driver_name
= "generic_dpi_panel",
178 .phy
.dpi
.data_lines
= 24,
181 static struct omap_dss_device devkit8000_tv_device
= {
183 .driver_name
= "venc",
184 .type
= OMAP_DISPLAY_TYPE_VENC
,
185 .phy
.venc
.type
= OMAP_DSS_VENC_TYPE_SVIDEO
,
189 static struct omap_dss_device
*devkit8000_dss_devices
[] = {
190 &devkit8000_lcd_device
,
191 &devkit8000_dvi_device
,
192 &devkit8000_tv_device
,
195 static struct omap_dss_board_info devkit8000_dss_data
= {
196 .num_devices
= ARRAY_SIZE(devkit8000_dss_devices
),
197 .devices
= devkit8000_dss_devices
,
198 .default_device
= &devkit8000_lcd_device
,
201 static struct platform_device devkit8000_dss_device
= {
205 .platform_data
= &devkit8000_dss_data
,
209 static struct regulator_consumer_supply devkit8000_vdda_dac_supply
=
210 REGULATOR_SUPPLY("vdda_dac", "omapdss");
212 static uint32_t board_keymap
[] = {
227 PERSISTENT_KEY(4, 5),
228 KEY(4, 4, KEY_VOLUMEUP
),
229 KEY(5, 5, KEY_VOLUMEDOWN
),
233 static struct matrix_keymap_data board_map_data
= {
234 .keymap
= board_keymap
,
235 .keymap_size
= ARRAY_SIZE(board_keymap
),
238 static struct twl4030_keypad_data devkit8000_kp_data
= {
239 .keymap_data
= &board_map_data
,
245 static struct gpio_led gpio_leds
[];
247 static int devkit8000_twl_gpio_setup(struct device
*dev
,
248 unsigned gpio
, unsigned ngpio
)
250 omap_mux_init_gpio(29, OMAP_PIN_INPUT
);
251 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
252 mmc
[0].gpio_cd
= gpio
+ 0;
253 omap2_hsmmc_init(mmc
);
255 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
256 gpio_leds
[2].gpio
= gpio
+ TWL4030_GPIO_MAX
+ 1;
258 /* gpio + 1 is "LCD_PWREN" (out, active high) */
259 devkit8000_lcd_device
.reset_gpio
= gpio
+ 1;
260 gpio_request(devkit8000_lcd_device
.reset_gpio
, "LCD_PWREN");
261 /* Disable until needed */
262 gpio_direction_output(devkit8000_lcd_device
.reset_gpio
, 0);
264 /* gpio + 7 is "DVI_PD" (out, active low) */
265 devkit8000_dvi_device
.reset_gpio
= gpio
+ 7;
266 gpio_request(devkit8000_dvi_device
.reset_gpio
, "DVI PowerDown");
267 /* Disable until needed */
268 gpio_direction_output(devkit8000_dvi_device
.reset_gpio
, 0);
273 static struct twl4030_gpio_platform_data devkit8000_gpio_data
= {
274 .gpio_base
= OMAP_MAX_GPIO_LINES
,
275 .irq_base
= TWL4030_GPIO_IRQ_BASE
,
276 .irq_end
= TWL4030_GPIO_IRQ_END
,
278 .pulldowns
= BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
279 | BIT(15) | BIT(16) | BIT(17),
280 .setup
= devkit8000_twl_gpio_setup
,
283 static struct regulator_consumer_supply devkit8000_vpll1_supply
=
284 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
286 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
287 static struct regulator_init_data devkit8000_vmmc1
= {
291 .valid_modes_mask
= REGULATOR_MODE_NORMAL
292 | REGULATOR_MODE_STANDBY
,
293 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
294 | REGULATOR_CHANGE_MODE
295 | REGULATOR_CHANGE_STATUS
,
297 .num_consumer_supplies
= 1,
298 .consumer_supplies
= &devkit8000_vmmc1_supply
,
301 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
302 static struct regulator_init_data devkit8000_vdac
= {
306 .valid_modes_mask
= REGULATOR_MODE_NORMAL
307 | REGULATOR_MODE_STANDBY
,
308 .valid_ops_mask
= REGULATOR_CHANGE_MODE
309 | REGULATOR_CHANGE_STATUS
,
311 .num_consumer_supplies
= 1,
312 .consumer_supplies
= &devkit8000_vdda_dac_supply
,
315 /* VPLL1 for digital video outputs */
316 static struct regulator_init_data devkit8000_vpll1
= {
320 .valid_modes_mask
= REGULATOR_MODE_NORMAL
321 | REGULATOR_MODE_STANDBY
,
322 .valid_ops_mask
= REGULATOR_CHANGE_MODE
323 | REGULATOR_CHANGE_STATUS
,
325 .num_consumer_supplies
= 1,
326 .consumer_supplies
= &devkit8000_vpll1_supply
,
329 /* VAUX4 for ads7846 and nubs */
330 static struct regulator_init_data devkit8000_vio
= {
335 .valid_modes_mask
= REGULATOR_MODE_NORMAL
336 | REGULATOR_MODE_STANDBY
,
337 .valid_ops_mask
= REGULATOR_CHANGE_MODE
338 | REGULATOR_CHANGE_STATUS
,
340 .num_consumer_supplies
= 1,
341 .consumer_supplies
= &devkit8000_vio_supply
,
344 static struct twl4030_usb_data devkit8000_usb_data
= {
345 .usb_mode
= T2_USB_MODE_ULPI
,
348 static struct twl4030_codec_audio_data devkit8000_audio_data
= {
349 .audio_mclk
= 26000000,
352 static struct twl4030_codec_data devkit8000_codec_data
= {
353 .audio_mclk
= 26000000,
354 .audio
= &devkit8000_audio_data
,
357 static struct twl4030_platform_data devkit8000_twldata
= {
358 .irq_base
= TWL4030_IRQ_BASE
,
359 .irq_end
= TWL4030_IRQ_END
,
361 /* platform_data for children goes here */
362 .usb
= &devkit8000_usb_data
,
363 .gpio
= &devkit8000_gpio_data
,
364 .codec
= &devkit8000_codec_data
,
365 .vmmc1
= &devkit8000_vmmc1
,
366 .vdac
= &devkit8000_vdac
,
367 .vpll1
= &devkit8000_vpll1
,
368 .vio
= &devkit8000_vio
,
369 .keypad
= &devkit8000_kp_data
,
372 static struct i2c_board_info __initdata devkit8000_i2c_boardinfo
[] = {
374 I2C_BOARD_INFO("tps65930", 0x48),
375 .flags
= I2C_CLIENT_WAKE
,
376 .irq
= INT_34XX_SYS_NIRQ
,
377 .platform_data
= &devkit8000_twldata
,
381 static int __init
devkit8000_i2c_init(void)
383 omap_register_i2c_bus(1, 2600, devkit8000_i2c_boardinfo
,
384 ARRAY_SIZE(devkit8000_i2c_boardinfo
));
385 /* Bus 3 is attached to the DVI port where devices like the pico DLP
386 * projector don't work reliably with 400kHz */
387 omap_register_i2c_bus(3, 400, NULL
, 0);
391 static struct gpio_led gpio_leds
[] = {
394 .default_trigger
= "heartbeat",
400 .default_trigger
= "mmc0",
406 .default_trigger
= "none",
412 .default_trigger
= "none",
418 static struct gpio_led_platform_data gpio_led_info
= {
420 .num_leds
= ARRAY_SIZE(gpio_leds
),
423 static struct platform_device leds_gpio
= {
427 .platform_data
= &gpio_led_info
,
431 static struct gpio_keys_button gpio_buttons
[] = {
440 static struct gpio_keys_platform_data gpio_key_info
= {
441 .buttons
= gpio_buttons
,
442 .nbuttons
= ARRAY_SIZE(gpio_buttons
),
445 static struct platform_device keys_gpio
= {
449 .platform_data
= &gpio_key_info
,
454 static void __init
devkit8000_init_irq(void)
456 omap2_init_common_infrastructure();
457 omap2_init_common_devices(mt46h32m32lf6_sdrc_params
,
458 mt46h32m32lf6_sdrc_params
);
460 #ifdef CONFIG_OMAP_32K_TIMER
461 omap2_gp_clockevent_set_gptimer(12);
465 static void __init
devkit8000_ads7846_init(void)
467 int gpio
= OMAP3_DEVKIT_TS_GPIO
;
470 ret
= gpio_request(gpio
, "ads7846_pen_down");
472 printk(KERN_ERR
"Failed to request GPIO %d for "
473 "ads7846 pen down IRQ\n", gpio
);
477 gpio_direction_input(gpio
);
480 static int ads7846_get_pendown_state(void)
482 return !gpio_get_value(OMAP3_DEVKIT_TS_GPIO
);
485 static struct ads7846_platform_data ads7846_config
= {
493 .get_pendown_state
= ads7846_get_pendown_state
,
495 .settle_delay_usecs
= 150,
498 static struct omap2_mcspi_device_config ads7846_mcspi_config
= {
500 .single_channel
= 1, /* 0: slave, 1: master */
503 static struct spi_board_info devkit8000_spi_board_info
[] __initdata
= {
505 .modalias
= "ads7846",
508 .max_speed_hz
= 1500000,
509 .controller_data
= &ads7846_mcspi_config
,
510 .irq
= OMAP_GPIO_IRQ(OMAP3_DEVKIT_TS_GPIO
),
511 .platform_data
= &ads7846_config
,
515 #define OMAP_DM9000_BASE 0x2c000000
517 static struct resource omap_dm9000_resources
[] = {
519 .start
= OMAP_DM9000_BASE
,
520 .end
= (OMAP_DM9000_BASE
+ 0x4 - 1),
521 .flags
= IORESOURCE_MEM
,
524 .start
= (OMAP_DM9000_BASE
+ 0x400),
525 .end
= (OMAP_DM9000_BASE
+ 0x400 + 0x4 - 1),
526 .flags
= IORESOURCE_MEM
,
529 .start
= OMAP_GPIO_IRQ(OMAP_DM9000_GPIO_IRQ
),
530 .flags
= IORESOURCE_IRQ
| IRQF_TRIGGER_LOW
,
534 static struct dm9000_plat_data omap_dm9000_platdata
= {
535 .flags
= DM9000_PLATF_16BITONLY
,
538 static struct platform_device omap_dm9000_dev
= {
541 .num_resources
= ARRAY_SIZE(omap_dm9000_resources
),
542 .resource
= omap_dm9000_resources
,
544 .platform_data
= &omap_dm9000_platdata
,
548 static void __init
omap_dm9000_init(void)
550 unsigned char *eth_addr
= omap_dm9000_platdata
.dev_addr
;
551 struct omap_die_id odi
;
553 if (gpio_request(OMAP_DM9000_GPIO_IRQ
, "dm9000 irq") < 0) {
554 printk(KERN_ERR
"Failed to request GPIO%d for dm9000 IRQ\n",
555 OMAP_DM9000_GPIO_IRQ
);
559 gpio_direction_input(OMAP_DM9000_GPIO_IRQ
);
561 /* init the mac address using DIE id */
562 omap_get_die_id(&odi
);
564 eth_addr
[0] = 0x02; /* locally administered */
565 eth_addr
[1] = odi
.id_1
& 0xff;
566 eth_addr
[2] = (odi
.id_0
& 0xff000000) >> 24;
567 eth_addr
[3] = (odi
.id_0
& 0x00ff0000) >> 16;
568 eth_addr
[4] = (odi
.id_0
& 0x0000ff00) >> 8;
569 eth_addr
[5] = (odi
.id_0
& 0x000000ff);
572 static struct platform_device
*devkit8000_devices
[] __initdata
= {
573 &devkit8000_dss_device
,
579 static void __init
devkit8000_flash_init(void)
582 u8 nandcs
= GPMC_CS_NUM
+ 1;
584 /* find out the chip-select on which NAND exists */
585 while (cs
< GPMC_CS_NUM
) {
587 ret
= gpmc_cs_read_reg(cs
, GPMC_CS_CONFIG1
);
589 if ((ret
& 0xC00) == 0x800) {
590 printk(KERN_INFO
"Found NAND on CS%d\n", cs
);
591 if (nandcs
> GPMC_CS_NUM
)
597 if (nandcs
> GPMC_CS_NUM
) {
598 printk(KERN_INFO
"NAND: Unable to find configuration "
603 if (nandcs
< GPMC_CS_NUM
) {
604 devkit8000_nand_data
.cs
= nandcs
;
606 printk(KERN_INFO
"Registering NAND on CS%d\n", nandcs
);
607 if (gpmc_nand_init(&devkit8000_nand_data
) < 0)
608 printk(KERN_ERR
"Unable to register NAND device\n");
612 static struct omap_musb_board_data musb_board_data
= {
613 .interface_type
= MUSB_INTERFACE_ULPI
,
618 static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst
= {
620 .port_mode
[0] = EHCI_HCD_OMAP_MODE_PHY
,
621 .port_mode
[1] = EHCI_HCD_OMAP_MODE_UNKNOWN
,
622 .port_mode
[2] = EHCI_HCD_OMAP_MODE_UNKNOWN
,
625 .reset_gpio_port
[0] = -EINVAL
,
626 .reset_gpio_port
[1] = -EINVAL
,
627 .reset_gpio_port
[2] = -EINVAL
630 static struct omap_board_mux board_mux
[] __initdata
= {
631 /* nCS and IRQ for Devkit8000 ethernet */
632 OMAP3_MUX(GPMC_NCS6
, OMAP_MUX_MODE0
),
633 OMAP3_MUX(ETK_D11
, OMAP_MUX_MODE4
| OMAP_PIN_INPUT_PULLUP
),
636 OMAP3_MUX(MCSPI2_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
637 OMAP3_MUX(MCSPI2_SIMO
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
638 OMAP3_MUX(MCSPI2_SOMI
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
639 OMAP3_MUX(MCSPI2_CS0
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
640 OMAP3_MUX(MCSPI2_CS1
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
643 OMAP3_MUX(ETK_D13
, OMAP_MUX_MODE4
| OMAP_PIN_INPUT
),
646 OMAP3_MUX(HSUSB0_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
647 OMAP3_MUX(HSUSB0_STP
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
648 OMAP3_MUX(HSUSB0_DIR
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
649 OMAP3_MUX(HSUSB0_NXT
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
650 OMAP3_MUX(HSUSB0_DATA0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
651 OMAP3_MUX(HSUSB0_DATA1
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
652 OMAP3_MUX(HSUSB0_DATA2
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
653 OMAP3_MUX(HSUSB0_DATA3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
654 OMAP3_MUX(HSUSB0_DATA4
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
655 OMAP3_MUX(HSUSB0_DATA5
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
656 OMAP3_MUX(HSUSB0_DATA6
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
657 OMAP3_MUX(HSUSB0_DATA7
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
660 OMAP3_MUX(ETK_CTL
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
661 OMAP3_MUX(ETK_CLK
, OMAP_MUX_MODE3
| OMAP_PIN_OUTPUT
),
662 OMAP3_MUX(ETK_D8
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
663 OMAP3_MUX(ETK_D9
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
664 OMAP3_MUX(ETK_D0
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
665 OMAP3_MUX(ETK_D1
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
666 OMAP3_MUX(ETK_D2
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
667 OMAP3_MUX(ETK_D3
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
668 OMAP3_MUX(ETK_D4
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
669 OMAP3_MUX(ETK_D5
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
670 OMAP3_MUX(ETK_D6
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
671 OMAP3_MUX(ETK_D7
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
674 OMAP3_MUX(SDMMC1_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
675 OMAP3_MUX(SDMMC1_CMD
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
676 OMAP3_MUX(SDMMC1_DAT0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
677 OMAP3_MUX(SDMMC1_DAT1
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
678 OMAP3_MUX(SDMMC1_DAT2
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
679 OMAP3_MUX(SDMMC1_DAT3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
680 OMAP3_MUX(SDMMC1_DAT4
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
681 OMAP3_MUX(SDMMC1_DAT5
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
682 OMAP3_MUX(SDMMC1_DAT6
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
683 OMAP3_MUX(SDMMC1_DAT7
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
686 OMAP3_MUX(MCBSP2_FSX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
687 OMAP3_MUX(MCBSP2_CLKX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
688 OMAP3_MUX(MCBSP2_DR
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
689 OMAP3_MUX(MCBSP2_DX
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
692 OMAP3_MUX(I2C1_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
693 OMAP3_MUX(I2C1_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
696 OMAP3_MUX(I2C2_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
697 OMAP3_MUX(I2C2_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
700 OMAP3_MUX(I2C3_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
701 OMAP3_MUX(I2C3_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
704 OMAP3_MUX(I2C4_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
705 OMAP3_MUX(I2C4_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
708 OMAP3_MUX(MCBSP3_CLKX
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
709 OMAP3_MUX(MCBSP3_FSX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
710 OMAP3_MUX(UART1_TX
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
711 OMAP3_MUX(UART1_RX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
714 OMAP3_MUX(DSS_PCLK
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
715 OMAP3_MUX(DSS_HSYNC
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
716 OMAP3_MUX(DSS_VSYNC
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
717 OMAP3_MUX(DSS_ACBIAS
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
718 OMAP3_MUX(DSS_DATA0
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
719 OMAP3_MUX(DSS_DATA1
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
720 OMAP3_MUX(DSS_DATA2
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
721 OMAP3_MUX(DSS_DATA3
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
722 OMAP3_MUX(DSS_DATA4
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
723 OMAP3_MUX(DSS_DATA5
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
724 OMAP3_MUX(DSS_DATA6
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
725 OMAP3_MUX(DSS_DATA7
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
726 OMAP3_MUX(DSS_DATA8
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
727 OMAP3_MUX(DSS_DATA9
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
728 OMAP3_MUX(DSS_DATA10
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
729 OMAP3_MUX(DSS_DATA11
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
730 OMAP3_MUX(DSS_DATA12
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
731 OMAP3_MUX(DSS_DATA13
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
732 OMAP3_MUX(DSS_DATA14
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
733 OMAP3_MUX(DSS_DATA15
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
734 OMAP3_MUX(DSS_DATA16
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
735 OMAP3_MUX(DSS_DATA17
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
736 OMAP3_MUX(DSS_DATA18
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
737 OMAP3_MUX(DSS_DATA19
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
738 OMAP3_MUX(DSS_DATA20
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
739 OMAP3_MUX(DSS_DATA21
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
740 OMAP3_MUX(DSS_DATA22
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
741 OMAP3_MUX(DSS_DATA23
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
745 OMAP3_MUX(MCSPI1_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
746 OMAP3_MUX(MCSPI1_SIMO
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
747 OMAP3_MUX(MCSPI1_SOMI
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
748 OMAP3_MUX(MCSPI1_CS0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLDOWN
),
749 OMAP3_MUX(MCSPI1_CS3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLDOWN
),
752 OMAP3_MUX(HDQ_SIO
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
755 OMAP3_MUX(MCBSP1_CLKR
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
756 OMAP3_MUX(MCBSP1_DX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
757 OMAP3_MUX(MCBSP1_DR
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
758 OMAP3_MUX(MCBSP1_FSX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT_PULLUP
),
761 OMAP3_MUX(SDMMC2_DAT4
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
762 OMAP3_MUX(SDMMC2_DAT5
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
763 OMAP3_MUX(SDMMC2_DAT6
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
764 OMAP3_MUX(SDMMC2_DAT7
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
767 OMAP3_MUX(I2C3_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
768 OMAP3_MUX(I2C3_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
770 OMAP3_MUX(MCBSP1_CLKX
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
771 OMAP3_MUX(MCBSP_CLKS
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
772 OMAP3_MUX(MCBSP1_FSR
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
774 OMAP3_MUX(GPMC_NCS7
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
775 OMAP3_MUX(GPMC_NCS3
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
778 OMAP3_MUX(SYS_NIRQ
, OMAP_MUX_MODE0
| OMAP_WAKEUP_EN
| \
779 OMAP_PIN_INPUT_PULLUP
),
781 { .reg_offset
= OMAP_MUX_TERMINATOR
},
784 static void __init
devkit8000_init(void)
786 omap3_mux_init(board_mux
, OMAP_PACKAGE_CUS
);
791 devkit8000_i2c_init();
792 platform_add_devices(devkit8000_devices
,
793 ARRAY_SIZE(devkit8000_devices
));
795 spi_register_board_info(devkit8000_spi_board_info
,
796 ARRAY_SIZE(devkit8000_spi_board_info
));
798 devkit8000_ads7846_init();
800 usb_musb_init(&musb_board_data
);
801 usb_ehci_init(&ehci_pdata
);
802 devkit8000_flash_init();
804 /* Ensure SDRC pins are mux'd for self-refresh */
805 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT
);
806 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT
);
809 MACHINE_START(DEVKIT8000
, "OMAP3 Devkit8000")
810 .boot_params
= 0x80000100,
811 .map_io
= omap3_map_io
,
812 .reserve
= omap_reserve
,
813 .init_irq
= devkit8000_init_irq
,
814 .init_machine
= devkit8000_init
,
815 .timer
= &omap_timer
,