26 #include <linux/types.h>
36 #include <linux/input.h>
37 #include <linux/i2c.h>
44 #include <mach/hardware.h>
48 #include <asm/memory.h>
51 #include <mach/common.h>
58 static int armadillo5x0_pins[] = {
135 #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4)
136 #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6)
137 #define USBH2_CS IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)
139 #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
140 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
163 pr_err(
"Failed to request the usb otg reset gpio\n");
169 pr_err(
"Failed to reset the usb otg phy\n");
209 pr_err(
"Failed to request the usb host 2 CS gpio\n");
215 pr_err(
"Failed to drive the usb host 2 CS gpio\n");
222 pr_err(
"Failed to request the usb host 2 reset gpio\n");
228 pr_err(
"Failed to reset the usb host 2 phy\n");
258 #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)
283 .buttons = armadillo5x0_buttons,
291 armadillo5x0_nand_board_info __initconst = {
299 static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
301 .name =
"nor.bootloader",
302 .offset = 0x00000000,
305 .name =
"nor.kernel",
309 .name =
"nor.userland",
311 .size = 110*128*1024,
313 .name =
"nor.config",
320 armadillo5x0_nor_flash_pdata __initconst = {
322 .parts = armadillo5x0_nor_flash_partitions,
323 .nr_parts =
ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
326 static const struct resource armadillo5x0_nor_flash_resource __initconst = {
380 static int armadillo5x0_sdhc1_get_ro(
struct device *
dev)
385 static int armadillo5x0_sdhc1_init(
struct device *dev,
389 int gpio_det, gpio_wp;
410 "sdhc-detect", data);
413 goto err_gpio_free_2;
427 static void armadillo5x0_sdhc1_exit(
struct device *dev,
void *data)
435 .get_ro = armadillo5x0_sdhc1_get_ro,
436 .init = armadillo5x0_sdhc1_init,
437 .exit = armadillo5x0_sdhc1_exit,
444 static struct resource armadillo5x0_smc911x_resources[] = {
464 .num_resources =
ARRAY_SIZE(armadillo5x0_smc911x_resources),
465 .resource = armadillo5x0_smc911x_resources,
467 .platform_data = &smsc911x_info,
477 &armadillo5x0_smc911x_device,
488 static void __init armadillo5x0_init(
void)
493 ARRAY_SIZE(armadillo5x0_pins),
"armadillo5x0");
497 armadillo5x0_smc911x_resources[1].
start =
499 armadillo5x0_smc911x_resources[1].
end =
520 platform_device_register_resndata(
NULL,
"physmap-flash", -1,
521 &armadillo5x0_nor_flash_resource, 1,
522 &armadillo5x0_nor_flash_pdata,
523 sizeof(armadillo5x0_nor_flash_pdata));
540 if (armadillo5x0_i2c_rtc.
irq == 0)
541 pr_warning(
"armadillo5x0_init: failed to get RTC IRQ\n");
548 if (usbotg_pdata.otg)
556 static void __init armadillo5x0_timer_init(
void)
561 static struct sys_timer armadillo5x0_timer = {
562 .init = armadillo5x0_timer_init,
567 .atag_offset = 0x100,
572 .timer = &armadillo5x0_timer,
573 .init_machine = armadillo5x0_init,