aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2009-12-07 08:41:28 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:46 -0500
commit6924dfb0588dab02a331a3a526f8a8fae7d1b3cc (patch)
tree029fbcc4b79321ce014d256ac21b6da374053040 /arch/blackfin/mach-bf527
parente18e7dd33454f277b9438af66d25984362278021 (diff)
Blackfin: bf527-ezkit: add support for V2.1 boards
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf527')
-rw-r--r--arch/blackfin/mach-bf527/boards/Kconfig5
-rw-r--r--arch/blackfin/mach-bf527/boards/Makefile1
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c153
3 files changed, 138 insertions, 21 deletions
diff --git a/arch/blackfin/mach-bf527/boards/Kconfig b/arch/blackfin/mach-bf527/boards/Kconfig
index df224d04e167..b14c28810a44 100644
--- a/arch/blackfin/mach-bf527/boards/Kconfig
+++ b/arch/blackfin/mach-bf527/boards/Kconfig
@@ -9,6 +9,11 @@ config BFIN527_EZKIT
9 help 9 help
10 BF527-EZKIT-LITE board support. 10 BF527-EZKIT-LITE board support.
11 11
12config BFIN527_EZKIT_V2
13 bool "BF527-EZKIT-V2"
14 help
15 BF527-EZKIT-LITE V2.1+ board support.
16
12config BFIN527_BLUETECHNIX_CM 17config BFIN527_BLUETECHNIX_CM
13 bool "Bluetechnix CM-BF527" 18 bool "Bluetechnix CM-BF527"
14 help 19 help
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile
index eb6ed3362f9f..51a5817c4a90 100644
--- a/arch/blackfin/mach-bf527/boards/Makefile
+++ b/arch/blackfin/mach-bf527/boards/Makefile
@@ -3,5 +3,6 @@
3# 3#
4 4
5obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o 5obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o
6obj-$(CONFIG_BFIN527_EZKIT_V2) += ezkit.o
6obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o 7obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o
7obj-$(CONFIG_BFIN526_EZBRD) += ezbrd.o 8obj-$(CONFIG_BFIN526_EZBRD) += ezbrd.o
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 6138b47fbbaf..9db506bdf4f4 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -18,6 +18,8 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/usb/sl811.h> 19#include <linux/usb/sl811.h>
20#include <linux/usb/musb.h> 20#include <linux/usb/musb.h>
21#include <linux/leds.h>
22#include <linux/input.h>
21#include <asm/dma.h> 23#include <asm/dma.h>
22#include <asm/bfin5xx_spi.h> 24#include <asm/bfin5xx_spi.h>
23#include <asm/reboot.h> 25#include <asm/reboot.h>
@@ -29,7 +31,11 @@
29/* 31/*
30 * Name the Board for the /proc/cpuinfo 32 * Name the Board for the /proc/cpuinfo
31 */ 33 */
34#ifdef CONFIG_BFIN527_EZKIT_V2
35const char bfin_board_name[] = "ADI BF527-EZKIT V2";
36#else
32const char bfin_board_name[] = "ADI BF527-EZKIT"; 37const char bfin_board_name[] = "ADI BF527-EZKIT";
38#endif
33 39
34/* 40/*
35 * Driver needs to know address, irq and flag pin. 41 * Driver needs to know address, irq and flag pin.
@@ -143,6 +149,32 @@ static struct platform_device bf52x_t350mcqb_device = {
143}; 149};
144#endif 150#endif
145 151
152#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
153#include <asm/bfin-lq035q1.h>
154
155static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
156 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
157};
158
159static struct resource bfin_lq035q1_resources[] = {
160 {
161 .start = IRQ_PPI_ERROR,
162 .end = IRQ_PPI_ERROR,
163 .flags = IORESOURCE_IRQ,
164 },
165};
166
167static struct platform_device bfin_lq035q1_device = {
168 .name = "bfin-lq035q1",
169 .id = -1,
170 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
171 .resource = bfin_lq035q1_resources,
172 .dev = {
173 .platform_data = &bfin_lq035q1_data,
174 },
175};
176#endif
177
146#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 178#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
147static struct mtd_partition ezkit_partitions[] = { 179static struct mtd_partition ezkit_partitions[] = {
148 { 180 {
@@ -500,14 +532,6 @@ static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
500}; 532};
501#endif 533#endif
502 534
503#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
504 && defined(CONFIG_SND_SOC_WM8731_SPI)
505static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
506 .enable_dma = 0,
507 .bits_per_word = 16,
508};
509#endif
510
511#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 535#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
512static struct bfin5xx_spi_chip spidev_chip_info = { 536static struct bfin5xx_spi_chip spidev_chip_info = {
513 .enable_dma = 0, 537 .enable_dma = 0,
@@ -515,6 +539,13 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
515}; 539};
516#endif 540#endif
517 541
542#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
543static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
544 .enable_dma = 0,
545 .bits_per_word = 8,
546};
547#endif
548
518static struct spi_board_info bfin_spi_board_info[] __initdata = { 549static struct spi_board_info bfin_spi_board_info[] __initdata = {
519#if defined(CONFIG_MTD_M25P80) \ 550#if defined(CONFIG_MTD_M25P80) \
520 || defined(CONFIG_MTD_M25P80_MODULE) 551 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -586,17 +617,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
586 .mode = SPI_CPHA | SPI_CPOL, 617 .mode = SPI_CPHA | SPI_CPOL,
587 }, 618 },
588#endif 619#endif
589#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
590 && defined(CONFIG_SND_SOC_WM8731_SPI)
591 {
592 .modalias = "wm8731",
593 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
594 .bus_num = 0,
595 .chip_select = 5,
596 .controller_data = &spi_wm8731_chip_info,
597 .mode = SPI_MODE_0,
598 },
599#endif
600#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 620#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
601 { 621 {
602 .modalias = "spidev", 622 .modalias = "spidev",
@@ -606,6 +626,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
606 .controller_data = &spidev_chip_info, 626 .controller_data = &spidev_chip_info,
607 }, 627 },
608#endif 628#endif
629#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
630 {
631 .modalias = "bfin-lq035q1-spi",
632 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
633 .bus_num = 0,
634 .chip_select = 7,
635 .controller_data = &lq035q1_spi_chip_info,
636 .mode = SPI_CPHA | SPI_CPOL,
637 },
638#endif
609}; 639};
610 640
611#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 641#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
@@ -824,6 +854,71 @@ static struct platform_device i2c_bfin_twi_device = {
824}; 854};
825#endif 855#endif
826 856
857#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
858#include <linux/mfd/adp5520.h>
859
860 /*
861 * ADP5520/5501 LEDs Data
862 */
863
864static struct led_info adp5520_leds[] = {
865 {
866 .name = "adp5520-led1",
867 .default_trigger = "none",
868 .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms,
869 },
870};
871
872static struct adp5520_leds_platform_data adp5520_leds_data = {
873 .num_leds = ARRAY_SIZE(adp5520_leds),
874 .leds = adp5520_leds,
875 .fade_in = ADP5520_FADE_T_600ms,
876 .fade_out = ADP5520_FADE_T_600ms,
877 .led_on_time = ADP5520_LED_ONT_600ms,
878};
879
880 /*
881 * ADP5520 Keypad Data
882 */
883
884static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
885 [ADP5520_KEY(3, 3)] = KEY_1,
886 [ADP5520_KEY(2, 3)] = KEY_2,
887 [ADP5520_KEY(1, 3)] = KEY_3,
888 [ADP5520_KEY(0, 3)] = KEY_UP,
889 [ADP5520_KEY(3, 2)] = KEY_4,
890 [ADP5520_KEY(2, 2)] = KEY_5,
891 [ADP5520_KEY(1, 2)] = KEY_6,
892 [ADP5520_KEY(0, 2)] = KEY_DOWN,
893 [ADP5520_KEY(3, 1)] = KEY_7,
894 [ADP5520_KEY(2, 1)] = KEY_8,
895 [ADP5520_KEY(1, 1)] = KEY_9,
896 [ADP5520_KEY(0, 1)] = KEY_DOT,
897 [ADP5520_KEY(3, 0)] = KEY_BACKSPACE,
898 [ADP5520_KEY(2, 0)] = KEY_0,
899 [ADP5520_KEY(1, 0)] = KEY_HELP,
900 [ADP5520_KEY(0, 0)] = KEY_ENTER,
901};
902
903static struct adp5520_keys_platform_data adp5520_keys_data = {
904 .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0,
905 .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0,
906 .keymap = adp5520_keymap,
907 .keymapsize = ARRAY_SIZE(adp5520_keymap),
908 .repeat = 0,
909};
910
911 /*
912 * ADP5520/5501 Multifuction Device Init Data
913 */
914
915static struct adp5520_platform_data adp5520_pdev_data = {
916 .leds = &adp5520_leds_data,
917 .keys = &adp5520_keys_data,
918};
919
920#endif
921
827static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 922static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
828#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 923#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
829 { 924 {
@@ -841,6 +936,20 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
841 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 936 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
842 }, 937 },
843#endif 938#endif
939#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
940 {
941 I2C_BOARD_INFO("ad7879", 0x2C),
942 .irq = IRQ_PF8,
943 .platform_data = (void *)&bfin_ad7879_ts_info,
944 },
945#endif
946#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
947 {
948 I2C_BOARD_INFO("pmic-adp5520", 0x32),
949 .irq = IRQ_PF9,
950 .platform_data = (void *)&adp5520_pdev_data,
951 },
952#endif
844}; 953};
845 954
846#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 955#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -915,7 +1024,6 @@ static struct platform_device bfin_sport1_uart_device = {
915#endif 1024#endif
916 1025
917#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1026#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
918#include <linux/input.h>
919#include <linux/gpio_keys.h> 1027#include <linux/gpio_keys.h>
920 1028
921static struct gpio_keys_button bfin_gpio_keys_table[] = { 1029static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -937,7 +1045,6 @@ static struct platform_device bfin_device_gpiokeys = {
937#endif 1045#endif
938 1046
939#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1047#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
940#include <linux/input.h>
941#include <asm/bfin_rotary.h> 1048#include <asm/bfin_rotary.h>
942 1049
943static struct bfin_rotary_platform_data bfin_rotary_data = { 1050static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -1043,6 +1150,10 @@ static struct platform_device *stamp_devices[] __initdata = {
1043 &bf52x_t350mcqb_device, 1150 &bf52x_t350mcqb_device,
1044#endif 1151#endif
1045 1152
1153#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1154 &bfin_lq035q1_device,
1155#endif
1156
1046#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1157#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1047#ifdef CONFIG_SERIAL_BFIN_UART0 1158#ifdef CONFIG_SERIAL_BFIN_UART0
1048 &bfin_uart0_device, 1159 &bfin_uart0_device,