aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards/stamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c623
1 files changed, 538 insertions, 85 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 68a27bccc7d..3aa344ce8e5 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -35,12 +35,10 @@
35#include <asm/reboot.h> 35#include <asm/reboot.h>
36#include <asm/portmux.h> 36#include <asm/portmux.h>
37#include <asm/dpmc.h> 37#include <asm/dpmc.h>
38#ifdef CONFIG_REGULATOR_ADP_SWITCH 38#ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
39#include <linux/regulator/adp_switch.h> 39#include <linux/regulator/fixed.h>
40#endif
41#ifdef CONFIG_REGULATOR_AD5398
42#include <linux/regulator/ad5398.h>
43#endif 40#endif
41#include <linux/regulator/machine.h>
44#include <linux/regulator/consumer.h> 42#include <linux/regulator/consumer.h>
45#include <linux/regulator/userspace-consumer.h> 43#include <linux/regulator/userspace-consumer.h>
46 44
@@ -264,7 +262,7 @@ static struct resource isp1362_hcd_resources[] = {
264 }, { 262 }, {
265 .start = IRQ_PF3, 263 .start = IRQ_PF3,
266 .end = IRQ_PF3, 264 .end = IRQ_PF3,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 265 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
268 }, 266 },
269}; 267};
270 268
@@ -329,13 +327,35 @@ static struct platform_device bfin_can_device = {
329#endif 327#endif
330 328
331#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 329#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
330#include <linux/bfin_mac.h>
331static const unsigned short bfin_mac_peripherals[] = P_MII0;
332
333static struct bfin_phydev_platform_data bfin_phydev_data[] = {
334 {
335 .addr = 1,
336 .irq = PHY_POLL, /* IRQ_MAC_PHYINT */
337 },
338};
339
340static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
341 .phydev_number = 1,
342 .phydev_data = bfin_phydev_data,
343 .phy_mode = PHY_INTERFACE_MODE_MII,
344 .mac_peripherals = bfin_mac_peripherals,
345};
346
332static struct platform_device bfin_mii_bus = { 347static struct platform_device bfin_mii_bus = {
333 .name = "bfin_mii_bus", 348 .name = "bfin_mii_bus",
349 .dev = {
350 .platform_data = &bfin_mii_bus_data,
351 }
334}; 352};
335 353
336static struct platform_device bfin_mac_device = { 354static struct platform_device bfin_mac_device = {
337 .name = "bfin_mac", 355 .name = "bfin_mac",
338 .dev.platform_data = &bfin_mii_bus, 356 .dev = {
357 .platform_data = &bfin_mii_bus,
358 }
339}; 359};
340#endif 360#endif
341 361
@@ -418,7 +438,7 @@ static struct platform_nand_data bfin_plat_nand_data = {
418static struct resource bfin_plat_nand_resources = { 438static struct resource bfin_plat_nand_resources = {
419 .start = 0x20212000, 439 .start = 0x20212000,
420 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)), 440 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
421 .flags = IORESOURCE_IO, 441 .flags = IORESOURCE_MEM,
422}; 442};
423 443
424static struct platform_device bfin_async_nand_device = { 444static struct platform_device bfin_async_nand_device = {
@@ -545,6 +565,14 @@ static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
545}; 565};
546#endif 566#endif
547 567
568#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \
569 || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
570static struct bfin5xx_spi_chip adav801_spi_chip_info = {
571 .enable_dma = 0,
572 .bits_per_word = 8,
573};
574#endif
575
548#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 576#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
549#include <linux/input/ad714x.h> 577#include <linux/input/ad714x.h>
550static struct bfin5xx_spi_chip ad7147_spi_chip_info = { 578static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
@@ -693,6 +721,65 @@ static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
693}; 721};
694#endif 722#endif
695 723
724#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
725static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
726 .enable_dma = 0,
727 .bits_per_word = 16,
728};
729#endif
730
731#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
732static unsigned short ad7816_platform_data[] = {
733 GPIO_PF4, /* rdwr_pin */
734 GPIO_PF5, /* convert_pin */
735 GPIO_PF7, /* busy_pin */
736 0,
737};
738
739static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
740 .enable_dma = 0,
741 .bits_per_word = 8,
742};
743#endif
744
745#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
746static unsigned long adt7310_platform_data[3] = {
747/* INT bound temperature alarm event. line 1 */
748 IRQ_PG4, IRQF_TRIGGER_LOW,
749/* CT bound temperature alarm event irq_flags. line 0 */
750 IRQF_TRIGGER_LOW,
751};
752
753static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
754 .enable_dma = 0,
755 .bits_per_word = 8,
756};
757#endif
758
759#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
760static unsigned short ad7298_platform_data[] = {
761 GPIO_PF7, /* busy_pin */
762 0,
763};
764
765static struct bfin5xx_spi_chip ad7298_spi_chip_info = {
766 .enable_dma = 0,
767 .bits_per_word = 16,
768};
769#endif
770
771#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
772static unsigned long adt7316_spi_data[2] = {
773 IRQF_TRIGGER_LOW, /* interrupt flags */
774 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
775};
776
777static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
778 .enable_dma = 0,
779 .bits_per_word = 8,
780};
781#endif
782
696#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 783#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
697#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 784#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
698 785
@@ -824,14 +911,12 @@ static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
824static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 911static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
825 .enable_dma = 1, 912 .enable_dma = 1,
826 .bits_per_word = 8, 913 .bits_per_word = 8,
827 .cs_gpio = GPIO_PF10,
828}; 914};
829#endif 915#endif
830 916
831#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 917#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
832static struct bfin5xx_spi_chip adf7021_spi_chip_info = { 918static struct bfin5xx_spi_chip adf7021_spi_chip_info = {
833 .bits_per_word = 16, 919 .bits_per_word = 16,
834 .cs_gpio = GPIO_PF10,
835}; 920};
836 921
837#include <linux/spi/adf702x.h> 922#include <linux/spi/adf702x.h>
@@ -938,6 +1023,13 @@ static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
938}; 1023};
939#endif 1024#endif
940 1025
1026#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE)
1027static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
1028 .enable_dma = 0, /* use dma transfer with this chip*/
1029 .bits_per_word = 8,
1030};
1031#endif
1032
941static struct spi_board_info bfin_spi_board_info[] __initdata = { 1033static struct spi_board_info bfin_spi_board_info[] __initdata = {
942#if defined(CONFIG_MTD_M25P80) \ 1034#if defined(CONFIG_MTD_M25P80) \
943 || defined(CONFIG_MTD_M25P80_MODULE) 1035 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -982,7 +1074,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
982 .modalias = "ad183x", 1074 .modalias = "ad183x",
983 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1075 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
984 .bus_num = 0, 1076 .bus_num = 0,
985 .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */ 1077 .chip_select = 4,
986 .platform_data = "ad1836", /* only includes chip name for the moment */ 1078 .platform_data = "ad1836", /* only includes chip name for the moment */
987 .controller_data = &ad1836_spi_chip_info, 1079 .controller_data = &ad1836_spi_chip_info,
988 .mode = SPI_MODE_3, 1080 .mode = SPI_MODE_3,
@@ -1000,6 +1092,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1000 }, 1092 },
1001#endif 1093#endif
1002 1094
1095#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
1096 {
1097 .modalias = "adav80x",
1098 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1099 .bus_num = 0,
1100 .chip_select = 1,
1101 .controller_data = &adav801_spi_chip_info,
1102 .mode = SPI_MODE_3,
1103 },
1104#endif
1105
1003#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 1106#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
1004 { 1107 {
1005 .modalias = "ad714x_captouch", 1108 .modalias = "ad714x_captouch",
@@ -1018,6 +1121,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1018 .modalias = "ad2s90", 1121 .modalias = "ad2s90",
1019 .bus_num = 0, 1122 .bus_num = 0,
1020 .chip_select = 3, /* change it for your board */ 1123 .chip_select = 3, /* change it for your board */
1124 .mode = SPI_MODE_3,
1021 .platform_data = NULL, 1125 .platform_data = NULL,
1022 .controller_data = &ad2s90_spi_chip_info, 1126 .controller_data = &ad2s90_spi_chip_info,
1023 }, 1127 },
@@ -1044,6 +1148,67 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1044 }, 1148 },
1045#endif 1149#endif
1046 1150
1151#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
1152 {
1153 .modalias = "ad7314",
1154 .max_speed_hz = 1000000,
1155 .bus_num = 0,
1156 .chip_select = 4, /* CS, change it for your board */
1157 .controller_data = &ad7314_spi_chip_info,
1158 .mode = SPI_MODE_1,
1159 },
1160#endif
1161
1162#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
1163 {
1164 .modalias = "ad7818",
1165 .max_speed_hz = 1000000,
1166 .bus_num = 0,
1167 .chip_select = 4, /* CS, change it for your board */
1168 .platform_data = ad7816_platform_data,
1169 .controller_data = &ad7816_spi_chip_info,
1170 .mode = SPI_MODE_3,
1171 },
1172#endif
1173
1174#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
1175 {
1176 .modalias = "adt7310",
1177 .max_speed_hz = 1000000,
1178 .irq = IRQ_PG5, /* CT alarm event. Line 0 */
1179 .bus_num = 0,
1180 .chip_select = 4, /* CS, change it for your board */
1181 .platform_data = adt7310_platform_data,
1182 .controller_data = &adt7310_spi_chip_info,
1183 .mode = SPI_MODE_3,
1184 },
1185#endif
1186
1187#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
1188 {
1189 .modalias = "ad7298",
1190 .max_speed_hz = 1000000,
1191 .bus_num = 0,
1192 .chip_select = 4, /* CS, change it for your board */
1193 .platform_data = ad7298_platform_data,
1194 .controller_data = &ad7298_spi_chip_info,
1195 .mode = SPI_MODE_3,
1196 },
1197#endif
1198
1199#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
1200 {
1201 .modalias = "adt7316",
1202 .max_speed_hz = 1000000,
1203 .irq = IRQ_PG5, /* interrupt line */
1204 .bus_num = 0,
1205 .chip_select = 4, /* CS, change it for your board */
1206 .platform_data = adt7316_spi_data,
1207 .controller_data = &adt7316_spi_chip_info,
1208 .mode = SPI_MODE_3,
1209 },
1210#endif
1211
1047#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 1212#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
1048 { 1213 {
1049 .modalias = "mmc_spi", 1214 .modalias = "mmc_spi",
@@ -1103,7 +1268,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1103 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1268 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1104 .irq = IRQ_PF6, 1269 .irq = IRQ_PF6,
1105 .bus_num = 0, 1270 .bus_num = 0,
1106 .chip_select = 0, /* GPIO controlled SSEL */ 1271 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1107 .controller_data = &enc28j60_spi_chip_info, 1272 .controller_data = &enc28j60_spi_chip_info,
1108 .mode = SPI_MODE_0, 1273 .mode = SPI_MODE_0,
1109 }, 1274 },
@@ -1125,7 +1290,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1125 .modalias = "adf702x", 1290 .modalias = "adf702x",
1126 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ 1291 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
1127 .bus_num = 0, 1292 .bus_num = 0,
1128 .chip_select = 0, /* GPIO controlled SSEL */ 1293 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1129 .controller_data = &adf7021_spi_chip_info, 1294 .controller_data = &adf7021_spi_chip_info,
1130 .platform_data = &adf7021_platform_data, 1295 .platform_data = &adf7021_platform_data,
1131 .mode = SPI_MODE_0, 1296 .mode = SPI_MODE_0,
@@ -1143,12 +1308,239 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1143 .mode = SPI_MODE_0, 1308 .mode = SPI_MODE_0,
1144 }, 1309 },
1145#endif 1310#endif
1311#if defined(CONFIG_AD7476) \
1312 || defined(CONFIG_AD7476_MODULE)
1313 {
1314 .modalias = "ad7476", /* Name of spi_driver for this device */
1315 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
1316 .bus_num = 0, /* Framework bus number */
1317 .chip_select = 1, /* Framework chip select. */
1318 .platform_data = NULL, /* No spi_driver specific config */
1319 .controller_data = &spi_ad7476_chip_info,
1320 .mode = SPI_MODE_3,
1321 },
1322#endif
1323#if defined(CONFIG_ADE7753) \
1324 || defined(CONFIG_ADE7753_MODULE)
1325 {
1326 .modalias = "ade7753",
1327 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1328 .bus_num = 0,
1329 .chip_select = 1, /* CS, change it for your board */
1330 .platform_data = NULL, /* No spi_driver specific config */
1331 .mode = SPI_MODE_1,
1332 },
1333#endif
1334#if defined(CONFIG_ADE7754) \
1335 || defined(CONFIG_ADE7754_MODULE)
1336 {
1337 .modalias = "ade7754",
1338 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1339 .bus_num = 0,
1340 .chip_select = 1, /* CS, change it for your board */
1341 .platform_data = NULL, /* No spi_driver specific config */
1342 .mode = SPI_MODE_1,
1343 },
1344#endif
1345#if defined(CONFIG_ADE7758) \
1346 || defined(CONFIG_ADE7758_MODULE)
1347 {
1348 .modalias = "ade7758",
1349 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1350 .bus_num = 0,
1351 .chip_select = 1, /* CS, change it for your board */
1352 .platform_data = NULL, /* No spi_driver specific config */
1353 .mode = SPI_MODE_1,
1354 },
1355#endif
1356#if defined(CONFIG_ADE7759) \
1357 || defined(CONFIG_ADE7759_MODULE)
1358 {
1359 .modalias = "ade7759",
1360 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1361 .bus_num = 0,
1362 .chip_select = 1, /* CS, change it for your board */
1363 .platform_data = NULL, /* No spi_driver specific config */
1364 .mode = SPI_MODE_1,
1365 },
1366#endif
1367#if defined(CONFIG_ADE7854_SPI) \
1368 || defined(CONFIG_ADE7854_SPI_MODULE)
1369 {
1370 .modalias = "ade7854",
1371 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1372 .bus_num = 0,
1373 .chip_select = 1, /* CS, change it for your board */
1374 .platform_data = NULL, /* No spi_driver specific config */
1375 .mode = SPI_MODE_3,
1376 },
1377#endif
1378#if defined(CONFIG_ADIS16060) \
1379 || defined(CONFIG_ADIS16060_MODULE)
1380 {
1381 .modalias = "adis16060_r",
1382 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1383 .bus_num = 0,
1384 .chip_select = MAX_CTRL_CS + 1, /* CS for read, change it for your board */
1385 .platform_data = NULL, /* No spi_driver specific config */
1386 .mode = SPI_MODE_0,
1387 },
1388 {
1389 .modalias = "adis16060_w",
1390 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1391 .bus_num = 0,
1392 .chip_select = 2, /* CS for write, change it for your board */
1393 .platform_data = NULL, /* No spi_driver specific config */
1394 .mode = SPI_MODE_1,
1395 },
1396#endif
1397#if defined(CONFIG_ADIS16130) \
1398 || defined(CONFIG_ADIS16130_MODULE)
1399 {
1400 .modalias = "adis16130",
1401 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1402 .bus_num = 0,
1403 .chip_select = 1, /* CS for read, change it for your board */
1404 .platform_data = NULL, /* No spi_driver specific config */
1405 .mode = SPI_MODE_3,
1406 },
1407#endif
1408#if defined(CONFIG_ADIS16201) \
1409 || defined(CONFIG_ADIS16201_MODULE)
1410 {
1411 .modalias = "adis16201",
1412 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1413 .bus_num = 0,
1414 .chip_select = 5, /* CS, change it for your board */
1415 .platform_data = NULL, /* No spi_driver specific config */
1416 .mode = SPI_MODE_3,
1417 .irq = IRQ_PF4,
1418 },
1419#endif
1420#if defined(CONFIG_ADIS16203) \
1421 || defined(CONFIG_ADIS16203_MODULE)
1422 {
1423 .modalias = "adis16203",
1424 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1425 .bus_num = 0,
1426 .chip_select = 5, /* CS, change it for your board */
1427 .platform_data = NULL, /* No spi_driver specific config */
1428 .mode = SPI_MODE_3,
1429 .irq = IRQ_PF4,
1430 },
1431#endif
1432#if defined(CONFIG_ADIS16204) \
1433 || defined(CONFIG_ADIS16204_MODULE)
1434 {
1435 .modalias = "adis16204",
1436 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1437 .bus_num = 0,
1438 .chip_select = 5, /* CS, change it for your board */
1439 .platform_data = NULL, /* No spi_driver specific config */
1440 .mode = SPI_MODE_3,
1441 .irq = IRQ_PF4,
1442 },
1443#endif
1444#if defined(CONFIG_ADIS16209) \
1445 || defined(CONFIG_ADIS16209_MODULE)
1446 {
1447 .modalias = "adis16209",
1448 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1449 .bus_num = 0,
1450 .chip_select = 5, /* CS, change it for your board */
1451 .platform_data = NULL, /* No spi_driver specific config */
1452 .mode = SPI_MODE_3,
1453 .irq = IRQ_PF4,
1454 },
1455#endif
1456#if defined(CONFIG_ADIS16220) \
1457 || defined(CONFIG_ADIS16220_MODULE)
1458 {
1459 .modalias = "adis16220",
1460 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
1461 .bus_num = 0,
1462 .chip_select = 5, /* CS, change it for your board */
1463 .platform_data = NULL, /* No spi_driver specific config */
1464 .mode = SPI_MODE_3,
1465 .irq = IRQ_PF4,
1466 },
1467#endif
1468#if defined(CONFIG_ADIS16240) \
1469 || defined(CONFIG_ADIS16240_MODULE)
1470 {
1471 .modalias = "adis16240",
1472 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1473 .bus_num = 0,
1474 .chip_select = 5, /* CS, change it for your board */
1475 .platform_data = NULL, /* No spi_driver specific config */
1476 .mode = SPI_MODE_3,
1477 .irq = IRQ_PF4,
1478 },
1479#endif
1480#if defined(CONFIG_ADIS16260) \
1481 || defined(CONFIG_ADIS16260_MODULE)
1482 {
1483 .modalias = "adis16260",
1484 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1485 .bus_num = 0,
1486 .chip_select = 5, /* CS, change it for your board */
1487 .platform_data = NULL, /* No spi_driver specific config */
1488 .mode = SPI_MODE_3,
1489 .irq = IRQ_PF4,
1490 },
1491#endif
1492#if defined(CONFIG_ADIS16261) \
1493 || defined(CONFIG_ADIS16261_MODULE)
1494 {
1495 .modalias = "adis16261",
1496 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */
1497 .bus_num = 0,
1498 .chip_select = 1, /* CS, change it for your board */
1499 .platform_data = NULL, /* No spi_driver specific config */
1500 .mode = SPI_MODE_3,
1501 },
1502#endif
1503#if defined(CONFIG_ADIS16300) \
1504 || defined(CONFIG_ADIS16300_MODULE)
1505 {
1506 .modalias = "adis16300",
1507 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1508 .bus_num = 0,
1509 .chip_select = 5, /* CS, change it for your board */
1510 .platform_data = NULL, /* No spi_driver specific config */
1511 .mode = SPI_MODE_3,
1512 .irq = IRQ_PF4,
1513 },
1514#endif
1515#if defined(CONFIG_ADIS16350) \
1516 || defined(CONFIG_ADIS16350_MODULE)
1517 {
1518 .modalias = "adis16364",
1519 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1520 .bus_num = 0,
1521 .chip_select = 5, /* CS, change it for your board */
1522 .platform_data = NULL, /* No spi_driver specific config */
1523 .mode = SPI_MODE_3,
1524 .irq = IRQ_PF4,
1525 },
1526#endif
1527#if defined(CONFIG_ADIS16400) \
1528 || defined(CONFIG_ADIS16400_MODULE)
1529 {
1530 .modalias = "adis16400",
1531 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1532 .bus_num = 0,
1533 .chip_select = 1, /* CS, change it for your board */
1534 .platform_data = NULL, /* No spi_driver specific config */
1535 .mode = SPI_MODE_3,
1536 },
1537#endif
1146}; 1538};
1147 1539
1148#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1540#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1149/* SPI controller data */ 1541/* SPI controller data */
1150static struct bfin5xx_spi_master bfin_spi0_info = { 1542static struct bfin5xx_spi_master bfin_spi0_info = {
1151 .num_chipselect = 8, 1543 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
1152 .enable_dma = 1, /* master has the ability to do dma transfer */ 1544 .enable_dma = 1, /* master has the ability to do dma transfer */
1153 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 1545 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
1154}; 1546};
@@ -1645,7 +2037,7 @@ static struct adp5520_keys_platform_data adp5520_keys_data = {
1645}; 2037};
1646 2038
1647 /* 2039 /*
1648 * ADP5520/5501 Multifuction Device Init Data 2040 * ADP5520/5501 Multifunction Device Init Data
1649 */ 2041 */
1650 2042
1651static struct adp5520_platform_data adp5520_pdev_data = { 2043static struct adp5520_platform_data adp5520_pdev_data = {
@@ -1773,12 +2165,6 @@ static struct regulator_init_data ad5398_regulator_data = {
1773 .consumer_supplies = &ad5398_consumer, 2165 .consumer_supplies = &ad5398_consumer,
1774}; 2166};
1775 2167
1776static struct ad5398_platform_data ad5398_i2c_platform_data = {
1777 .current_bits = 10,
1778 .current_offset = 4,
1779 .regulator_data = &ad5398_regulator_data,
1780};
1781
1782#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2168#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
1783 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) 2169 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
1784static struct platform_device ad5398_virt_consumer_device = { 2170static struct platform_device ad5398_virt_consumer_device = {
@@ -1811,7 +2197,34 @@ static struct platform_device ad5398_userspace_consumer_device = {
1811#endif 2197#endif
1812#endif 2198#endif
1813 2199
2200#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2201/* INT bound temperature alarm event. line 1 */
2202static unsigned long adt7410_platform_data[2] = {
2203 IRQ_PG4, IRQF_TRIGGER_LOW,
2204};
2205#endif
2206
2207#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2208/* INT bound temperature alarm event. line 1 */
2209static unsigned long adt7316_i2c_data[2] = {
2210 IRQF_TRIGGER_LOW, /* interrupt flags */
2211 GPIO_PF4, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
2212};
2213#endif
2214
1814static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 2215static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2216#if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
2217 {
2218 I2C_BOARD_INFO("ad1937", 0x04),
2219 },
2220#endif
2221
2222#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
2223 {
2224 I2C_BOARD_INFO("adav803", 0x10),
2225 },
2226#endif
2227
1815#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 2228#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
1816 { 2229 {
1817 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 2230 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
@@ -1843,12 +2256,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1843 { 2256 {
1844 I2C_BOARD_INFO("ad7414", 0x9), 2257 I2C_BOARD_INFO("ad7414", 0x9),
1845 .irq = IRQ_PG5, 2258 .irq = IRQ_PG5,
1846 /* 2259 .irq_flags = IRQF_TRIGGER_LOW,
1847 * platform_data pointer is borrwoed by the driver to
1848 * store custimer defined IRQ ALART level mode.
1849 * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid.
1850 */
1851 .platform_data = (void *)IRQF_TRIGGER_LOW,
1852 }, 2260 },
1853#endif 2261#endif
1854 2262
@@ -1856,12 +2264,56 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1856 { 2264 {
1857 I2C_BOARD_INFO("ad7417", 0xb), 2265 I2C_BOARD_INFO("ad7417", 0xb),
1858 .irq = IRQ_PG5, 2266 .irq = IRQ_PG5,
1859 /* 2267 .irq_flags = IRQF_TRIGGER_LOW,
1860 * platform_data pointer is borrwoed by the driver to 2268 .platform_data = (void *)GPIO_PF4,
1861 * store custimer defined IRQ ALART level mode. 2269 },
1862 * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid. 2270#endif
1863 */ 2271
1864 .platform_data = (void *)IRQF_TRIGGER_LOW, 2272#if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE)
2273 {
2274 I2C_BOARD_INFO("ade7854", 0x38),
2275 },
2276#endif
2277
2278#if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE)
2279 {
2280 I2C_BOARD_INFO("adt75", 0x9),
2281 .irq = IRQ_PG5,
2282 .irq_flags = IRQF_TRIGGER_LOW,
2283 },
2284#endif
2285
2286#if defined(CONFIG_ADT7408) || defined(CONFIG_ADT7408_MODULE)
2287 {
2288 I2C_BOARD_INFO("adt7408", 0x18),
2289 .irq = IRQ_PG5,
2290 .irq_flags = IRQF_TRIGGER_LOW,
2291 },
2292#endif
2293
2294#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2295 {
2296 I2C_BOARD_INFO("adt7410", 0x48),
2297 /* CT critical temperature event. line 0 */
2298 .irq = IRQ_PG5,
2299 .irq_flags = IRQF_TRIGGER_LOW,
2300 .platform_data = (void *)&adt7410_platform_data,
2301 },
2302#endif
2303
2304#if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE)
2305 {
2306 I2C_BOARD_INFO("ad7291", 0x20),
2307 .irq = IRQ_PG5,
2308 .irq_flags = IRQF_TRIGGER_LOW,
2309 },
2310#endif
2311
2312#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2313 {
2314 I2C_BOARD_INFO("adt7316", 0x48),
2315 .irq = IRQ_PG6,
2316 .platform_data = (void *)&adt7316_i2c_data,
1865 }, 2317 },
1866#endif 2318#endif
1867 2319
@@ -1917,7 +2369,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1917#endif 2369#endif
1918#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2370#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1919 { 2371 {
1920 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C), 2372 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F),
1921 }, 2373 },
1922#endif 2374#endif
1923#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 2375#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
@@ -1954,7 +2406,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1954#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2406#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
1955 { 2407 {
1956 I2C_BOARD_INFO("ad5398", 0xC), 2408 I2C_BOARD_INFO("ad5398", 0xC),
1957 .platform_data = (void *)&ad5398_i2c_platform_data, 2409 .platform_data = (void *)&ad5398_regulator_data,
1958 }, 2410 },
1959#endif 2411#endif
1960#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2412#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
@@ -1963,6 +2415,16 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1963 .platform_data = (void *)&adp8860_pdata, 2415 .platform_data = (void *)&adp8860_pdata,
1964 }, 2416 },
1965#endif 2417#endif
2418#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE)
2419 {
2420 I2C_BOARD_INFO("adau1373", 0x1A),
2421 },
2422#endif
2423#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
2424 {
2425 I2C_BOARD_INFO("ad5252", 0x2e),
2426 },
2427#endif
1966}; 2428};
1967 2429
1968#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2430#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -2147,50 +2609,38 @@ static struct platform_device bfin_ac97 = {
2147}; 2609};
2148#endif 2610#endif
2149 2611
2150#if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) 2612#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2151#define REGULATOR_ADP122 "adp122" 2613#define REGULATOR_ADP122 "adp122"
2152#define REGULATOR_ADP150 "adp150" 2614#define REGULATOR_ADP122_UV 2500000
2153 2615
2154static struct regulator_consumer_supply adp122_consumers = { 2616static struct regulator_consumer_supply adp122_consumers = {
2155 .supply = REGULATOR_ADP122, 2617 .supply = REGULATOR_ADP122,
2156}; 2618};
2157 2619
2158static struct regulator_consumer_supply adp150_consumers = { 2620static struct regulator_init_data adp_switch_regulator_data = {
2159 .supply = REGULATOR_ADP150, 2621 .constraints = {
2160}; 2622 .name = REGULATOR_ADP122,
2161 2623 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2162static struct regulator_init_data adp_switch_regulator_data[] = { 2624 .min_uV = REGULATOR_ADP122_UV,
2163 { 2625 .max_uV = REGULATOR_ADP122_UV,
2164 .constraints = { 2626 .min_uA = 0,
2165 .name = REGULATOR_ADP122, 2627 .max_uA = 300000,
2166 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2167 .min_uA = 0,
2168 .max_uA = 300000,
2169 },
2170 .num_consumer_supplies = 1, /* only 1 */
2171 .consumer_supplies = &adp122_consumers,
2172 .driver_data = (void *)GPIO_PF2, /* gpio port only */
2173 },
2174 {
2175 .constraints = {
2176 .name = REGULATOR_ADP150,
2177 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2178 .min_uA = 0,
2179 .max_uA = 150000,
2180 },
2181 .num_consumer_supplies = 1, /* only 1 */
2182 .consumer_supplies = &adp150_consumers,
2183 .driver_data = (void *)GPIO_PF3, /* gpio port only */
2184 }, 2628 },
2629 .num_consumer_supplies = 1, /* only 1 */
2630 .consumer_supplies = &adp122_consumers,
2185}; 2631};
2186 2632
2187static struct adp_switch_platform_data adp_switch_pdata = { 2633static struct fixed_voltage_config adp_switch_pdata = {
2188 .regulator_num = ARRAY_SIZE(adp_switch_regulator_data), 2634 .supply_name = REGULATOR_ADP122,
2189 .regulator_data = adp_switch_regulator_data, 2635 .microvolts = REGULATOR_ADP122_UV,
2636 .gpio = GPIO_PF2,
2637 .enable_high = 1,
2638 .enabled_at_boot = 0,
2639 .init_data = &adp_switch_regulator_data,
2190}; 2640};
2191 2641
2192static struct platform_device adp_switch_device = { 2642static struct platform_device adp_switch_device = {
2193 .name = "adp_switch", 2643 .name = "reg-fixed-voltage",
2194 .id = 0, 2644 .id = 0,
2195 .dev = { 2645 .dev = {
2196 .platform_data = &adp_switch_pdata, 2646 .platform_data = &adp_switch_pdata,
@@ -2216,27 +2666,26 @@ static struct platform_device adp122_userspace_consumer_device = {
2216 .platform_data = &adp122_userspace_comsumer_data, 2666 .platform_data = &adp122_userspace_comsumer_data,
2217 }, 2667 },
2218}; 2668};
2669#endif
2670#endif
2219 2671
2220static struct regulator_bulk_data adp150_bulk_data = { 2672#if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2221 .supply = REGULATOR_ADP150, 2673 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2222};
2223 2674
2224static struct regulator_userspace_consumer_data adp150_userspace_comsumer_data = { 2675static struct resource iio_gpio_trigger_resources[] = {
2225 .name = REGULATOR_ADP150, 2676 [0] = {
2226 .num_supplies = 1, 2677 .start = IRQ_PF5,
2227 .supplies = &adp150_bulk_data, 2678 .end = IRQ_PF5,
2679 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
2680 },
2228}; 2681};
2229 2682
2230static struct platform_device adp150_userspace_consumer_device = { 2683static struct platform_device iio_gpio_trigger = {
2231 .name = "reg-userspace-consumer", 2684 .name = "iio_gpio_trigger",
2232 .id = 1, 2685 .num_resources = ARRAY_SIZE(iio_gpio_trigger_resources),
2233 .dev = { 2686 .resource = iio_gpio_trigger_resources,
2234 .platform_data = &adp150_userspace_comsumer_data,
2235 },
2236}; 2687};
2237#endif 2688#endif
2238#endif
2239
2240 2689
2241static struct platform_device *stamp_devices[] __initdata = { 2690static struct platform_device *stamp_devices[] __initdata = {
2242 2691
@@ -2369,14 +2818,18 @@ static struct platform_device *stamp_devices[] __initdata = {
2369#endif 2818#endif
2370#endif 2819#endif
2371 2820
2372#if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) 2821#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2373 &adp_switch_device, 2822 &adp_switch_device,
2374#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2823#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2375 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2824 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2376 &adp122_userspace_consumer_device, 2825 &adp122_userspace_consumer_device,
2377 &adp150_userspace_consumer_device,
2378#endif 2826#endif
2379#endif 2827#endif
2828
2829#if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2830 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2831 &iio_gpio_trigger,
2832#endif
2380}; 2833};
2381 2834
2382static int __init stamp_init(void) 2835static int __init stamp_init(void)