diff options
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 386 |
1 files changed, 262 insertions, 124 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index c46baa5e6d9b..ac9b52e0087c 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/io.h> | ||
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/nand.h> | 14 | #include <linux/mtd/nand.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
@@ -25,6 +26,8 @@ | |||
25 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
26 | #include <linux/usb/sl811.h> | 27 | #include <linux/usb/sl811.h> |
27 | #include <linux/spi/mmc_spi.h> | 28 | #include <linux/spi/mmc_spi.h> |
29 | #include <linux/leds.h> | ||
30 | #include <linux/input.h> | ||
28 | #include <asm/dma.h> | 31 | #include <asm/dma.h> |
29 | #include <asm/bfin5xx_spi.h> | 32 | #include <asm/bfin5xx_spi.h> |
30 | #include <asm/reboot.h> | 33 | #include <asm/reboot.h> |
@@ -65,7 +68,7 @@ static struct isp1760_platform_data isp1760_priv = { | |||
65 | }; | 68 | }; |
66 | 69 | ||
67 | static struct platform_device bfin_isp1760_device = { | 70 | static struct platform_device bfin_isp1760_device = { |
68 | .name = "isp1760-hcd", | 71 | .name = "isp1760", |
69 | .id = 0, | 72 | .id = 0, |
70 | .dev = { | 73 | .dev = { |
71 | .platform_data = &isp1760_priv, | 74 | .platform_data = &isp1760_priv, |
@@ -76,7 +79,6 @@ static struct platform_device bfin_isp1760_device = { | |||
76 | #endif | 79 | #endif |
77 | 80 | ||
78 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 81 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
79 | #include <linux/input.h> | ||
80 | #include <linux/gpio_keys.h> | 82 | #include <linux/gpio_keys.h> |
81 | 83 | ||
82 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | 84 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
@@ -195,28 +197,6 @@ static struct platform_device dm9000_device = { | |||
195 | }; | 197 | }; |
196 | #endif | 198 | #endif |
197 | 199 | ||
198 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | ||
199 | static struct resource ax88180_resources[] = { | ||
200 | [0] = { | ||
201 | .start = 0x20300000, | ||
202 | .end = 0x20300000 + 0x8000, | ||
203 | .flags = IORESOURCE_MEM, | ||
204 | }, | ||
205 | [1] = { | ||
206 | .start = IRQ_PF7, | ||
207 | .end = IRQ_PF7, | ||
208 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static struct platform_device ax88180_device = { | ||
213 | .name = "ax88180", | ||
214 | .id = -1, | ||
215 | .num_resources = ARRAY_SIZE(ax88180_resources), | ||
216 | .resource = ax88180_resources, | ||
217 | }; | ||
218 | #endif | ||
219 | |||
220 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | 200 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) |
221 | static struct resource sl811_hcd_resources[] = { | 201 | static struct resource sl811_hcd_resources[] = { |
222 | { | 202 | { |
@@ -272,8 +252,8 @@ static struct resource isp1362_hcd_resources[] = { | |||
272 | .end = 0x20360004, | 252 | .end = 0x20360004, |
273 | .flags = IORESOURCE_MEM, | 253 | .flags = IORESOURCE_MEM, |
274 | }, { | 254 | }, { |
275 | .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | 255 | .start = IRQ_PF3, |
276 | .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | 256 | .end = IRQ_PF3, |
277 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 257 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
278 | }, | 258 | }, |
279 | }; | 259 | }; |
@@ -300,6 +280,44 @@ static struct platform_device isp1362_hcd_device = { | |||
300 | }; | 280 | }; |
301 | #endif | 281 | #endif |
302 | 282 | ||
283 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | ||
284 | unsigned short bfin_can_peripherals[] = { | ||
285 | P_CAN0_RX, P_CAN0_TX, 0 | ||
286 | }; | ||
287 | |||
288 | static struct resource bfin_can_resources[] = { | ||
289 | { | ||
290 | .start = 0xFFC02A00, | ||
291 | .end = 0xFFC02FFF, | ||
292 | .flags = IORESOURCE_MEM, | ||
293 | }, | ||
294 | { | ||
295 | .start = IRQ_CAN_RX, | ||
296 | .end = IRQ_CAN_RX, | ||
297 | .flags = IORESOURCE_IRQ, | ||
298 | }, | ||
299 | { | ||
300 | .start = IRQ_CAN_TX, | ||
301 | .end = IRQ_CAN_TX, | ||
302 | .flags = IORESOURCE_IRQ, | ||
303 | }, | ||
304 | { | ||
305 | .start = IRQ_CAN_ERROR, | ||
306 | .end = IRQ_CAN_ERROR, | ||
307 | .flags = IORESOURCE_IRQ, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static struct platform_device bfin_can_device = { | ||
312 | .name = "bfin_can", | ||
313 | .num_resources = ARRAY_SIZE(bfin_can_resources), | ||
314 | .resource = bfin_can_resources, | ||
315 | .dev = { | ||
316 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | ||
317 | }, | ||
318 | }; | ||
319 | #endif | ||
320 | |||
303 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 321 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
304 | static struct platform_device bfin_mii_bus = { | 322 | static struct platform_device bfin_mii_bus = { |
305 | .name = "bfin_mii_bus", | 323 | .name = "bfin_mii_bus", |
@@ -514,15 +532,14 @@ static struct bfin5xx_spi_chip ad1938_spi_chip_info = { | |||
514 | }; | 532 | }; |
515 | #endif | 533 | #endif |
516 | 534 | ||
517 | #if defined(CONFIG_INPUT_EVAL_AD7147EBZ) | 535 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) |
518 | #include <linux/input.h> | ||
519 | #include <linux/input/ad714x.h> | 536 | #include <linux/input/ad714x.h> |
520 | static struct bfin5xx_spi_chip ad7147_spi_chip_info = { | 537 | static struct bfin5xx_spi_chip ad7147_spi_chip_info = { |
521 | .enable_dma = 0, | 538 | .enable_dma = 0, |
522 | .bits_per_word = 16, | 539 | .bits_per_word = 16, |
523 | }; | 540 | }; |
524 | 541 | ||
525 | static struct ad714x_slider_plat slider_plat[] = { | 542 | static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { |
526 | { | 543 | { |
527 | .start_stage = 0, | 544 | .start_stage = 0, |
528 | .end_stage = 7, | 545 | .end_stage = 7, |
@@ -530,7 +547,7 @@ static struct ad714x_slider_plat slider_plat[] = { | |||
530 | }, | 547 | }, |
531 | }; | 548 | }; |
532 | 549 | ||
533 | static struct ad714x_button_plat button_plat[] = { | 550 | static struct ad714x_button_plat ad7147_spi_button_plat[] = { |
534 | { | 551 | { |
535 | .keycode = BTN_FORWARD, | 552 | .keycode = BTN_FORWARD, |
536 | .l_mask = 0, | 553 | .l_mask = 0, |
@@ -557,11 +574,11 @@ static struct ad714x_button_plat button_plat[] = { | |||
557 | .h_mask = 0x400, | 574 | .h_mask = 0x400, |
558 | }, | 575 | }, |
559 | }; | 576 | }; |
560 | static struct ad714x_platform_data ad7147_platfrom_data = { | 577 | static struct ad714x_platform_data ad7147_spi_platform_data = { |
561 | .slider_num = 1, | 578 | .slider_num = 1, |
562 | .button_num = 5, | 579 | .button_num = 5, |
563 | .slider = slider_plat, | 580 | .slider = ad7147_spi_slider_plat, |
564 | .button = button_plat, | 581 | .button = ad7147_spi_button_plat, |
565 | .stage_cfg_reg = { | 582 | .stage_cfg_reg = { |
566 | {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600}, | 583 | {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600}, |
567 | {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650}, | 584 | {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650}, |
@@ -580,10 +597,9 @@ static struct ad714x_platform_data ad7147_platfrom_data = { | |||
580 | }; | 597 | }; |
581 | #endif | 598 | #endif |
582 | 599 | ||
583 | #if defined(CONFIG_INPUT_EVAL_AD7142EB) | 600 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) |
584 | #include <linux/input.h> | ||
585 | #include <linux/input/ad714x.h> | 601 | #include <linux/input/ad714x.h> |
586 | static struct ad714x_button_plat button_plat[] = { | 602 | static struct ad714x_button_plat ad7142_i2c_button_plat[] = { |
587 | { | 603 | { |
588 | .keycode = BTN_1, | 604 | .keycode = BTN_1, |
589 | .l_mask = 0, | 605 | .l_mask = 0, |
@@ -605,9 +621,9 @@ static struct ad714x_button_plat button_plat[] = { | |||
605 | .h_mask = 0x8, | 621 | .h_mask = 0x8, |
606 | }, | 622 | }, |
607 | }; | 623 | }; |
608 | static struct ad714x_platform_data ad7142_platfrom_data = { | 624 | static struct ad714x_platform_data ad7142_i2c_platform_data = { |
609 | .button_num = 4, | 625 | .button_num = 4, |
610 | .button = button_plat, | 626 | .button = ad7142_i2c_button_plat, |
611 | .stage_cfg_reg = { | 627 | .stage_cfg_reg = { |
612 | /* fixme: figure out right setting for all comoponent according | 628 | /* fixme: figure out right setting for all comoponent according |
613 | * to hardware feature of EVAL-AD7142EB board */ | 629 | * to hardware feature of EVAL-AD7142EB board */ |
@@ -696,8 +712,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
696 | #endif | 712 | #endif |
697 | 713 | ||
698 | #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) | 714 | #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) |
699 | #include <linux/input.h> | 715 | #include <linux/input/adxl34x.h> |
700 | #include <linux/spi/adxl34x.h> | ||
701 | static const struct adxl34x_platform_data adxl34x_info = { | 716 | static const struct adxl34x_platform_data adxl34x_info = { |
702 | .x_axis_offset = 0, | 717 | .x_axis_offset = 0, |
703 | .y_axis_offset = 0, | 718 | .y_axis_offset = 0, |
@@ -721,9 +736,7 @@ static const struct adxl34x_platform_data adxl34x_info = { | |||
721 | .ev_code_y = ABS_Y, /* EV_REL */ | 736 | .ev_code_y = ABS_Y, /* EV_REL */ |
722 | .ev_code_z = ABS_Z, /* EV_REL */ | 737 | .ev_code_z = ABS_Z, /* EV_REL */ |
723 | 738 | ||
724 | .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */ | 739 | .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */ |
725 | .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */ | ||
726 | .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */ | ||
727 | 740 | ||
728 | /* .ev_code_ff = KEY_F,*/ /* EV_KEY */ | 741 | /* .ev_code_ff = KEY_F,*/ /* EV_KEY */ |
729 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ | 742 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ |
@@ -761,6 +774,47 @@ static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { | |||
761 | }; | 774 | }; |
762 | #endif | 775 | #endif |
763 | 776 | ||
777 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) | ||
778 | static struct bfin5xx_spi_chip adf7021_spi_chip_info = { | ||
779 | .bits_per_word = 16, | ||
780 | .cs_gpio = GPIO_PF10, | ||
781 | }; | ||
782 | |||
783 | #include <linux/spi/adf702x.h> | ||
784 | #define TXREG 0x0160A470 | ||
785 | static const u32 adf7021_regs[] = { | ||
786 | 0x09608FA0, | ||
787 | 0x00575011, | ||
788 | 0x00A7F092, | ||
789 | 0x2B141563, | ||
790 | 0x81F29E94, | ||
791 | 0x00003155, | ||
792 | 0x050A4F66, | ||
793 | 0x00000007, | ||
794 | 0x00000008, | ||
795 | 0x000231E9, | ||
796 | 0x3296354A, | ||
797 | 0x891A2B3B, | ||
798 | 0x00000D9C, | ||
799 | 0x0000000D, | ||
800 | 0x0000000E, | ||
801 | 0x0000000F, | ||
802 | }; | ||
803 | |||
804 | static struct adf702x_platform_data adf7021_platform_data = { | ||
805 | .regs_base = (void *)SPORT1_TCR1, | ||
806 | .dma_ch_rx = CH_SPORT1_RX, | ||
807 | .dma_ch_tx = CH_SPORT1_TX, | ||
808 | .irq_sport_err = IRQ_SPORT1_ERROR, | ||
809 | .gpio_int_rfs = GPIO_PF8, | ||
810 | .pin_req = {P_SPORT1_DTPRI, P_SPORT1_RFS, P_SPORT1_DRPRI, | ||
811 | P_SPORT1_RSCLK, P_SPORT1_TSCLK, 0}, | ||
812 | .adf702x_model = MODEL_ADF7021, | ||
813 | .adf702x_regs = adf7021_regs, | ||
814 | .tx_reg = TXREG, | ||
815 | }; | ||
816 | #endif | ||
817 | |||
764 | #if defined(CONFIG_MTD_DATAFLASH) \ | 818 | #if defined(CONFIG_MTD_DATAFLASH) \ |
765 | || defined(CONFIG_MTD_DATAFLASH_MODULE) | 819 | || defined(CONFIG_MTD_DATAFLASH_MODULE) |
766 | 820 | ||
@@ -794,6 +848,13 @@ static struct bfin5xx_spi_chip data_flash_chip_info = { | |||
794 | }; | 848 | }; |
795 | #endif | 849 | #endif |
796 | 850 | ||
851 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) | ||
852 | static struct bfin5xx_spi_chip spi_adxl34x_chip_info = { | ||
853 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
854 | .bits_per_word = 8, | ||
855 | }; | ||
856 | #endif | ||
857 | |||
797 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 858 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
798 | #if defined(CONFIG_MTD_M25P80) \ | 859 | #if defined(CONFIG_MTD_M25P80) \ |
799 | || defined(CONFIG_MTD_M25P80_MODULE) | 860 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -855,7 +916,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
855 | }, | 916 | }, |
856 | #endif | 917 | #endif |
857 | 918 | ||
858 | #if defined(CONFIG_INPUT_EVAL_AD7147EBZ) | 919 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) |
859 | { | 920 | { |
860 | .modalias = "ad714x_captouch", | 921 | .modalias = "ad714x_captouch", |
861 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ | 922 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
@@ -863,7 +924,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
863 | .bus_num = 0, | 924 | .bus_num = 0, |
864 | .chip_select = 5, | 925 | .chip_select = 5, |
865 | .mode = SPI_MODE_3, | 926 | .mode = SPI_MODE_3, |
866 | .platform_data = &ad7147_platfrom_data, | 927 | .platform_data = &ad7147_spi_platform_data, |
867 | .controller_data = &ad7147_spi_chip_info, | 928 | .controller_data = &ad7147_spi_chip_info, |
868 | }, | 929 | }, |
869 | #endif | 930 | #endif |
@@ -932,6 +993,30 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
932 | .mode = SPI_MODE_0, | 993 | .mode = SPI_MODE_0, |
933 | }, | 994 | }, |
934 | #endif | 995 | #endif |
996 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) | ||
997 | { | ||
998 | .modalias = "adxl34x", | ||
999 | .platform_data = &adxl34x_info, | ||
1000 | .irq = IRQ_PF6, | ||
1001 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | ||
1002 | .bus_num = 0, | ||
1003 | .chip_select = 2, | ||
1004 | .controller_data = &spi_adxl34x_chip_info, | ||
1005 | .mode = SPI_MODE_3, | ||
1006 | }, | ||
1007 | #endif | ||
1008 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) | ||
1009 | { | ||
1010 | .modalias = "adf702x", | ||
1011 | .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ | ||
1012 | .bus_num = 0, | ||
1013 | .chip_select = 0, /* GPIO controlled SSEL */ | ||
1014 | .controller_data = &adf7021_spi_chip_info, | ||
1015 | .platform_data = &adf7021_platform_data, | ||
1016 | .mode = SPI_MODE_0, | ||
1017 | }, | ||
1018 | #endif | ||
1019 | |||
935 | }; | 1020 | }; |
936 | 1021 | ||
937 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 1022 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
@@ -1175,7 +1260,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
1175 | #endif | 1260 | #endif |
1176 | 1261 | ||
1177 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | 1262 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) |
1178 | #include <linux/input.h> | ||
1179 | #include <linux/i2c/adp5588.h> | 1263 | #include <linux/i2c/adp5588.h> |
1180 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { | 1264 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { |
1181 | [0] = KEY_GRAVE, | 1265 | [0] = KEY_GRAVE, |
@@ -1268,35 +1352,33 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = { | |||
1268 | * ADP5520/5501 Backlight Data | 1352 | * ADP5520/5501 Backlight Data |
1269 | */ | 1353 | */ |
1270 | 1354 | ||
1271 | static struct adp5520_backlight_platfrom_data adp5520_backlight_data = { | 1355 | static struct adp5520_backlight_platform_data adp5520_backlight_data = { |
1272 | .fade_in = FADE_T_1200ms, | 1356 | .fade_in = ADP5520_FADE_T_1200ms, |
1273 | .fade_out = FADE_T_1200ms, | 1357 | .fade_out = ADP5520_FADE_T_1200ms, |
1274 | .fade_led_law = BL_LAW_LINEAR, | 1358 | .fade_led_law = ADP5520_BL_LAW_LINEAR, |
1275 | .en_ambl_sens = 1, | 1359 | .en_ambl_sens = 1, |
1276 | .abml_filt = BL_AMBL_FILT_640ms, | 1360 | .abml_filt = ADP5520_BL_AMBL_FILT_640ms, |
1277 | .l1_daylight_max = BL_CUR_mA(15), | 1361 | .l1_daylight_max = ADP5520_BL_CUR_mA(15), |
1278 | .l1_daylight_dim = BL_CUR_mA(0), | 1362 | .l1_daylight_dim = ADP5520_BL_CUR_mA(0), |
1279 | .l2_office_max = BL_CUR_mA(7), | 1363 | .l2_office_max = ADP5520_BL_CUR_mA(7), |
1280 | .l2_office_dim = BL_CUR_mA(0), | 1364 | .l2_office_dim = ADP5520_BL_CUR_mA(0), |
1281 | .l3_dark_max = BL_CUR_mA(3), | 1365 | .l3_dark_max = ADP5520_BL_CUR_mA(3), |
1282 | .l3_dark_dim = BL_CUR_mA(0), | 1366 | .l3_dark_dim = ADP5520_BL_CUR_mA(0), |
1283 | .l2_trip = L2_COMP_CURR_uA(700), | 1367 | .l2_trip = ADP5520_L2_COMP_CURR_uA(700), |
1284 | .l2_hyst = L2_COMP_CURR_uA(50), | 1368 | .l2_hyst = ADP5520_L2_COMP_CURR_uA(50), |
1285 | .l3_trip = L3_COMP_CURR_uA(80), | 1369 | .l3_trip = ADP5520_L3_COMP_CURR_uA(80), |
1286 | .l3_hyst = L3_COMP_CURR_uA(20), | 1370 | .l3_hyst = ADP5520_L3_COMP_CURR_uA(20), |
1287 | }; | 1371 | }; |
1288 | 1372 | ||
1289 | /* | 1373 | /* |
1290 | * ADP5520/5501 LEDs Data | 1374 | * ADP5520/5501 LEDs Data |
1291 | */ | 1375 | */ |
1292 | 1376 | ||
1293 | #include <linux/leds.h> | ||
1294 | |||
1295 | static struct led_info adp5520_leds[] = { | 1377 | static struct led_info adp5520_leds[] = { |
1296 | { | 1378 | { |
1297 | .name = "adp5520-led1", | 1379 | .name = "adp5520-led1", |
1298 | .default_trigger = "none", | 1380 | .default_trigger = "none", |
1299 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | LED_OFFT_600ms, | 1381 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms, |
1300 | }, | 1382 | }, |
1301 | #ifdef ADP5520_EN_ALL_LEDS | 1383 | #ifdef ADP5520_EN_ALL_LEDS |
1302 | { | 1384 | { |
@@ -1312,51 +1394,50 @@ static struct led_info adp5520_leds[] = { | |||
1312 | #endif | 1394 | #endif |
1313 | }; | 1395 | }; |
1314 | 1396 | ||
1315 | static struct adp5520_leds_platfrom_data adp5520_leds_data = { | 1397 | static struct adp5520_leds_platform_data adp5520_leds_data = { |
1316 | .num_leds = ARRAY_SIZE(adp5520_leds), | 1398 | .num_leds = ARRAY_SIZE(adp5520_leds), |
1317 | .leds = adp5520_leds, | 1399 | .leds = adp5520_leds, |
1318 | .fade_in = FADE_T_600ms, | 1400 | .fade_in = ADP5520_FADE_T_600ms, |
1319 | .fade_out = FADE_T_600ms, | 1401 | .fade_out = ADP5520_FADE_T_600ms, |
1320 | .led_on_time = LED_ONT_600ms, | 1402 | .led_on_time = ADP5520_LED_ONT_600ms, |
1321 | }; | 1403 | }; |
1322 | 1404 | ||
1323 | /* | 1405 | /* |
1324 | * ADP5520 GPIO Data | 1406 | * ADP5520 GPIO Data |
1325 | */ | 1407 | */ |
1326 | 1408 | ||
1327 | static struct adp5520_gpio_platfrom_data adp5520_gpio_data = { | 1409 | static struct adp5520_gpio_platform_data adp5520_gpio_data = { |
1328 | .gpio_start = 50, | 1410 | .gpio_start = 50, |
1329 | .gpio_en_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, | 1411 | .gpio_en_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
1330 | .gpio_pullup_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, | 1412 | .gpio_pullup_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
1331 | }; | 1413 | }; |
1332 | 1414 | ||
1333 | /* | 1415 | /* |
1334 | * ADP5520 Keypad Data | 1416 | * ADP5520 Keypad Data |
1335 | */ | 1417 | */ |
1336 | 1418 | ||
1337 | #include <linux/input.h> | ||
1338 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { | 1419 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { |
1339 | [KEY(0, 0)] = KEY_GRAVE, | 1420 | [ADP5520_KEY(0, 0)] = KEY_GRAVE, |
1340 | [KEY(0, 1)] = KEY_1, | 1421 | [ADP5520_KEY(0, 1)] = KEY_1, |
1341 | [KEY(0, 2)] = KEY_2, | 1422 | [ADP5520_KEY(0, 2)] = KEY_2, |
1342 | [KEY(0, 3)] = KEY_3, | 1423 | [ADP5520_KEY(0, 3)] = KEY_3, |
1343 | [KEY(1, 0)] = KEY_4, | 1424 | [ADP5520_KEY(1, 0)] = KEY_4, |
1344 | [KEY(1, 1)] = KEY_5, | 1425 | [ADP5520_KEY(1, 1)] = KEY_5, |
1345 | [KEY(1, 2)] = KEY_6, | 1426 | [ADP5520_KEY(1, 2)] = KEY_6, |
1346 | [KEY(1, 3)] = KEY_7, | 1427 | [ADP5520_KEY(1, 3)] = KEY_7, |
1347 | [KEY(2, 0)] = KEY_8, | 1428 | [ADP5520_KEY(2, 0)] = KEY_8, |
1348 | [KEY(2, 1)] = KEY_9, | 1429 | [ADP5520_KEY(2, 1)] = KEY_9, |
1349 | [KEY(2, 2)] = KEY_0, | 1430 | [ADP5520_KEY(2, 2)] = KEY_0, |
1350 | [KEY(2, 3)] = KEY_MINUS, | 1431 | [ADP5520_KEY(2, 3)] = KEY_MINUS, |
1351 | [KEY(3, 0)] = KEY_EQUAL, | 1432 | [ADP5520_KEY(3, 0)] = KEY_EQUAL, |
1352 | [KEY(3, 1)] = KEY_BACKSLASH, | 1433 | [ADP5520_KEY(3, 1)] = KEY_BACKSLASH, |
1353 | [KEY(3, 2)] = KEY_BACKSPACE, | 1434 | [ADP5520_KEY(3, 2)] = KEY_BACKSPACE, |
1354 | [KEY(3, 3)] = KEY_ENTER, | 1435 | [ADP5520_KEY(3, 3)] = KEY_ENTER, |
1355 | }; | 1436 | }; |
1356 | 1437 | ||
1357 | static struct adp5520_keys_platfrom_data adp5520_keys_data = { | 1438 | static struct adp5520_keys_platform_data adp5520_keys_data = { |
1358 | .rows_en_mask = ROW_R3 | ROW_R2 | ROW_R1 | ROW_R0, | 1439 | .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0, |
1359 | .cols_en_mask = COL_C3 | COL_C2 | COL_C1 | COL_C0, | 1440 | .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0, |
1360 | .keymap = adp5520_keymap, | 1441 | .keymap = adp5520_keymap, |
1361 | .keymapsize = ARRAY_SIZE(adp5520_keymap), | 1442 | .keymapsize = ARRAY_SIZE(adp5520_keymap), |
1362 | .repeat = 0, | 1443 | .repeat = 0, |
@@ -1366,50 +1447,81 @@ static struct adp5520_keys_platfrom_data adp5520_keys_data = { | |||
1366 | * ADP5520/5501 Multifuction Device Init Data | 1447 | * ADP5520/5501 Multifuction Device Init Data |
1367 | */ | 1448 | */ |
1368 | 1449 | ||
1369 | static struct adp5520_subdev_info adp5520_subdevs[] = { | ||
1370 | { | ||
1371 | .name = "adp5520-backlight", | ||
1372 | .id = ID_ADP5520, | ||
1373 | .platform_data = &adp5520_backlight_data, | ||
1374 | }, | ||
1375 | { | ||
1376 | .name = "adp5520-led", | ||
1377 | .id = ID_ADP5520, | ||
1378 | .platform_data = &adp5520_leds_data, | ||
1379 | }, | ||
1380 | { | ||
1381 | .name = "adp5520-gpio", | ||
1382 | .id = ID_ADP5520, | ||
1383 | .platform_data = &adp5520_gpio_data, | ||
1384 | }, | ||
1385 | { | ||
1386 | .name = "adp5520-keys", | ||
1387 | .id = ID_ADP5520, | ||
1388 | .platform_data = &adp5520_keys_data, | ||
1389 | }, | ||
1390 | }; | ||
1391 | |||
1392 | static struct adp5520_platform_data adp5520_pdev_data = { | 1450 | static struct adp5520_platform_data adp5520_pdev_data = { |
1393 | .num_subdevs = ARRAY_SIZE(adp5520_subdevs), | 1451 | .backlight = &adp5520_backlight_data, |
1394 | .subdevs = adp5520_subdevs, | 1452 | .leds = &adp5520_leds_data, |
1453 | .gpio = &adp5520_gpio_data, | ||
1454 | .keys = &adp5520_keys_data, | ||
1395 | }; | 1455 | }; |
1396 | 1456 | ||
1397 | #endif | 1457 | #endif |
1398 | 1458 | ||
1399 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) | 1459 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) |
1400 | #include <linux/i2c/adp5588.h> | 1460 | #include <linux/i2c/adp5588.h> |
1401 | static struct adp5588_gpio_platfrom_data adp5588_gpio_data = { | 1461 | static struct adp5588_gpio_platform_data adp5588_gpio_data = { |
1402 | .gpio_start = 50, | 1462 | .gpio_start = 50, |
1403 | .pullup_dis_mask = 0, | 1463 | .pullup_dis_mask = 0, |
1404 | }; | 1464 | }; |
1405 | #endif | 1465 | #endif |
1406 | 1466 | ||
1467 | #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) | ||
1468 | #include <linux/i2c/adp8870.h> | ||
1469 | static struct led_info adp8870_leds[] = { | ||
1470 | { | ||
1471 | .name = "adp8870-led7", | ||
1472 | .default_trigger = "none", | ||
1473 | .flags = ADP8870_LED_D7 | ADP8870_LED_OFFT_600ms, | ||
1474 | }, | ||
1475 | }; | ||
1476 | |||
1477 | |||
1478 | static struct adp8870_backlight_platform_data adp8870_pdata = { | ||
1479 | .bl_led_assign = ADP8870_BL_D1 | ADP8870_BL_D2 | ADP8870_BL_D3 | | ||
1480 | ADP8870_BL_D4 | ADP8870_BL_D5 | ADP8870_BL_D6, /* 1 = Backlight 0 = Individual LED */ | ||
1481 | .pwm_assign = 0, /* 1 = Enables PWM mode */ | ||
1482 | |||
1483 | .bl_fade_in = ADP8870_FADE_T_1200ms, /* Backlight Fade-In Timer */ | ||
1484 | .bl_fade_out = ADP8870_FADE_T_1200ms, /* Backlight Fade-Out Timer */ | ||
1485 | .bl_fade_law = ADP8870_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */ | ||
1486 | |||
1487 | .en_ambl_sens = 1, /* 1 = enable ambient light sensor */ | ||
1488 | .abml_filt = ADP8870_BL_AMBL_FILT_320ms, /* Light sensor filter time */ | ||
1489 | |||
1490 | .l1_daylight_max = ADP8870_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1491 | .l1_daylight_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1492 | .l2_bright_max = ADP8870_BL_CUR_mA(14), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1493 | .l2_bright_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1494 | .l3_office_max = ADP8870_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1495 | .l3_office_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1496 | .l4_indoor_max = ADP8870_BL_CUR_mA(3), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1497 | .l4_indor_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1498 | .l5_dark_max = ADP8870_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1499 | .l5_dark_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1500 | |||
1501 | .l2_trip = ADP8870_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
1502 | .l2_hyst = ADP8870_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
1503 | .l3_trip = ADP8870_L3_COMP_CURR_uA(389), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
1504 | .l3_hyst = ADP8870_L3_COMP_CURR_uA(54), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
1505 | .l4_trip = ADP8870_L4_COMP_CURR_uA(167), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ | ||
1506 | .l4_hyst = ADP8870_L4_COMP_CURR_uA(16), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ | ||
1507 | .l5_trip = ADP8870_L5_COMP_CURR_uA(43), /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
1508 | .l5_hyst = ADP8870_L5_COMP_CURR_uA(11), /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
1509 | |||
1510 | .leds = adp8870_leds, | ||
1511 | .num_leds = ARRAY_SIZE(adp8870_leds), | ||
1512 | .led_fade_law = ADP8870_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */ | ||
1513 | .led_fade_in = ADP8870_FADE_T_600ms, | ||
1514 | .led_fade_out = ADP8870_FADE_T_600ms, | ||
1515 | .led_on_time = ADP8870_LED_ONT_200ms, | ||
1516 | }; | ||
1517 | #endif | ||
1518 | |||
1407 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 1519 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
1408 | #if defined(CONFIG_INPUT_EVAL_AD7142EB) | 1520 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) |
1409 | { | 1521 | { |
1410 | I2C_BOARD_INFO("ad7142_captouch", 0x2C), | 1522 | I2C_BOARD_INFO("ad7142_captouch", 0x2C), |
1411 | .irq = IRQ_PG5, | 1523 | .irq = IRQ_PG5, |
1412 | .platform_data = (void *)&ad7142_platfrom_data, | 1524 | .platform_data = (void *)&ad7142_i2c_platform_data, |
1413 | }, | 1525 | }, |
1414 | #endif | 1526 | #endif |
1415 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) | 1527 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
@@ -1462,6 +1574,32 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1462 | I2C_BOARD_INFO("bfin-adv7393", 0x2B), | 1574 | I2C_BOARD_INFO("bfin-adv7393", 0x2B), |
1463 | }, | 1575 | }, |
1464 | #endif | 1576 | #endif |
1577 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) | ||
1578 | { | ||
1579 | I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C), | ||
1580 | }, | ||
1581 | #endif | ||
1582 | #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) | ||
1583 | { | ||
1584 | I2C_BOARD_INFO("adp8870", 0x2B), | ||
1585 | .platform_data = (void *)&adp8870_pdata, | ||
1586 | }, | ||
1587 | #endif | ||
1588 | #if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE) | ||
1589 | { | ||
1590 | I2C_BOARD_INFO("adau1371", 0x1A), | ||
1591 | }, | ||
1592 | #endif | ||
1593 | #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) | ||
1594 | { | ||
1595 | I2C_BOARD_INFO("adau1761", 0x38), | ||
1596 | }, | ||
1597 | #endif | ||
1598 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) | ||
1599 | { | ||
1600 | I2C_BOARD_INFO("ad5258", 0x18), | ||
1601 | }, | ||
1602 | #endif | ||
1465 | }; | 1603 | }; |
1466 | 1604 | ||
1467 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1605 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
@@ -1602,8 +1740,8 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1602 | &dm9000_device, | 1740 | &dm9000_device, |
1603 | #endif | 1741 | #endif |
1604 | 1742 | ||
1605 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | 1743 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
1606 | &ax88180_device, | 1744 | &bfin_can_device, |
1607 | #endif | 1745 | #endif |
1608 | 1746 | ||
1609 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 1747 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |