diff options
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 176 |
1 files changed, 106 insertions, 70 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 8ee2b744e234..9454fb7b18c3 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -54,57 +54,46 @@ | |||
54 | /* | 54 | /* |
55 | * Name the Board for the /proc/cpuinfo | 55 | * Name the Board for the /proc/cpuinfo |
56 | */ | 56 | */ |
57 | const char bfin_board_name[] = "ADDS-BF527-EZKIT"; | 57 | const char bfin_board_name[] = "ADI BF527-EZKIT"; |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Driver needs to know address, irq and flag pin. | 60 | * Driver needs to know address, irq and flag pin. |
61 | */ | 61 | */ |
62 | 62 | ||
63 | #define ISP1761_BASE 0x203C0000 | ||
64 | #define ISP1761_IRQ IRQ_PF7 | ||
65 | |||
66 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 63 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
67 | static struct resource bfin_isp1761_resources[] = { | 64 | #include <linux/usb/isp1760.h> |
65 | static struct resource bfin_isp1760_resources[] = { | ||
68 | [0] = { | 66 | [0] = { |
69 | .name = "isp1761-regs", | 67 | .start = 0x203C0000, |
70 | .start = ISP1761_BASE + 0x00000000, | 68 | .end = 0x203C0000 + 0x000fffff, |
71 | .end = ISP1761_BASE + 0x000fffff, | ||
72 | .flags = IORESOURCE_MEM, | 69 | .flags = IORESOURCE_MEM, |
73 | }, | 70 | }, |
74 | [1] = { | 71 | [1] = { |
75 | .start = ISP1761_IRQ, | 72 | .start = IRQ_PF7, |
76 | .end = ISP1761_IRQ, | 73 | .end = IRQ_PF7, |
77 | .flags = IORESOURCE_IRQ, | 74 | .flags = IORESOURCE_IRQ, |
78 | }, | 75 | }, |
79 | }; | 76 | }; |
80 | 77 | ||
81 | static struct platform_device bfin_isp1761_device = { | 78 | static struct isp1760_platform_data isp1760_priv = { |
82 | .name = "isp1761", | 79 | .is_isp1761 = 0, |
83 | .id = 0, | 80 | .port1_disable = 0, |
84 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 81 | .bus_width_16 = 1, |
85 | .resource = bfin_isp1761_resources, | 82 | .port1_otg = 0, |
83 | .analog_oc = 0, | ||
84 | .dack_polarity_high = 0, | ||
85 | .dreq_polarity_high = 0, | ||
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct platform_device *bfin_isp1761_devices[] = { | 88 | static struct platform_device bfin_isp1760_device = { |
89 | &bfin_isp1761_device, | 89 | .name = "isp1760-hcd", |
90 | .id = 0, | ||
91 | .dev = { | ||
92 | .platform_data = &isp1760_priv, | ||
93 | }, | ||
94 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
95 | .resource = bfin_isp1760_resources, | ||
90 | }; | 96 | }; |
91 | |||
92 | int __init bfin_isp1761_init(void) | ||
93 | { | ||
94 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
95 | |||
96 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
97 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
98 | |||
99 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
100 | } | ||
101 | |||
102 | void __exit bfin_isp1761_exit(void) | ||
103 | { | ||
104 | platform_device_unregister(&bfin_isp1761_device); | ||
105 | } | ||
106 | |||
107 | arch_initcall(bfin_isp1761_init); | ||
108 | #endif | 97 | #endif |
109 | 98 | ||
110 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 99 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
@@ -131,8 +120,8 @@ static struct musb_hdrc_config musb_config = { | |||
131 | .dyn_fifo = 0, | 120 | .dyn_fifo = 0, |
132 | .soft_con = 1, | 121 | .soft_con = 1, |
133 | .dma = 1, | 122 | .dma = 1, |
134 | .num_eps = 7, | 123 | .num_eps = 8, |
135 | .dma_channels = 7, | 124 | .dma_channels = 8, |
136 | .gpio_vrsel = GPIO_PG13, | 125 | .gpio_vrsel = GPIO_PG13, |
137 | }; | 126 | }; |
138 | 127 | ||
@@ -515,13 +504,6 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | |||
515 | }; | 504 | }; |
516 | #endif | 505 | #endif |
517 | 506 | ||
518 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
519 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||
520 | .enable_dma = 1, | ||
521 | .bits_per_word = 8, | ||
522 | }; | ||
523 | #endif | ||
524 | |||
525 | #if defined(CONFIG_PBX) | 507 | #if defined(CONFIG_PBX) |
526 | static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { | 508 | static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { |
527 | .ctl_reg = 0x4, /* send zero */ | 509 | .ctl_reg = 0x4, /* send zero */ |
@@ -552,6 +534,30 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
552 | }; | 534 | }; |
553 | #endif | 535 | #endif |
554 | 536 | ||
537 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) | ||
538 | #include <linux/spi/ad7879.h> | ||
539 | static const struct ad7879_platform_data bfin_ad7879_ts_info = { | ||
540 | .model = 7879, /* Model = AD7879 */ | ||
541 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ | ||
542 | .pressure_max = 10000, | ||
543 | .pressure_min = 0, | ||
544 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ | ||
545 | .acquisition_time = 1, /* 4us acquisition time per sample */ | ||
546 | .median = 2, /* do 8 measurements */ | ||
547 | .averaging = 1, /* take the average of 4 middle samples */ | ||
548 | .pen_down_acc_interval = 255, /* 9.4 ms */ | ||
549 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | ||
550 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | ||
551 | }; | ||
552 | #endif | ||
553 | |||
554 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
555 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
556 | .enable_dma = 0, | ||
557 | .bits_per_word = 16, | ||
558 | }; | ||
559 | #endif | ||
560 | |||
555 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 561 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
556 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 562 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
557 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | 563 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { |
@@ -613,26 +619,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
613 | .controller_data = &ad9960_spi_chip_info, | 619 | .controller_data = &ad9960_spi_chip_info, |
614 | }, | 620 | }, |
615 | #endif | 621 | #endif |
616 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
617 | { | ||
618 | .modalias = "spi_mmc_dummy", | ||
619 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
620 | .bus_num = 0, | ||
621 | .chip_select = 0, | ||
622 | .platform_data = NULL, | ||
623 | .controller_data = &spi_mmc_chip_info, | ||
624 | .mode = SPI_MODE_3, | ||
625 | }, | ||
626 | { | ||
627 | .modalias = "spi_mmc", | ||
628 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
629 | .bus_num = 0, | ||
630 | .chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||
631 | .platform_data = NULL, | ||
632 | .controller_data = &spi_mmc_chip_info, | ||
633 | .mode = SPI_MODE_3, | ||
634 | }, | ||
635 | #endif | ||
636 | #if defined(CONFIG_PBX) | 622 | #if defined(CONFIG_PBX) |
637 | { | 623 | { |
638 | .modalias = "fxs-spi", | 624 | .modalias = "fxs-spi", |
@@ -662,6 +648,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
662 | .controller_data = &spi_ad7877_chip_info, | 648 | .controller_data = &spi_ad7877_chip_info, |
663 | }, | 649 | }, |
664 | #endif | 650 | #endif |
651 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
652 | { | ||
653 | .modalias = "ad7879", | ||
654 | .platform_data = &bfin_ad7879_ts_info, | ||
655 | .irq = IRQ_PF8, | ||
656 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | ||
657 | .bus_num = 0, | ||
658 | .chip_select = 3, | ||
659 | .controller_data = &spi_ad7879_chip_info, | ||
660 | .mode = SPI_CPHA | SPI_CPOL, | ||
661 | }, | ||
662 | #endif | ||
665 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 663 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
666 | && defined(CONFIG_SND_SOC_WM8731_SPI) | 664 | && defined(CONFIG_SND_SOC_WM8731_SPI) |
667 | { | 665 | { |
@@ -756,30 +754,59 @@ static struct platform_device bfin_uart_device = { | |||
756 | #endif | 754 | #endif |
757 | 755 | ||
758 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 756 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
759 | static struct resource bfin_sir_resources[] = { | ||
760 | #ifdef CONFIG_BFIN_SIR0 | 757 | #ifdef CONFIG_BFIN_SIR0 |
758 | static struct resource bfin_sir0_resources[] = { | ||
761 | { | 759 | { |
762 | .start = 0xFFC00400, | 760 | .start = 0xFFC00400, |
763 | .end = 0xFFC004FF, | 761 | .end = 0xFFC004FF, |
764 | .flags = IORESOURCE_MEM, | 762 | .flags = IORESOURCE_MEM, |
765 | }, | 763 | }, |
764 | { | ||
765 | .start = IRQ_UART0_RX, | ||
766 | .end = IRQ_UART0_RX+1, | ||
767 | .flags = IORESOURCE_IRQ, | ||
768 | }, | ||
769 | { | ||
770 | .start = CH_UART0_RX, | ||
771 | .end = CH_UART0_RX+1, | ||
772 | .flags = IORESOURCE_DMA, | ||
773 | }, | ||
774 | }; | ||
775 | |||
776 | static struct platform_device bfin_sir0_device = { | ||
777 | .name = "bfin_sir", | ||
778 | .id = 0, | ||
779 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||
780 | .resource = bfin_sir0_resources, | ||
781 | }; | ||
766 | #endif | 782 | #endif |
767 | #ifdef CONFIG_BFIN_SIR1 | 783 | #ifdef CONFIG_BFIN_SIR1 |
784 | static struct resource bfin_sir1_resources[] = { | ||
768 | { | 785 | { |
769 | .start = 0xFFC02000, | 786 | .start = 0xFFC02000, |
770 | .end = 0xFFC020FF, | 787 | .end = 0xFFC020FF, |
771 | .flags = IORESOURCE_MEM, | 788 | .flags = IORESOURCE_MEM, |
772 | }, | 789 | }, |
773 | #endif | 790 | { |
791 | .start = IRQ_UART1_RX, | ||
792 | .end = IRQ_UART1_RX+1, | ||
793 | .flags = IORESOURCE_IRQ, | ||
794 | }, | ||
795 | { | ||
796 | .start = CH_UART1_RX, | ||
797 | .end = CH_UART1_RX+1, | ||
798 | .flags = IORESOURCE_DMA, | ||
799 | }, | ||
774 | }; | 800 | }; |
775 | 801 | ||
776 | static struct platform_device bfin_sir_device = { | 802 | static struct platform_device bfin_sir1_device = { |
777 | .name = "bfin_sir", | 803 | .name = "bfin_sir", |
778 | .id = 0, | 804 | .id = 1, |
779 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | 805 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
780 | .resource = bfin_sir_resources, | 806 | .resource = bfin_sir1_resources, |
781 | }; | 807 | }; |
782 | #endif | 808 | #endif |
809 | #endif | ||
783 | 810 | ||
784 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 811 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
785 | static struct resource bfin_twi0_resource[] = { | 812 | static struct resource bfin_twi0_resource[] = { |
@@ -944,6 +971,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
944 | &isp1362_hcd_device, | 971 | &isp1362_hcd_device, |
945 | #endif | 972 | #endif |
946 | 973 | ||
974 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
975 | &bfin_isp1760_device, | ||
976 | #endif | ||
977 | |||
947 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 978 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
948 | &musb_device, | 979 | &musb_device, |
949 | #endif | 980 | #endif |
@@ -985,7 +1016,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
985 | #endif | 1016 | #endif |
986 | 1017 | ||
987 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1018 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
988 | &bfin_sir_device, | 1019 | #ifdef CONFIG_BFIN_SIR0 |
1020 | &bfin_sir0_device, | ||
1021 | #endif | ||
1022 | #ifdef CONFIG_BFIN_SIR1 | ||
1023 | &bfin_sir1_device, | ||
1024 | #endif | ||
989 | #endif | 1025 | #endif |
990 | 1026 | ||
991 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 1027 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |