blob: a4b1ee819c574643c30d79a518f0379fc5867cc0 [file] [log] [blame]
Roy Huang24a07a12007-07-12 22:41:45 +08001/*
2 * File: arch/blackfin/mach-bf548/boards/ezkit.c
3 * Based on: arch/blackfin/mach-bf537/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2007 Analog Devices Inc.
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31#include <linux/device.h>
32#include <linux/platform_device.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h>
Mike Frysingerde8c43f2008-01-24 17:14:04 +080035#include <linux/mtd/physmap.h>
Roy Huang24a07a12007-07-12 22:41:45 +080036#include <linux/spi/spi.h>
37#include <linux/spi/flash.h>
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080038#include <linux/irq.h>
Bryan Wu81d9c7f2008-03-26 10:02:13 +080039#include <linux/i2c.h>
Roy Huang24a07a12007-07-12 22:41:45 +080040#include <linux/interrupt.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080041#include <linux/usb/musb.h>
Roy Huang24a07a12007-07-12 22:41:45 +080042#include <asm/bfin5xx_spi.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080043#include <asm/dma.h>
44#include <asm/gpio.h>
45#include <asm/nand.h>
Michael Hennerich14b03202008-05-07 11:41:26 +080046#include <asm/dpmc.h>
Bryan Wu5d448dd2007-11-12 23:24:42 +080047#include <asm/portmux.h>
Cliff Cai501674a2009-01-07 23:14:38 +080048#include <asm/bfin_sdh.h>
Bryan Wu639f6572008-08-27 10:51:02 +080049#include <mach/bf54x_keys.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080050#include <linux/input.h>
51#include <linux/spi/ad7877.h>
Roy Huang24a07a12007-07-12 22:41:45 +080052
53/*
54 * Name the Board for the /proc/cpuinfo
55 */
Mike Frysingerfe85cad2008-11-18 17:48:22 +080056const char bfin_board_name[] = "ADI BF548-EZKIT";
Roy Huang24a07a12007-07-12 22:41:45 +080057
58/*
59 * Driver needs to know address, irq and flag pin.
60 */
61
Michael Hennerich0a6304a2008-07-26 16:14:57 +080062#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
Michael Hennerich3f375692008-11-18 17:48:22 +080063#include <linux/usb/isp1760.h>
64static struct resource bfin_isp1760_resources[] = {
Michael Hennerich0a6304a2008-07-26 16:14:57 +080065 [0] = {
Michael Hennerich0a6304a2008-07-26 16:14:57 +080066 .start = 0x2C0C0000,
67 .end = 0x2C0C0000 + 0xfffff,
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = IRQ_PG7,
72 .end = IRQ_PG7,
73 .flags = IORESOURCE_IRQ,
74 },
75};
76
Michael Hennerich3f375692008-11-18 17:48:22 +080077static struct isp1760_platform_data isp1760_priv = {
78 .is_isp1761 = 0,
79 .port1_disable = 0,
80 .bus_width_16 = 1,
81 .port1_otg = 0,
82 .analog_oc = 0,
83 .dack_polarity_high = 0,
84 .dreq_polarity_high = 0,
85};
86
87static struct platform_device bfin_isp1760_device = {
88 .name = "isp1760-hcd",
Michael Hennerich0a6304a2008-07-26 16:14:57 +080089 .id = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080090 .dev = {
91 .platform_data = &isp1760_priv,
92 },
93 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
94 .resource = bfin_isp1760_resources,
Michael Hennerich0a6304a2008-07-26 16:14:57 +080095};
Michael Hennerich0a6304a2008-07-26 16:14:57 +080096#endif
97
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080098#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
99
Bryan Wu639f6572008-08-27 10:51:02 +0800100#include <mach/bf54x-lq043.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800101
102static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
103 .width = 480,
104 .height = 272,
105 .xres = {480, 480, 480},
106 .yres = {272, 272, 272},
107 .bpp = {24, 24, 24},
108 .disp = GPIO_PE3,
109};
110
111static struct resource bf54x_lq043_resources[] = {
112 {
113 .start = IRQ_EPPI0_ERR,
114 .end = IRQ_EPPI0_ERR,
115 .flags = IORESOURCE_IRQ,
116 },
117};
118
119static struct platform_device bf54x_lq043_device = {
120 .name = "bf54x-lq043",
121 .id = -1,
122 .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
123 .resource = bf54x_lq043_resources,
124 .dev = {
125 .platform_data = &bf54x_lq043_data,
126 },
127};
128#endif
129
130#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400131static const unsigned int bf548_keymap[] = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800132 KEYVAL(0, 0, KEY_ENTER),
133 KEYVAL(0, 1, KEY_HELP),
134 KEYVAL(0, 2, KEY_0),
135 KEYVAL(0, 3, KEY_BACKSPACE),
136 KEYVAL(1, 0, KEY_TAB),
137 KEYVAL(1, 1, KEY_9),
138 KEYVAL(1, 2, KEY_8),
139 KEYVAL(1, 3, KEY_7),
140 KEYVAL(2, 0, KEY_DOWN),
141 KEYVAL(2, 1, KEY_6),
142 KEYVAL(2, 2, KEY_5),
143 KEYVAL(2, 3, KEY_4),
144 KEYVAL(3, 0, KEY_UP),
145 KEYVAL(3, 1, KEY_3),
146 KEYVAL(3, 2, KEY_2),
147 KEYVAL(3, 3, KEY_1),
148};
149
150static struct bfin_kpad_platform_data bf54x_kpad_data = {
151 .rows = 4,
152 .cols = 4,
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400153 .keymap = bf548_keymap,
154 .keymapsize = ARRAY_SIZE(bf548_keymap),
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800155 .repeat = 0,
156 .debounce_time = 5000, /* ns (5ms) */
157 .coldrive_time = 1000, /* ns (1ms) */
158 .keyup_test_interval = 50, /* ms (50ms) */
159};
160
161static struct resource bf54x_kpad_resources[] = {
162 {
163 .start = IRQ_KEY,
164 .end = IRQ_KEY,
165 .flags = IORESOURCE_IRQ,
166 },
167};
168
169static struct platform_device bf54x_kpad_device = {
170 .name = "bf54x-keys",
171 .id = -1,
172 .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
173 .resource = bf54x_kpad_resources,
174 .dev = {
175 .platform_data = &bf54x_kpad_data,
176 },
177};
178#endif
179
Michael Hennerichaca5e4a2008-10-08 14:27:59 +0800180#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
181#include <asm/bfin_rotary.h>
182
183static struct bfin_rotary_platform_data bfin_rotary_data = {
184 /*.rotary_up_key = KEY_UP,*/
185 /*.rotary_down_key = KEY_DOWN,*/
186 .rotary_rel_code = REL_WHEEL,
187 .rotary_button_key = KEY_ENTER,
188 .debounce = 10, /* 0..17 */
189 .mode = ROT_QUAD_ENC | ROT_DEBE,
190};
191
192static struct resource bfin_rotary_resources[] = {
193 {
194 .start = IRQ_CNT,
195 .end = IRQ_CNT,
196 .flags = IORESOURCE_IRQ,
197 },
198};
199
200static struct platform_device bfin_rotary_device = {
201 .name = "bfin-rotary",
202 .id = -1,
203 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
204 .resource = bfin_rotary_resources,
205 .dev = {
206 .platform_data = &bfin_rotary_data,
207 },
208};
209#endif
210
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000211#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
212#include <linux/input.h>
213#include <linux/spi/adxl34x.h>
214static const struct adxl34x_platform_data adxl34x_info = {
215 .x_axis_offset = 0,
216 .y_axis_offset = 0,
217 .z_axis_offset = 0,
218 .tap_threshold = 0x31,
219 .tap_duration = 0x10,
220 .tap_latency = 0x60,
221 .tap_window = 0xF0,
222 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
223 .act_axis_control = 0xFF,
224 .activity_threshold = 5,
225 .inactivity_threshold = 3,
226 .inactivity_time = 4,
227 .free_fall_threshold = 0x7,
228 .free_fall_time = 0x20,
229 .data_rate = 0x8,
230 .data_range = ADXL_FULL_RES,
231
232 .ev_type = EV_ABS,
233 .ev_code_x = ABS_X, /* EV_REL */
234 .ev_code_y = ABS_Y, /* EV_REL */
235 .ev_code_z = ABS_Z, /* EV_REL */
236
237 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */
238 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
239 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
240
241/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
242/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
243 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
244 .fifo_mode = ADXL_FIFO_STREAM,
245};
246#endif
247
Roy Huang24a07a12007-07-12 22:41:45 +0800248#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
249static struct platform_device rtc_device = {
250 .name = "rtc-bfin",
251 .id = -1,
252};
253#endif
254
255#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
256static struct resource bfin_uart_resources[] = {
257#ifdef CONFIG_SERIAL_BFIN_UART0
258 {
259 .start = 0xFFC00400,
260 .end = 0xFFC004FF,
261 .flags = IORESOURCE_MEM,
262 },
263#endif
264#ifdef CONFIG_SERIAL_BFIN_UART1
265 {
266 .start = 0xFFC02000,
267 .end = 0xFFC020FF,
268 .flags = IORESOURCE_MEM,
269 },
270#endif
271#ifdef CONFIG_SERIAL_BFIN_UART2
272 {
273 .start = 0xFFC02100,
274 .end = 0xFFC021FF,
275 .flags = IORESOURCE_MEM,
276 },
277#endif
278#ifdef CONFIG_SERIAL_BFIN_UART3
279 {
280 .start = 0xFFC03100,
281 .end = 0xFFC031FF,
Mike Frysingercc2e16b2008-07-19 16:43:51 +0800282 .flags = IORESOURCE_MEM,
Roy Huang24a07a12007-07-12 22:41:45 +0800283 },
284#endif
285};
286
287static struct platform_device bfin_uart_device = {
288 .name = "bfin-uart",
289 .id = 1,
290 .num_resources = ARRAY_SIZE(bfin_uart_resources),
291 .resource = bfin_uart_resources,
292};
293#endif
294
Graf Yang5be36d22008-04-25 03:09:15 +0800295#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang5be36d22008-04-25 03:09:15 +0800296#ifdef CONFIG_BFIN_SIR0
Graf Yang42bd8bc2009-01-07 23:14:39 +0800297static struct resource bfin_sir0_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800298 {
299 .start = 0xFFC00400,
300 .end = 0xFFC004FF,
301 .flags = IORESOURCE_MEM,
302 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800303 {
304 .start = IRQ_UART0_RX,
305 .end = IRQ_UART0_RX+1,
306 .flags = IORESOURCE_IRQ,
307 },
308 {
309 .start = CH_UART0_RX,
310 .end = CH_UART0_RX+1,
311 .flags = IORESOURCE_DMA,
312 },
313};
314static struct platform_device bfin_sir0_device = {
315 .name = "bfin_sir",
316 .id = 0,
317 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
318 .resource = bfin_sir0_resources,
319};
Graf Yang5be36d22008-04-25 03:09:15 +0800320#endif
321#ifdef CONFIG_BFIN_SIR1
Graf Yang42bd8bc2009-01-07 23:14:39 +0800322static struct resource bfin_sir1_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800323 {
324 .start = 0xFFC02000,
325 .end = 0xFFC020FF,
326 .flags = IORESOURCE_MEM,
327 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800328 {
329 .start = IRQ_UART1_RX,
330 .end = IRQ_UART1_RX+1,
331 .flags = IORESOURCE_IRQ,
332 },
333 {
334 .start = CH_UART1_RX,
335 .end = CH_UART1_RX+1,
336 .flags = IORESOURCE_DMA,
337 },
338};
339static struct platform_device bfin_sir1_device = {
340 .name = "bfin_sir",
341 .id = 1,
342 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
343 .resource = bfin_sir1_resources,
344};
Graf Yang5be36d22008-04-25 03:09:15 +0800345#endif
346#ifdef CONFIG_BFIN_SIR2
Graf Yang42bd8bc2009-01-07 23:14:39 +0800347static struct resource bfin_sir2_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800348 {
349 .start = 0xFFC02100,
350 .end = 0xFFC021FF,
351 .flags = IORESOURCE_MEM,
352 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800353 {
354 .start = IRQ_UART2_RX,
355 .end = IRQ_UART2_RX+1,
356 .flags = IORESOURCE_IRQ,
357 },
358 {
359 .start = CH_UART2_RX,
360 .end = CH_UART2_RX+1,
361 .flags = IORESOURCE_DMA,
362 },
363};
364static struct platform_device bfin_sir2_device = {
365 .name = "bfin_sir",
366 .id = 2,
367 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
368 .resource = bfin_sir2_resources,
369};
Graf Yang5be36d22008-04-25 03:09:15 +0800370#endif
371#ifdef CONFIG_BFIN_SIR3
Graf Yang42bd8bc2009-01-07 23:14:39 +0800372static struct resource bfin_sir3_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800373 {
374 .start = 0xFFC03100,
375 .end = 0xFFC031FF,
376 .flags = IORESOURCE_MEM,
377 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800378 {
379 .start = IRQ_UART3_RX,
380 .end = IRQ_UART3_RX+1,
381 .flags = IORESOURCE_IRQ,
382 },
383 {
384 .start = CH_UART3_RX,
385 .end = CH_UART3_RX+1,
386 .flags = IORESOURCE_DMA,
387 },
Graf Yang5be36d22008-04-25 03:09:15 +0800388};
Graf Yang42bd8bc2009-01-07 23:14:39 +0800389static struct platform_device bfin_sir3_device = {
Graf Yang5be36d22008-04-25 03:09:15 +0800390 .name = "bfin_sir",
Graf Yang42bd8bc2009-01-07 23:14:39 +0800391 .id = 3,
392 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
393 .resource = bfin_sir3_resources,
Graf Yang5be36d22008-04-25 03:09:15 +0800394};
395#endif
Graf Yang42bd8bc2009-01-07 23:14:39 +0800396#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800397
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800398#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
399static struct resource smsc911x_resources[] = {
400 {
401 .name = "smsc911x-memory",
402 .start = 0x24000000,
403 .end = 0x24000000 + 0xFF,
404 .flags = IORESOURCE_MEM,
405 },
406 {
407 .start = IRQ_PE8,
408 .end = IRQ_PE8,
409 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
410 },
411};
412static struct platform_device smsc911x_device = {
413 .name = "smsc911x",
414 .id = 0,
415 .num_resources = ARRAY_SIZE(smsc911x_resources),
416 .resource = smsc911x_resources,
417};
418#endif
419
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800420#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
421static struct resource musb_resources[] = {
422 [0] = {
423 .start = 0xFFC03C00,
424 .end = 0xFFC040FF,
425 .flags = IORESOURCE_MEM,
426 },
427 [1] = { /* general IRQ */
428 .start = IRQ_USB_INT0,
429 .end = IRQ_USB_INT0,
430 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
431 },
432 [2] = { /* DMA IRQ */
433 .start = IRQ_USB_DMA,
434 .end = IRQ_USB_DMA,
435 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
436 },
437};
438
Bryan Wu50041ac2008-10-08 13:39:40 +0800439static struct musb_hdrc_config musb_config = {
440 .multipoint = 0,
441 .dyn_fifo = 0,
442 .soft_con = 1,
443 .dma = 1,
Bryan Wufea05da2009-01-07 23:14:39 +0800444 .num_eps = 8,
445 .dma_channels = 8,
Bryan Wu50041ac2008-10-08 13:39:40 +0800446 .gpio_vrsel = GPIO_PE7,
447};
448
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800449static struct musb_hdrc_platform_data musb_plat = {
Bryan Wu29350772007-12-24 12:20:19 +0800450#if defined(CONFIG_USB_MUSB_OTG)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800451 .mode = MUSB_OTG,
Bryan Wu29350772007-12-24 12:20:19 +0800452#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800453 .mode = MUSB_HOST,
Bryan Wu29350772007-12-24 12:20:19 +0800454#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800455 .mode = MUSB_PERIPHERAL,
456#endif
Bryan Wu50041ac2008-10-08 13:39:40 +0800457 .config = &musb_config,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800458};
459
460static u64 musb_dmamask = ~(u32)0;
461
462static struct platform_device musb_device = {
463 .name = "musb_hdrc",
464 .id = 0,
465 .dev = {
466 .dma_mask = &musb_dmamask,
467 .coherent_dma_mask = 0xffffffff,
468 .platform_data = &musb_plat,
469 },
470 .num_resources = ARRAY_SIZE(musb_resources),
471 .resource = musb_resources,
472};
473#endif
474
475#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
476static struct resource bfin_atapi_resources[] = {
477 {
478 .start = 0xFFC03800,
479 .end = 0xFFC0386F,
480 .flags = IORESOURCE_MEM,
481 },
482 {
483 .start = IRQ_ATAPI_ERR,
484 .end = IRQ_ATAPI_ERR,
485 .flags = IORESOURCE_IRQ,
486 },
487};
488
489static struct platform_device bfin_atapi_device = {
490 .name = "pata-bf54x",
491 .id = -1,
492 .num_resources = ARRAY_SIZE(bfin_atapi_resources),
493 .resource = bfin_atapi_resources,
494};
495#endif
496
497#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
498static struct mtd_partition partition_info[] = {
499 {
Robin Getzaa582972008-08-05 17:47:29 +0800500 .name = "linux kernel(nand)",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800501 .offset = 0,
Mike Frysingerf4585a02008-10-13 14:45:21 +0800502 .size = 4 * 1024 * 1024,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800503 },
504 {
Robin Getzaa582972008-08-05 17:47:29 +0800505 .name = "file system(nand)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800506 .offset = MTDPART_OFS_APPEND,
507 .size = MTDPART_SIZ_FULL,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800508 },
509};
510
511static struct bf5xx_nand_platform bf5xx_nand_platform = {
512 .page_size = NFC_PG_SIZE_256,
513 .data_width = NFC_NWIDTH_8,
514 .partitions = partition_info,
515 .nr_partitions = ARRAY_SIZE(partition_info),
516 .rd_dly = 3,
517 .wr_dly = 3,
518};
519
520static struct resource bf5xx_nand_resources[] = {
521 {
522 .start = 0xFFC03B00,
523 .end = 0xFFC03B4F,
524 .flags = IORESOURCE_MEM,
525 },
526 {
527 .start = CH_NFC,
528 .end = CH_NFC,
529 .flags = IORESOURCE_IRQ,
530 },
531};
532
533static struct platform_device bf5xx_nand_device = {
534 .name = "bf5xx-nand",
535 .id = 0,
536 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
537 .resource = bf5xx_nand_resources,
538 .dev = {
539 .platform_data = &bf5xx_nand_platform,
540 },
541};
542#endif
543
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -0700544#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Cliff Cai501674a2009-01-07 23:14:38 +0800545
546static struct bfin_sd_host bfin_sdh_data = {
547 .dma_chan = CH_SDH,
548 .irq_int0 = IRQ_SDH_MASK0,
549 .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0},
550};
551
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800552static struct platform_device bf54x_sdh_device = {
553 .name = "bfin-sdh",
554 .id = 0,
Cliff Cai501674a2009-01-07 23:14:38 +0800555 .dev = {
556 .platform_data = &bfin_sdh_data,
557 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800558};
559#endif
560
Mike Frysinger793dc272008-03-26 08:09:12 +0800561#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800562static struct mtd_partition ezkit_partitions[] = {
563 {
Robin Getzaa582972008-08-05 17:47:29 +0800564 .name = "bootloader(nor)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800565 .size = 0x40000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800566 .offset = 0,
567 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800568 .name = "linux kernel(nor)",
Mike Frysinger664d0402008-10-09 17:28:36 +0800569 .size = 0x400000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800570 .offset = MTDPART_OFS_APPEND,
571 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800572 .name = "file system(nor)",
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800573 .size = MTDPART_SIZ_FULL,
574 .offset = MTDPART_OFS_APPEND,
575 }
576};
577
578static struct physmap_flash_data ezkit_flash_data = {
579 .width = 2,
580 .parts = ezkit_partitions,
581 .nr_parts = ARRAY_SIZE(ezkit_partitions),
582};
583
584static struct resource ezkit_flash_resource = {
585 .start = 0x20000000,
Mike Frysinger664d0402008-10-09 17:28:36 +0800586 .end = 0x21ffffff,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800587 .flags = IORESOURCE_MEM,
588};
589
590static struct platform_device ezkit_flash_device = {
591 .name = "physmap-flash",
592 .id = 0,
593 .dev = {
594 .platform_data = &ezkit_flash_data,
595 },
596 .num_resources = 1,
597 .resource = &ezkit_flash_resource,
598};
Mike Frysinger793dc272008-03-26 08:09:12 +0800599#endif
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800600
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800601#if defined(CONFIG_MTD_M25P80) \
602 || defined(CONFIG_MTD_M25P80_MODULE)
603/* SPI flash chip (m25p16) */
604static struct mtd_partition bfin_spi_flash_partitions[] = {
605 {
Robin Getzaa582972008-08-05 17:47:29 +0800606 .name = "bootloader(spi)",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800607 .size = 0x00040000,
608 .offset = 0,
609 .mask_flags = MTD_CAP_ROM
610 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800611 .name = "linux kernel(spi)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800612 .size = MTDPART_SIZ_FULL,
613 .offset = MTDPART_OFS_APPEND,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800614 }
615};
616
617static struct flash_platform_data bfin_spi_flash_data = {
618 .name = "m25p80",
619 .parts = bfin_spi_flash_partitions,
620 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
621 .type = "m25p16",
622};
623
624static struct bfin5xx_spi_chip spi_flash_chip_info = {
625 .enable_dma = 0, /* use dma transfer with this chip*/
626 .bits_per_word = 8,
627 .cs_change_per_word = 0,
628};
629#endif
630
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800631#if defined(CONFIG_SND_BLACKFIN_AD1836) \
632 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
633static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
634 .enable_dma = 0,
635 .bits_per_word = 16,
636};
637#endif
638
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800639#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
640static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
Michael Hennerichc7d48962007-11-15 21:33:31 +0800641 .cs_change_per_word = 0,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800642 .enable_dma = 0,
643 .bits_per_word = 16,
644};
645
646static const struct ad7877_platform_data bfin_ad7877_ts_info = {
647 .model = 7877,
648 .vref_delay_usecs = 50, /* internal, no capacitor */
649 .x_plate_ohms = 419,
650 .y_plate_ohms = 486,
651 .pressure_max = 1000,
652 .pressure_min = 0,
653 .stopacq_polarity = 1,
654 .first_conversion_delay = 3,
655 .acquisition_time = 1,
656 .averaging = 1,
657 .pen_down_acc_interval = 1,
658};
659#endif
660
Michael Hennerich6e668932008-02-09 01:54:09 +0800661#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
662static struct bfin5xx_spi_chip spidev_chip_info = {
663 .enable_dma = 0,
664 .bits_per_word = 8,
665};
666#endif
667
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000668#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
669static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
670 .enable_dma = 0, /* use dma transfer with this chip*/
671 .bits_per_word = 8,
672 .cs_change_per_word = 0,
673};
674#endif
675
Mike Frysinger5bda2722008-06-07 15:03:01 +0800676static struct spi_board_info bfin_spi_board_info[] __initdata = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800677#if defined(CONFIG_MTD_M25P80) \
678 || defined(CONFIG_MTD_M25P80_MODULE)
679 {
680 /* the modalias must be the same as spi device driver name */
681 .modalias = "m25p80", /* Name of spi_driver for this device */
682 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
683 .bus_num = 0, /* Framework bus number */
684 .chip_select = 1, /* SPI_SSEL1*/
685 .platform_data = &bfin_spi_flash_data,
686 .controller_data = &spi_flash_chip_info,
687 .mode = SPI_MODE_3,
688 },
689#endif
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800690#if defined(CONFIG_SND_BLACKFIN_AD1836) \
691 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
692 {
693 .modalias = "ad1836-spi",
694 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
695 .bus_num = 1,
696 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
697 .controller_data = &ad1836_spi_chip_info,
698 },
699#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800700#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000701 {
702 .modalias = "ad7877",
703 .platform_data = &bfin_ad7877_ts_info,
704 .irq = IRQ_PB4, /* old boards (<=Rev 1.3) use IRQ_PJ11 */
705 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
706 .bus_num = 0,
707 .chip_select = 2,
708 .controller_data = &spi_ad7877_chip_info,
709 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800710#endif
Michael Hennerich6e668932008-02-09 01:54:09 +0800711#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
712 {
713 .modalias = "spidev",
714 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
715 .bus_num = 0,
716 .chip_select = 1,
717 .controller_data = &spidev_chip_info,
718 },
719#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000720#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
721 {
722 .modalias = "adxl34x",
723 .platform_data = &adxl34x_info,
724 .irq = IRQ_PC5,
725 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
726 .bus_num = 1,
727 .chip_select = 2,
728 .controller_data = &spi_adxl34x_chip_info,
729 .mode = SPI_MODE_3,
730 },
731#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800732};
Mike Frysinger5bda2722008-06-07 15:03:01 +0800733#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800734/* SPI (0) */
735static struct resource bfin_spi0_resource[] = {
736 [0] = {
737 .start = SPI0_REGBASE,
738 .end = SPI0_REGBASE + 0xFF,
739 .flags = IORESOURCE_MEM,
740 },
741 [1] = {
742 .start = CH_SPI0,
743 .end = CH_SPI0,
Yi Li53122692009-06-05 12:11:11 +0000744 .flags = IORESOURCE_DMA,
745 },
746 [2] = {
747 .start = IRQ_SPI0,
748 .end = IRQ_SPI0,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800749 .flags = IORESOURCE_IRQ,
750 }
751};
752
753/* SPI (1) */
754static struct resource bfin_spi1_resource[] = {
755 [0] = {
756 .start = SPI1_REGBASE,
757 .end = SPI1_REGBASE + 0xFF,
758 .flags = IORESOURCE_MEM,
759 },
760 [1] = {
761 .start = CH_SPI1,
762 .end = CH_SPI1,
Yi Li53122692009-06-05 12:11:11 +0000763 .flags = IORESOURCE_DMA,
764 },
765 [2] = {
766 .start = IRQ_SPI1,
767 .end = IRQ_SPI1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800768 .flags = IORESOURCE_IRQ,
769 }
770};
771
772/* SPI controller data */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800773static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800774 .num_chipselect = 8,
775 .enable_dma = 1, /* master has the ability to do dma transfer */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800776 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800777};
778
779static struct platform_device bf54x_spi_master0 = {
780 .name = "bfin-spi",
781 .id = 0, /* Bus number */
782 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
783 .resource = bfin_spi0_resource,
784 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +0800785 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800786 },
787};
788
Bryan Wu5d448dd2007-11-12 23:24:42 +0800789static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
790 .num_chipselect = 8,
791 .enable_dma = 1, /* master has the ability to do dma transfer */
792 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
793};
794
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800795static struct platform_device bf54x_spi_master1 = {
796 .name = "bfin-spi",
797 .id = 1, /* Bus number */
798 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
799 .resource = bfin_spi1_resource,
800 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +0800801 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800802 },
803};
804#endif /* spi master and devices */
805
806#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
807static struct resource bfin_twi0_resource[] = {
808 [0] = {
809 .start = TWI0_REGBASE,
810 .end = TWI0_REGBASE + 0xFF,
811 .flags = IORESOURCE_MEM,
812 },
813 [1] = {
814 .start = IRQ_TWI0,
815 .end = IRQ_TWI0,
816 .flags = IORESOURCE_IRQ,
817 },
818};
819
820static struct platform_device i2c_bfin_twi0_device = {
821 .name = "i2c-bfin-twi",
822 .id = 0,
823 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
824 .resource = bfin_twi0_resource,
825};
826
Mike Frysinger7160e9502007-11-21 16:03:07 +0800827#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800828static struct resource bfin_twi1_resource[] = {
829 [0] = {
830 .start = TWI1_REGBASE,
831 .end = TWI1_REGBASE + 0xFF,
832 .flags = IORESOURCE_MEM,
833 },
834 [1] = {
835 .start = IRQ_TWI1,
836 .end = IRQ_TWI1,
837 .flags = IORESOURCE_IRQ,
838 },
839};
840
841static struct platform_device i2c_bfin_twi1_device = {
842 .name = "i2c-bfin-twi",
843 .id = 1,
844 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
845 .resource = bfin_twi1_resource,
846};
847#endif
Mike Frysinger7160e9502007-11-21 16:03:07 +0800848#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800849
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800850static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
851};
852
853#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
854static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
Mike Frysingera261eec2009-05-20 14:05:36 +0000855#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800856 {
857 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800858 },
859#endif
860#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
861 {
862 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800863 .irq = 212,
864 },
865#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000866#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
867 {
868 I2C_BOARD_INFO("adxl34x", 0x53),
869 .irq = IRQ_PC5,
870 .platform_data = (void *)&adxl34x_info,
871 },
872#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800873};
874#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800875
Michael Hennerich2463ef22008-01-27 16:49:48 +0800876#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
877#include <linux/gpio_keys.h>
878
879static struct gpio_keys_button bfin_gpio_keys_table[] = {
880 {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
881 {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
882 {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
883 {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
884};
885
886static struct gpio_keys_platform_data bfin_gpio_keys_data = {
887 .buttons = bfin_gpio_keys_table,
888 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
889};
890
891static struct platform_device bfin_device_gpiokeys = {
892 .name = "gpio-keys",
893 .dev = {
894 .platform_data = &bfin_gpio_keys_data,
895 },
896};
897#endif
898
Mike Frysingercad2ab62008-02-22 17:01:31 +0800899static struct resource bfin_gpios_resources = {
900 .start = 0,
901 .end = MAX_BLACKFIN_GPIOS - 1,
902 .flags = IORESOURCE_IRQ,
903};
904
905static struct platform_device bfin_gpios_device = {
906 .name = "simple-gpio",
907 .id = -1,
908 .num_resources = 1,
909 .resource = &bfin_gpios_resources,
910};
911
Michael Hennerich14b03202008-05-07 11:41:26 +0800912static const unsigned int cclk_vlev_datasheet[] =
913{
914/*
915 * Internal VLEV BF54XSBBC1533
916 ****temporarily using these values until data sheet is updated
917 */
918 VRPAIR(VLEV_085, 150000000),
919 VRPAIR(VLEV_090, 250000000),
920 VRPAIR(VLEV_110, 276000000),
921 VRPAIR(VLEV_115, 301000000),
922 VRPAIR(VLEV_120, 525000000),
923 VRPAIR(VLEV_125, 550000000),
924 VRPAIR(VLEV_130, 600000000),
925};
926
927static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
928 .tuple_tab = cclk_vlev_datasheet,
929 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
930 .vr_settling_time = 25 /* us */,
931};
932
933static struct platform_device bfin_dpmc = {
934 .name = "bfin dpmc",
935 .dev = {
936 .platform_data = &bfin_dmpc_vreg_data,
937 },
938};
939
Roy Huang24a07a12007-07-12 22:41:45 +0800940static struct platform_device *ezkit_devices[] __initdata = {
Michael Hennerich14b03202008-05-07 11:41:26 +0800941
942 &bfin_dpmc,
943
Roy Huang24a07a12007-07-12 22:41:45 +0800944#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
945 &rtc_device,
946#endif
947
948#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
949 &bfin_uart_device,
950#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800951
Graf Yang5be36d22008-04-25 03:09:15 +0800952#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang42bd8bc2009-01-07 23:14:39 +0800953#ifdef CONFIG_BFIN_SIR0
954 &bfin_sir0_device,
955#endif
956#ifdef CONFIG_BFIN_SIR1
957 &bfin_sir1_device,
958#endif
959#ifdef CONFIG_BFIN_SIR2
960 &bfin_sir2_device,
961#endif
962#ifdef CONFIG_BFIN_SIR3
963 &bfin_sir3_device,
964#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800965#endif
966
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800967#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
968 &bf54x_lq043_device,
969#endif
970
971#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
972 &smsc911x_device,
973#endif
974
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800975#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
976 &musb_device,
977#endif
978
Michael Hennerich3f375692008-11-18 17:48:22 +0800979#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
980 &bfin_isp1760_device,
981#endif
982
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800983#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
984 &bfin_atapi_device,
985#endif
986
987#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
988 &bf5xx_nand_device,
989#endif
990
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -0700991#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800992 &bf54x_sdh_device,
993#endif
994
995#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
996 &bf54x_spi_master0,
Bryan Wud4b1d272007-10-21 17:03:55 +0800997 &bf54x_spi_master1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800998#endif
999
1000#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1001 &bf54x_kpad_device,
1002#endif
1003
Michael Hennerichaca5e4a2008-10-08 14:27:59 +08001004#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
1005 &bfin_rotary_device,
1006#endif
1007
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001008#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1009 &i2c_bfin_twi0_device,
Mike Frysinger7160e9502007-11-21 16:03:07 +08001010#if !defined(CONFIG_BF542)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001011 &i2c_bfin_twi1_device,
1012#endif
Mike Frysinger7160e9502007-11-21 16:03:07 +08001013#endif
Michael Hennerich2463ef22008-01-27 16:49:48 +08001014
1015#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1016 &bfin_device_gpiokeys,
1017#endif
Mike Frysingercad2ab62008-02-22 17:01:31 +08001018
1019 &bfin_gpios_device,
Mike Frysinger793dc272008-03-26 08:09:12 +08001020
1021#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +08001022 &ezkit_flash_device,
Mike Frysinger793dc272008-03-26 08:09:12 +08001023#endif
Roy Huang24a07a12007-07-12 22:41:45 +08001024};
1025
Mike Frysingera01d7a72008-02-02 15:34:56 +08001026static int __init ezkit_init(void)
Roy Huang24a07a12007-07-12 22:41:45 +08001027{
Harvey Harrisonb85d8582008-04-23 09:39:01 +08001028 printk(KERN_INFO "%s(): registering device resources\n", __func__);
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001029
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001030 i2c_register_board_info(0, bfin_i2c_board_info0,
1031 ARRAY_SIZE(bfin_i2c_board_info0));
1032#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1033 i2c_register_board_info(1, bfin_i2c_board_info1,
1034 ARRAY_SIZE(bfin_i2c_board_info1));
1035#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001036
Roy Huang24a07a12007-07-12 22:41:45 +08001037 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001038
Mike Frysinger5bda2722008-06-07 15:03:01 +08001039 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001040
Roy Huang24a07a12007-07-12 22:41:45 +08001041 return 0;
1042}
1043
Mike Frysingera01d7a72008-02-02 15:34:56 +08001044arch_initcall(ezkit_init);