15 #include <linux/i2c.h>
19 #include <linux/input.h>
23 #include <mach/common.h>
24 #include <mach/hardware.h>
27 #include <asm/setup.h>
35 #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
36 #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27)
37 #define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5)
38 #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14)
39 #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21)
40 #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24)
41 #define BABBAGE_ECSPI1_CS1 IMX_GPIO_NR(4, 25)
42 #define BABBAGE_SD2_CD IMX_GPIO_NR(1, 6)
43 #define BABBAGE_SD2_WP IMX_GPIO_NR(1, 5)
46 #define MX51_USB_CTRL_1_OFFSET 0x10
47 #define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
49 #define MX51_USB_PLLDIV_12_MHZ 0x00
50 #define MX51_USB_PLL_DIV_19_2_MHZ 0x01
51 #define MX51_USB_PLL_DIV_24_MHZ 0x02
64 .buttons = babbage_buttons,
187 static struct gpio mx51_babbage_usbh1_gpios[] = {
192 static int gpio_usbh1_active(
void)
203 pr_debug(
"failed to get USBH1 pins: %d\n", ret);
215 static inline void babbage_usbhub_reset(
void)
232 static inline void babbage_fec_reset(
void)
296 .init = initialize_otg_port,
306 .
init = initialize_usbh1_port,
314 if (!
strcmp(options,
"host"))
315 otg_mode_host =
true;
316 else if (!
strcmp(options,
"device"))
317 otg_mode_host =
false;
319 pr_info(
"otg_mode neither \"host\" nor \"device\". "
320 "Defaulting to device\n");
323 __setup(
"otg_mode=", babbage_otg_mode);
325 static struct spi_board_info mx51_babbage_spi_board_info[] __initdata = {
328 .max_speed_hz = 25000000,
332 .platform_data =
NULL,
336 static int mx51_babbage_spi_cs[] = {
341 static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
342 .chipselect = mx51_babbage_spi_cs,
343 .num_chipselect =
ARRAY_SIZE(mx51_babbage_spi_cs),
367 static void __init mx51_babbage_init(
void)
375 #if defined(CONFIG_CPU_FREQ_IMX)
398 initialize_otg_port(
NULL);
406 babbage_usbhub_reset();
417 static void __init mx51_babbage_timer_init(
void)
422 static struct sys_timer mx51_babbage_timer = {
423 .init = mx51_babbage_timer_init,
428 .atag_offset = 0x100,
433 .timer = &mx51_babbage_timer,
434 .init_machine = mx51_babbage_init,