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>
50 #include <plat/mcspi.h>
51 #include <linux/input/matrix_keypad.h>
52 #include <linux/spi/spi.h>
53 #include <linux/spi/ads7846.h>
54 #include <linux/dm9000.h>
55 #include <linux/interrupt.h>
57 #include "sdram-micron-mt46h32m32lf-6.h"
63 #define NAND_BLOCK_SIZE SZ_128K
65 #define OMAP_DM9000_GPIO_IRQ 25
66 #define OMAP3_DEVKIT_TS_GPIO 27
68 static struct mtd_partition devkit8000_nand_partitions
[] = {
69 /* All the partition sizes are listed in terms of NAND block size */
73 .size
= 4 * NAND_BLOCK_SIZE
,
74 .mask_flags
= MTD_WRITEABLE
, /* force read-only */
78 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x80000 */
79 .size
= 15 * NAND_BLOCK_SIZE
,
80 .mask_flags
= MTD_WRITEABLE
, /* force read-only */
84 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x260000 */
85 .size
= 1 * NAND_BLOCK_SIZE
,
89 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x280000 */
90 .size
= 32 * NAND_BLOCK_SIZE
,
93 .name
= "File System",
94 .offset
= MTDPART_OFS_APPEND
, /* Offset = 0x680000 */
95 .size
= MTDPART_SIZ_FULL
,
99 static struct omap_nand_platform_data devkit8000_nand_data
= {
100 .options
= NAND_BUSWIDTH_16
,
101 .parts
= devkit8000_nand_partitions
,
102 .nr_parts
= ARRAY_SIZE(devkit8000_nand_partitions
),
103 .dma_channel
= -1, /* disable DMA in OMAP NAND driver */
106 static struct omap2_hsmmc_info mmc
[] = {
109 .caps
= MMC_CAP_4_BIT_DATA
| MMC_CAP_8_BIT_DATA
,
115 static int devkit8000_panel_enable_lcd(struct omap_dss_device
*dssdev
)
117 twl_i2c_write_u8(TWL4030_MODULE_GPIO
, 0x80, REG_GPIODATADIR1
);
118 twl_i2c_write_u8(TWL4030_MODULE_LED
, 0x0, 0x0);
120 if (gpio_is_valid(dssdev
->reset_gpio
))
121 gpio_set_value(dssdev
->reset_gpio
, 1);
125 static void devkit8000_panel_disable_lcd(struct omap_dss_device
*dssdev
)
127 if (gpio_is_valid(dssdev
->reset_gpio
))
128 gpio_set_value(dssdev
->reset_gpio
, 0);
131 static int devkit8000_panel_enable_dvi(struct omap_dss_device
*dssdev
)
133 if (gpio_is_valid(dssdev
->reset_gpio
))
134 gpio_set_value(dssdev
->reset_gpio
, 1);
138 static void devkit8000_panel_disable_dvi(struct omap_dss_device
*dssdev
)
140 if (gpio_is_valid(dssdev
->reset_gpio
))
141 gpio_set_value(dssdev
->reset_gpio
, 0);
144 static struct regulator_consumer_supply devkit8000_vmmc1_supply
=
145 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
149 static struct regulator_consumer_supply devkit8000_vio_supply
=
150 REGULATOR_SUPPLY("vcc", "spi2.0");
152 static struct omap_dss_device devkit8000_lcd_device
= {
154 .driver_name
= "generic_panel",
155 .type
= OMAP_DISPLAY_TYPE_DPI
,
156 .phy
.dpi
.data_lines
= 24,
157 .reset_gpio
= -EINVAL
, /* will be replaced */
158 .platform_enable
= devkit8000_panel_enable_lcd
,
159 .platform_disable
= devkit8000_panel_disable_lcd
,
161 static struct omap_dss_device devkit8000_dvi_device
= {
163 .driver_name
= "generic_panel",
164 .type
= OMAP_DISPLAY_TYPE_DPI
,
165 .phy
.dpi
.data_lines
= 24,
166 .reset_gpio
= -EINVAL
, /* will be replaced */
167 .platform_enable
= devkit8000_panel_enable_dvi
,
168 .platform_disable
= devkit8000_panel_disable_dvi
,
171 static struct omap_dss_device devkit8000_tv_device
= {
173 .driver_name
= "venc",
174 .type
= OMAP_DISPLAY_TYPE_VENC
,
175 .phy
.venc
.type
= OMAP_DSS_VENC_TYPE_SVIDEO
,
179 static struct omap_dss_device
*devkit8000_dss_devices
[] = {
180 &devkit8000_lcd_device
,
181 &devkit8000_dvi_device
,
182 &devkit8000_tv_device
,
185 static struct omap_dss_board_info devkit8000_dss_data
= {
186 .num_devices
= ARRAY_SIZE(devkit8000_dss_devices
),
187 .devices
= devkit8000_dss_devices
,
188 .default_device
= &devkit8000_lcd_device
,
191 static struct platform_device devkit8000_dss_device
= {
195 .platform_data
= &devkit8000_dss_data
,
199 static struct regulator_consumer_supply devkit8000_vdda_dac_supply
=
200 REGULATOR_SUPPLY("vdda_dac", "omapdss");
202 static uint32_t board_keymap
[] = {
217 PERSISTENT_KEY(4, 5),
218 KEY(4, 4, KEY_VOLUMEUP
),
219 KEY(5, 5, KEY_VOLUMEDOWN
),
223 static struct matrix_keymap_data board_map_data
= {
224 .keymap
= board_keymap
,
225 .keymap_size
= ARRAY_SIZE(board_keymap
),
228 static struct twl4030_keypad_data devkit8000_kp_data
= {
229 .keymap_data
= &board_map_data
,
235 static struct gpio_led gpio_leds
[];
237 static int devkit8000_twl_gpio_setup(struct device
*dev
,
238 unsigned gpio
, unsigned ngpio
)
240 omap_mux_init_gpio(29, OMAP_PIN_INPUT
);
241 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
242 mmc
[0].gpio_cd
= gpio
+ 0;
243 omap2_hsmmc_init(mmc
);
245 /* link regulators to MMC adapters */
246 devkit8000_vmmc1_supply
.dev
= mmc
[0].dev
;
248 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
249 gpio_leds
[2].gpio
= gpio
+ TWL4030_GPIO_MAX
+ 1;
251 /* gpio + 1 is "LCD_PWREN" (out, active high) */
252 devkit8000_lcd_device
.reset_gpio
= gpio
+ 1;
253 gpio_request(devkit8000_lcd_device
.reset_gpio
, "LCD_PWREN");
254 /* Disable until needed */
255 gpio_direction_output(devkit8000_lcd_device
.reset_gpio
, 0);
257 /* gpio + 7 is "DVI_PD" (out, active low) */
258 devkit8000_dvi_device
.reset_gpio
= gpio
+ 7;
259 gpio_request(devkit8000_dvi_device
.reset_gpio
, "DVI PowerDown");
260 /* Disable until needed */
261 gpio_direction_output(devkit8000_dvi_device
.reset_gpio
, 0);
266 static struct twl4030_gpio_platform_data devkit8000_gpio_data
= {
267 .gpio_base
= OMAP_MAX_GPIO_LINES
,
268 .irq_base
= TWL4030_GPIO_IRQ_BASE
,
269 .irq_end
= TWL4030_GPIO_IRQ_END
,
272 .pulldowns
= BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
273 | BIT(15) | BIT(16) | BIT(17),
274 .setup
= devkit8000_twl_gpio_setup
,
277 static struct regulator_consumer_supply devkit8000_vpll1_supply
=
278 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
280 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
281 static struct regulator_init_data devkit8000_vmmc1
= {
285 .valid_modes_mask
= REGULATOR_MODE_NORMAL
286 | REGULATOR_MODE_STANDBY
,
287 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
288 | REGULATOR_CHANGE_MODE
289 | REGULATOR_CHANGE_STATUS
,
291 .num_consumer_supplies
= 1,
292 .consumer_supplies
= &devkit8000_vmmc1_supply
,
295 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
296 static struct regulator_init_data devkit8000_vdac
= {
300 .valid_modes_mask
= REGULATOR_MODE_NORMAL
301 | REGULATOR_MODE_STANDBY
,
302 .valid_ops_mask
= REGULATOR_CHANGE_MODE
303 | REGULATOR_CHANGE_STATUS
,
305 .num_consumer_supplies
= 1,
306 .consumer_supplies
= &devkit8000_vdda_dac_supply
,
309 /* VPLL1 for digital video outputs */
310 static struct regulator_init_data devkit8000_vpll1
= {
314 .valid_modes_mask
= REGULATOR_MODE_NORMAL
315 | REGULATOR_MODE_STANDBY
,
316 .valid_ops_mask
= REGULATOR_CHANGE_MODE
317 | REGULATOR_CHANGE_STATUS
,
319 .num_consumer_supplies
= 1,
320 .consumer_supplies
= &devkit8000_vpll1_supply
,
323 /* VAUX4 for ads7846 and nubs */
324 static struct regulator_init_data devkit8000_vio
= {
329 .valid_modes_mask
= REGULATOR_MODE_NORMAL
330 | REGULATOR_MODE_STANDBY
,
331 .valid_ops_mask
= REGULATOR_CHANGE_MODE
332 | REGULATOR_CHANGE_STATUS
,
334 .num_consumer_supplies
= 1,
335 .consumer_supplies
= &devkit8000_vio_supply
,
338 static struct twl4030_usb_data devkit8000_usb_data
= {
339 .usb_mode
= T2_USB_MODE_ULPI
,
342 static struct twl4030_codec_audio_data devkit8000_audio_data
= {
343 .audio_mclk
= 26000000,
346 static struct twl4030_codec_data devkit8000_codec_data
= {
347 .audio_mclk
= 26000000,
348 .audio
= &devkit8000_audio_data
,
351 static struct twl4030_platform_data devkit8000_twldata
= {
352 .irq_base
= TWL4030_IRQ_BASE
,
353 .irq_end
= TWL4030_IRQ_END
,
355 /* platform_data for children goes here */
356 .usb
= &devkit8000_usb_data
,
357 .gpio
= &devkit8000_gpio_data
,
358 .codec
= &devkit8000_codec_data
,
359 .vmmc1
= &devkit8000_vmmc1
,
360 .vdac
= &devkit8000_vdac
,
361 .vpll1
= &devkit8000_vpll1
,
362 .vio
= &devkit8000_vio
,
363 .keypad
= &devkit8000_kp_data
,
366 static struct i2c_board_info __initdata devkit8000_i2c_boardinfo
[] = {
368 I2C_BOARD_INFO("tps65930", 0x48),
369 .flags
= I2C_CLIENT_WAKE
,
370 .irq
= INT_34XX_SYS_NIRQ
,
371 .platform_data
= &devkit8000_twldata
,
375 static int __init
devkit8000_i2c_init(void)
377 omap_register_i2c_bus(1, 2600, devkit8000_i2c_boardinfo
,
378 ARRAY_SIZE(devkit8000_i2c_boardinfo
));
379 /* Bus 3 is attached to the DVI port where devices like the pico DLP
380 * projector don't work reliably with 400kHz */
381 omap_register_i2c_bus(3, 400, NULL
, 0);
385 static struct gpio_led gpio_leds
[] = {
388 .default_trigger
= "heartbeat",
394 .default_trigger
= "mmc0",
400 .default_trigger
= "none",
406 .default_trigger
= "none",
412 static struct gpio_led_platform_data gpio_led_info
= {
414 .num_leds
= ARRAY_SIZE(gpio_leds
),
417 static struct platform_device leds_gpio
= {
421 .platform_data
= &gpio_led_info
,
425 static struct gpio_keys_button gpio_buttons
[] = {
434 static struct gpio_keys_platform_data gpio_key_info
= {
435 .buttons
= gpio_buttons
,
436 .nbuttons
= ARRAY_SIZE(gpio_buttons
),
439 static struct platform_device keys_gpio
= {
443 .platform_data
= &gpio_key_info
,
448 static void __init
devkit8000_init_irq(void)
450 omap2_init_common_hw(mt46h32m32lf6_sdrc_params
,
451 mt46h32m32lf6_sdrc_params
);
453 #ifdef CONFIG_OMAP_32K_TIMER
454 omap2_gp_clockevent_set_gptimer(12);
459 static void __init
devkit8000_ads7846_init(void)
461 int gpio
= OMAP3_DEVKIT_TS_GPIO
;
464 ret
= gpio_request(gpio
, "ads7846_pen_down");
466 printk(KERN_ERR
"Failed to request GPIO %d for "
467 "ads7846 pen down IRQ\n", gpio
);
471 gpio_direction_input(gpio
);
474 static int ads7846_get_pendown_state(void)
476 return !gpio_get_value(OMAP3_DEVKIT_TS_GPIO
);
479 static struct ads7846_platform_data ads7846_config
= {
487 .get_pendown_state
= ads7846_get_pendown_state
,
489 .settle_delay_usecs
= 150,
492 static struct omap2_mcspi_device_config ads7846_mcspi_config
= {
494 .single_channel
= 1, /* 0: slave, 1: master */
497 static struct spi_board_info devkit8000_spi_board_info
[] __initdata
= {
499 .modalias
= "ads7846",
502 .max_speed_hz
= 1500000,
503 .controller_data
= &ads7846_mcspi_config
,
504 .irq
= OMAP_GPIO_IRQ(OMAP3_DEVKIT_TS_GPIO
),
505 .platform_data
= &ads7846_config
,
509 #define OMAP_DM9000_BASE 0x2c000000
511 static struct resource omap_dm9000_resources
[] = {
513 .start
= OMAP_DM9000_BASE
,
514 .end
= (OMAP_DM9000_BASE
+ 0x4 - 1),
515 .flags
= IORESOURCE_MEM
,
518 .start
= (OMAP_DM9000_BASE
+ 0x400),
519 .end
= (OMAP_DM9000_BASE
+ 0x400 + 0x4 - 1),
520 .flags
= IORESOURCE_MEM
,
523 .start
= OMAP_GPIO_IRQ(OMAP_DM9000_GPIO_IRQ
),
524 .flags
= IORESOURCE_IRQ
| IRQF_TRIGGER_LOW
,
528 static struct dm9000_plat_data omap_dm9000_platdata
= {
529 .flags
= DM9000_PLATF_16BITONLY
,
532 static struct platform_device omap_dm9000_dev
= {
535 .num_resources
= ARRAY_SIZE(omap_dm9000_resources
),
536 .resource
= omap_dm9000_resources
,
538 .platform_data
= &omap_dm9000_platdata
,
542 static void __init
omap_dm9000_init(void)
544 unsigned char *eth_addr
= omap_dm9000_platdata
.dev_addr
;
545 struct omap_die_id odi
;
547 if (gpio_request(OMAP_DM9000_GPIO_IRQ
, "dm9000 irq") < 0) {
548 printk(KERN_ERR
"Failed to request GPIO%d for dm9000 IRQ\n",
549 OMAP_DM9000_GPIO_IRQ
);
553 gpio_direction_input(OMAP_DM9000_GPIO_IRQ
);
555 /* init the mac address using DIE id */
556 omap_get_die_id(&odi
);
558 eth_addr
[0] = 0x02; /* locally administered */
559 eth_addr
[1] = odi
.id_1
& 0xff;
560 eth_addr
[2] = (odi
.id_0
& 0xff000000) >> 24;
561 eth_addr
[3] = (odi
.id_0
& 0x00ff0000) >> 16;
562 eth_addr
[4] = (odi
.id_0
& 0x0000ff00) >> 8;
563 eth_addr
[5] = (odi
.id_0
& 0x000000ff);
566 static struct platform_device
*devkit8000_devices
[] __initdata
= {
567 &devkit8000_dss_device
,
573 static void __init
devkit8000_flash_init(void)
576 u8 nandcs
= GPMC_CS_NUM
+ 1;
578 /* find out the chip-select on which NAND exists */
579 while (cs
< GPMC_CS_NUM
) {
581 ret
= gpmc_cs_read_reg(cs
, GPMC_CS_CONFIG1
);
583 if ((ret
& 0xC00) == 0x800) {
584 printk(KERN_INFO
"Found NAND on CS%d\n", cs
);
585 if (nandcs
> GPMC_CS_NUM
)
591 if (nandcs
> GPMC_CS_NUM
) {
592 printk(KERN_INFO
"NAND: Unable to find configuration "
597 if (nandcs
< GPMC_CS_NUM
) {
598 devkit8000_nand_data
.cs
= nandcs
;
600 printk(KERN_INFO
"Registering NAND on CS%d\n", nandcs
);
601 if (gpmc_nand_init(&devkit8000_nand_data
) < 0)
602 printk(KERN_ERR
"Unable to register NAND device\n");
606 static struct omap_musb_board_data musb_board_data
= {
607 .interface_type
= MUSB_INTERFACE_ULPI
,
612 static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst
= {
614 .port_mode
[0] = EHCI_HCD_OMAP_MODE_PHY
,
615 .port_mode
[1] = EHCI_HCD_OMAP_MODE_UNKNOWN
,
616 .port_mode
[2] = EHCI_HCD_OMAP_MODE_UNKNOWN
,
619 .reset_gpio_port
[0] = -EINVAL
,
620 .reset_gpio_port
[1] = -EINVAL
,
621 .reset_gpio_port
[2] = -EINVAL
624 static struct omap_board_mux board_mux
[] __initdata
= {
625 /* nCS and IRQ for Devkit8000 ethernet */
626 OMAP3_MUX(GPMC_NCS6
, OMAP_MUX_MODE0
),
627 OMAP3_MUX(ETK_D11
, OMAP_MUX_MODE4
| OMAP_PIN_INPUT_PULLUP
),
630 OMAP3_MUX(MCSPI2_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
631 OMAP3_MUX(MCSPI2_SIMO
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
632 OMAP3_MUX(MCSPI2_SOMI
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
633 OMAP3_MUX(MCSPI2_CS0
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
634 OMAP3_MUX(MCSPI2_CS1
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
637 OMAP3_MUX(ETK_D13
, OMAP_MUX_MODE4
| OMAP_PIN_INPUT
),
640 OMAP3_MUX(HSUSB0_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
641 OMAP3_MUX(HSUSB0_STP
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
642 OMAP3_MUX(HSUSB0_DIR
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
643 OMAP3_MUX(HSUSB0_NXT
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
644 OMAP3_MUX(HSUSB0_DATA0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
645 OMAP3_MUX(HSUSB0_DATA1
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
646 OMAP3_MUX(HSUSB0_DATA2
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
647 OMAP3_MUX(HSUSB0_DATA3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
648 OMAP3_MUX(HSUSB0_DATA4
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
649 OMAP3_MUX(HSUSB0_DATA5
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
650 OMAP3_MUX(HSUSB0_DATA6
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
651 OMAP3_MUX(HSUSB0_DATA7
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
654 OMAP3_MUX(ETK_CTL
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
655 OMAP3_MUX(ETK_CLK
, OMAP_MUX_MODE3
| OMAP_PIN_OUTPUT
),
656 OMAP3_MUX(ETK_D8
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
657 OMAP3_MUX(ETK_D9
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
658 OMAP3_MUX(ETK_D0
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
659 OMAP3_MUX(ETK_D1
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
660 OMAP3_MUX(ETK_D2
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
661 OMAP3_MUX(ETK_D3
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
662 OMAP3_MUX(ETK_D4
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
663 OMAP3_MUX(ETK_D5
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
664 OMAP3_MUX(ETK_D6
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
665 OMAP3_MUX(ETK_D7
, OMAP_MUX_MODE3
| OMAP_PIN_INPUT
),
668 OMAP3_MUX(SDMMC1_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
669 OMAP3_MUX(SDMMC1_CMD
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
670 OMAP3_MUX(SDMMC1_DAT0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
671 OMAP3_MUX(SDMMC1_DAT1
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
672 OMAP3_MUX(SDMMC1_DAT2
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
673 OMAP3_MUX(SDMMC1_DAT3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
674 OMAP3_MUX(SDMMC1_DAT4
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
675 OMAP3_MUX(SDMMC1_DAT5
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
676 OMAP3_MUX(SDMMC1_DAT6
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
677 OMAP3_MUX(SDMMC1_DAT7
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
680 OMAP3_MUX(MCBSP2_FSX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
681 OMAP3_MUX(MCBSP2_CLKX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
682 OMAP3_MUX(MCBSP2_DR
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
683 OMAP3_MUX(MCBSP2_DX
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
686 OMAP3_MUX(I2C1_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
687 OMAP3_MUX(I2C1_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
690 OMAP3_MUX(I2C2_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
691 OMAP3_MUX(I2C2_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
694 OMAP3_MUX(I2C3_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
695 OMAP3_MUX(I2C3_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
698 OMAP3_MUX(I2C4_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
699 OMAP3_MUX(I2C4_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
702 OMAP3_MUX(MCBSP3_CLKX
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
703 OMAP3_MUX(MCBSP3_FSX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
704 OMAP3_MUX(UART1_TX
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
705 OMAP3_MUX(UART1_RX
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
708 OMAP3_MUX(DSS_PCLK
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
709 OMAP3_MUX(DSS_HSYNC
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
710 OMAP3_MUX(DSS_VSYNC
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
711 OMAP3_MUX(DSS_ACBIAS
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
712 OMAP3_MUX(DSS_DATA0
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
713 OMAP3_MUX(DSS_DATA1
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
714 OMAP3_MUX(DSS_DATA2
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
715 OMAP3_MUX(DSS_DATA3
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
716 OMAP3_MUX(DSS_DATA4
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
717 OMAP3_MUX(DSS_DATA5
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
718 OMAP3_MUX(DSS_DATA6
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
719 OMAP3_MUX(DSS_DATA7
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
720 OMAP3_MUX(DSS_DATA8
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
721 OMAP3_MUX(DSS_DATA9
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
722 OMAP3_MUX(DSS_DATA10
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
723 OMAP3_MUX(DSS_DATA11
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
724 OMAP3_MUX(DSS_DATA12
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
725 OMAP3_MUX(DSS_DATA13
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
726 OMAP3_MUX(DSS_DATA14
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
727 OMAP3_MUX(DSS_DATA15
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
728 OMAP3_MUX(DSS_DATA16
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
729 OMAP3_MUX(DSS_DATA17
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
730 OMAP3_MUX(DSS_DATA18
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
731 OMAP3_MUX(DSS_DATA19
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
732 OMAP3_MUX(DSS_DATA20
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
733 OMAP3_MUX(DSS_DATA21
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
734 OMAP3_MUX(DSS_DATA22
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
735 OMAP3_MUX(DSS_DATA23
, OMAP_MUX_MODE0
| OMAP_PIN_OUTPUT
),
739 OMAP3_MUX(MCSPI1_CLK
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
740 OMAP3_MUX(MCSPI1_SIMO
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
741 OMAP3_MUX(MCSPI1_SOMI
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
742 OMAP3_MUX(MCSPI1_CS0
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLDOWN
),
743 OMAP3_MUX(MCSPI1_CS3
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLDOWN
),
746 OMAP3_MUX(HDQ_SIO
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
749 OMAP3_MUX(MCBSP1_CLKR
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
750 OMAP3_MUX(MCBSP1_DX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
751 OMAP3_MUX(MCBSP1_DR
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
752 OMAP3_MUX(MCBSP1_FSX
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT_PULLUP
),
755 OMAP3_MUX(SDMMC2_DAT4
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
756 OMAP3_MUX(SDMMC2_DAT5
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
757 OMAP3_MUX(SDMMC2_DAT6
, OMAP_MUX_MODE1
| OMAP_PIN_OUTPUT
),
758 OMAP3_MUX(SDMMC2_DAT7
, OMAP_MUX_MODE1
| OMAP_PIN_INPUT
),
761 OMAP3_MUX(I2C3_SCL
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
762 OMAP3_MUX(I2C3_SDA
, OMAP_MUX_MODE0
| OMAP_PIN_INPUT
),
764 OMAP3_MUX(MCBSP1_CLKX
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
765 OMAP3_MUX(MCBSP_CLKS
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
766 OMAP3_MUX(MCBSP1_FSR
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
768 OMAP3_MUX(GPMC_NCS7
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
769 OMAP3_MUX(GPMC_NCS3
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
772 OMAP3_MUX(SYS_NIRQ
, OMAP_MUX_MODE0
| OMAP_WAKEUP_EN
| \
773 OMAP_PIN_INPUT_PULLUP
),
775 { .reg_offset
= OMAP_MUX_TERMINATOR
},
778 static void __init
devkit8000_init(void)
780 omap3_mux_init(board_mux
, OMAP_PACKAGE_CUS
);
785 devkit8000_i2c_init();
786 platform_add_devices(devkit8000_devices
,
787 ARRAY_SIZE(devkit8000_devices
));
789 spi_register_board_info(devkit8000_spi_board_info
,
790 ARRAY_SIZE(devkit8000_spi_board_info
));
792 devkit8000_ads7846_init();
794 usb_musb_init(&musb_board_data
);
795 usb_ehci_init(&ehci_pdata
);
796 devkit8000_flash_init();
798 /* Ensure SDRC pins are mux'd for self-refresh */
799 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT
);
800 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT
);
803 MACHINE_START(DEVKIT8000
, "OMAP3 Devkit8000")
804 .boot_params
= 0x80000100,
805 .map_io
= omap3_map_io
,
806 .reserve
= omap_reserve
,
807 .init_irq
= devkit8000_init_irq
,
808 .init_machine
= devkit8000_init
,
809 .timer
= &omap_timer
,