|
@@ -0,0 +1,131 @@
|
|
|
+/*
|
|
|
+ * Copyright 2004-2009 Analog Devices Inc.
|
|
|
+ * 2005 National ICT Australia (NICTA)
|
|
|
+ * Aidan Williams <aidan@nicta.com.au>
|
|
|
+ *
|
|
|
+ * Licensed under the GPL-2 or later.
|
|
|
+ */
|
|
|
+
|
|
|
+#include <linux/device.h>
|
|
|
+#include <linux/export.h>
|
|
|
+#include <linux/kernel.h>
|
|
|
+#include <linux/platform_device.h>
|
|
|
+#include <linux/io.h>
|
|
|
+#include <linux/mtd/mtd.h>
|
|
|
+#include <linux/mtd/nand.h>
|
|
|
+#include <linux/mtd/partitions.h>
|
|
|
+#include <linux/mtd/plat-ram.h>
|
|
|
+#include <linux/mtd/physmap.h>
|
|
|
+#include <linux/spi/spi.h>
|
|
|
+#include <linux/spi/flash.h>
|
|
|
+#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
|
|
|
+#include <linux/usb/isp1362.h>
|
|
|
+#endif
|
|
|
+#include <linux/i2c.h>
|
|
|
+#include <linux/i2c/adp5588.h>
|
|
|
+#include <linux/etherdevice.h>
|
|
|
+#include <linux/ata_platform.h>
|
|
|
+#include <linux/irq.h>
|
|
|
+#include <linux/interrupt.h>
|
|
|
+#include <linux/usb/sl811.h>
|
|
|
+#include <linux/spi/mmc_spi.h>
|
|
|
+#include <linux/leds.h>
|
|
|
+#include <linux/input.h>
|
|
|
+#include <asm/dma.h>
|
|
|
+#include <asm/bfin5xx_spi.h>
|
|
|
+#include <asm/reboot.h>
|
|
|
+#include <asm/portmux.h>
|
|
|
+#include <asm/dpmc.h>
|
|
|
+#include <asm/bfin_sport.h>
|
|
|
+#ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
|
|
|
+#include <linux/regulator/fixed.h>
|
|
|
+#endif
|
|
|
+#include <linux/regulator/machine.h>
|
|
|
+#include <linux/regulator/consumer.h>
|
|
|
+#include <linux/regulator/userspace-consumer.h>
|
|
|
+
|
|
|
+/*
|
|
|
+ * Name the Board for the /proc/cpuinfo
|
|
|
+ */
|
|
|
+const char bfin_board_name[] = "ADI BF537-STAMP";
|
|
|
+
|
|
|
+/*
|
|
|
+ * Driver needs to know address, irq and flag pin.
|
|
|
+ */
|
|
|
+
|
|
|
+#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
|
|
|
+#include <linux/usb/isp1760.h>
|
|
|
+static struct resource bfin_isp1760_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .start = 0x203C0000,
|
|
|
+ .end = 0x203C0000 + 0x000fffff,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = IRQ_PF7,
|
|
|
+ .end = IRQ_PF7,
|
|
|
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct isp1760_platform_data isp1760_priv = {
|
|
|
+ .is_isp1761 = 0,
|
|
|
+ .bus_width_16 = 1,
|
|
|
+ .port1_otg = 0,
|
|
|
+ .analog_oc = 0,
|
|
|
+ .dack_polarity_high = 0,
|
|
|
+ .dreq_polarity_high = 0,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device bfin_isp1760_device = {
|
|
|
+ .name = "isp1760",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &isp1760_priv,
|
|
|
+ },
|
|
|
+ .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
|
|
|
+ .resource = bfin_isp1760_resources,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
|
|
+#include <linux/gpio_keys.h>
|
|
|
+
|
|
|
+static struct gpio_keys_button bfin_gpio_keys_table[] = {
|
|
|
+ {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
|
|
|
+ {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
|
|
|
+ {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
|
|
|
+ {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data bfin_gpio_keys_data = {
|
|
|
+ .buttons = bfin_gpio_keys_table,
|
|
|
+ .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device bfin_device_gpiokeys = {
|
|
|
+ .name = "gpio-keys",
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &bfin_gpio_keys_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
|
|
|
+static struct resource bfin_pcmcia_cf_resources[] = {
|
|
|
+ {
|
|
|
+ .start = 0x20310000, /* IO PORT */
|
|
|
+ .end = 0x20312000,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .start = 0x20311000, /* Attribute Memory */
|
|
|
+ .end = 0x20311FFF,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }, {
|
|
|
+ .start = IRQ_PF4,
|
|
|
+ .end = IRQ_PF4,
|
|
|
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
|
|
+ }, {
|
|
|
+ .start = 6, /* Card Detect PF6 */
|
|
|
+ .end = 6,
|
|
|
+ .flags = IORESOURCE_IRQ,
|