aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf537/boards')
-rw-r--r--arch/blackfin/mach-bf537/boards/Kconfig12
-rw-r--r--arch/blackfin/mach-bf537/boards/Makefile3
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c727
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c (renamed from arch/blackfin/mach-bf537/boards/cm_bf537.c)47
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c29
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c249
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c43
7 files changed, 989 insertions, 121 deletions
diff --git a/arch/blackfin/mach-bf537/boards/Kconfig b/arch/blackfin/mach-bf537/boards/Kconfig
index 77c59da87e85..44132fda63be 100644
--- a/arch/blackfin/mach-bf537/boards/Kconfig
+++ b/arch/blackfin/mach-bf537/boards/Kconfig
@@ -9,11 +9,17 @@ config BFIN537_STAMP
9 help 9 help
10 BF537-STAMP board support. 10 BF537-STAMP board support.
11 11
12config BFIN537_BLUETECHNIX_CM 12config BFIN537_BLUETECHNIX_CM_E
13 bool "Bluetechnix CM-BF537" 13 bool "Bluetechnix CM-BF537E"
14 depends on (BF537) 14 depends on (BF537)
15 help 15 help
16 CM-BF537 support for EVAL- and DEV-Board. 16 CM-BF537E support for EVAL- and DEV-Board.
17
18config BFIN537_BLUETECHNIX_CM_U
19 bool "Bluetechnix CM-BF537U"
20 depends on (BF537)
21 help
22 CM-BF537U support for EVAL- and DEV-Board.
17 23
18config BFIN537_BLUETECHNIX_TCM 24config BFIN537_BLUETECHNIX_TCM
19 bool "Bluetechnix TCM-BF537" 25 bool "Bluetechnix TCM-BF537"
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile
index 68b98a7af6a6..7e6aa4e5b205 100644
--- a/arch/blackfin/mach-bf537/boards/Makefile
+++ b/arch/blackfin/mach-bf537/boards/Makefile
@@ -3,7 +3,8 @@
3# 3#
4 4
5obj-$(CONFIG_BFIN537_STAMP) += stamp.o 5obj-$(CONFIG_BFIN537_STAMP) += stamp.o
6obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o 6obj-$(CONFIG_BFIN537_BLUETECHNIX_CM_E) += cm_bf537e.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM_U) += cm_bf537u.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM) += tcm_bf537.o 8obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM) += tcm_bf537.o
8obj-$(CONFIG_PNAV10) += pnav10.o 9obj-$(CONFIG_PNAV10) += pnav10.o
9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o 10obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
new file mode 100644
index 000000000000..87acb7dd2df3
--- /dev/null
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -0,0 +1,727 @@
1/*
2 * File: arch/blackfin/mach-bf537/boards/cm_bf537.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created: 2005
7 * Description: Board description file
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 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/etherdevice.h>
33#include <linux/platform_device.h>
34#include <linux/mtd/mtd.h>
35#include <linux/mtd/partitions.h>
36#include <linux/mtd/physmap.h>
37#include <linux/spi/spi.h>
38#include <linux/spi/flash.h>
39#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
40#include <linux/usb/isp1362.h>
41#endif
42#include <linux/ata_platform.h>
43#include <linux/irq.h>
44#include <asm/dma.h>
45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h>
47#include <asm/dpmc.h>
48
49/*
50 * Name the Board for the /proc/cpuinfo
51 */
52const char bfin_board_name[] = "Bluetechnix CM BF537E";
53
54#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
55/* all SPI peripherals info goes here */
56
57#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
58static struct mtd_partition bfin_spi_flash_partitions[] = {
59 {
60 .name = "bootloader(spi)",
61 .size = 0x00020000,
62 .offset = 0,
63 .mask_flags = MTD_CAP_ROM
64 }, {
65 .name = "linux kernel(spi)",
66 .size = 0xe0000,
67 .offset = 0x20000
68 }, {
69 .name = "file system(spi)",
70 .size = 0x700000,
71 .offset = 0x00100000,
72 }
73};
74
75static struct flash_platform_data bfin_spi_flash_data = {
76 .name = "m25p80",
77 .parts = bfin_spi_flash_partitions,
78 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
79 .type = "m25p64",
80};
81
82/* SPI flash chip (m25p64) */
83static struct bfin5xx_spi_chip spi_flash_chip_info = {
84 .enable_dma = 0, /* use dma transfer with this chip*/
85 .bits_per_word = 8,
86};
87#endif
88
89#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
90/* SPI ADC chip */
91static struct bfin5xx_spi_chip spi_adc_chip_info = {
92 .enable_dma = 1, /* use dma transfer with this chip*/
93 .bits_per_word = 16,
94};
95#endif
96
97#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
98static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
99 .enable_dma = 0,
100 .bits_per_word = 16,
101};
102#endif
103
104#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
105static struct bfin5xx_spi_chip mmc_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 8,
108};
109#endif
110
111static struct spi_board_info bfin_spi_board_info[] __initdata = {
112#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
113 {
114 /* the modalias must be the same as spi device driver name */
115 .modalias = "m25p80", /* Name of spi_driver for this device */
116 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
117 .bus_num = 0, /* Framework bus number */
118 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
119 .platform_data = &bfin_spi_flash_data,
120 .controller_data = &spi_flash_chip_info,
121 .mode = SPI_MODE_3,
122 },
123#endif
124
125#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
126 {
127 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
128 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
129 .bus_num = 0, /* Framework bus number */
130 .chip_select = 1, /* Framework chip select. */
131 .platform_data = NULL, /* No spi_driver specific config */
132 .controller_data = &spi_adc_chip_info,
133 },
134#endif
135
136#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
137 {
138 .modalias = "ad1836",
139 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
140 .bus_num = 0,
141 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
142 .controller_data = &ad1836_spi_chip_info,
143 },
144#endif
145
146#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
147 {
148 .modalias = "mmc_spi",
149 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
150 .bus_num = 0,
151 .chip_select = 1,
152 .controller_data = &mmc_spi_chip_info,
153 .mode = SPI_MODE_3,
154 },
155#endif
156};
157
158/* SPI (0) */
159static struct resource bfin_spi0_resource[] = {
160 [0] = {
161 .start = SPI0_REGBASE,
162 .end = SPI0_REGBASE + 0xFF,
163 .flags = IORESOURCE_MEM,
164 },
165 [1] = {
166 .start = CH_SPI,
167 .end = CH_SPI,
168 .flags = IORESOURCE_DMA,
169 },
170 [2] = {
171 .start = IRQ_SPI,
172 .end = IRQ_SPI,
173 .flags = IORESOURCE_IRQ,
174 },
175};
176
177/* SPI controller data */
178static struct bfin5xx_spi_master bfin_spi0_info = {
179 .num_chipselect = 8,
180 .enable_dma = 1, /* master has the ability to do dma transfer */
181 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
182};
183
184static struct platform_device bfin_spi0_device = {
185 .name = "bfin-spi",
186 .id = 0, /* Bus number */
187 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
188 .resource = bfin_spi0_resource,
189 .dev = {
190 .platform_data = &bfin_spi0_info, /* Passed to driver */
191 },
192};
193#endif /* spi master and devices */
194
195#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
196static struct platform_device rtc_device = {
197 .name = "rtc-bfin",
198 .id = -1,
199};
200#endif
201
202#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
203static struct platform_device hitachi_fb_device = {
204 .name = "hitachi-tx09",
205};
206#endif
207
208#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
209#include <linux/smc91x.h>
210
211static struct smc91x_platdata smc91x_info = {
212 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
213 .leda = RPC_LED_100_10,
214 .ledb = RPC_LED_TX_RX,
215};
216
217static struct resource smc91x_resources[] = {
218 {
219 .start = 0x20200300,
220 .end = 0x20200300 + 16,
221 .flags = IORESOURCE_MEM,
222 }, {
223 .start = IRQ_PF14,
224 .end = IRQ_PF14,
225 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
226 },
227};
228
229static struct platform_device smc91x_device = {
230 .name = "smc91x",
231 .id = 0,
232 .num_resources = ARRAY_SIZE(smc91x_resources),
233 .resource = smc91x_resources,
234 .dev = {
235 .platform_data = &smc91x_info,
236 },
237};
238#endif
239
240#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
241static struct resource isp1362_hcd_resources[] = {
242 {
243 .start = 0x20308000,
244 .end = 0x20308000,
245 .flags = IORESOURCE_MEM,
246 }, {
247 .start = 0x20308004,
248 .end = 0x20308004,
249 .flags = IORESOURCE_MEM,
250 }, {
251 .start = IRQ_PG15,
252 .end = IRQ_PG15,
253 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
254 },
255};
256
257static struct isp1362_platform_data isp1362_priv = {
258 .sel15Kres = 1,
259 .clknotstop = 0,
260 .oc_enable = 0,
261 .int_act_high = 0,
262 .int_edge_triggered = 0,
263 .remote_wakeup_connected = 0,
264 .no_power_switching = 1,
265 .power_switching_mode = 0,
266};
267
268static struct platform_device isp1362_hcd_device = {
269 .name = "isp1362-hcd",
270 .id = 0,
271 .dev = {
272 .platform_data = &isp1362_priv,
273 },
274 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
275 .resource = isp1362_hcd_resources,
276};
277#endif
278
279#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
280static struct resource net2272_bfin_resources[] = {
281 {
282 .start = 0x20300000,
283 .end = 0x20300000 + 0x100,
284 .flags = IORESOURCE_MEM,
285 }, {
286 .start = IRQ_PG13,
287 .end = IRQ_PG13,
288 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
289 },
290};
291
292static struct platform_device net2272_bfin_device = {
293 .name = "net2272",
294 .id = -1,
295 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
296 .resource = net2272_bfin_resources,
297};
298#endif
299
300static struct resource bfin_gpios_resources = {
301 .start = 0,
302 .end = MAX_BLACKFIN_GPIOS - 1,
303 .flags = IORESOURCE_IRQ,
304};
305
306static struct platform_device bfin_gpios_device = {
307 .name = "simple-gpio",
308 .id = -1,
309 .num_resources = 1,
310 .resource = &bfin_gpios_resources,
311};
312
313#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
314static struct mtd_partition cm_partitions[] = {
315 {
316 .name = "bootloader(nor)",
317 .size = 0x40000,
318 .offset = 0,
319 }, {
320 .name = "linux kernel(nor)",
321 .size = 0x100000,
322 .offset = MTDPART_OFS_APPEND,
323 }, {
324 .name = "file system(nor)",
325 .size = MTDPART_SIZ_FULL,
326 .offset = MTDPART_OFS_APPEND,
327 }
328};
329
330static struct physmap_flash_data cm_flash_data = {
331 .width = 2,
332 .parts = cm_partitions,
333 .nr_parts = ARRAY_SIZE(cm_partitions),
334};
335
336static unsigned cm_flash_gpios[] = { GPIO_PF4 };
337
338static struct resource cm_flash_resource[] = {
339 {
340 .name = "cfi_probe",
341 .start = 0x20000000,
342 .end = 0x201fffff,
343 .flags = IORESOURCE_MEM,
344 }, {
345 .start = (unsigned long)cm_flash_gpios,
346 .end = ARRAY_SIZE(cm_flash_gpios),
347 .flags = IORESOURCE_IRQ,
348 }
349};
350
351static struct platform_device cm_flash_device = {
352 .name = "gpio-addr-flash",
353 .id = 0,
354 .dev = {
355 .platform_data = &cm_flash_data,
356 },
357 .num_resources = ARRAY_SIZE(cm_flash_resource),
358 .resource = cm_flash_resource,
359};
360#endif
361
362#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
363#ifdef CONFIG_SERIAL_BFIN_UART0
364static struct resource bfin_uart0_resources[] = {
365 {
366 .start = 0xFFC00400,
367 .end = 0xFFC004FF,
368 .flags = IORESOURCE_MEM,
369 },
370 {
371 .start = IRQ_UART0_RX,
372 .end = IRQ_UART0_RX+1,
373 .flags = IORESOURCE_IRQ,
374 },
375 {
376 .start = IRQ_UART0_ERROR,
377 .end = IRQ_UART0_ERROR,
378 .flags = IORESOURCE_IRQ,
379 },
380 {
381 .start = CH_UART0_TX,
382 .end = CH_UART0_TX,
383 .flags = IORESOURCE_DMA,
384 },
385 {
386 .start = CH_UART0_RX,
387 .end = CH_UART0_RX,
388 .flags = IORESOURCE_DMA,
389 },
390#ifdef CONFIG_BFIN_UART0_CTSRTS
391 {
392 /*
393 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
394 */
395 .start = -1,
396 .end = -1,
397 .flags = IORESOURCE_IO,
398 },
399 {
400 /*
401 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
402 */
403 .start = -1,
404 .end = -1,
405 .flags = IORESOURCE_IO,
406 },
407#endif
408};
409
410static struct platform_device bfin_uart0_device = {
411 .name = "bfin-uart",
412 .id = 0,
413 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
414 .resource = bfin_uart0_resources,
415};
416#endif
417#ifdef CONFIG_SERIAL_BFIN_UART1
418static struct resource bfin_uart1_resources[] = {
419 {
420 .start = 0xFFC02000,
421 .end = 0xFFC020FF,
422 .flags = IORESOURCE_MEM,
423 },
424 {
425 .start = IRQ_UART1_RX,
426 .end = IRQ_UART1_RX+1,
427 .flags = IORESOURCE_IRQ,
428 },
429 {
430 .start = IRQ_UART1_ERROR,
431 .end = IRQ_UART1_ERROR,
432 .flags = IORESOURCE_IRQ,
433 },
434 {
435 .start = CH_UART1_TX,
436 .end = CH_UART1_TX,
437 .flags = IORESOURCE_DMA,
438 },
439 {
440 .start = CH_UART1_RX,
441 .end = CH_UART1_RX,
442 .flags = IORESOURCE_DMA,
443 },
444#ifdef CONFIG_BFIN_UART1_CTSRTS
445 {
446 /*
447 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
448 */
449 .start = -1,
450 .end = -1,
451 .flags = IORESOURCE_IO,
452 },
453 {
454 /*
455 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
456 */
457 .start = -1,
458 .end = -1,
459 .flags = IORESOURCE_IO,
460 },
461#endif
462};
463
464static struct platform_device bfin_uart1_device = {
465 .name = "bfin-uart",
466 .id = 1,
467 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
468 .resource = bfin_uart1_resources,
469};
470#endif
471#endif
472
473#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
474#ifdef CONFIG_BFIN_SIR0
475static struct resource bfin_sir0_resources[] = {
476 {
477 .start = 0xFFC00400,
478 .end = 0xFFC004FF,
479 .flags = IORESOURCE_MEM,
480 },
481 {
482 .start = IRQ_UART0_RX,
483 .end = IRQ_UART0_RX+1,
484 .flags = IORESOURCE_IRQ,
485 },
486 {
487 .start = CH_UART0_RX,
488 .end = CH_UART0_RX+1,
489 .flags = IORESOURCE_DMA,
490 },
491};
492static struct platform_device bfin_sir0_device = {
493 .name = "bfin_sir",
494 .id = 0,
495 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
496 .resource = bfin_sir0_resources,
497};
498#endif
499#ifdef CONFIG_BFIN_SIR1
500static struct resource bfin_sir1_resources[] = {
501 {
502 .start = 0xFFC02000,
503 .end = 0xFFC020FF,
504 .flags = IORESOURCE_MEM,
505 },
506 {
507 .start = IRQ_UART1_RX,
508 .end = IRQ_UART1_RX+1,
509 .flags = IORESOURCE_IRQ,
510 },
511 {
512 .start = CH_UART1_RX,
513 .end = CH_UART1_RX+1,
514 .flags = IORESOURCE_DMA,
515 },
516};
517static struct platform_device bfin_sir1_device = {
518 .name = "bfin_sir",
519 .id = 1,
520 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
521 .resource = bfin_sir1_resources,
522};
523#endif
524#endif
525
526#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
527static struct resource bfin_twi0_resource[] = {
528 [0] = {
529 .start = TWI0_REGBASE,
530 .end = TWI0_REGBASE,
531 .flags = IORESOURCE_MEM,
532 },
533 [1] = {
534 .start = IRQ_TWI,
535 .end = IRQ_TWI,
536 .flags = IORESOURCE_IRQ,
537 },
538};
539
540static struct platform_device i2c_bfin_twi_device = {
541 .name = "i2c-bfin-twi",
542 .id = 0,
543 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
544 .resource = bfin_twi0_resource,
545};
546#endif
547
548#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
549static struct platform_device bfin_sport0_uart_device = {
550 .name = "bfin-sport-uart",
551 .id = 0,
552};
553
554static struct platform_device bfin_sport1_uart_device = {
555 .name = "bfin-sport-uart",
556 .id = 1,
557};
558#endif
559
560#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
561static struct platform_device bfin_mii_bus = {
562 .name = "bfin_mii_bus",
563};
564
565static struct platform_device bfin_mac_device = {
566 .name = "bfin_mac",
567 .dev.platform_data = &bfin_mii_bus,
568};
569#endif
570
571#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
572#define PATA_INT IRQ_PF14
573
574static struct pata_platform_info bfin_pata_platform_data = {
575 .ioport_shift = 2,
576 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
577};
578
579static struct resource bfin_pata_resources[] = {
580 {
581 .start = 0x2030C000,
582 .end = 0x2030C01F,
583 .flags = IORESOURCE_MEM,
584 },
585 {
586 .start = 0x2030D018,
587 .end = 0x2030D01B,
588 .flags = IORESOURCE_MEM,
589 },
590 {
591 .start = PATA_INT,
592 .end = PATA_INT,
593 .flags = IORESOURCE_IRQ,
594 },
595};
596
597static struct platform_device bfin_pata_device = {
598 .name = "pata_platform",
599 .id = -1,
600 .num_resources = ARRAY_SIZE(bfin_pata_resources),
601 .resource = bfin_pata_resources,
602 .dev = {
603 .platform_data = &bfin_pata_platform_data,
604 }
605};
606#endif
607
608static const unsigned int cclk_vlev_datasheet[] =
609{
610 VRPAIR(VLEV_085, 250000000),
611 VRPAIR(VLEV_090, 376000000),
612 VRPAIR(VLEV_095, 426000000),
613 VRPAIR(VLEV_100, 426000000),
614 VRPAIR(VLEV_105, 476000000),
615 VRPAIR(VLEV_110, 476000000),
616 VRPAIR(VLEV_115, 476000000),
617 VRPAIR(VLEV_120, 500000000),
618 VRPAIR(VLEV_125, 533000000),
619 VRPAIR(VLEV_130, 600000000),
620};
621
622static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
623 .tuple_tab = cclk_vlev_datasheet,
624 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
625 .vr_settling_time = 25 /* us */,
626};
627
628static struct platform_device bfin_dpmc = {
629 .name = "bfin dpmc",
630 .dev = {
631 .platform_data = &bfin_dmpc_vreg_data,
632 },
633};
634
635static struct platform_device *cm_bf537e_devices[] __initdata = {
636
637 &bfin_dpmc,
638
639#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
640 &hitachi_fb_device,
641#endif
642
643#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
644 &rtc_device,
645#endif
646
647#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
648#ifdef CONFIG_SERIAL_BFIN_UART0
649 &bfin_uart0_device,
650#endif
651#ifdef CONFIG_SERIAL_BFIN_UART1
652 &bfin_uart1_device,
653#endif
654#endif
655
656#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
657#ifdef CONFIG_BFIN_SIR0
658 &bfin_sir0_device,
659#endif
660#ifdef CONFIG_BFIN_SIR1
661 &bfin_sir1_device,
662#endif
663#endif
664
665#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
666 &i2c_bfin_twi_device,
667#endif
668
669#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
670 &bfin_sport0_uart_device,
671 &bfin_sport1_uart_device,
672#endif
673
674#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
675 &isp1362_hcd_device,
676#endif
677
678#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
679 &smc91x_device,
680#endif
681
682#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
683 &bfin_mii_bus,
684 &bfin_mac_device,
685#endif
686
687#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
688 &net2272_bfin_device,
689#endif
690
691#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
692 &bfin_spi0_device,
693#endif
694
695#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
696 &bfin_pata_device,
697#endif
698
699#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
700 &cm_flash_device,
701#endif
702
703 &bfin_gpios_device,
704};
705
706static int __init cm_bf537e_init(void)
707{
708 printk(KERN_INFO "%s(): registering device resources\n", __func__);
709 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
710#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
711 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
712#endif
713
714#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
715 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
716#endif
717 return 0;
718}
719
720arch_initcall(cm_bf537e_init);
721
722void bfin_get_ether_addr(char *addr)
723{
724 random_ether_addr(addr);
725 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
726}
727EXPORT_SYMBOL(bfin_get_ether_addr);
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a87d1cfcd06..8219dc3d65bd 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * File: arch/blackfin/mach-bf537/boards/cm_bf537.c 2 * File: arch/blackfin/mach-bf537/boards/cm_bf537u.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c 3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au> 4 * Author: Aidan Williams <aidan@nicta.com.au>
5 * 5 *
@@ -45,11 +45,12 @@
45#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h> 46#include <asm/portmux.h>
47#include <asm/dpmc.h> 47#include <asm/dpmc.h>
48#include <linux/spi/mmc_spi.h>
48 49
49/* 50/*
50 * Name the Board for the /proc/cpuinfo 51 * Name the Board for the /proc/cpuinfo
51 */ 52 */
52const char bfin_board_name[] = "Bluetechnix CM BF537"; 53const char bfin_board_name[] = "Bluetechnix CM BF537U";
53 54
54#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 55#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
55/* all SPI peripherals info goes here */ 56/* all SPI peripherals info goes here */
@@ -101,13 +102,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
101}; 102};
102#endif 103#endif
103 104
104#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
105static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 16,
108};
109#endif
110
111#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 105#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
112static struct bfin5xx_spi_chip mmc_spi_chip_info = { 106static struct bfin5xx_spi_chip mmc_spi_chip_info = {
113 .enable_dma = 0, 107 .enable_dma = 0,
@@ -142,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
142 136
143#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 137#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
144 { 138 {
145 .modalias = "ad1836-spi", 139 .modalias = "ad1836",
146 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 140 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
147 .bus_num = 0, 141 .bus_num = 0,
148 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 142 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -150,16 +144,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
150 }, 144 },
151#endif 145#endif
152 146
153#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
154 {
155 .modalias = "ad9960-spi",
156 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
157 .bus_num = 0,
158 .chip_select = 1,
159 .controller_data = &ad9960_spi_chip_info,
160 },
161#endif
162
163#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 147#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
164 { 148 {
165 .modalias = "mmc_spi", 149 .modalias = "mmc_spi",
@@ -223,6 +207,14 @@ static struct platform_device hitachi_fb_device = {
223#endif 207#endif
224 208
225#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 209#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
210#include <linux/smc91x.h>
211
212static struct smc91x_platdata smc91x_info = {
213 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
214 .leda = RPC_LED_100_10,
215 .ledb = RPC_LED_TX_RX,
216};
217
226static struct resource smc91x_resources[] = { 218static struct resource smc91x_resources[] = {
227 { 219 {
228 .start = 0x20200300, 220 .start = 0x20200300,
@@ -240,6 +232,9 @@ static struct platform_device smc91x_device = {
240 .id = 0, 232 .id = 0,
241 .num_resources = ARRAY_SIZE(smc91x_resources), 233 .num_resources = ARRAY_SIZE(smc91x_resources),
242 .resource = smc91x_resources, 234 .resource = smc91x_resources,
235 .dev = {
236 .platform_data = &smc91x_info,
237 },
243}; 238};
244#endif 239#endif
245 240
@@ -324,7 +319,7 @@ static struct mtd_partition cm_partitions[] = {
324 .offset = 0, 319 .offset = 0,
325 }, { 320 }, {
326 .name = "linux kernel(nor)", 321 .name = "linux kernel(nor)",
327 .size = 0xE0000, 322 .size = 0x100000,
328 .offset = MTDPART_OFS_APPEND, 323 .offset = MTDPART_OFS_APPEND,
329 }, { 324 }, {
330 .name = "file system(nor)", 325 .name = "file system(nor)",
@@ -339,7 +334,7 @@ static struct physmap_flash_data cm_flash_data = {
339 .nr_parts = ARRAY_SIZE(cm_partitions), 334 .nr_parts = ARRAY_SIZE(cm_partitions),
340}; 335};
341 336
342static unsigned cm_flash_gpios[] = { GPIO_PF4 }; 337static unsigned cm_flash_gpios[] = { GPIO_PH0 };
343 338
344static struct resource cm_flash_resource[] = { 339static struct resource cm_flash_resource[] = {
345 { 340 {
@@ -548,7 +543,7 @@ static struct platform_device bfin_dpmc = {
548 }, 543 },
549}; 544};
550 545
551static struct platform_device *cm_bf537_devices[] __initdata = { 546static struct platform_device *cm_bf537u_devices[] __initdata = {
552 547
553 &bfin_dpmc, 548 &bfin_dpmc,
554 549
@@ -614,10 +609,10 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
614 &bfin_gpios_device, 609 &bfin_gpios_device,
615}; 610};
616 611
617static int __init cm_bf537_init(void) 612static int __init cm_bf537u_init(void)
618{ 613{
619 printk(KERN_INFO "%s(): registering device resources\n", __func__); 614 printk(KERN_INFO "%s(): registering device resources\n", __func__);
620 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 615 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
621#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 616#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
622 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 617 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
623#endif 618#endif
@@ -628,7 +623,7 @@ static int __init cm_bf537_init(void)
628 return 0; 623 return 0;
629} 624}
630 625
631arch_initcall(cm_bf537_init); 626arch_initcall(cm_bf537u_init);
632 627
633void bfin_get_ether_addr(char *addr) 628void bfin_get_ether_addr(char *addr)
634{ 629{
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 838240f151f5..10b35b838bac 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -92,6 +92,14 @@ static struct platform_device rtc_device = {
92#endif 92#endif
93 93
94#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 94#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
95#include <linux/smc91x.h>
96
97static struct smc91x_platdata smc91x_info = {
98 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
99 .leda = RPC_LED_100_10,
100 .ledb = RPC_LED_TX_RX,
101};
102
95static struct resource smc91x_resources[] = { 103static struct resource smc91x_resources[] = {
96 { 104 {
97 .name = "smc91x-regs", 105 .name = "smc91x-regs",
@@ -110,6 +118,9 @@ static struct platform_device smc91x_device = {
110 .id = 0, 118 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources), 119 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources, 120 .resource = smc91x_resources,
121 .dev = {
122 .platform_data = &smc91x_info,
123 },
113}; 124};
114#endif 125#endif
115 126
@@ -282,13 +293,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
282}; 293};
283#endif 294#endif
284 295
285#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
286static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
287 .enable_dma = 0,
288 .bits_per_word = 16,
289};
290#endif
291
292#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 296#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
293static struct bfin5xx_spi_chip mmc_spi_chip_info = { 297static struct bfin5xx_spi_chip mmc_spi_chip_info = {
294 .enable_dma = 0, 298 .enable_dma = 0,
@@ -348,22 +352,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
348#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 352#if defined(CONFIG_SND_BLACKFIN_AD1836) \
349 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 353 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
350 { 354 {
351 .modalias = "ad1836-spi", 355 .modalias = "ad1836",
352 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 356 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
353 .bus_num = 0, 357 .bus_num = 0,
354 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 358 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
355 .controller_data = &ad1836_spi_chip_info, 359 .controller_data = &ad1836_spi_chip_info,
356 }, 360 },
357#endif 361#endif
358#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
359 {
360 .modalias = "ad9960-spi",
361 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
362 .bus_num = 0,
363 .chip_select = 1,
364 .controller_data = &ad9960_spi_chip_info,
365 },
366#endif
367#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 362#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
368 { 363 {
369 .modalias = "mmc_spi", 364 .modalias = "mmc_spi",
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index bd656907b8c0..9db6b40743e0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -171,6 +171,14 @@ static struct platform_device rtc_device = {
171#endif 171#endif
172 172
173#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 173#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
174#include <linux/smc91x.h>
175
176static struct smc91x_platdata smc91x_info = {
177 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
178 .leda = RPC_LED_100_10,
179 .ledb = RPC_LED_TX_RX,
180};
181
174static struct resource smc91x_resources[] = { 182static struct resource smc91x_resources[] = {
175 { 183 {
176 .name = "smc91x-regs", 184 .name = "smc91x-regs",
@@ -189,6 +197,9 @@ static struct platform_device smc91x_device = {
189 .id = 0, 197 .id = 0,
190 .num_resources = ARRAY_SIZE(smc91x_resources), 198 .num_resources = ARRAY_SIZE(smc91x_resources),
191 .resource = smc91x_resources, 199 .resource = smc91x_resources,
200 .dev = {
201 .platform_data = &smc91x_info,
202 },
192}; 203};
193#endif 204#endif
194 205
@@ -196,10 +207,15 @@ static struct platform_device smc91x_device = {
196static struct resource dm9000_resources[] = { 207static struct resource dm9000_resources[] = {
197 [0] = { 208 [0] = {
198 .start = 0x203FB800, 209 .start = 0x203FB800,
199 .end = 0x203FB800 + 8, 210 .end = 0x203FB800 + 1,
200 .flags = IORESOURCE_MEM, 211 .flags = IORESOURCE_MEM,
201 }, 212 },
202 [1] = { 213 [1] = {
214 .start = 0x203FB804,
215 .end = 0x203FB804 + 1,
216 .flags = IORESOURCE_MEM,
217 },
218 [2] = {
203 .start = IRQ_PF9, 219 .start = IRQ_PF9,
204 .end = IRQ_PF9, 220 .end = IRQ_PF9,
205 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), 221 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
@@ -516,19 +532,135 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
516}; 532};
517#endif 533#endif
518 534
519#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 535#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
520 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 536 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
521static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 537static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
522 .enable_dma = 0, 538 .enable_dma = 0,
523 .bits_per_word = 16, 539 .bits_per_word = 16,
524}; 540};
525#endif 541#endif
526 542
527#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) 543#if defined(CONFIG_SND_BF5XX_SOC_AD1938) \
528static struct bfin5xx_spi_chip ad9960_spi_chip_info = { 544 || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
545static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
546 .enable_dma = 0,
547 .bits_per_word = 8,
548 .cs_gpio = GPIO_PF5,
549};
550#endif
551
552#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
553#include <linux/input.h>
554#include <linux/input/ad714x.h>
555static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
529 .enable_dma = 0, 556 .enable_dma = 0,
530 .bits_per_word = 16, 557 .bits_per_word = 16,
531}; 558};
559
560static struct ad714x_slider_plat slider_plat[] = {
561 {
562 .start_stage = 0,
563 .end_stage = 7,
564 .max_coord = 128,
565 },
566};
567
568static struct ad714x_button_plat button_plat[] = {
569 {
570 .keycode = BTN_FORWARD,
571 .l_mask = 0,
572 .h_mask = 0x600,
573 },
574 {
575 .keycode = BTN_LEFT,
576 .l_mask = 0,
577 .h_mask = 0x500,
578 },
579 {
580 .keycode = BTN_MIDDLE,
581 .l_mask = 0,
582 .h_mask = 0x800,
583 },
584 {
585 .keycode = BTN_RIGHT,
586 .l_mask = 0x100,
587 .h_mask = 0x400,
588 },
589 {
590 .keycode = BTN_BACK,
591 .l_mask = 0x200,
592 .h_mask = 0x400,
593 },
594};
595static struct ad714x_platform_data ad7147_platfrom_data = {
596 .slider_num = 1,
597 .button_num = 5,
598 .slider = slider_plat,
599 .button = button_plat,
600 .stage_cfg_reg = {
601 {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
602 {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
603 {0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650},
604 {0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650},
605 {0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650},
606 {0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650},
607 {0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650},
608 {0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600},
609 {0xFF7B, 0x3FFF, 0x506, 0x2626, 1100, 1100, 1150, 1150},
610 {0xFDFE, 0x3FFF, 0x606, 0x2626, 1100, 1100, 1150, 1150},
611 {0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300},
612 {0xFFEF, 0x1FFF, 0x0, 0x2626, 1100, 1100, 1150, 1150},
613 },
614 .sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0},
615};
616#endif
617
618#if defined(CONFIG_INPUT_EVAL_AD7142EB)
619#include <linux/input.h>
620#include <linux/input/ad714x.h>
621static struct ad714x_button_plat button_plat[] = {
622 {
623 .keycode = BTN_1,
624 .l_mask = 0,
625 .h_mask = 0x1,
626 },
627 {
628 .keycode = BTN_2,
629 .l_mask = 0,
630 .h_mask = 0x2,
631 },
632 {
633 .keycode = BTN_3,
634 .l_mask = 0,
635 .h_mask = 0x4,
636 },
637 {
638 .keycode = BTN_4,
639 .l_mask = 0x0,
640 .h_mask = 0x8,
641 },
642};
643static struct ad714x_platform_data ad7142_platfrom_data = {
644 .button_num = 4,
645 .button = button_plat,
646 .stage_cfg_reg = {
647 /* fixme: figure out right setting for all comoponent according
648 * to hardware feature of EVAL-AD7142EB board */
649 {0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
650 {0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
651 {0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
652 {0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
653 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
654 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
655 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
656 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
657 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
658 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
659 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
660 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
661 },
662 .sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0},
663};
532#endif 664#endif
533 665
534#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 666#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -555,15 +687,7 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
555static struct bfin5xx_spi_chip mmc_spi_chip_info = { 687static struct bfin5xx_spi_chip mmc_spi_chip_info = {
556 .enable_dma = 0, 688 .enable_dma = 0,
557 .bits_per_word = 8, 689 .bits_per_word = 8,
558}; 690 .pio_interrupt = 0,
559#endif
560
561#if defined(CONFIG_PBX)
562static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
563 .ctl_reg = 0x4, /* send zero */
564 .enable_dma = 0,
565 .bits_per_word = 8,
566 .cs_change_per_word = 1,
567}; 691};
568#endif 692#endif
569 693
@@ -743,25 +867,42 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
743 }, 867 },
744#endif 868#endif
745 869
746#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 870#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
747 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 871 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
748 { 872 {
749 .modalias = "ad1836-spi", 873 .modalias = "ad1836",
750 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 874 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
751 .bus_num = 0, 875 .bus_num = 0,
752 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 876 .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
753 .controller_data = &ad1836_spi_chip_info, 877 .controller_data = &ad1836_spi_chip_info,
878 .mode = SPI_MODE_3,
754 }, 879 },
755#endif 880#endif
756#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) 881
882#if defined(CONFIG_SND_BF5XX_SOC_AD1938) || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
757 { 883 {
758 .modalias = "ad9960-spi", 884 .modalias = "ad1938",
759 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 885 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
760 .bus_num = 0, 886 .bus_num = 0,
761 .chip_select = 1, 887 .chip_select = 0,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
762 .controller_data = &ad9960_spi_chip_info, 888 .controller_data = &ad1938_spi_chip_info,
889 .mode = SPI_MODE_3,
763 }, 890 },
764#endif 891#endif
892
893#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
894 {
895 .modalias = "ad714x_captouch",
896 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
897 .irq = IRQ_PF4,
898 .bus_num = 0,
899 .chip_select = 5,
900 .mode = SPI_MODE_3,
901 .platform_data = &ad7147_platfrom_data,
902 .controller_data = &ad7147_spi_chip_info,
903 },
904#endif
905
765#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 906#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
766 { 907 {
767 .modalias = "mmc_spi", 908 .modalias = "mmc_spi",
@@ -773,24 +914,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
773 .mode = SPI_MODE_3, 914 .mode = SPI_MODE_3,
774 }, 915 },
775#endif 916#endif
776#if defined(CONFIG_PBX)
777 {
778 .modalias = "fxs-spi",
779 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
780 .bus_num = 0,
781 .chip_select = 8 - CONFIG_J11_JUMPER,
782 .controller_data = &spi_si3xxx_chip_info,
783 .mode = SPI_MODE_3,
784 },
785 {
786 .modalias = "fxo-spi",
787 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
788 .bus_num = 0,
789 .chip_select = 8 - CONFIG_J19_JUMPER,
790 .controller_data = &spi_si3xxx_chip_info,
791 .mode = SPI_MODE_3,
792 },
793#endif
794#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 917#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
795 { 918 {
796 .modalias = "ad7877", 919 .modalias = "ad7877",
@@ -864,6 +987,11 @@ static struct resource bfin_spi0_resource[] = {
864 [1] = { 987 [1] = {
865 .start = CH_SPI, 988 .start = CH_SPI,
866 .end = CH_SPI, 989 .end = CH_SPI,
990 .flags = IORESOURCE_DMA,
991 },
992 [2] = {
993 .start = IRQ_SPI,
994 .end = IRQ_SPI,
867 .flags = IORESOURCE_IRQ, 995 .flags = IORESOURCE_IRQ,
868 }, 996 },
869}; 997};
@@ -1089,7 +1217,7 @@ static struct platform_device i2c_bfin_twi_device = {
1089 1217
1090#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1218#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1091#include <linux/input.h> 1219#include <linux/input.h>
1092#include <linux/i2c/adp5588_keys.h> 1220#include <linux/i2c/adp5588.h>
1093static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1221static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1094 [0] = KEY_GRAVE, 1222 [0] = KEY_GRAVE,
1095 [1] = KEY_1, 1223 [1] = KEY_1,
@@ -1309,11 +1437,20 @@ static struct adp5520_platform_data adp5520_pdev_data = {
1309 1437
1310#endif 1438#endif
1311 1439
1440#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1441#include <linux/i2c/adp5588.h>
1442static struct adp5588_gpio_platfrom_data adp5588_gpio_data = {
1443 .gpio_start = 50,
1444 .pullup_dis_mask = 0,
1445};
1446#endif
1447
1312static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 1448static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1313#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) 1449#if defined(CONFIG_INPUT_EVAL_AD7142EB)
1314 { 1450 {
1315 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 1451 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
1316 .irq = IRQ_PG5, 1452 .irq = IRQ_PG5,
1453 .platform_data = (void *)&ad7142_platfrom_data,
1317 }, 1454 },
1318#endif 1455#endif
1319#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1456#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
@@ -1321,7 +1458,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1321 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1458 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1322 }, 1459 },
1323#endif 1460#endif
1324#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 1461#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
1325 { 1462 {
1326 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 1463 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1327 .irq = IRQ_PG6, 1464 .irq = IRQ_PG6,
@@ -1355,6 +1492,12 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1355 .platform_data = (void *)&adxl34x_info, 1492 .platform_data = (void *)&adxl34x_info,
1356 }, 1493 },
1357#endif 1494#endif
1495#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1496 {
1497 I2C_BOARD_INFO("adp5588-gpio", 0x34),
1498 .platform_data = (void *)&adp5588_gpio_data,
1499 },
1500#endif
1358}; 1501};
1359 1502
1360#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1503#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -1456,6 +1599,13 @@ static struct platform_device bfin_dpmc = {
1456 }, 1599 },
1457}; 1600};
1458 1601
1602#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1603static struct platform_device bfin_tdm = {
1604 .name = "bfin-tdm",
1605 /* TODO: add platform data here */
1606};
1607#endif
1608
1459static struct platform_device *stamp_devices[] __initdata = { 1609static struct platform_device *stamp_devices[] __initdata = {
1460 1610
1461 &bfin_dpmc, 1611 &bfin_dpmc,
@@ -1561,6 +1711,10 @@ static struct platform_device *stamp_devices[] __initdata = {
1561#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1711#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1562 &stamp_flash_device, 1712 &stamp_flash_device,
1563#endif 1713#endif
1714
1715#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1716 &bfin_tdm,
1717#endif
1564}; 1718};
1565 1719
1566static int __init stamp_init(void) 1720static int __init stamp_init(void)
@@ -1572,11 +1726,6 @@ static int __init stamp_init(void)
1572 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1726 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1573 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 1727 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1574 1728
1575#if (defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)) \
1576 && defined(PATA_INT)
1577 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
1578#endif
1579
1580 return 0; 1729 return 0;
1581} 1730}
1582 1731
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index e523e6e610d0..61353f7bcb9e 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -45,6 +45,7 @@
45#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h> 46#include <asm/portmux.h>
47#include <asm/dpmc.h> 47#include <asm/dpmc.h>
48#include <linux/spi/mmc_spi.h>
48 49
49/* 50/*
50 * Name the Board for the /proc/cpuinfo 51 * Name the Board for the /proc/cpuinfo
@@ -101,13 +102,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
101}; 102};
102#endif 103#endif
103 104
104#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
105static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 16,
108};
109#endif
110
111#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 105#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
112static struct bfin5xx_spi_chip mmc_spi_chip_info = { 106static struct bfin5xx_spi_chip mmc_spi_chip_info = {
113 .enable_dma = 0, 107 .enable_dma = 0,
@@ -142,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
142 136
143#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 137#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
144 { 138 {
145 .modalias = "ad1836-spi", 139 .modalias = "ad1836",
146 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 140 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
147 .bus_num = 0, 141 .bus_num = 0,
148 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 142 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -150,22 +144,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
150 }, 144 },
151#endif 145#endif
152 146
153#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
154 {
155 .modalias = "ad9960-spi",
156 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
157 .bus_num = 0,
158 .chip_select = 1,
159 .controller_data = &ad9960_spi_chip_info,
160 },
161#endif
162
163#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 147#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
164 { 148 {
165 .modalias = "mmc_spi", 149 .modalias = "mmc_spi",
166 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 150 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
167 .bus_num = 0, 151 .bus_num = 0,
168 .chip_select = 5, 152 .chip_select = 1,
169 .controller_data = &mmc_spi_chip_info, 153 .controller_data = &mmc_spi_chip_info,
170 .mode = SPI_MODE_3, 154 .mode = SPI_MODE_3,
171 }, 155 },
@@ -223,6 +207,14 @@ static struct platform_device hitachi_fb_device = {
223#endif 207#endif
224 208
225#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 209#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
210#include <linux/smc91x.h>
211
212static struct smc91x_platdata smc91x_info = {
213 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
214 .leda = RPC_LED_100_10,
215 .ledb = RPC_LED_TX_RX,
216};
217
226static struct resource smc91x_resources[] = { 218static struct resource smc91x_resources[] = {
227 { 219 {
228 .start = 0x20200300, 220 .start = 0x20200300,
@@ -240,6 +232,9 @@ static struct platform_device smc91x_device = {
240 .id = 0, 232 .id = 0,
241 .num_resources = ARRAY_SIZE(smc91x_resources), 233 .num_resources = ARRAY_SIZE(smc91x_resources),
242 .resource = smc91x_resources, 234 .resource = smc91x_resources,
235 .dev = {
236 .platform_data = &smc91x_info,
237 },
243}; 238};
244#endif 239#endif
245 240
@@ -285,12 +280,12 @@ static struct platform_device isp1362_hcd_device = {
285#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 280#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
286static struct resource net2272_bfin_resources[] = { 281static struct resource net2272_bfin_resources[] = {
287 { 282 {
288 .start = 0x20200000, 283 .start = 0x20300000,
289 .end = 0x20200000 + 0x100, 284 .end = 0x20300000 + 0x100,
290 .flags = IORESOURCE_MEM, 285 .flags = IORESOURCE_MEM,
291 }, { 286 }, {
292 .start = IRQ_PH14, 287 .start = IRQ_PG13,
293 .end = IRQ_PH14, 288 .end = IRQ_PG13,
294 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 289 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
295 }, 290 },
296}; 291};
@@ -324,7 +319,7 @@ static struct mtd_partition cm_partitions[] = {
324 .offset = 0, 319 .offset = 0,
325 }, { 320 }, {
326 .name = "linux kernel(nor)", 321 .name = "linux kernel(nor)",
327 .size = 0xE0000, 322 .size = 0x100000,
328 .offset = MTDPART_OFS_APPEND, 323 .offset = MTDPART_OFS_APPEND,
329 }, { 324 }, {
330 .name = "file system(nor)", 325 .name = "file system(nor)",