stamp.c revision 57af8edf3f0346aa0f942f245acbfe122bb75707
11394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/*
296f1050d3df105c9ae6c6ac224f370199ea82fcdRobin Getz * Copyright 2004-2009 Analog Devices Inc.
396f1050d3df105c9ae6c6ac224f370199ea82fcdRobin Getz *                2005 National ICT Australia (NICTA)
496f1050d3df105c9ae6c6ac224f370199ea82fcdRobin Getz *                      Aidan Williams <aidan@nicta.com.au>
51394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu *
696f1050d3df105c9ae6c6ac224f370199ea82fcdRobin Getz * Licensed under the GPL-2 or later.
71394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu */
81394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
91394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/device.h>
10fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#include <linux/kernel.h>
111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/platform_device.h>
126e3647554e2bf7d7a898ccfc35941adbecd888e7Barry Song#include <linux/io.h>
131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/mtd/mtd.h>
14fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#include <linux/mtd/nand.h>
151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/mtd/partitions.h>
16fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#include <linux/mtd/plat-ram.h>
17de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger#include <linux/mtd/physmap.h>
181394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/spi/spi.h>
191394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/spi/flash.h>
201394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
21f02bcec5986870b3ddae26f6be1cde0703abfd8aMike Frysinger#include <linux/usb/isp1362.h>
221394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
230a87e3e92b299e0f1a69b36664ecde2fc296c40aJeff Garzik#include <linux/ata_platform.h>
241394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/irq.h>
251394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#include <linux/interrupt.h>
2681d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu#include <linux/i2c.h>
2727f5d75afaa1b65e4cc1e4ac8a2a5095d24f1576David Brownell#include <linux/usb/sl811.h>
28f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#include <linux/spi/mmc_spi.h>
29c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#include <asm/dma.h>
301f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger#include <asm/bfin5xx_spi.h>
31c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#include <asm/reboot.h>
325d448dd50712ae42f8176b5bb8db4703bef6f0f5Bryan Wu#include <asm/portmux.h>
3314b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich#include <asm/dpmc.h>
341394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/*
361394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu * Name the Board for the /proc/cpuinfo
371394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu */
38fe85cad25e56aad5e020ea5cab50a100892f645bMike Frysingerconst char bfin_board_name[] = "ADI BF537-STAMP";
391394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
401394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/*
411394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu *  Driver needs to know address, irq and flag pin.
421394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu */
431394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
441394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
453f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich#include <linux/usb/isp1760.h>
463f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerichstatic struct resource bfin_isp1760_resources[] = {
471394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	[0] = {
483f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich		.start  = 0x203C0000,
493f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich		.end    = 0x203C0000 + 0x000fffff,
501394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags  = IORESOURCE_MEM,
511394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
521394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	[1] = {
533f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich		.start  = IRQ_PF7,
543f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich		.end    = IRQ_PF7,
556a6be3d1882743a382f18da9821a410bb29964a2Michael Hennerich		.flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
561394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
571394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
593f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerichstatic struct isp1760_platform_data isp1760_priv = {
603f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.is_isp1761 = 0,
613f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.bus_width_16 = 1,
623f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.port1_otg = 0,
633f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.analog_oc = 0,
643f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.dack_polarity_high = 0,
653f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.dreq_polarity_high = 0,
661394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
671394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
683f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerichstatic struct platform_device bfin_isp1760_device = {
69c6feb7682885f732a264ef589ee44edb1a3d45f2Michael Hennerich	.name           = "isp1760",
703f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.id             = 0,
713f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.dev = {
723f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich		.platform_data = &isp1760_priv,
733f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	},
743f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.num_resources  = ARRAY_SIZE(bfin_isp1760_resources),
753f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	.resource       = bfin_isp1760_resources,
761394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
771394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
781394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
792463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
802463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#include <linux/input.h>
812463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#include <linux/gpio_keys.h>
822463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich
832463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerichstatic struct gpio_keys_button bfin_gpio_keys_table[] = {
842463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	{BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
852463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	{BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
862463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	{BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
872463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	{BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
882463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich};
892463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich
902463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerichstatic struct gpio_keys_platform_data bfin_gpio_keys_data = {
912463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	.buttons        = bfin_gpio_keys_table,
922463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	.nbuttons       = ARRAY_SIZE(bfin_gpio_keys_table),
932463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich};
942463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich
952463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerichstatic struct platform_device bfin_device_gpiokeys = {
962463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	.name      = "gpio-keys",
972463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	.dev = {
982463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich		.platform_data = &bfin_gpio_keys_data,
992463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	},
1002463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich};
1012463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#endif
1022463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich
1031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
1041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource bfin_pcmcia_cf_resources[] = {
1051394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
1061394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20310000, /* IO PORT */
1071394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20312000,
1081394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
1091f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
110d2d50aa97d695d83ccb2341488d977e8cfe36555Simon Arlott		.start = 0x20311000, /* Attribute Memory */
1111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20311FFF,
1121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
1131f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
1141394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = IRQ_PF4,
1151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = IRQ_PF4,
1161394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
1171f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
1181394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 6, /* Card Detect PF6 */
1191394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 6,
1201394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ,
1211394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
1221394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
1231394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1241394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_pcmcia_cf_device = {
1251394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "bfin_cf_pcmcia",
1261394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = -1,
1271394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
1281394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = bfin_pcmcia_cf_resources,
1291394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
1301394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
1311394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1321394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1331394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device rtc_device = {
1341394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "rtc-bfin",
1351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id   = -1,
1361394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
1371394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
1381394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1391394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
14061f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich#include <linux/smc91x.h>
14161f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich
14261f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerichstatic struct smc91x_platdata smc91x_info = {
14361f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich	.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
14461f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich	.leda = RPC_LED_100_10,
14561f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich	.ledb = RPC_LED_TX_RX,
14661f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich};
14761f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich
1481394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource smc91x_resources[] = {
1491394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
1501394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.name = "smc91x-regs",
1511394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20300300,
1521394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20300300 + 16,
1531394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
1541f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
1551394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1561394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = IRQ_PF7,
1571394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = IRQ_PF7,
1581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
1591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
1601394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
1611394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device smc91x_device = {
1621394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "smc91x",
1631394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 0,
1641394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(smc91x_resources),
1651394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = smc91x_resources,
16661f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich	.dev	= {
16761f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich		.platform_data	= &smc91x_info,
16861f09b5a09fb3962bbd3990a9a5a8470197955bbMichael Hennerich	},
1691394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
1701394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
1711394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
172f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
173f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landaustatic struct resource dm9000_resources[] = {
174f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	[0] = {
175f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau		.start	= 0x203FB800,
176b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song		.end	= 0x203FB800 + 1,
177f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau		.flags	= IORESOURCE_MEM,
178f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	},
179f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	[1] = {
180b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song		.start	= 0x203FB804,
181b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song		.end	= 0x203FB804 + 1,
182b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song		.flags	= IORESOURCE_MEM,
183b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song	},
184b3dec4a4ff495248170358cb3b8254a814e5b096Barry Song	[2] = {
185f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau		.start	= IRQ_PF9,
186f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau		.end	= IRQ_PF9,
187f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau		.flags	= (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
188f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	},
189f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau};
190f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau
191f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landaustatic struct platform_device dm9000_device = {
192f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	.name		= "dm9000",
193f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	.id		= -1,
194f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	.num_resources	= ARRAY_SIZE(dm9000_resources),
195f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	.resource	= dm9000_resources,
196f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau};
197f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau#endif
198f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau
199561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
200561cc18b8696fd41367544f45542c096fa08d878Michael Hennerichstatic struct resource ax88180_resources[] = {
201561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	[0] = {
202561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.start	= 0x20300000,
203561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.end	= 0x20300000 + 0x8000,
204561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.flags	= IORESOURCE_MEM,
205561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	},
206561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	[1] = {
207561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.start	= IRQ_PF7,
208561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.end	= IRQ_PF7,
209561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich		.flags	= (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
210561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	},
211561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich};
212561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich
213561cc18b8696fd41367544f45542c096fa08d878Michael Hennerichstatic struct platform_device ax88180_device = {
214561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	.name		= "ax88180",
215561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	.id		= -1,
216561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	.num_resources	= ARRAY_SIZE(ax88180_resources),
217561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	.resource	= ax88180_resources,
218561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich};
219561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich#endif
220561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich
2211394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
2221394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource sl811_hcd_resources[] = {
2231394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
2241394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20340000,
2251394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20340000,
2261394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
2271f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
2281394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20340004,
2291394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20340004,
2301394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
2311f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
2321394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = CONFIG_USB_SL811_BFIN_IRQ,
2331394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = CONFIG_USB_SL811_BFIN_IRQ,
2341394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
2351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
2361394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
2371394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2381394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
2391394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wuvoid sl811_port_power(struct device *dev, int is_on)
2401394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu{
241c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
242acbcd2631975cf6f0be5cd294cbfd12226cd9958Michael Hennerich	gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
2431394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu}
2441394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
2451394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2461394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct sl811_platform_data sl811_priv = {
2471394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.potpg = 10,
2481394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.power = 250,       /* == 500mA */
2491394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
2501394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.port_power = &sl811_port_power,
2511394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
2521394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
2531394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2541394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device sl811_hcd_device = {
2551394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "sl811-hcd",
2561394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 0,
2571394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.dev = {
2581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.platform_data = &sl811_priv,
2591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
2601394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(sl811_hcd_resources),
2611394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = sl811_hcd_resources,
2621394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
2631394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
2641394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2651394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
2661394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource isp1362_hcd_resources[] = {
2671394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
2681394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20360000,
2691394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20360000,
2701394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
2711f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
2721394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20360004,
2731394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20360004,
2741394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
2751f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
27621b03cfe4c50fd586bfebd06d852457c07f60c2bMike Frysinger		.start = IRQ_PF3,
27721b03cfe4c50fd586bfebd06d852457c07f60c2bMike Frysinger		.end = IRQ_PF3,
2781394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
2791394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
2801394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
2811394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2821394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct isp1362_platform_data isp1362_priv = {
2831394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.sel15Kres = 1,
2841394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.clknotstop = 0,
2851394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.oc_enable = 0,
2861394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.int_act_high = 0,
2871394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.int_edge_triggered = 0,
2881394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.remote_wakeup_connected = 0,
2891394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.no_power_switching = 1,
2901394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.power_switching_mode = 0,
2911394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
2921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
2931394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device isp1362_hcd_device = {
2941394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "isp1362-hcd",
2951394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 0,
2961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.dev = {
2971394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.platform_data = &isp1362_priv,
2981394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
2991394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(isp1362_hcd_resources),
3001394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = isp1362_hcd_resources,
3011394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
3021394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
3031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
3041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
30565319628db2c7a630daadfeec4d371aaca788482Graf Yangstatic struct platform_device bfin_mii_bus = {
30665319628db2c7a630daadfeec4d371aaca788482Graf Yang	.name = "bfin_mii_bus",
30765319628db2c7a630daadfeec4d371aaca788482Graf Yang};
30865319628db2c7a630daadfeec4d371aaca788482Graf Yang
3091394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_mac_device = {
3101394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "bfin_mac",
31165319628db2c7a630daadfeec4d371aaca788482Graf Yang	.dev.platform_data = &bfin_mii_bus,
3121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
3131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
3141394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
3151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
3161394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource net2272_bfin_resources[] = {
3171394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
3181394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0x20300000,
3191394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0x20300000 + 0x100,
3201394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
3211f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
3221394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = IRQ_PF7,
3231394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = IRQ_PF7,
3241394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
3251394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
3261394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
3271394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
3281394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device net2272_bfin_device = {
3291394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "net2272",
3301394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = -1,
3311394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(net2272_bfin_resources),
3321394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = net2272_bfin_resources,
3331394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
3341394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
3351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
336fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
337fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#ifdef CONFIG_MTD_PARTITIONS
338fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerconst char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
339fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
340fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic struct mtd_partition bfin_plat_nand_partitions[] = {
341fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	{
342aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name   = "linux kernel(nand)",
343fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.size   = 0x400000,
344fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.offset = 0,
345fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	}, {
346aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name   = "file system(nand)",
347fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.size   = MTDPART_SIZ_FULL,
348fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.offset = MTDPART_OFS_APPEND,
349fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	},
350fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger};
351fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#endif
352fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
353fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#define BFIN_NAND_PLAT_CLE 2
354fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#define BFIN_NAND_PLAT_ALE 1
355fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
356fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger{
357fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	struct nand_chip *this = mtd->priv;
358fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
359fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	if (cmd == NAND_CMD_NONE)
360fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		return;
361fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
362fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	if (ctrl & NAND_CLE)
363fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
364fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	else
365fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
366fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger}
367fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
368fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#define BFIN_NAND_PLAT_READY GPIO_PF3
369fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
370fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger{
371fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	return gpio_get_value(BFIN_NAND_PLAT_READY);
372fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger}
373fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
374fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic struct platform_nand_data bfin_plat_nand_data = {
375fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.chip = {
376fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.chip_delay = 30,
377fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#ifdef CONFIG_MTD_PARTITIONS
378fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.part_probe_types = part_probes,
379fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.partitions = bfin_plat_nand_partitions,
380fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
381fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#endif
382fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	},
383fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.ctrl = {
384fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.cmd_ctrl  = bfin_plat_nand_cmd_ctrl,
385fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.dev_ready = bfin_plat_nand_dev_ready,
386fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	},
387fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger};
388fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
389fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#define MAX(x, y) (x > y ? x : y)
390fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic struct resource bfin_plat_nand_resources = {
391fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.start = 0x20212000,
392fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.end   = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
393fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.flags = IORESOURCE_IO,
394fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger};
395fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
396fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic struct platform_device bfin_async_nand_device = {
397fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.name = "gen_nand",
398fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.id = -1,
399fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.num_resources = 1,
400fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.resource = &bfin_plat_nand_resources,
401fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	.dev = {
402fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger		.platform_data = &bfin_plat_nand_data,
403fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	},
404fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger};
405fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
406fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic void bfin_plat_nand_init(void)
407fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger{
408fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");
409fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger}
410fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#else
411fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysingerstatic void bfin_plat_nand_init(void) {}
412fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#endif
413fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
414793dc27b51b2ffff95b72408e2ef44e0995c185bMike Frysinger#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
415de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysingerstatic struct mtd_partition stamp_partitions[] = {
416de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	{
417aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name       = "bootloader(nor)",
418edf056417d11fe9321ec15a55bd128e4f4c73796Mike Frysinger		.size       = 0x40000,
419de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.offset     = 0,
420de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	}, {
421aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name       = "linux kernel(nor)",
4226ecb5b6dbc01b958fdce7008f297a5c7ba2d8105Grace Pan		.size       = 0x180000,
423de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.offset     = MTDPART_OFS_APPEND,
424de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	}, {
425aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name       = "file system(nor)",
4266ecb5b6dbc01b958fdce7008f297a5c7ba2d8105Grace Pan		.size       = 0x400000 - 0x40000 - 0x180000 - 0x10000,
427de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.offset     = MTDPART_OFS_APPEND,
428de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	}, {
429aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name       = "MAC Address(nor)",
430de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.size       = MTDPART_SIZ_FULL,
431de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.offset     = 0x3F0000,
432de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.mask_flags = MTD_WRITEABLE,
433de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	}
434de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger};
435de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger
436de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysingerstatic struct physmap_flash_data stamp_flash_data = {
437de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.width      = 2,
438de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.parts      = stamp_partitions,
439de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.nr_parts   = ARRAY_SIZE(stamp_partitions),
440de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger};
441de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger
442de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysingerstatic struct resource stamp_flash_resource = {
443de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.start = 0x20000000,
444de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.end   = 0x203fffff,
445de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.flags = IORESOURCE_MEM,
446de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger};
447de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger
448de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysingerstatic struct platform_device stamp_flash_device = {
449de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.name          = "physmap-flash",
450de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.id            = 0,
451de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.dev = {
452de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger		.platform_data = &stamp_flash_data,
453de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	},
454de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.num_resources = 1,
455de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	.resource      = &stamp_flash_resource,
456de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger};
457793dc27b51b2ffff95b72408e2ef44e0995c185bMike Frysinger#endif
458de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger
4591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_MTD_M25P80) \
4601394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	|| defined(CONFIG_MTD_M25P80_MODULE)
4611394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct mtd_partition bfin_spi_flash_partitions[] = {
4621394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
463aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name = "bootloader(spi)",
464edf056417d11fe9321ec15a55bd128e4f4c73796Mike Frysinger		.size = 0x00040000,
4651394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.offset = 0,
4661394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.mask_flags = MTD_CAP_ROM
4671f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
468aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name = "linux kernel(spi)",
4696ecb5b6dbc01b958fdce7008f297a5c7ba2d8105Grace Pan		.size = 0x180000,
470edf056417d11fe9321ec15a55bd128e4f4c73796Mike Frysinger		.offset = MTDPART_OFS_APPEND,
4711f83b8f148a1eb967d2a628cbb741cd56fb54572Mike Frysinger	}, {
472aa5829776347dbd9eeb461f650c1d085cf463a83Robin Getz		.name = "file system(spi)",
473edf056417d11fe9321ec15a55bd128e4f4c73796Mike Frysinger		.size = MTDPART_SIZ_FULL,
474edf056417d11fe9321ec15a55bd128e4f4c73796Mike Frysinger		.offset = MTDPART_OFS_APPEND,
4751394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	}
4761394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
4771394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
4781394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct flash_platform_data bfin_spi_flash_data = {
4791394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "m25p80",
4801394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.parts = bfin_spi_flash_partitions,
4811394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
48288a8078b3b31349e9cbf09215eab6891fb1aed0fMichael Hennerich	/* .type = "m25p64", */
4831394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
4841394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
4851394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/* SPI flash chip (m25p64) */
4861394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct bfin5xx_spi_chip spi_flash_chip_info = {
4871394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.enable_dma = 0,         /* use dma transfer with this chip*/
4881394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.bits_per_word = 8,
4891394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
4901394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
4911394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
492a261eec0009b6093727fb7a59b12a10c6c981714Mike Frysinger#if defined(CONFIG_BFIN_SPI_ADC) \
493a261eec0009b6093727fb7a59b12a10c6c981714Mike Frysinger	|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
4941394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/* SPI ADC chip */
4951394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct bfin5xx_spi_chip spi_adc_chip_info = {
4961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.enable_dma = 1,         /* use dma transfer with this chip*/
4971394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.bits_per_word = 16,
4981394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
4991394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
5001394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
5018312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
5028312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song	|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
5031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct bfin5xx_spi_chip ad1836_spi_chip_info = {
5041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.enable_dma = 0,
5051394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.bits_per_word = 16,
5061394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
5071394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
5081394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
509d4b834c13940b5433d16ae3605794b3d74804348Barry Song#if defined(CONFIG_SND_BF5XX_SOC_AD1938) \
510d4b834c13940b5433d16ae3605794b3d74804348Barry Song	|| defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
511d4b834c13940b5433d16ae3605794b3d74804348Barry Songstatic struct bfin5xx_spi_chip ad1938_spi_chip_info = {
512d4b834c13940b5433d16ae3605794b3d74804348Barry Song	.enable_dma = 0,
513d4b834c13940b5433d16ae3605794b3d74804348Barry Song	.bits_per_word = 8,
514d4b834c13940b5433d16ae3605794b3d74804348Barry Song	.cs_gpio = GPIO_PF5,
515d4b834c13940b5433d16ae3605794b3d74804348Barry Song};
516d4b834c13940b5433d16ae3605794b3d74804348Barry Song#endif
517d4b834c13940b5433d16ae3605794b3d74804348Barry Song
518427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
519427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#include <linux/input.h>
520427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#include <linux/input/ad714x.h>
521427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct bfin5xx_spi_chip ad7147_spi_chip_info = {
522427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.enable_dma = 0,
523427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.bits_per_word = 16,
524427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
525427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song
526427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct ad714x_slider_plat slider_plat[] = {
527427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
528427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.start_stage = 0,
529427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.end_stage = 7,
530427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.max_coord = 128,
531427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
532427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
533427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song
534427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct ad714x_button_plat button_plat[] = {
535427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
536427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_FORWARD,
537427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
538427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x600,
539427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
540427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
541427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_LEFT,
542427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
543427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x500,
544427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
545427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
546427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_MIDDLE,
547427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
548427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x800,
549427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
550427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
551427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_RIGHT,
552427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0x100,
553427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x400,
554427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
555427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
556427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_BACK,
557427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0x200,
558427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x400,
559427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
560427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
561427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct ad714x_platform_data ad7147_platfrom_data = {
562427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.slider_num = 1,
563427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.button_num = 5,
564427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.slider = slider_plat,
565427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.button = button_plat,
566427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.stage_cfg_reg =  {
567427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
568427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
569427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650},
570427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650},
571427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650},
572427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650},
573427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650},
574427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600},
575427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFF7B, 0x3FFF, 0x506,  0x2626, 1100, 1100, 1150, 1150},
576427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFDFE, 0x3FFF, 0x606,  0x2626, 1100, 1100, 1150, 1150},
577427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300},
578427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFEF, 0x1FFF, 0x0,    0x2626, 1100, 1100, 1150, 1150},
579427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
580427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0},
581427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
582427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#endif
583427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song
584427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#if defined(CONFIG_INPUT_EVAL_AD7142EB)
585427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#include <linux/input.h>
586427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#include <linux/input/ad714x.h>
587427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct ad714x_button_plat button_plat[] = {
588427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
589427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_1,
590427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
591427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x1,
592427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
593427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
594427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_2,
595427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
596427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x2,
597427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
598427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
599427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_3,
600427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0,
601427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x4,
602427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
603427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
604427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.keycode = BTN_4,
605427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.l_mask = 0x0,
606427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.h_mask = 0x8,
607427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
608427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
609427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Songstatic struct ad714x_platform_data ad7142_platfrom_data = {
610427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.button_num = 4,
611427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.button = button_plat,
612427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.stage_cfg_reg =  {
613427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		/* fixme: figure out right setting for all comoponent according
614427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		 * to hardware feature of EVAL-AD7142EB board */
615427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
616427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
617427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
618427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
619427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
620427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
621427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
622427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
623427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
624427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
625427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
626427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		{0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
627427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
628427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	.sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0},
629427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song};
630427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#endif
631427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song
632f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
633f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
634f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li
635f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Listatic int bfin_mmc_spi_init(struct device *dev,
636f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	irqreturn_t (*detect_int)(int, void *), void *data)
637f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li{
638f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
639f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		IRQF_TRIGGER_FALLING, "mmc-spi-detect", data);
640f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li}
641f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li
642f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Listatic void bfin_mmc_spi_exit(struct device *dev, void *data)
643f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li{
644f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	free_irq(MMC_SPI_CARD_DETECT_INT, data);
645f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li}
646f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li
647f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Listatic struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
648f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	.init = bfin_mmc_spi_init,
649f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	.exit = bfin_mmc_spi_exit,
650f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	.detect_delay = 100, /* msecs */
651f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li};
652f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li
653f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Listatic struct bfin5xx_spi_chip  mmc_spi_chip_info = {
654f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	.enable_dma = 0,
655f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	.bits_per_word = 8,
656e68d1ebc30e033612bb69f949da654d72beae57dYi Li	.pio_interrupt = 0,
657f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li};
658f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#endif
659f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li
6601394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
66146aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich#include <linux/spi/ad7877.h>
6621394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct bfin5xx_spi_chip spi_ad7877_chip_info = {
6631394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.enable_dma = 0,
6641394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.bits_per_word = 16,
6651394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
6661394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
6671394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic const struct ad7877_platform_data bfin_ad7877_ts_info = {
6681394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.model			= 7877,
6691394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.vref_delay_usecs	= 50,	/* internal, no capacitor */
6701394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.x_plate_ohms		= 419,
6711394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.y_plate_ohms		= 486,
6721394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.pressure_max		= 1000,
6731394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.pressure_min		= 0,
6741394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.stopacq_polarity 	= 1,
6751394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.first_conversion_delay = 3,
6761394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.acquisition_time 	= 1,
6771394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.averaging 		= 1,
6781394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.pen_down_acc_interval 	= 1,
6791394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
6801394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
6811394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
68246aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
68346aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich#include <linux/spi/ad7879.h>
68446aa04f9b678d1d6f3558429109326775ca87715Michael Hennerichstatic const struct ad7879_platform_data bfin_ad7879_ts_info = {
68546aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.model			= 7879,	/* Model = AD7879 */
68646aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.x_plate_ohms		= 620,	/* 620 Ohm from the touch datasheet */
68746aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.pressure_max		= 10000,
68846aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.pressure_min		= 0,
68946aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.first_conversion_delay = 3,	/* wait 512us before do a first conversion */
69046aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.acquisition_time 	= 1,	/* 4us acquisition time per sample */
69146aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.median			= 2,	/* do 8 measurements */
69246aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.averaging 		= 1,	/* take the average of 4 middle samples */
69346aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.pen_down_acc_interval 	= 255,	/* 9.4 ms */
69446aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.gpio_output		= 1,	/* configure AUX/VBAT/GPIO as GPIO output */
69546aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.gpio_default 		= 1,	/* During initialization set GPIO = HIGH */
69646aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich};
69746aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich#endif
69846aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich
699ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
700ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich#include <linux/input.h>
70157af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich#include <linux/input/adxl34x.h>
702ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerichstatic const struct adxl34x_platform_data adxl34x_info = {
703ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.x_axis_offset = 0,
704ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.y_axis_offset = 0,
705ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.z_axis_offset = 0,
706ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.tap_threshold = 0x31,
707ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.tap_duration = 0x10,
708ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.tap_latency = 0x60,
709ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.tap_window = 0xF0,
710ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
711ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.act_axis_control = 0xFF,
712ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.activity_threshold = 5,
713ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.inactivity_threshold = 3,
714ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.inactivity_time = 4,
715ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.free_fall_threshold = 0x7,
716ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.free_fall_time = 0x20,
717ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.data_rate = 0x8,
718ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.data_range = ADXL_FULL_RES,
719ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich
720ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.ev_type = EV_ABS,
721ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.ev_code_x = ABS_X,		/* EV_REL */
722ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.ev_code_y = ABS_Y,		/* EV_REL */
723ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.ev_code_z = ABS_Z,		/* EV_REL */
724ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich
72557af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich	.ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
726ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich
727ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich/*	.ev_code_ff = KEY_F,*/		/* EV_KEY */
728ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich/*	.ev_code_act_inactivity = KEY_A,*/	/* EV_KEY */
729ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
730ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	.fifo_mode = ADXL_FIFO_STREAM,
731ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich};
732ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich#endif
733ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich
734f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
735f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerichstatic struct bfin5xx_spi_chip spi_ad7879_chip_info = {
736f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich	.enable_dma = 0,
737f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich	.bits_per_word = 16,
738f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich};
739f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich#endif
740f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich
7416e668936db12550ab5a6a758f236140101e5a644Michael Hennerich#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
7426e668936db12550ab5a6a758f236140101e5a644Michael Hennerichstatic struct bfin5xx_spi_chip spidev_chip_info = {
7436e668936db12550ab5a6a758f236140101e5a644Michael Hennerich	.enable_dma = 0,
7446e668936db12550ab5a6a758f236140101e5a644Michael Hennerich	.bits_per_word = 8,
7456e668936db12550ab5a6a758f236140101e5a644Michael Hennerich};
7466e668936db12550ab5a6a758f236140101e5a644Michael Hennerich#endif
7476e668936db12550ab5a6a758f236140101e5a644Michael Hennerich
7482043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
7492043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerichstatic struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
7502043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.enable_dma	= 0,
7512043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.bits_per_word	= 8,
7522043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich};
7532043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#endif
7542043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
75585a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
75685a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerichstatic struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
75785a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich	.enable_dma	= 1,
75885a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich	.bits_per_word	= 8,
75985a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich	.cs_gpio = GPIO_PF10,
76085a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich};
76185a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich#endif
76285a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich
7638e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich#if defined(CONFIG_MTD_DATAFLASH) \
7648e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	|| defined(CONFIG_MTD_DATAFLASH_MODULE)
765ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich
766ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerichstatic struct mtd_partition bfin_spi_dataflash_partitions[] = {
767ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	{
768ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.name = "bootloader(spi)",
769ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.size = 0x00040000,
770ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.offset = 0,
771ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.mask_flags = MTD_CAP_ROM
772ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	}, {
773ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.name = "linux kernel(spi)",
7746ecb5b6dbc01b958fdce7008f297a5c7ba2d8105Grace Pan		.size = 0x180000,
775ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.offset = MTDPART_OFS_APPEND,
776ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	}, {
777ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.name = "file system(spi)",
778ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.size = MTDPART_SIZ_FULL,
779ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.offset = MTDPART_OFS_APPEND,
780ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	}
781ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich};
782ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich
783ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerichstatic struct flash_platform_data bfin_spi_dataflash_data = {
784ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	.name = "SPI Dataflash",
785ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	.parts = bfin_spi_dataflash_partitions,
786ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich	.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
787ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich};
788ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich
7898e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich/* DataFlash chip */
7908e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerichstatic struct bfin5xx_spi_chip data_flash_chip_info = {
7918e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	.enable_dma = 0,         /* use dma transfer with this chip*/
7928e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	.bits_per_word = 8,
7938e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich};
7948e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich#endif
7958e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich
79657af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
79757af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerichstatic struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
79857af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich	.enable_dma = 0,         /* use dma transfer with this chip*/
79957af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich	.bits_per_word = 8,
80057af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich};
80157af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich#endif
80257af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich
8031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct spi_board_info bfin_spi_board_info[] __initdata = {
8041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_MTD_M25P80) \
8051394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	|| defined(CONFIG_MTD_M25P80_MODULE)
8061394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
8071394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		/* the modalias must be the same as spi device driver name */
8081394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.modalias = "m25p80", /* Name of spi_driver for this device */
8091394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
810c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.bus_num = 0, /* Framework bus number */
8111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
8121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.platform_data = &bfin_spi_flash_data,
8131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.controller_data = &spi_flash_chip_info,
8141394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.mode = SPI_MODE_3,
8151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
8161394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
8178e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich#if defined(CONFIG_MTD_DATAFLASH) \
8188e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	|| defined(CONFIG_MTD_DATAFLASH_MODULE)
8198e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	{	/* DataFlash chip */
8208e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich		.modalias = "mtd_dataflash",
821ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.max_speed_hz = 33250000,     /* max spi clock (SCK) speed in HZ */
8228e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich		.bus_num = 0, /* Framework bus number */
8238e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich		.chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
824ceac2651e9b7b77734d1c2b6f5d7d218d22f5427Michael Hennerich		.platform_data = &bfin_spi_dataflash_data,
8258e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich		.controller_data = &data_flash_chip_info,
8268e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich		.mode = SPI_MODE_3,
8278e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich	},
8288e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12fMichael Hennerich#endif
829a261eec0009b6093727fb7a59b12a10c6c981714Mike Frysinger#if defined(CONFIG_BFIN_SPI_ADC) \
830a261eec0009b6093727fb7a59b12a10c6c981714Mike Frysinger	|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
8311394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
8321394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
8331394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.max_speed_hz = 6250000,     /* max spi clock (SCK) speed in HZ */
834c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.bus_num = 0, /* Framework bus number */
8351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.chip_select = 1, /* Framework chip select. */
8361394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.platform_data = NULL, /* No spi_driver specific config */
8371394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.controller_data = &spi_adc_chip_info,
8381394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
8391394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
8401394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
8418312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
8428312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song	|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
8431394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
844dac981740f4b990eadf523b0900859f189dd2b4eBarry Song		.modalias = "ad1836",
8451394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
846c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.bus_num = 0,
8478312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song		.chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
8481394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.controller_data = &ad1836_spi_chip_info,
8498312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song		.mode = SPI_MODE_3,
8501394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
8511394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
852d4b834c13940b5433d16ae3605794b3d74804348Barry Song
853d4b834c13940b5433d16ae3605794b3d74804348Barry Song#if defined(CONFIG_SND_BF5XX_SOC_AD1938) || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
854d4b834c13940b5433d16ae3605794b3d74804348Barry Song	{
855dac981740f4b990eadf523b0900859f189dd2b4eBarry Song		.modalias = "ad1938",
856d4b834c13940b5433d16ae3605794b3d74804348Barry Song		.max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
857d4b834c13940b5433d16ae3605794b3d74804348Barry Song		.bus_num = 0,
858d4b834c13940b5433d16ae3605794b3d74804348Barry Song		.chip_select = 0,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
859d4b834c13940b5433d16ae3605794b3d74804348Barry Song		.controller_data = &ad1938_spi_chip_info,
860d4b834c13940b5433d16ae3605794b3d74804348Barry Song		.mode = SPI_MODE_3,
861d4b834c13940b5433d16ae3605794b3d74804348Barry Song	},
862d4b834c13940b5433d16ae3605794b3d74804348Barry Song#endif
863d4b834c13940b5433d16ae3605794b3d74804348Barry Song
864427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
865427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	{
866427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.modalias = "ad714x_captouch",
867427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.max_speed_hz = 1000000,     /* max spi clock (SCK) speed in HZ */
868427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.irq = IRQ_PF4,
869427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.bus_num = 0,
870427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.chip_select = 5,
871427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.mode = SPI_MODE_3,
872427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.platform_data = &ad7147_platfrom_data,
873427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.controller_data = &ad7147_spi_chip_info,
874427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song	},
875427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#endif
876427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song
877f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
878f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	{
879f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.modalias = "mmc_spi",
880f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
881f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.bus_num = 0,
882f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.chip_select = 4,
883f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.platform_data = &bfin_mmc_spi_pdata,
884f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.controller_data = &mmc_spi_chip_info,
885f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li		.mode = SPI_MODE_3,
886f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li	},
887f79ea4cba00e2c2f5ffde9007e7ba0fe992b2e18Yi Li#endif
8881394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
8891394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
8901394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.modalias		= "ad7877",
8911394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.platform_data		= &bfin_ad7877_ts_info,
8921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.irq			= IRQ_PF6,
8931394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.max_speed_hz	= 12500000,     /* max spi clock (SCK) speed in HZ */
894c7d4896621d42c84956911afd5f10a5d317c781aMichael Hennerich		.bus_num	= 0,
8951394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.chip_select  = 1,
8961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.controller_data = &spi_ad7877_chip_info,
8971394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
8981394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
899f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
90046aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	{
90146aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.modalias = "ad7879",
90246aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.platform_data = &bfin_ad7879_ts_info,
90346aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.irq = IRQ_PF7,
90446aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.max_speed_hz = 5000000,     /* max spi clock (SCK) speed in HZ */
90546aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.bus_num = 0,
90646aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.chip_select = 1,
90746aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.controller_data = &spi_ad7879_chip_info,
90846aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.mode = SPI_CPHA | SPI_CPOL,
90946aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	},
91046aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich#endif
9116e668936db12550ab5a6a758f236140101e5a644Michael Hennerich#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
9126e668936db12550ab5a6a758f236140101e5a644Michael Hennerich	{
9136e668936db12550ab5a6a758f236140101e5a644Michael Hennerich		.modalias = "spidev",
9146e668936db12550ab5a6a758f236140101e5a644Michael Hennerich		.max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
9156e668936db12550ab5a6a758f236140101e5a644Michael Hennerich		.bus_num = 0,
9166e668936db12550ab5a6a758f236140101e5a644Michael Hennerich		.chip_select = 1,
9176e668936db12550ab5a6a758f236140101e5a644Michael Hennerich		.controller_data = &spidev_chip_info,
9186e668936db12550ab5a6a758f236140101e5a644Michael Hennerich	},
9196e668936db12550ab5a6a758f236140101e5a644Michael Hennerich#endif
9202043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
9212043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	{
9222043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.modalias = "bfin-lq035q1-spi",
9232043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
9242043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.bus_num = 0,
92546aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich		.chip_select = 2,
9262043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.controller_data = &lq035q1_spi_chip_info,
9272043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.mode = SPI_CPHA | SPI_CPOL,
9282043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	},
9292043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#endif
93085a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
93185a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich	{
93285a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.modalias = "enc28j60",
93385a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
93485a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.irq = IRQ_PF6,
93585a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.bus_num = 0,
93685a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.chip_select = 0,	/* GPIO controlled SSEL */
93785a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.controller_data = &enc28j60_spi_chip_info,
93885a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich		.mode = SPI_MODE_0,
93985a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich	},
94085a192e92dcb67552ee3fcdf2e36c11688b61955Michael Hennerich#endif
94157af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
94257af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich	{
94357af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.modalias	= "adxl34x",
94457af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.platform_data	= &adxl34x_info,
94557af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.irq		= IRQ_PF6,
94657af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.max_speed_hz	= 5000000,    /* max spi clock (SCK) speed in HZ */
94757af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.bus_num	= 0,
94857af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.chip_select	= 2,
94957af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.controller_data = &spi_adxl34x_chip_info,
95057af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich		.mode = SPI_MODE_3,
95157af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich	},
95257af8edf3f0346aa0f942f245acbfe122bb75707Michael Hennerich#endif
9531394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
9541394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
9555bda27235b24146cf870de663141ee4fbfa8a70bMike Frysinger#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
9561394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu/* SPI controller data */
957c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct bfin5xx_spi_master bfin_spi0_info = {
9581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_chipselect = 8,
9591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.enable_dma = 1,  /* master has the ability to do dma transfer */
9605d448dd50712ae42f8176b5bb8db4703bef6f0f5Bryan Wu	.pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
9611394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
9621394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
963c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu/* SPI (0) */
964c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct resource bfin_spi0_resource[] = {
965c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	[0] = {
966c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = SPI0_REGBASE,
967c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end   = SPI0_REGBASE + 0xFF,
968c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_MEM,
969c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		},
970c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	[1] = {
971c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = CH_SPI,
972c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end   = CH_SPI,
973e68d1ebc30e033612bb69f949da654d72beae57dYi Li		.flags = IORESOURCE_DMA,
974e68d1ebc30e033612bb69f949da654d72beae57dYi Li	},
975e68d1ebc30e033612bb69f949da654d72beae57dYi Li	[2] = {
976e68d1ebc30e033612bb69f949da654d72beae57dYi Li		.start = IRQ_SPI,
977e68d1ebc30e033612bb69f949da654d72beae57dYi Li		.end   = IRQ_SPI,
978c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_IRQ,
979c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
980c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
981c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
982c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct platform_device bfin_spi0_device = {
983c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.name = "bfin-spi",
984c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.id = 0, /* Bus number */
985c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.num_resources = ARRAY_SIZE(bfin_spi0_resource),
986c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.resource = bfin_spi0_resource,
9871394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.dev = {
988c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.platform_data = &bfin_spi0_info, /* Passed to driver */
9891394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
9901394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
9911394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif  /* spi master and devices */
9921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
9931e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
9941e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
9951e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai/* SPORT SPI controller data */
9961e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct bfin5xx_spi_master bfin_sport_spi0_info = {
9971e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.num_chipselect = 1, /* master only supports one device */
9981e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.enable_dma = 0,  /* master don't support DMA */
9991e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
10001e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
10011e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10021e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10031e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct resource bfin_sport_spi0_resource[] = {
10041e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	[0] = {
10051e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.start = SPORT0_TCR1,
10061e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.end   = SPORT0_TCR1 + 0xFF,
10071e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.flags = IORESOURCE_MEM,
10081e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		},
10091e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	[1] = {
10101e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.start = IRQ_SPORT0_ERROR,
10111e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.end   = IRQ_SPORT0_ERROR,
10121e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.flags = IORESOURCE_IRQ,
10131e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		},
10141e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10151e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10161e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct platform_device bfin_sport_spi0_device = {
10171e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.name = "bfin-sport-spi",
10181e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.id = 1, /* Bus number */
10191e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.num_resources = ARRAY_SIZE(bfin_sport_spi0_resource),
10201e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.resource = bfin_sport_spi0_resource,
10211e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.dev = {
10221e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.platform_data = &bfin_sport_spi0_info, /* Passed to driver */
10231e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	},
10241e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10251e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10261e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct bfin5xx_spi_master bfin_sport_spi1_info = {
10271e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.num_chipselect = 1, /* master only supports one device */
10281e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.enable_dma = 0,  /* master don't support DMA */
10291e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
10301e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
10311e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10321e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10331e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct resource bfin_sport_spi1_resource[] = {
10341e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	[0] = {
10351e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.start = SPORT1_TCR1,
10361e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.end   = SPORT1_TCR1 + 0xFF,
10371e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.flags = IORESOURCE_MEM,
10381e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		},
10391e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	[1] = {
10401e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.start = IRQ_SPORT1_ERROR,
10411e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.end   = IRQ_SPORT1_ERROR,
10421e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.flags = IORESOURCE_IRQ,
10431e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		},
10441e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10451e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10461e9aa95526c3dfc50e55665c7129469a12593bebCliff Caistatic struct platform_device bfin_sport_spi1_device = {
10471e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.name = "bfin-sport-spi",
10481e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.id = 2, /* Bus number */
10491e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.num_resources = ARRAY_SIZE(bfin_sport_spi1_resource),
10501e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.resource = bfin_sport_spi1_resource,
10511e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	.dev = {
10521e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai		.platform_data = &bfin_sport_spi1_info, /* Passed to driver */
10531e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	},
10541e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai};
10551e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10561e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai#endif  /* sport spi master and devices */
10571e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
10581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
10591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_fb_device = {
1060c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.name = "bf537-lq035",
1061c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
1062c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#endif
1063c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
10642043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
10652043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#include <asm/bfin-lq035q1.h>
10662043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
10672043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerichstatic struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
10682043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.mode = 	LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
106946aa04f9b678d1d6f3558429109326775ca87715Michael Hennerich	.use_bl = 	0,	/* let something else control the LCD Blacklight */
10702043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.gpio_bl =	GPIO_PF7,
10712043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich};
10722043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
10732043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerichstatic struct resource bfin_lq035q1_resources[] = {
10742043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	{
10752043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.start = IRQ_PPI_ERROR,
10762043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.end = IRQ_PPI_ERROR,
10772043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.flags = IORESOURCE_IRQ,
10782043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	},
10792043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich};
10802043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
10812043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerichstatic struct platform_device bfin_lq035q1_device = {
10822043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.name		= "bfin-lq035q1",
10832043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.id		= -1,
10842043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.num_resources 	= ARRAY_SIZE(bfin_lq035q1_resources),
10852043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.resource 	= bfin_lq035q1_resources,
10862043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	.dev		= {
10872043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich		.platform_data = &bfin_lq035q1_data,
10882043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	},
10892043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich};
10902043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#endif
10912043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
10921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
10931394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct resource bfin_uart_resources[] = {
1094233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang#ifdef CONFIG_SERIAL_BFIN_UART0
10951394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	{
10961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0xFFC00400,
10971394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0xFFC004FF,
10981394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
1099233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang	},
1100233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang#endif
1101233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang#ifdef CONFIG_SERIAL_BFIN_UART1
1102233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang	{
11031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.start = 0xFFC02000,
11041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.end = 0xFFC020FF,
11051394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu		.flags = IORESOURCE_MEM,
11061394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	},
1107233b28a91caf7cff326e604c437a364eaf794106Sonic Zhang#endif
11081394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
11091394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
11101394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_uart_device = {
11111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "bfin-uart",
11121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 1,
11131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.num_resources = ARRAY_SIZE(bfin_uart_resources),
11141394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.resource = bfin_uart_resources,
11151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
11161394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
11171394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
11185be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
11195be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#ifdef CONFIG_BFIN_SIR0
112042bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yangstatic struct resource bfin_sir0_resources[] = {
11215be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang	{
11225be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.start = 0xFFC00400,
11235be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.end = 0xFFC004FF,
11245be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.flags = IORESOURCE_MEM,
11255be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang	},
112642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	{
112742bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.start = IRQ_UART0_RX,
112842bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.end = IRQ_UART0_RX+1,
112942bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.flags = IORESOURCE_IRQ,
113042bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	},
113142bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	{
113242bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.start = CH_UART0_RX,
113342bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.end = CH_UART0_RX+1,
113442bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.flags = IORESOURCE_DMA,
113542bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	},
113642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang};
113742bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang
113842bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yangstatic struct platform_device bfin_sir0_device = {
113942bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.name = "bfin_sir",
114042bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.id = 0,
114142bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.num_resources = ARRAY_SIZE(bfin_sir0_resources),
114242bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.resource = bfin_sir0_resources,
114342bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang};
11445be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#endif
11455be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#ifdef CONFIG_BFIN_SIR1
114642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yangstatic struct resource bfin_sir1_resources[] = {
11475be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang	{
11485be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.start = 0xFFC02000,
11495be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.end = 0xFFC020FF,
11505be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang		.flags = IORESOURCE_MEM,
11515be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang	},
115242bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	{
115342bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.start = IRQ_UART1_RX,
115442bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.end = IRQ_UART1_RX+1,
115542bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.flags = IORESOURCE_IRQ,
115642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	},
115742bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	{
115842bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.start = CH_UART1_RX,
115942bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.end = CH_UART1_RX+1,
116042bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang		.flags = IORESOURCE_DMA,
116142bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	},
11625be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang};
11635be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang
116442bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yangstatic struct platform_device bfin_sir1_device = {
11655be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang	.name = "bfin_sir",
116642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.id = 1,
116742bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.num_resources = ARRAY_SIZE(bfin_sir1_resources),
116842bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	.resource = bfin_sir1_resources,
11695be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang};
11705be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#endif
117142bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang#endif
11725be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang
11731394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1174c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct resource bfin_twi0_resource[] = {
1175c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	[0] = {
1176c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = TWI0_REGBASE,
1177c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end   = TWI0_REGBASE,
1178c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_MEM,
1179c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
1180c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	[1] = {
1181c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = IRQ_TWI,
1182c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end   = IRQ_TWI,
1183c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_IRQ,
1184c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
1185c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
1186c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
11871394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device i2c_bfin_twi_device = {
11881394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "i2c-bfin-twi",
11891394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 0,
1190c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.num_resources = ARRAY_SIZE(bfin_twi0_resource),
1191c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.resource = bfin_twi0_resource,
11921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
11931394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
11941394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
119551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
119651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich#include <linux/input.h>
1197f39d56ec469a9ade221ceeb85a37b051374f616bMichael Hennerich#include <linux/i2c/adp5588.h>
119851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerichstatic const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
119951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[0]	 = KEY_GRAVE,
120051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[1]	 = KEY_1,
120151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[2]	 = KEY_2,
120251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[3]	 = KEY_3,
120351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[4]	 = KEY_4,
120451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[5]	 = KEY_5,
120551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[6]	 = KEY_6,
120651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[7]	 = KEY_7,
120751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[8]	 = KEY_8,
120851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[9]	 = KEY_9,
120951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[10]	 = KEY_0,
121051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[11]	 = KEY_MINUS,
121151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[12]	 = KEY_EQUAL,
121251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[13]	 = KEY_BACKSLASH,
121351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[15]	 = KEY_KP0,
121451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[16]	 = KEY_Q,
121551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[17]	 = KEY_W,
121651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[18]	 = KEY_E,
121751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[19]	 = KEY_R,
121851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[20]	 = KEY_T,
121951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[21]	 = KEY_Y,
122051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[22]	 = KEY_U,
122151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[23]	 = KEY_I,
122251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[24]	 = KEY_O,
122351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[25]	 = KEY_P,
122451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[26]	 = KEY_LEFTBRACE,
122551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[27]	 = KEY_RIGHTBRACE,
122651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[29]	 = KEY_KP1,
122751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[30]	 = KEY_KP2,
122851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[31]	 = KEY_KP3,
122951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[32]	 = KEY_A,
123051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[33]	 = KEY_S,
123151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[34]	 = KEY_D,
123251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[35]	 = KEY_F,
123351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[36]	 = KEY_G,
123451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[37]	 = KEY_H,
123551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[38]	 = KEY_J,
123651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[39]	 = KEY_K,
123751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[40]	 = KEY_L,
123851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[41]	 = KEY_SEMICOLON,
123951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[42]	 = KEY_APOSTROPHE,
124051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[43]	 = KEY_BACKSLASH,
124151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[45]	 = KEY_KP4,
124251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[46]	 = KEY_KP5,
124351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[47]	 = KEY_KP6,
124451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[48]	 = KEY_102ND,
124551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[49]	 = KEY_Z,
124651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[50]	 = KEY_X,
124751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[51]	 = KEY_C,
124851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[52]	 = KEY_V,
124951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[53]	 = KEY_B,
125051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[54]	 = KEY_N,
125151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[55]	 = KEY_M,
125251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[56]	 = KEY_COMMA,
125351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[57]	 = KEY_DOT,
125451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[58]	 = KEY_SLASH,
125551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[60]	 = KEY_KPDOT,
125651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[61]	 = KEY_KP7,
125751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[62]	 = KEY_KP8,
125851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[63]	 = KEY_KP9,
125951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[64]	 = KEY_SPACE,
126051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[65]	 = KEY_BACKSPACE,
126151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[66]	 = KEY_TAB,
126251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[67]	 = KEY_KPENTER,
126351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[68]	 = KEY_ENTER,
126451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[69]	 = KEY_ESC,
126551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[70]	 = KEY_DELETE,
126651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[74]	 = KEY_KPMINUS,
126751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[76]	 = KEY_UP,
126851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[77]	 = KEY_DOWN,
126951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[78]	 = KEY_RIGHT,
127051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	[79]	 = KEY_LEFT,
127151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich};
127251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich
127351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerichstatic struct adp5588_kpad_platform_data adp5588_kpad_data = {
127451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	.rows		= 8,
127551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	.cols		= 10,
127651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	.keymap		= adp5588_keymap,
127751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	.keymapsize	= ARRAY_SIZE(adp5588_keymap),
127851ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	.repeat		= 0,
127951ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich};
128051ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich#endif
128151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich
12823ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
12833ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#include <linux/mfd/adp5520.h>
12843ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
12853ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	/*
12863ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 *  ADP5520/5501 Backlight Data
12873ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 */
12883ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
12893ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_backlight_platfrom_data adp5520_backlight_data = {
12903ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.fade_in 		= FADE_T_1200ms,
12913ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.fade_out 		= FADE_T_1200ms,
12923ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.fade_led_law 		= BL_LAW_LINEAR,
12933ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.en_ambl_sens 		= 1,
12943ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.abml_filt 		= BL_AMBL_FILT_640ms,
12953ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l1_daylight_max 	= BL_CUR_mA(15),
12963ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l1_daylight_dim 	= BL_CUR_mA(0),
12973ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l2_office_max 		= BL_CUR_mA(7),
12983ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l2_office_dim 		= BL_CUR_mA(0),
12993ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l3_dark_max 		= BL_CUR_mA(3),
13003ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l3_dark_dim 		= BL_CUR_mA(0),
13013ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l2_trip 		= L2_COMP_CURR_uA(700),
13023ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l2_hyst 		= L2_COMP_CURR_uA(50),
13033ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l3_trip 		= L3_COMP_CURR_uA(80),
13043ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.l3_hyst 		= L3_COMP_CURR_uA(20),
13053ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13063ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13073ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	/*
13083ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 *  ADP5520/5501 LEDs Data
13093ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 */
13103ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13113ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#include <linux/leds.h>
13123ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13133ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct led_info adp5520_leds[] = {
13143ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13153ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-led1",
13163ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.default_trigger = "none",
13173ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | LED_OFFT_600ms,
13183ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
13193ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#ifdef ADP5520_EN_ALL_LEDS
13203ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13213ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-led2",
13223ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.default_trigger = "none",
13233ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.flags = FLAG_ID_ADP5520_LED2_ADP5501_LED1,
13243ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
13253ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13263ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-led3",
13273ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.default_trigger = "none",
13283ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.flags = FLAG_ID_ADP5520_LED3_ADP5501_LED2,
13293ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
13303ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#endif
13313ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13323ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13333ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_leds_platfrom_data adp5520_leds_data = {
13343ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.num_leds = ARRAY_SIZE(adp5520_leds),
13353ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.leds = adp5520_leds,
13363ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.fade_in = FADE_T_600ms,
13373ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.fade_out = FADE_T_600ms,
13383ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.led_on_time = LED_ONT_600ms,
13393ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13403ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13413ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	/*
13423ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 *  ADP5520 GPIO Data
13433ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 */
13443ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13453ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_gpio_platfrom_data adp5520_gpio_data = {
13463ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.gpio_start = 50,
13473ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.gpio_en_mask = GPIO_C1 | GPIO_C2 | GPIO_R2,
13483ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.gpio_pullup_mask = GPIO_C1 | GPIO_C2 | GPIO_R2,
13493ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13503ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13513ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	/*
13523ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 *  ADP5520 Keypad Data
13533ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 */
13543ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13553ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#include <linux/input.h>
13563ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
13573ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(0, 0)]	= KEY_GRAVE,
13583ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(0, 1)]	= KEY_1,
13593ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(0, 2)]	= KEY_2,
13603ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(0, 3)]	= KEY_3,
13613ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(1, 0)]	= KEY_4,
13623ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(1, 1)]	= KEY_5,
13633ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(1, 2)]	= KEY_6,
13643ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(1, 3)]	= KEY_7,
13653ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(2, 0)]	= KEY_8,
13663ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(2, 1)]	= KEY_9,
13673ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(2, 2)]	= KEY_0,
13683ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(2, 3)]	= KEY_MINUS,
13693ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(3, 0)]	= KEY_EQUAL,
13703ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(3, 1)]	= KEY_BACKSLASH,
13713ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(3, 2)]	= KEY_BACKSPACE,
13723ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	[KEY(3, 3)]	= KEY_ENTER,
13733ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13743ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13753ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_keys_platfrom_data adp5520_keys_data = {
13763ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.rows_en_mask	= ROW_R3 | ROW_R2 | ROW_R1 | ROW_R0,
13773ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.cols_en_mask	= COL_C3 | COL_C2 | COL_C1 | COL_C0,
13783ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.keymap		= adp5520_keymap,
13793ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.keymapsize	= ARRAY_SIZE(adp5520_keymap),
13803ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.repeat		= 0,
13813ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
13823ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13833ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	/*
13843ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 *  ADP5520/5501 Multifuction Device Init Data
13853ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	 */
13863ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
13873ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_subdev_info adp5520_subdevs[] = {
13883ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13893ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-backlight",
13903ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.id = ID_ADP5520,
13913ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.platform_data = &adp5520_backlight_data,
13923ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
13933ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13943ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-led",
13953ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.id = ID_ADP5520,
13963ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.platform_data = &adp5520_leds_data,
13973ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
13983ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
13993ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-gpio",
14003ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.id = ID_ADP5520,
14013ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.platform_data = &adp5520_gpio_data,
14023ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
14033ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
14043ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.name = "adp5520-keys",
14053ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.id = ID_ADP5520,
14063ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.platform_data = &adp5520_keys_data,
14073ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
14083ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
14093ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
14103ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerichstatic struct adp5520_platform_data adp5520_pdev_data = {
14113ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.num_subdevs = ARRAY_SIZE(adp5520_subdevs),
14123ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	.subdevs = adp5520_subdevs,
14133ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich};
14143ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
14153ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#endif
14163ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich
1417ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1418ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich#include <linux/i2c/adp5588.h>
1419ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerichstatic struct adp5588_gpio_platfrom_data adp5588_gpio_data = {
1420ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich	.gpio_start = 50,
1421ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich	.pullup_dis_mask = 0,
1422ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich};
1423ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich#endif
1424ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich
142581d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wustatic struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1426427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song#if defined(CONFIG_INPUT_EVAL_AD7142EB)
142781d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	{
1428427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		I2C_BOARD_INFO("ad7142_captouch", 0x2C),
14294c94c3e09adba9718218d6e3d35b2dfae81f3911Barry Song		.irq = IRQ_PG5,
1430427f277e5f472b6c1bc444ef5f7d30ebe280420eBarry Song		.platform_data = (void *)&ad7142_platfrom_data,
143181d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	},
143281d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu#endif
1433ebd5833327e3fb46eb55553d8f5432b5226bf897Michael Hennerich#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
143481d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	{
143581d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu		I2C_BOARD_INFO("pcf8574_lcd", 0x22),
143681d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	},
143781d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu#endif
1438204844ebd08cfb0c83689e55d6633dcd0230d36dMichael Hennerich#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
143981d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	{
144081d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu		I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1441f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich		.irq = IRQ_PG6,
1442f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich	},
1443f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich#endif
1444f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
1445f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich	{
1446f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich		I2C_BOARD_INFO("ad7879", 0x2F),
1447f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich		.irq = IRQ_PG5,
1448f51501551ef5c3f3d3911fbd736664d614014344Michael Hennerich		.platform_data = (void *)&bfin_ad7879_ts_info,
144981d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	},
145081d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu#endif
145151ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
145251ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	{
145351ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich		I2C_BOARD_INFO("adp5588-keys", 0x34),
145451ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich		.irq = IRQ_PG0,
145551ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich		.platform_data = (void *)&adp5588_kpad_data,
145651ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich	},
145751ed9ad7d239c7c10af088d1b7c5f3ee8d022f94Michael Hennerich#endif
14583ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
14593ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	{
14603ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		I2C_BOARD_INFO("pmic-adp5520", 0x32),
14614f84b6e0bb9a7d92c791ba3607674c98f69418cbMike Frysinger		.irq = IRQ_PG0,
14623ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich		.platform_data = (void *)&adp5520_pdev_data,
14633ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich	},
14643ea57218fde5fe6c2ff449d4c30fc69ac6976096Michael Hennerich#endif
1465ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1466ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	{
1467ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich		I2C_BOARD_INFO("adxl34x", 0x53),
1468ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich		.irq = IRQ_PG3,
1469ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich		.platform_data = (void *)&adxl34x_info,
1470ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich	},
1471ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3Michael Hennerich#endif
1472ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1473ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich	{
1474ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich		I2C_BOARD_INFO("adp5588-gpio", 0x34),
1475ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich		.platform_data = (void *)&adp5588_gpio_data,
1476ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich	},
1477ba877d4491a06ae69d53981bc242ef97a8157026Michael Hennerich#endif
147850c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31Michael Hennerich#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
147950c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31Michael Hennerich	{
148050c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31Michael Hennerich		I2C_BOARD_INFO("bfin-adv7393", 0x2B),
148150c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31Michael Hennerich	},
148250c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31Michael Hennerich#endif
1483ddcd7cb857cdf2a29c30125f71cb5d4d6744c99bMichael Hennerich#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1484ddcd7cb857cdf2a29c30125f71cb5d4d6744c99bMichael Hennerich	{
1485ddcd7cb857cdf2a29c30125f71cb5d4d6744c99bMichael Hennerich		I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C),
1486ddcd7cb857cdf2a29c30125f71cb5d4d6744c99bMichael Hennerich	},
1487ddcd7cb857cdf2a29c30125f71cb5d4d6744c99bMichael Hennerich#endif
148881d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu};
148981d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu
14901394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
14911394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_sport0_uart_device = {
14921394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "bfin-sport-uart",
14931394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 0,
14941394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
14951394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
14961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device bfin_sport1_uart_device = {
14971394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.name = "bfin-sport-uart",
14981394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	.id = 1,
14991394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
15001394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
15011394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1502c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
15032c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
15042c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich/* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
1505c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
15062c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich#ifdef CF_IDE_NAND_CARD_USE_HDD_INTERFACE
15072c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich#define PATA_INT	IRQ_PF5
1508c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct pata_platform_info bfin_pata_platform_data = {
1509c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.ioport_shift = 1,
151064e5c51291ec760e7fdb7628fe63690d1dc6aaf7Mike Frysinger	.irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
1511c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
1512c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
1513c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct resource bfin_pata_resources[] = {
1514c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	{
1515c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = 0x20314020,
1516c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end = 0x2031403F,
1517c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_MEM,
1518c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
1519c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	{
1520c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = 0x2031401C,
1521c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end = 0x2031401F,
1522c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_MEM,
1523c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
1524c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	{
1525c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.start = PATA_INT,
1526c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.end = PATA_INT,
1527c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.flags = IORESOURCE_IRQ,
1528c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	},
1529c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
15302c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich#elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
15312c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerichstatic struct pata_platform_info bfin_pata_platform_data = {
15322c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich	.ioport_shift = 0,
15332c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich};
1534648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich/* CompactFlash Storage Card Memory Mapped Adressing
1535648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich * /REG = A11 = 1
1536648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich */
15372c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerichstatic struct resource bfin_pata_resources[] = {
15382c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich	{
1539648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich		.start = 0x20211800,
1540648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich		.end = 0x20211807,
15412c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich		.flags = IORESOURCE_MEM,
15422c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich	},
15432c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich	{
1544648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich		.start = 0x2021180E,	/* Device Ctl */
1545648882d940a1f84cbf11418ae6e405ef42a66855Michael Hennerich		.end = 0x2021180E,
15462c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich		.flags = IORESOURCE_MEM,
15472c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich	},
15482c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich};
15492c8beb2cbef632a3683950aab8bcd9735a0a0270Michael Hennerich#endif
1550c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
1551c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wustatic struct platform_device bfin_pata_device = {
1552c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.name = "pata_platform",
1553c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.id = -1,
1554c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.num_resources = ARRAY_SIZE(bfin_pata_resources),
1555c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.resource = bfin_pata_resources,
1556c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	.dev = {
1557c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu		.platform_data = &bfin_pata_platform_data,
1558c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	}
1559c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu};
1560c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#endif
1561c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
156214b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerichstatic const unsigned int cclk_vlev_datasheet[] =
156314b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich{
156414b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_085, 250000000),
156514b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_090, 376000000),
156614b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_095, 426000000),
156714b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_100, 426000000),
156814b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_105, 476000000),
156914b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_110, 476000000),
157014b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_115, 476000000),
157114b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_120, 500000000),
157214b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_125, 533000000),
157314b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	VRPAIR(VLEV_130, 600000000),
157414b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich};
157514b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich
157614b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerichstatic struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
157714b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	.tuple_tab = cclk_vlev_datasheet,
157814b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	.tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
157914b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	.vr_settling_time = 25 /* us */,
158014b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich};
158114b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich
158214b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerichstatic struct platform_device bfin_dpmc = {
158314b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	.name = "bfin dpmc",
158414b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	.dev = {
158514b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich		.platform_data = &bfin_dmpc_vreg_data,
158614b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	},
158714b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich};
158814b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich
15898312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
15908312440e05ea74feabc648ad8f36c823af4ddd8eBarry Songstatic struct platform_device bfin_tdm = {
15918312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song	.name = "bfin-tdm",
15928312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song	/* TODO: add platform data here */
15938312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song};
15948312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#endif
15958312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song
15961394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic struct platform_device *stamp_devices[] __initdata = {
159714b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich
159814b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich	&bfin_dpmc,
159914b03204c8060d036b04cbb18bbd6f6f311f4fedMichael Hennerich
16001394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
16011394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_pcmcia_cf_device,
16021394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16031394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16041394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
16051394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&rtc_device,
16061394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16071394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16081394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
16091394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&sl811_hcd_device,
16101394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
16131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&isp1362_hcd_device,
16141394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16151394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16163f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
16173f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich	&bfin_isp1760_device,
16183f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich#endif
16193f37569044cb3d9ba4722710b84d018f573d4b0eMichael Hennerich
16201394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
16211394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&smc91x_device,
16221394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16231394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
1624f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
1625f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau	&dm9000_device,
1626f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau#endif
1627f40d24d909ad99c802a6813ff32b6feb20ab8c71Alex Landau
1628561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
1629561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich	&ax88180_device,
1630561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich#endif
1631561cc18b8696fd41367544f45542c096fa08d878Michael Hennerich
16321394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
163365319628db2c7a630daadfeec4d371aaca788482Graf Yang	&bfin_mii_bus,
16341394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_mac_device,
16351394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16361394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16371394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
16381394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&net2272_bfin_device,
16391394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16401394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16411394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1642c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	&bfin_spi0_device,
16431394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16441394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16451e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
16461e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	&bfin_sport_spi0_device,
16471e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai	&bfin_sport_spi1_device,
16481e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai#endif
16491e9aa95526c3dfc50e55665c7129469a12593bebCliff Cai
16501394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
16511394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_fb_device,
16521394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16531394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16542043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
16552043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich	&bfin_lq035q1_device,
16562043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich#endif
16572043f3f7312cc7fbbc2acffb9d87265b0ad9a529Michael Hennerich
16581394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
16591394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_uart_device,
16601394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16611394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16625be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
166342bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang#ifdef CONFIG_BFIN_SIR0
166442bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	&bfin_sir0_device,
166542bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang#endif
166642bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang#ifdef CONFIG_BFIN_SIR1
166742bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang	&bfin_sir1_device,
166842bd8bcb2fa1853fda9c51d956f70bbe2329bdfbGraf Yang#endif
16695be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang#endif
16705be36d22b28f01e5074f78b29aa6128da0a53641Graf Yang
16711394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
16721394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&i2c_bfin_twi_device,
16731394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
16741394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
16751394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
16761394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_sport0_uart_device,
16771394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	&bfin_sport1_uart_device,
16781394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu#endif
1679c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
1680c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1681c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	&bfin_pata_device,
1682c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu#endif
16832463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich
16842463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
16852463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich	&bfin_device_gpiokeys,
16862463ef22bf8b6e22048bd26f940c014f7e1f0998Michael Hennerich#endif
1687cad2ab65dd1c7d65153ffccd71c90db028fd62f0Mike Frysinger
1688fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
1689fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	&bfin_async_nand_device,
1690fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger#endif
1691fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger
1692793dc27b51b2ffff95b72408e2ef44e0995c185bMike Frysinger#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1693de8c43f2fca9bb06f3ee87b38a61d5d9966ce221Mike Frysinger	&stamp_flash_device,
1694793dc27b51b2ffff95b72408e2ef44e0995c185bMike Frysinger#endif
16958312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song
16968312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
16978312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song	&bfin_tdm,
16988312440e05ea74feabc648ad8f36c823af4ddd8eBarry Song#endif
16991394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu};
17001394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
17011394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wustatic int __init stamp_init(void)
17021394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu{
1703b85d858b40a28107ee50ca9e89f57c0e35c251c6Harvey Harrison	printk(KERN_INFO "%s(): registering device resources\n", __func__);
170481d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu	i2c_register_board_info(0, bfin_i2c_board_info,
170581d9c7f27dd679df6d03df53eba4fd12caafdb47Bryan Wu				ARRAY_SIZE(bfin_i2c_board_info));
1706fc68911ee379bff429c2f8dfc0a4d3277eb193ecMike Frysinger	bfin_plat_nand_init();
17071394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
17085bda27235b24146cf870de663141ee4fbfa8a70bMike Frysinger	spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1709c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
17101394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu	return 0;
17111394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu}
17121394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wu
17131394f03221790a988afc3e4b3cb79f2e477246a9Bryan Wuarch_initcall(stamp_init);
1714c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu
1715c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wuvoid native_machine_restart(char *cmd)
1716c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu{
1717c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	/* workaround reboot hang when booting from SPI */
1718c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu	if ((bfin_read_SYSCR() & 0x7) == 0x3)
1719b52dae3139066765a7d96563e9cd33d9e60efe33Sonic Zhang		bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
1720c6c4d7bbbb498c38afa05688dfc2784948a0c4e2Bryan Wu}
1721137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger
1722137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger/*
1723137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger * Currently the MAC address is saved in Flash by U-Boot
1724137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger */
1725137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger#define FLASH_MAC	0x203f0000
17269862cc5278aabd82230369a142c817e37a42caa3Mike Frysingervoid bfin_get_ether_addr(char *addr)
1727137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger{
1728137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger	*(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
1729137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger	*(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
1730137b1529da492baa654c702ecb60bb950eccb98dMike Frysinger}
17319862cc5278aabd82230369a142c817e37a42caa3Mike FrysingerEXPORT_SYMBOL(bfin_get_ether_addr);
1732