diff options
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezbrd.c')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezbrd.c | 90 |
1 files changed, 80 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index 36c87b6fbdec..0314bd3355eb 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -51,7 +51,7 @@ | |||
51 | /* | 51 | /* |
52 | * Name the Board for the /proc/cpuinfo | 52 | * Name the Board for the /proc/cpuinfo |
53 | */ | 53 | */ |
54 | const char bfin_board_name[] = "BF526-EZBRD"; | 54 | const char bfin_board_name[] = "ADI BF526-EZBRD"; |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Driver needs to know address, irq and flag pin. | 57 | * Driver needs to know address, irq and flag pin. |
@@ -81,8 +81,8 @@ static struct musb_hdrc_config musb_config = { | |||
81 | .dyn_fifo = 0, | 81 | .dyn_fifo = 0, |
82 | .soft_con = 1, | 82 | .soft_con = 1, |
83 | .dma = 1, | 83 | .dma = 1, |
84 | .num_eps = 7, | 84 | .num_eps = 8, |
85 | .dma_channels = 7, | 85 | .dma_channels = 8, |
86 | .gpio_vrsel = GPIO_PG13, | 86 | .gpio_vrsel = GPIO_PG13, |
87 | }; | 87 | }; |
88 | 88 | ||
@@ -288,6 +288,30 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
288 | }; | 288 | }; |
289 | #endif | 289 | #endif |
290 | 290 | ||
291 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) | ||
292 | #include <linux/spi/ad7879.h> | ||
293 | static const struct ad7879_platform_data bfin_ad7879_ts_info = { | ||
294 | .model = 7879, /* Model = AD7879 */ | ||
295 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ | ||
296 | .pressure_max = 10000, | ||
297 | .pressure_min = 0, | ||
298 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ | ||
299 | .acquisition_time = 1, /* 4us acquisition time per sample */ | ||
300 | .median = 2, /* do 8 measurements */ | ||
301 | .averaging = 1, /* take the average of 4 middle samples */ | ||
302 | .pen_down_acc_interval = 255, /* 9.4 ms */ | ||
303 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | ||
304 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | ||
305 | }; | ||
306 | #endif | ||
307 | |||
308 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
309 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
310 | .enable_dma = 0, | ||
311 | .bits_per_word = 16, | ||
312 | }; | ||
313 | #endif | ||
314 | |||
291 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 315 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
292 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 316 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
293 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | 317 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { |
@@ -386,6 +410,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
386 | .controller_data = &spi_ad7877_chip_info, | 410 | .controller_data = &spi_ad7877_chip_info, |
387 | }, | 411 | }, |
388 | #endif | 412 | #endif |
413 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
414 | { | ||
415 | .modalias = "ad7879", | ||
416 | .platform_data = &bfin_ad7879_ts_info, | ||
417 | .irq = IRQ_PG0, | ||
418 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | ||
419 | .bus_num = 0, | ||
420 | .chip_select = 5, | ||
421 | .controller_data = &spi_ad7879_chip_info, | ||
422 | .mode = SPI_CPHA | SPI_CPOL, | ||
423 | }, | ||
424 | #endif | ||
389 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 425 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
390 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 426 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
391 | { | 427 | { |
@@ -478,30 +514,59 @@ static struct platform_device bfin_uart_device = { | |||
478 | #endif | 514 | #endif |
479 | 515 | ||
480 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 516 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
481 | static struct resource bfin_sir_resources[] = { | ||
482 | #ifdef CONFIG_BFIN_SIR0 | 517 | #ifdef CONFIG_BFIN_SIR0 |
518 | static struct resource bfin_sir0_resources[] = { | ||
483 | { | 519 | { |
484 | .start = 0xFFC00400, | 520 | .start = 0xFFC00400, |
485 | .end = 0xFFC004FF, | 521 | .end = 0xFFC004FF, |
486 | .flags = IORESOURCE_MEM, | 522 | .flags = IORESOURCE_MEM, |
487 | }, | 523 | }, |
524 | { | ||
525 | .start = IRQ_UART0_RX, | ||
526 | .end = IRQ_UART0_RX+1, | ||
527 | .flags = IORESOURCE_IRQ, | ||
528 | }, | ||
529 | { | ||
530 | .start = CH_UART0_RX, | ||
531 | .end = CH_UART0_RX+1, | ||
532 | .flags = IORESOURCE_DMA, | ||
533 | }, | ||
534 | }; | ||
535 | |||
536 | static struct platform_device bfin_sir0_device = { | ||
537 | .name = "bfin_sir", | ||
538 | .id = 0, | ||
539 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||
540 | .resource = bfin_sir0_resources, | ||
541 | }; | ||
488 | #endif | 542 | #endif |
489 | #ifdef CONFIG_BFIN_SIR1 | 543 | #ifdef CONFIG_BFIN_SIR1 |
544 | static struct resource bfin_sir1_resources[] = { | ||
490 | { | 545 | { |
491 | .start = 0xFFC02000, | 546 | .start = 0xFFC02000, |
492 | .end = 0xFFC020FF, | 547 | .end = 0xFFC020FF, |
493 | .flags = IORESOURCE_MEM, | 548 | .flags = IORESOURCE_MEM, |
494 | }, | 549 | }, |
495 | #endif | 550 | { |
551 | .start = IRQ_UART1_RX, | ||
552 | .end = IRQ_UART1_RX+1, | ||
553 | .flags = IORESOURCE_IRQ, | ||
554 | }, | ||
555 | { | ||
556 | .start = CH_UART1_RX, | ||
557 | .end = CH_UART1_RX+1, | ||
558 | .flags = IORESOURCE_DMA, | ||
559 | }, | ||
496 | }; | 560 | }; |
497 | 561 | ||
498 | static struct platform_device bfin_sir_device = { | 562 | static struct platform_device bfin_sir1_device = { |
499 | .name = "bfin_sir", | 563 | .name = "bfin_sir", |
500 | .id = 0, | 564 | .id = 1, |
501 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 565 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
502 | .resource = bfin_sir_resources, | 566 | .resource = bfin_sir1_resources, |
503 | }; | 567 | }; |
504 | #endif | 568 | #endif |
569 | #endif | ||
505 | 570 | ||
506 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 571 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
507 | static struct resource bfin_twi0_resource[] = { | 572 | static struct resource bfin_twi0_resource[] = { |
@@ -671,7 +736,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
671 | #endif | 736 | #endif |
672 | 737 | ||
673 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 738 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
674 | &bfin_sir_device, | 739 | #ifdef CONFIG_BFIN_SIR0 |
740 | &bfin_sir0_device, | ||
741 | #endif | ||
742 | #ifdef CONFIG_BFIN_SIR1 | ||
743 | &bfin_sir1_device, | ||
744 | #endif | ||
675 | #endif | 745 | #endif |
676 | 746 | ||
677 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 747 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |