blob: c66f3801274f543a9e004b7a756f847061b131c4 [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,
Michael Hennerich3f375692008-11-18 17:48:22 +080079 .bus_width_16 = 1,
80 .port1_otg = 0,
81 .analog_oc = 0,
82 .dack_polarity_high = 0,
83 .dreq_polarity_high = 0,
84};
85
86static struct platform_device bfin_isp1760_device = {
87 .name = "isp1760-hcd",
Michael Hennerich0a6304a2008-07-26 16:14:57 +080088 .id = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080089 .dev = {
90 .platform_data = &isp1760_priv,
91 },
92 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
93 .resource = bfin_isp1760_resources,
Michael Hennerich0a6304a2008-07-26 16:14:57 +080094};
Michael Hennerich0a6304a2008-07-26 16:14:57 +080095#endif
96
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080097#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
98
Bryan Wu639f6572008-08-27 10:51:02 +080099#include <mach/bf54x-lq043.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800100
101static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
Stefan Pledl0e101ec2009-07-29 08:09:45 +0000102 .width = 95,
103 .height = 54,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800104 .xres = {480, 480, 480},
105 .yres = {272, 272, 272},
106 .bpp = {24, 24, 24},
107 .disp = GPIO_PE3,
108};
109
110static struct resource bf54x_lq043_resources[] = {
111 {
112 .start = IRQ_EPPI0_ERR,
113 .end = IRQ_EPPI0_ERR,
114 .flags = IORESOURCE_IRQ,
115 },
116};
117
118static struct platform_device bf54x_lq043_device = {
119 .name = "bf54x-lq043",
120 .id = -1,
121 .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
122 .resource = bf54x_lq043_resources,
123 .dev = {
124 .platform_data = &bf54x_lq043_data,
125 },
126};
127#endif
128
129#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400130static const unsigned int bf548_keymap[] = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800131 KEYVAL(0, 0, KEY_ENTER),
132 KEYVAL(0, 1, KEY_HELP),
133 KEYVAL(0, 2, KEY_0),
134 KEYVAL(0, 3, KEY_BACKSPACE),
135 KEYVAL(1, 0, KEY_TAB),
136 KEYVAL(1, 1, KEY_9),
137 KEYVAL(1, 2, KEY_8),
138 KEYVAL(1, 3, KEY_7),
139 KEYVAL(2, 0, KEY_DOWN),
140 KEYVAL(2, 1, KEY_6),
141 KEYVAL(2, 2, KEY_5),
142 KEYVAL(2, 3, KEY_4),
143 KEYVAL(3, 0, KEY_UP),
144 KEYVAL(3, 1, KEY_3),
145 KEYVAL(3, 2, KEY_2),
146 KEYVAL(3, 3, KEY_1),
147};
148
149static struct bfin_kpad_platform_data bf54x_kpad_data = {
150 .rows = 4,
151 .cols = 4,
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400152 .keymap = bf548_keymap,
153 .keymapsize = ARRAY_SIZE(bf548_keymap),
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800154 .repeat = 0,
155 .debounce_time = 5000, /* ns (5ms) */
156 .coldrive_time = 1000, /* ns (1ms) */
157 .keyup_test_interval = 50, /* ms (50ms) */
158};
159
160static struct resource bf54x_kpad_resources[] = {
161 {
162 .start = IRQ_KEY,
163 .end = IRQ_KEY,
164 .flags = IORESOURCE_IRQ,
165 },
166};
167
168static struct platform_device bf54x_kpad_device = {
169 .name = "bf54x-keys",
170 .id = -1,
171 .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
172 .resource = bf54x_kpad_resources,
173 .dev = {
174 .platform_data = &bf54x_kpad_data,
175 },
176};
177#endif
178
Michael Hennerichaca5e4a2008-10-08 14:27:59 +0800179#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
180#include <asm/bfin_rotary.h>
181
182static struct bfin_rotary_platform_data bfin_rotary_data = {
183 /*.rotary_up_key = KEY_UP,*/
184 /*.rotary_down_key = KEY_DOWN,*/
185 .rotary_rel_code = REL_WHEEL,
186 .rotary_button_key = KEY_ENTER,
187 .debounce = 10, /* 0..17 */
188 .mode = ROT_QUAD_ENC | ROT_DEBE,
189};
190
191static struct resource bfin_rotary_resources[] = {
192 {
193 .start = IRQ_CNT,
194 .end = IRQ_CNT,
195 .flags = IORESOURCE_IRQ,
196 },
197};
198
199static struct platform_device bfin_rotary_device = {
200 .name = "bfin-rotary",
201 .id = -1,
202 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
203 .resource = bfin_rotary_resources,
204 .dev = {
205 .platform_data = &bfin_rotary_data,
206 },
207};
208#endif
209
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000210#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
211#include <linux/input.h>
212#include <linux/spi/adxl34x.h>
213static const struct adxl34x_platform_data adxl34x_info = {
214 .x_axis_offset = 0,
215 .y_axis_offset = 0,
216 .z_axis_offset = 0,
217 .tap_threshold = 0x31,
218 .tap_duration = 0x10,
219 .tap_latency = 0x60,
220 .tap_window = 0xF0,
221 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
222 .act_axis_control = 0xFF,
223 .activity_threshold = 5,
224 .inactivity_threshold = 3,
225 .inactivity_time = 4,
226 .free_fall_threshold = 0x7,
227 .free_fall_time = 0x20,
228 .data_rate = 0x8,
229 .data_range = ADXL_FULL_RES,
230
231 .ev_type = EV_ABS,
232 .ev_code_x = ABS_X, /* EV_REL */
233 .ev_code_y = ABS_Y, /* EV_REL */
234 .ev_code_z = ABS_Z, /* EV_REL */
235
236 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */
237 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
238 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
239
240/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
241/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
242 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
243 .fifo_mode = ADXL_FIFO_STREAM,
244};
245#endif
246
Roy Huang24a07a12007-07-12 22:41:45 +0800247#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
248static struct platform_device rtc_device = {
249 .name = "rtc-bfin",
250 .id = -1,
251};
252#endif
253
254#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
255static struct resource bfin_uart_resources[] = {
256#ifdef CONFIG_SERIAL_BFIN_UART0
257 {
258 .start = 0xFFC00400,
259 .end = 0xFFC004FF,
260 .flags = IORESOURCE_MEM,
261 },
262#endif
263#ifdef CONFIG_SERIAL_BFIN_UART1
264 {
265 .start = 0xFFC02000,
266 .end = 0xFFC020FF,
267 .flags = IORESOURCE_MEM,
268 },
269#endif
270#ifdef CONFIG_SERIAL_BFIN_UART2
271 {
272 .start = 0xFFC02100,
273 .end = 0xFFC021FF,
274 .flags = IORESOURCE_MEM,
275 },
276#endif
277#ifdef CONFIG_SERIAL_BFIN_UART3
278 {
279 .start = 0xFFC03100,
280 .end = 0xFFC031FF,
Mike Frysingercc2e16b2008-07-19 16:43:51 +0800281 .flags = IORESOURCE_MEM,
Roy Huang24a07a12007-07-12 22:41:45 +0800282 },
283#endif
284};
285
286static struct platform_device bfin_uart_device = {
287 .name = "bfin-uart",
288 .id = 1,
289 .num_resources = ARRAY_SIZE(bfin_uart_resources),
290 .resource = bfin_uart_resources,
291};
292#endif
293
Graf Yang5be36d22008-04-25 03:09:15 +0800294#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang5be36d22008-04-25 03:09:15 +0800295#ifdef CONFIG_BFIN_SIR0
Graf Yang42bd8bc2009-01-07 23:14:39 +0800296static struct resource bfin_sir0_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800297 {
298 .start = 0xFFC00400,
299 .end = 0xFFC004FF,
300 .flags = IORESOURCE_MEM,
301 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800302 {
303 .start = IRQ_UART0_RX,
304 .end = IRQ_UART0_RX+1,
305 .flags = IORESOURCE_IRQ,
306 },
307 {
308 .start = CH_UART0_RX,
309 .end = CH_UART0_RX+1,
310 .flags = IORESOURCE_DMA,
311 },
312};
313static struct platform_device bfin_sir0_device = {
314 .name = "bfin_sir",
315 .id = 0,
316 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
317 .resource = bfin_sir0_resources,
318};
Graf Yang5be36d22008-04-25 03:09:15 +0800319#endif
320#ifdef CONFIG_BFIN_SIR1
Graf Yang42bd8bc2009-01-07 23:14:39 +0800321static struct resource bfin_sir1_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800322 {
323 .start = 0xFFC02000,
324 .end = 0xFFC020FF,
325 .flags = IORESOURCE_MEM,
326 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800327 {
328 .start = IRQ_UART1_RX,
329 .end = IRQ_UART1_RX+1,
330 .flags = IORESOURCE_IRQ,
331 },
332 {
333 .start = CH_UART1_RX,
334 .end = CH_UART1_RX+1,
335 .flags = IORESOURCE_DMA,
336 },
337};
338static struct platform_device bfin_sir1_device = {
339 .name = "bfin_sir",
340 .id = 1,
341 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
342 .resource = bfin_sir1_resources,
343};
Graf Yang5be36d22008-04-25 03:09:15 +0800344#endif
345#ifdef CONFIG_BFIN_SIR2
Graf Yang42bd8bc2009-01-07 23:14:39 +0800346static struct resource bfin_sir2_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800347 {
348 .start = 0xFFC02100,
349 .end = 0xFFC021FF,
350 .flags = IORESOURCE_MEM,
351 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800352 {
353 .start = IRQ_UART2_RX,
354 .end = IRQ_UART2_RX+1,
355 .flags = IORESOURCE_IRQ,
356 },
357 {
358 .start = CH_UART2_RX,
359 .end = CH_UART2_RX+1,
360 .flags = IORESOURCE_DMA,
361 },
362};
363static struct platform_device bfin_sir2_device = {
364 .name = "bfin_sir",
365 .id = 2,
366 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
367 .resource = bfin_sir2_resources,
368};
Graf Yang5be36d22008-04-25 03:09:15 +0800369#endif
370#ifdef CONFIG_BFIN_SIR3
Graf Yang42bd8bc2009-01-07 23:14:39 +0800371static struct resource bfin_sir3_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800372 {
373 .start = 0xFFC03100,
374 .end = 0xFFC031FF,
375 .flags = IORESOURCE_MEM,
376 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800377 {
378 .start = IRQ_UART3_RX,
379 .end = IRQ_UART3_RX+1,
380 .flags = IORESOURCE_IRQ,
381 },
382 {
383 .start = CH_UART3_RX,
384 .end = CH_UART3_RX+1,
385 .flags = IORESOURCE_DMA,
386 },
Graf Yang5be36d22008-04-25 03:09:15 +0800387};
Graf Yang42bd8bc2009-01-07 23:14:39 +0800388static struct platform_device bfin_sir3_device = {
Graf Yang5be36d22008-04-25 03:09:15 +0800389 .name = "bfin_sir",
Graf Yang42bd8bc2009-01-07 23:14:39 +0800390 .id = 3,
391 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
392 .resource = bfin_sir3_resources,
Graf Yang5be36d22008-04-25 03:09:15 +0800393};
394#endif
Graf Yang42bd8bc2009-01-07 23:14:39 +0800395#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800396
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800397#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400398#include <linux/smsc911x.h>
399
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800400static struct resource smsc911x_resources[] = {
401 {
402 .name = "smsc911x-memory",
403 .start = 0x24000000,
404 .end = 0x24000000 + 0xFF,
405 .flags = IORESOURCE_MEM,
406 },
407 {
408 .start = IRQ_PE8,
409 .end = IRQ_PE8,
410 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
411 },
412};
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400413
414static struct smsc911x_platform_config smsc911x_config = {
415 .flags = SMSC911X_USE_32BIT,
416 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
417 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
418 .phy_interface = PHY_INTERFACE_MODE_MII,
419};
420
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800421static struct platform_device smsc911x_device = {
422 .name = "smsc911x",
423 .id = 0,
424 .num_resources = ARRAY_SIZE(smsc911x_resources),
425 .resource = smsc911x_resources,
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400426 .dev = {
427 .platform_data = &smsc911x_config,
428 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800429};
430#endif
431
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800432#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
433static struct resource musb_resources[] = {
434 [0] = {
435 .start = 0xFFC03C00,
436 .end = 0xFFC040FF,
437 .flags = IORESOURCE_MEM,
438 },
439 [1] = { /* general IRQ */
440 .start = IRQ_USB_INT0,
441 .end = IRQ_USB_INT0,
442 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
443 },
444 [2] = { /* DMA IRQ */
445 .start = IRQ_USB_DMA,
446 .end = IRQ_USB_DMA,
447 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
448 },
449};
450
Bryan Wu50041ac2008-10-08 13:39:40 +0800451static struct musb_hdrc_config musb_config = {
452 .multipoint = 0,
453 .dyn_fifo = 0,
454 .soft_con = 1,
455 .dma = 1,
Bryan Wufea05da2009-01-07 23:14:39 +0800456 .num_eps = 8,
457 .dma_channels = 8,
Bryan Wu50041ac2008-10-08 13:39:40 +0800458 .gpio_vrsel = GPIO_PE7,
459};
460
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800461static struct musb_hdrc_platform_data musb_plat = {
Bryan Wu29350772007-12-24 12:20:19 +0800462#if defined(CONFIG_USB_MUSB_OTG)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800463 .mode = MUSB_OTG,
Bryan Wu29350772007-12-24 12:20:19 +0800464#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800465 .mode = MUSB_HOST,
Bryan Wu29350772007-12-24 12:20:19 +0800466#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800467 .mode = MUSB_PERIPHERAL,
468#endif
Bryan Wu50041ac2008-10-08 13:39:40 +0800469 .config = &musb_config,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800470};
471
472static u64 musb_dmamask = ~(u32)0;
473
474static struct platform_device musb_device = {
475 .name = "musb_hdrc",
476 .id = 0,
477 .dev = {
478 .dma_mask = &musb_dmamask,
479 .coherent_dma_mask = 0xffffffff,
480 .platform_data = &musb_plat,
481 },
482 .num_resources = ARRAY_SIZE(musb_resources),
483 .resource = musb_resources,
484};
485#endif
486
487#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
488static struct resource bfin_atapi_resources[] = {
489 {
490 .start = 0xFFC03800,
491 .end = 0xFFC0386F,
492 .flags = IORESOURCE_MEM,
493 },
494 {
495 .start = IRQ_ATAPI_ERR,
496 .end = IRQ_ATAPI_ERR,
497 .flags = IORESOURCE_IRQ,
498 },
499};
500
501static struct platform_device bfin_atapi_device = {
502 .name = "pata-bf54x",
503 .id = -1,
504 .num_resources = ARRAY_SIZE(bfin_atapi_resources),
505 .resource = bfin_atapi_resources,
506};
507#endif
508
509#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
510static struct mtd_partition partition_info[] = {
511 {
Robin Getzaa582972008-08-05 17:47:29 +0800512 .name = "linux kernel(nand)",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800513 .offset = 0,
Mike Frysingerf4585a02008-10-13 14:45:21 +0800514 .size = 4 * 1024 * 1024,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800515 },
516 {
Robin Getzaa582972008-08-05 17:47:29 +0800517 .name = "file system(nand)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800518 .offset = MTDPART_OFS_APPEND,
519 .size = MTDPART_SIZ_FULL,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800520 },
521};
522
523static struct bf5xx_nand_platform bf5xx_nand_platform = {
524 .page_size = NFC_PG_SIZE_256,
525 .data_width = NFC_NWIDTH_8,
526 .partitions = partition_info,
527 .nr_partitions = ARRAY_SIZE(partition_info),
528 .rd_dly = 3,
529 .wr_dly = 3,
530};
531
532static struct resource bf5xx_nand_resources[] = {
533 {
534 .start = 0xFFC03B00,
535 .end = 0xFFC03B4F,
536 .flags = IORESOURCE_MEM,
537 },
538 {
539 .start = CH_NFC,
540 .end = CH_NFC,
541 .flags = IORESOURCE_IRQ,
542 },
543};
544
545static struct platform_device bf5xx_nand_device = {
546 .name = "bf5xx-nand",
547 .id = 0,
548 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
549 .resource = bf5xx_nand_resources,
550 .dev = {
551 .platform_data = &bf5xx_nand_platform,
552 },
553};
554#endif
555
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -0700556#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Cliff Cai501674a2009-01-07 23:14:38 +0800557
558static struct bfin_sd_host bfin_sdh_data = {
559 .dma_chan = CH_SDH,
560 .irq_int0 = IRQ_SDH_MASK0,
561 .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0},
562};
563
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800564static struct platform_device bf54x_sdh_device = {
565 .name = "bfin-sdh",
566 .id = 0,
Cliff Cai501674a2009-01-07 23:14:38 +0800567 .dev = {
568 .platform_data = &bfin_sdh_data,
569 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800570};
571#endif
572
Mike Frysinger793dc272008-03-26 08:09:12 +0800573#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800574static struct mtd_partition ezkit_partitions[] = {
575 {
Robin Getzaa582972008-08-05 17:47:29 +0800576 .name = "bootloader(nor)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800577 .size = 0x40000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800578 .offset = 0,
579 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800580 .name = "linux kernel(nor)",
Mike Frysinger664d0402008-10-09 17:28:36 +0800581 .size = 0x400000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800582 .offset = MTDPART_OFS_APPEND,
583 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800584 .name = "file system(nor)",
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800585 .size = MTDPART_SIZ_FULL,
586 .offset = MTDPART_OFS_APPEND,
587 }
588};
589
590static struct physmap_flash_data ezkit_flash_data = {
591 .width = 2,
592 .parts = ezkit_partitions,
593 .nr_parts = ARRAY_SIZE(ezkit_partitions),
594};
595
596static struct resource ezkit_flash_resource = {
597 .start = 0x20000000,
Mike Frysinger664d0402008-10-09 17:28:36 +0800598 .end = 0x21ffffff,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800599 .flags = IORESOURCE_MEM,
600};
601
602static struct platform_device ezkit_flash_device = {
603 .name = "physmap-flash",
604 .id = 0,
605 .dev = {
606 .platform_data = &ezkit_flash_data,
607 },
608 .num_resources = 1,
609 .resource = &ezkit_flash_resource,
610};
Mike Frysinger793dc272008-03-26 08:09:12 +0800611#endif
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800612
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800613#if defined(CONFIG_MTD_M25P80) \
614 || defined(CONFIG_MTD_M25P80_MODULE)
615/* SPI flash chip (m25p16) */
616static struct mtd_partition bfin_spi_flash_partitions[] = {
617 {
Robin Getzaa582972008-08-05 17:47:29 +0800618 .name = "bootloader(spi)",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800619 .size = 0x00040000,
620 .offset = 0,
621 .mask_flags = MTD_CAP_ROM
622 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800623 .name = "linux kernel(spi)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800624 .size = MTDPART_SIZ_FULL,
625 .offset = MTDPART_OFS_APPEND,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800626 }
627};
628
629static struct flash_platform_data bfin_spi_flash_data = {
630 .name = "m25p80",
631 .parts = bfin_spi_flash_partitions,
632 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
633 .type = "m25p16",
634};
635
636static struct bfin5xx_spi_chip spi_flash_chip_info = {
637 .enable_dma = 0, /* use dma transfer with this chip*/
638 .bits_per_word = 8,
639 .cs_change_per_word = 0,
640};
641#endif
642
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800643#if defined(CONFIG_SND_BLACKFIN_AD1836) \
644 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
645static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
646 .enable_dma = 0,
647 .bits_per_word = 16,
648};
649#endif
650
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800651#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
652static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
Michael Hennerichc7d48962007-11-15 21:33:31 +0800653 .cs_change_per_word = 0,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800654 .enable_dma = 0,
655 .bits_per_word = 16,
656};
657
658static const struct ad7877_platform_data bfin_ad7877_ts_info = {
659 .model = 7877,
660 .vref_delay_usecs = 50, /* internal, no capacitor */
661 .x_plate_ohms = 419,
662 .y_plate_ohms = 486,
663 .pressure_max = 1000,
664 .pressure_min = 0,
665 .stopacq_polarity = 1,
666 .first_conversion_delay = 3,
667 .acquisition_time = 1,
668 .averaging = 1,
669 .pen_down_acc_interval = 1,
670};
671#endif
672
Michael Hennerich6e668932008-02-09 01:54:09 +0800673#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
674static struct bfin5xx_spi_chip spidev_chip_info = {
675 .enable_dma = 0,
676 .bits_per_word = 8,
677};
678#endif
679
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000680#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
681static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
682 .enable_dma = 0, /* use dma transfer with this chip*/
683 .bits_per_word = 8,
684 .cs_change_per_word = 0,
685};
686#endif
687
Mike Frysinger5bda2722008-06-07 15:03:01 +0800688static struct spi_board_info bfin_spi_board_info[] __initdata = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800689#if defined(CONFIG_MTD_M25P80) \
690 || defined(CONFIG_MTD_M25P80_MODULE)
691 {
692 /* the modalias must be the same as spi device driver name */
693 .modalias = "m25p80", /* Name of spi_driver for this device */
694 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
695 .bus_num = 0, /* Framework bus number */
696 .chip_select = 1, /* SPI_SSEL1*/
697 .platform_data = &bfin_spi_flash_data,
698 .controller_data = &spi_flash_chip_info,
699 .mode = SPI_MODE_3,
700 },
701#endif
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800702#if defined(CONFIG_SND_BLACKFIN_AD1836) \
703 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
704 {
Barry Songdac98172009-08-13 21:07:37 +0000705 .modalias = "ad1836",
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800706 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
707 .bus_num = 1,
708 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
709 .controller_data = &ad1836_spi_chip_info,
710 },
711#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800712#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000713 {
714 .modalias = "ad7877",
715 .platform_data = &bfin_ad7877_ts_info,
716 .irq = IRQ_PB4, /* old boards (<=Rev 1.3) use IRQ_PJ11 */
717 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
718 .bus_num = 0,
719 .chip_select = 2,
720 .controller_data = &spi_ad7877_chip_info,
721 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800722#endif
Michael Hennerich6e668932008-02-09 01:54:09 +0800723#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
724 {
725 .modalias = "spidev",
726 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
727 .bus_num = 0,
728 .chip_select = 1,
729 .controller_data = &spidev_chip_info,
730 },
731#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000732#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
733 {
734 .modalias = "adxl34x",
735 .platform_data = &adxl34x_info,
736 .irq = IRQ_PC5,
737 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
738 .bus_num = 1,
739 .chip_select = 2,
740 .controller_data = &spi_adxl34x_chip_info,
741 .mode = SPI_MODE_3,
742 },
743#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800744};
Mike Frysinger5bda2722008-06-07 15:03:01 +0800745#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800746/* SPI (0) */
747static struct resource bfin_spi0_resource[] = {
748 [0] = {
749 .start = SPI0_REGBASE,
750 .end = SPI0_REGBASE + 0xFF,
751 .flags = IORESOURCE_MEM,
752 },
753 [1] = {
754 .start = CH_SPI0,
755 .end = CH_SPI0,
Yi Li53122692009-06-05 12:11:11 +0000756 .flags = IORESOURCE_DMA,
757 },
758 [2] = {
759 .start = IRQ_SPI0,
760 .end = IRQ_SPI0,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800761 .flags = IORESOURCE_IRQ,
762 }
763};
764
765/* SPI (1) */
766static struct resource bfin_spi1_resource[] = {
767 [0] = {
768 .start = SPI1_REGBASE,
769 .end = SPI1_REGBASE + 0xFF,
770 .flags = IORESOURCE_MEM,
771 },
772 [1] = {
773 .start = CH_SPI1,
774 .end = CH_SPI1,
Yi Li53122692009-06-05 12:11:11 +0000775 .flags = IORESOURCE_DMA,
776 },
777 [2] = {
778 .start = IRQ_SPI1,
779 .end = IRQ_SPI1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800780 .flags = IORESOURCE_IRQ,
781 }
782};
783
784/* SPI controller data */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800785static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
Yi Li4e4d4962009-08-30 20:45:50 +0000786 .num_chipselect = 3,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800787 .enable_dma = 1, /* master has the ability to do dma transfer */
Bryan Wu5d448dd2007-11-12 23:24:42 +0800788 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800789};
790
791static struct platform_device bf54x_spi_master0 = {
792 .name = "bfin-spi",
793 .id = 0, /* Bus number */
794 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
795 .resource = bfin_spi0_resource,
796 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +0800797 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800798 },
799};
800
Bryan Wu5d448dd2007-11-12 23:24:42 +0800801static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
Yi Li4e4d4962009-08-30 20:45:50 +0000802 .num_chipselect = 3,
Bryan Wu5d448dd2007-11-12 23:24:42 +0800803 .enable_dma = 1, /* master has the ability to do dma transfer */
804 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
805};
806
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800807static struct platform_device bf54x_spi_master1 = {
808 .name = "bfin-spi",
809 .id = 1, /* Bus number */
810 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
811 .resource = bfin_spi1_resource,
812 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +0800813 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800814 },
815};
816#endif /* spi master and devices */
817
818#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
819static struct resource bfin_twi0_resource[] = {
820 [0] = {
821 .start = TWI0_REGBASE,
822 .end = TWI0_REGBASE + 0xFF,
823 .flags = IORESOURCE_MEM,
824 },
825 [1] = {
826 .start = IRQ_TWI0,
827 .end = IRQ_TWI0,
828 .flags = IORESOURCE_IRQ,
829 },
830};
831
832static struct platform_device i2c_bfin_twi0_device = {
833 .name = "i2c-bfin-twi",
834 .id = 0,
835 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
836 .resource = bfin_twi0_resource,
837};
838
Mike Frysinger7160e9502007-11-21 16:03:07 +0800839#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800840static struct resource bfin_twi1_resource[] = {
841 [0] = {
842 .start = TWI1_REGBASE,
843 .end = TWI1_REGBASE + 0xFF,
844 .flags = IORESOURCE_MEM,
845 },
846 [1] = {
847 .start = IRQ_TWI1,
848 .end = IRQ_TWI1,
849 .flags = IORESOURCE_IRQ,
850 },
851};
852
853static struct platform_device i2c_bfin_twi1_device = {
854 .name = "i2c-bfin-twi",
855 .id = 1,
856 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
857 .resource = bfin_twi1_resource,
858};
859#endif
Mike Frysinger7160e9502007-11-21 16:03:07 +0800860#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800861
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800862static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
863};
864
865#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
866static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
Michael Hennerichebd58332009-07-02 11:00:38 +0000867#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800868 {
869 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800870 },
871#endif
Michael Hennerich204844e2009-06-30 14:57:22 +0000872#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800873 {
874 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800875 .irq = 212,
876 },
877#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000878#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
879 {
880 I2C_BOARD_INFO("adxl34x", 0x53),
881 .irq = IRQ_PC5,
882 .platform_data = (void *)&adxl34x_info,
883 },
884#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800885};
886#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +0800887
Michael Hennerich2463ef22008-01-27 16:49:48 +0800888#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
889#include <linux/gpio_keys.h>
890
891static struct gpio_keys_button bfin_gpio_keys_table[] = {
892 {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
893 {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
894 {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
895 {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
896};
897
898static struct gpio_keys_platform_data bfin_gpio_keys_data = {
899 .buttons = bfin_gpio_keys_table,
900 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
901};
902
903static struct platform_device bfin_device_gpiokeys = {
904 .name = "gpio-keys",
905 .dev = {
906 .platform_data = &bfin_gpio_keys_data,
907 },
908};
909#endif
910
Mike Frysingercad2ab62008-02-22 17:01:31 +0800911static struct resource bfin_gpios_resources = {
912 .start = 0,
913 .end = MAX_BLACKFIN_GPIOS - 1,
914 .flags = IORESOURCE_IRQ,
915};
916
917static struct platform_device bfin_gpios_device = {
918 .name = "simple-gpio",
919 .id = -1,
920 .num_resources = 1,
921 .resource = &bfin_gpios_resources,
922};
923
Michael Hennerich14b03202008-05-07 11:41:26 +0800924static const unsigned int cclk_vlev_datasheet[] =
925{
926/*
927 * Internal VLEV BF54XSBBC1533
928 ****temporarily using these values until data sheet is updated
929 */
930 VRPAIR(VLEV_085, 150000000),
931 VRPAIR(VLEV_090, 250000000),
932 VRPAIR(VLEV_110, 276000000),
933 VRPAIR(VLEV_115, 301000000),
934 VRPAIR(VLEV_120, 525000000),
935 VRPAIR(VLEV_125, 550000000),
936 VRPAIR(VLEV_130, 600000000),
937};
938
939static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
940 .tuple_tab = cclk_vlev_datasheet,
941 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
942 .vr_settling_time = 25 /* us */,
943};
944
945static struct platform_device bfin_dpmc = {
946 .name = "bfin dpmc",
947 .dev = {
948 .platform_data = &bfin_dmpc_vreg_data,
949 },
950};
951
Roy Huang24a07a12007-07-12 22:41:45 +0800952static struct platform_device *ezkit_devices[] __initdata = {
Michael Hennerich14b03202008-05-07 11:41:26 +0800953
954 &bfin_dpmc,
955
Roy Huang24a07a12007-07-12 22:41:45 +0800956#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
957 &rtc_device,
958#endif
959
960#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
961 &bfin_uart_device,
962#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800963
Graf Yang5be36d22008-04-25 03:09:15 +0800964#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang42bd8bc2009-01-07 23:14:39 +0800965#ifdef CONFIG_BFIN_SIR0
966 &bfin_sir0_device,
967#endif
968#ifdef CONFIG_BFIN_SIR1
969 &bfin_sir1_device,
970#endif
971#ifdef CONFIG_BFIN_SIR2
972 &bfin_sir2_device,
973#endif
974#ifdef CONFIG_BFIN_SIR3
975 &bfin_sir3_device,
976#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800977#endif
978
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800979#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
980 &bf54x_lq043_device,
981#endif
982
983#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
984 &smsc911x_device,
985#endif
986
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800987#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
988 &musb_device,
989#endif
990
Michael Hennerich3f375692008-11-18 17:48:22 +0800991#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
992 &bfin_isp1760_device,
993#endif
994
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800995#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
996 &bfin_atapi_device,
997#endif
998
999#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1000 &bf5xx_nand_device,
1001#endif
1002
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -07001003#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001004 &bf54x_sdh_device,
1005#endif
1006
1007#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1008 &bf54x_spi_master0,
Bryan Wud4b1d272007-10-21 17:03:55 +08001009 &bf54x_spi_master1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001010#endif
1011
1012#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1013 &bf54x_kpad_device,
1014#endif
1015
Michael Hennerichaca5e4a2008-10-08 14:27:59 +08001016#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE)
1017 &bfin_rotary_device,
1018#endif
1019
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001020#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1021 &i2c_bfin_twi0_device,
Mike Frysinger7160e9502007-11-21 16:03:07 +08001022#if !defined(CONFIG_BF542)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001023 &i2c_bfin_twi1_device,
1024#endif
Mike Frysinger7160e9502007-11-21 16:03:07 +08001025#endif
Michael Hennerich2463ef22008-01-27 16:49:48 +08001026
1027#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1028 &bfin_device_gpiokeys,
1029#endif
Mike Frysingercad2ab62008-02-22 17:01:31 +08001030
1031 &bfin_gpios_device,
Mike Frysinger793dc272008-03-26 08:09:12 +08001032
1033#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +08001034 &ezkit_flash_device,
Mike Frysinger793dc272008-03-26 08:09:12 +08001035#endif
Roy Huang24a07a12007-07-12 22:41:45 +08001036};
1037
Mike Frysingera01d7a72008-02-02 15:34:56 +08001038static int __init ezkit_init(void)
Roy Huang24a07a12007-07-12 22:41:45 +08001039{
Harvey Harrisonb85d8582008-04-23 09:39:01 +08001040 printk(KERN_INFO "%s(): registering device resources\n", __func__);
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001041
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001042 i2c_register_board_info(0, bfin_i2c_board_info0,
1043 ARRAY_SIZE(bfin_i2c_board_info0));
1044#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1045 i2c_register_board_info(1, bfin_i2c_board_info1,
1046 ARRAY_SIZE(bfin_i2c_board_info1));
1047#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001048
Roy Huang24a07a12007-07-12 22:41:45 +08001049 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001050
Mike Frysinger5bda2722008-06-07 15:03:01 +08001051 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001052
Roy Huang24a07a12007-07-12 22:41:45 +08001053 return 0;
1054}
1055
Mike Frysingera01d7a72008-02-02 15:34:56 +08001056arch_initcall(ezkit_init);