Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 2 | * Copyright 2004-2009 Analog Devices Inc. |
| 3 | * 2005 National ICT Australia (NICTA) |
| 4 | * Aidan Williams <aidan@nicta.com.au> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 5 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 6 | * Licensed under the GPL-2 or later. |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <linux/device.h> |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 10 | #include <linux/kernel.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 11 | #include <linux/platform_device.h> |
Barry Song | 6e36475 | 2009-09-29 03:01:40 +0000 | [diff] [blame] | 12 | #include <linux/io.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 13 | #include <linux/mtd/mtd.h> |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 14 | #include <linux/mtd/nand.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 15 | #include <linux/mtd/partitions.h> |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 16 | #include <linux/mtd/plat-ram.h> |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 17 | #include <linux/mtd/physmap.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 18 | #include <linux/spi/spi.h> |
| 19 | #include <linux/spi/flash.h> |
| 20 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
Mike Frysinger | f02bcec | 2007-11-15 21:29:15 +0800 | [diff] [blame] | 21 | #include <linux/usb/isp1362.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 22 | #endif |
Sonic Zhang | 7a9cc48 | 2009-12-22 04:47:04 +0000 | [diff] [blame] | 23 | #include <linux/i2c.h> |
| 24 | #include <linux/i2c/adp5588.h> |
Mike Frysinger | 0531c46 | 2010-01-19 07:04:29 +0000 | [diff] [blame] | 25 | #include <linux/etherdevice.h> |
Jeff Garzik | 0a87e3e | 2008-02-01 18:02:30 -0500 | [diff] [blame] | 26 | #include <linux/ata_platform.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 27 | #include <linux/irq.h> |
| 28 | #include <linux/interrupt.h> |
David Brownell | 27f5d75 | 2007-10-04 18:06:16 -0700 | [diff] [blame] | 29 | #include <linux/usb/sl811.h> |
Yi Li | f79ea4c | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 30 | #include <linux/spi/mmc_spi.h> |
Michael Hennerich | 78756c6 | 2009-10-13 15:28:33 +0000 | [diff] [blame] | 31 | #include <linux/leds.h> |
| 32 | #include <linux/input.h> |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 33 | #include <asm/dma.h> |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 34 | #include <asm/bfin5xx_spi.h> |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 35 | #include <asm/reboot.h> |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 36 | #include <asm/portmux.h> |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 37 | #include <asm/dpmc.h> |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 38 | #include <asm/bfin_sport.h> |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 39 | #ifdef CONFIG_REGULATOR_FIXED_VOLTAGE |
| 40 | #include <linux/regulator/fixed.h> |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 41 | #endif |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 42 | #include <linux/regulator/machine.h> |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 43 | #include <linux/regulator/consumer.h> |
| 44 | #include <linux/regulator/userspace-consumer.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 45 | |
| 46 | /* |
| 47 | * Name the Board for the /proc/cpuinfo |
| 48 | */ |
Mike Frysinger | fe85cad | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 49 | const char bfin_board_name[] = "ADI BF537-STAMP"; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | |
| 51 | /* |
| 52 | * Driver needs to know address, irq and flag pin. |
| 53 | */ |
| 54 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 55 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 56 | #include <linux/usb/isp1760.h> |
| 57 | static struct resource bfin_isp1760_resources[] = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 58 | [0] = { |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 59 | .start = 0x203C0000, |
| 60 | .end = 0x203C0000 + 0x000fffff, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 61 | .flags = IORESOURCE_MEM, |
| 62 | }, |
| 63 | [1] = { |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 64 | .start = IRQ_PF7, |
| 65 | .end = IRQ_PF7, |
Michael Hennerich | 6a6be3d | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 66 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 67 | }, |
| 68 | }; |
| 69 | |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 70 | static struct isp1760_platform_data isp1760_priv = { |
| 71 | .is_isp1761 = 0, |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 72 | .bus_width_16 = 1, |
| 73 | .port1_otg = 0, |
| 74 | .analog_oc = 0, |
| 75 | .dack_polarity_high = 0, |
| 76 | .dreq_polarity_high = 0, |
| 77 | }; |
| 78 | |
| 79 | static struct platform_device bfin_isp1760_device = { |
Michael Hennerich | c6feb768 | 2009-10-15 10:37:33 +0000 | [diff] [blame] | 80 | .name = "isp1760", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 81 | .id = 0, |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 82 | .dev = { |
| 83 | .platform_data = &isp1760_priv, |
| 84 | }, |
| 85 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), |
| 86 | .resource = bfin_isp1760_resources, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 87 | }; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 88 | #endif |
| 89 | |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 90 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 91 | #include <linux/gpio_keys.h> |
| 92 | |
| 93 | static struct gpio_keys_button bfin_gpio_keys_table[] = { |
| 94 | {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"}, |
| 95 | {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"}, |
| 96 | {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"}, |
| 97 | {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"}, |
| 98 | }; |
| 99 | |
| 100 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { |
| 101 | .buttons = bfin_gpio_keys_table, |
| 102 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), |
| 103 | }; |
| 104 | |
| 105 | static struct platform_device bfin_device_gpiokeys = { |
| 106 | .name = "gpio-keys", |
| 107 | .dev = { |
| 108 | .platform_data = &bfin_gpio_keys_data, |
| 109 | }, |
| 110 | }; |
| 111 | #endif |
| 112 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 113 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) |
| 114 | static struct resource bfin_pcmcia_cf_resources[] = { |
| 115 | { |
| 116 | .start = 0x20310000, /* IO PORT */ |
| 117 | .end = 0x20312000, |
| 118 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 119 | }, { |
Simon Arlott | d2d50aa | 2007-06-11 15:31:30 +0800 | [diff] [blame] | 120 | .start = 0x20311000, /* Attribute Memory */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 121 | .end = 0x20311FFF, |
| 122 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 123 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 124 | .start = IRQ_PF4, |
| 125 | .end = IRQ_PF4, |
| 126 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 127 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 128 | .start = 6, /* Card Detect PF6 */ |
| 129 | .end = 6, |
| 130 | .flags = IORESOURCE_IRQ, |
| 131 | }, |
| 132 | }; |
| 133 | |
| 134 | static struct platform_device bfin_pcmcia_cf_device = { |
| 135 | .name = "bfin_cf_pcmcia", |
| 136 | .id = -1, |
| 137 | .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources), |
| 138 | .resource = bfin_pcmcia_cf_resources, |
| 139 | }; |
| 140 | #endif |
| 141 | |
| 142 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 143 | static struct platform_device rtc_device = { |
| 144 | .name = "rtc-bfin", |
| 145 | .id = -1, |
| 146 | }; |
| 147 | #endif |
| 148 | |
| 149 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 150 | #include <linux/smc91x.h> |
| 151 | |
| 152 | static struct smc91x_platdata smc91x_info = { |
| 153 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
| 154 | .leda = RPC_LED_100_10, |
| 155 | .ledb = RPC_LED_TX_RX, |
| 156 | }; |
| 157 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 158 | static struct resource smc91x_resources[] = { |
| 159 | { |
| 160 | .name = "smc91x-regs", |
| 161 | .start = 0x20300300, |
| 162 | .end = 0x20300300 + 16, |
| 163 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 164 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 165 | |
| 166 | .start = IRQ_PF7, |
| 167 | .end = IRQ_PF7, |
| 168 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 169 | }, |
| 170 | }; |
| 171 | static struct platform_device smc91x_device = { |
| 172 | .name = "smc91x", |
| 173 | .id = 0, |
| 174 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 175 | .resource = smc91x_resources, |
Michael Hennerich | 61f09b5 | 2009-07-24 08:48:31 +0000 | [diff] [blame] | 176 | .dev = { |
| 177 | .platform_data = &smc91x_info, |
| 178 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 179 | }; |
| 180 | #endif |
| 181 | |
Alex Landau | f40d24d | 2007-07-12 12:11:48 +0800 | [diff] [blame] | 182 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) |
| 183 | static struct resource dm9000_resources[] = { |
| 184 | [0] = { |
| 185 | .start = 0x203FB800, |
Barry Song | b3dec4a | 2009-07-27 06:42:50 +0000 | [diff] [blame] | 186 | .end = 0x203FB800 + 1, |
Alex Landau | f40d24d | 2007-07-12 12:11:48 +0800 | [diff] [blame] | 187 | .flags = IORESOURCE_MEM, |
| 188 | }, |
| 189 | [1] = { |
Barry Song | b3dec4a | 2009-07-27 06:42:50 +0000 | [diff] [blame] | 190 | .start = 0x203FB804, |
| 191 | .end = 0x203FB804 + 1, |
| 192 | .flags = IORESOURCE_MEM, |
| 193 | }, |
| 194 | [2] = { |
Alex Landau | f40d24d | 2007-07-12 12:11:48 +0800 | [diff] [blame] | 195 | .start = IRQ_PF9, |
| 196 | .end = IRQ_PF9, |
| 197 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), |
| 198 | }, |
| 199 | }; |
| 200 | |
| 201 | static struct platform_device dm9000_device = { |
| 202 | .name = "dm9000", |
| 203 | .id = -1, |
| 204 | .num_resources = ARRAY_SIZE(dm9000_resources), |
| 205 | .resource = dm9000_resources, |
| 206 | }; |
| 207 | #endif |
| 208 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 209 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) |
| 210 | static struct resource sl811_hcd_resources[] = { |
| 211 | { |
| 212 | .start = 0x20340000, |
| 213 | .end = 0x20340000, |
| 214 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 215 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 216 | .start = 0x20340004, |
| 217 | .end = 0x20340004, |
| 218 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 219 | }, { |
Mike Frysinger | 0121865 | 2009-12-21 15:07:43 +0000 | [diff] [blame] | 220 | .start = IRQ_PF4, |
| 221 | .end = IRQ_PF4, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 222 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 223 | }, |
| 224 | }; |
| 225 | |
| 226 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) |
| 227 | void sl811_port_power(struct device *dev, int is_on) |
| 228 | { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 229 | gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); |
Michael Hennerich | acbcd26 | 2008-01-22 18:36:20 +0800 | [diff] [blame] | 230 | gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 231 | } |
| 232 | #endif |
| 233 | |
| 234 | static struct sl811_platform_data sl811_priv = { |
| 235 | .potpg = 10, |
| 236 | .power = 250, /* == 500mA */ |
| 237 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) |
| 238 | .port_power = &sl811_port_power, |
| 239 | #endif |
| 240 | }; |
| 241 | |
| 242 | static struct platform_device sl811_hcd_device = { |
| 243 | .name = "sl811-hcd", |
| 244 | .id = 0, |
| 245 | .dev = { |
| 246 | .platform_data = &sl811_priv, |
| 247 | }, |
| 248 | .num_resources = ARRAY_SIZE(sl811_hcd_resources), |
| 249 | .resource = sl811_hcd_resources, |
| 250 | }; |
| 251 | #endif |
| 252 | |
| 253 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 254 | static struct resource isp1362_hcd_resources[] = { |
| 255 | { |
| 256 | .start = 0x20360000, |
| 257 | .end = 0x20360000, |
| 258 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 259 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 260 | .start = 0x20360004, |
| 261 | .end = 0x20360004, |
| 262 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 263 | }, { |
Mike Frysinger | 21b03cf | 2009-09-24 05:44:36 +0000 | [diff] [blame] | 264 | .start = IRQ_PF3, |
| 265 | .end = IRQ_PF3, |
Michael Hennerich | 9e75894 | 2010-03-18 12:51:49 +0000 | [diff] [blame] | 266 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 267 | }, |
| 268 | }; |
| 269 | |
| 270 | static struct isp1362_platform_data isp1362_priv = { |
| 271 | .sel15Kres = 1, |
| 272 | .clknotstop = 0, |
| 273 | .oc_enable = 0, |
| 274 | .int_act_high = 0, |
| 275 | .int_edge_triggered = 0, |
| 276 | .remote_wakeup_connected = 0, |
| 277 | .no_power_switching = 1, |
| 278 | .power_switching_mode = 0, |
| 279 | }; |
| 280 | |
| 281 | static struct platform_device isp1362_hcd_device = { |
| 282 | .name = "isp1362-hcd", |
| 283 | .id = 0, |
| 284 | .dev = { |
| 285 | .platform_data = &isp1362_priv, |
| 286 | }, |
| 287 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), |
| 288 | .resource = isp1362_hcd_resources, |
| 289 | }; |
| 290 | #endif |
| 291 | |
Barry Song | 706a01b | 2009-11-02 07:29:07 +0000 | [diff] [blame] | 292 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 293 | static unsigned short bfin_can_peripherals[] = { |
Barry Song | 706a01b | 2009-11-02 07:29:07 +0000 | [diff] [blame] | 294 | P_CAN0_RX, P_CAN0_TX, 0 |
| 295 | }; |
| 296 | |
| 297 | static struct resource bfin_can_resources[] = { |
| 298 | { |
| 299 | .start = 0xFFC02A00, |
| 300 | .end = 0xFFC02FFF, |
| 301 | .flags = IORESOURCE_MEM, |
| 302 | }, |
| 303 | { |
| 304 | .start = IRQ_CAN_RX, |
| 305 | .end = IRQ_CAN_RX, |
| 306 | .flags = IORESOURCE_IRQ, |
| 307 | }, |
| 308 | { |
| 309 | .start = IRQ_CAN_TX, |
| 310 | .end = IRQ_CAN_TX, |
| 311 | .flags = IORESOURCE_IRQ, |
| 312 | }, |
| 313 | { |
| 314 | .start = IRQ_CAN_ERROR, |
| 315 | .end = IRQ_CAN_ERROR, |
| 316 | .flags = IORESOURCE_IRQ, |
| 317 | }, |
| 318 | }; |
| 319 | |
| 320 | static struct platform_device bfin_can_device = { |
| 321 | .name = "bfin_can", |
| 322 | .num_resources = ARRAY_SIZE(bfin_can_resources), |
| 323 | .resource = bfin_can_resources, |
| 324 | .dev = { |
| 325 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ |
| 326 | }, |
| 327 | }; |
| 328 | #endif |
| 329 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 330 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 331 | #include <linux/bfin_mac.h> |
| 332 | static const unsigned short bfin_mac_peripherals[] = P_MII0; |
| 333 | |
| 334 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
| 335 | { |
| 336 | .addr = 1, |
| 337 | .irq = PHY_POLL, /* IRQ_MAC_PHYINT */ |
| 338 | }, |
| 339 | }; |
| 340 | |
| 341 | static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { |
| 342 | .phydev_number = 1, |
| 343 | .phydev_data = bfin_phydev_data, |
| 344 | .phy_mode = PHY_INTERFACE_MODE_MII, |
| 345 | .mac_peripherals = bfin_mac_peripherals, |
| 346 | }; |
| 347 | |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 348 | static struct platform_device bfin_mii_bus = { |
| 349 | .name = "bfin_mii_bus", |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 350 | .dev = { |
| 351 | .platform_data = &bfin_mii_bus_data, |
| 352 | } |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 353 | }; |
| 354 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 355 | static struct platform_device bfin_mac_device = { |
| 356 | .name = "bfin_mac", |
Sonic Zhang | 02460d0 | 2010-06-11 10:44:22 +0000 | [diff] [blame] | 357 | .dev = { |
| 358 | .platform_data = &bfin_mii_bus, |
| 359 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 360 | }; |
| 361 | #endif |
| 362 | |
| 363 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 364 | static struct resource net2272_bfin_resources[] = { |
| 365 | { |
| 366 | .start = 0x20300000, |
| 367 | .end = 0x20300000 + 0x100, |
| 368 | .flags = IORESOURCE_MEM, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 369 | }, { |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 370 | .start = 1, |
| 371 | .flags = IORESOURCE_BUS, |
| 372 | }, { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 373 | .start = IRQ_PF7, |
| 374 | .end = IRQ_PF7, |
| 375 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 376 | }, |
| 377 | }; |
| 378 | |
| 379 | static struct platform_device net2272_bfin_device = { |
| 380 | .name = "net2272", |
| 381 | .id = -1, |
| 382 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), |
| 383 | .resource = net2272_bfin_resources, |
| 384 | }; |
| 385 | #endif |
| 386 | |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 387 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 388 | const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; |
| 389 | |
| 390 | static struct mtd_partition bfin_plat_nand_partitions[] = { |
| 391 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 392 | .name = "linux kernel(nand)", |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 393 | .size = 0x400000, |
| 394 | .offset = 0, |
| 395 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 396 | .name = "file system(nand)", |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 397 | .size = MTDPART_SIZ_FULL, |
| 398 | .offset = MTDPART_OFS_APPEND, |
| 399 | }, |
| 400 | }; |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 401 | |
| 402 | #define BFIN_NAND_PLAT_CLE 2 |
| 403 | #define BFIN_NAND_PLAT_ALE 1 |
| 404 | static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) |
| 405 | { |
| 406 | struct nand_chip *this = mtd->priv; |
| 407 | |
| 408 | if (cmd == NAND_CMD_NONE) |
| 409 | return; |
| 410 | |
| 411 | if (ctrl & NAND_CLE) |
| 412 | writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE)); |
| 413 | else |
| 414 | writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE)); |
| 415 | } |
| 416 | |
| 417 | #define BFIN_NAND_PLAT_READY GPIO_PF3 |
| 418 | static int bfin_plat_nand_dev_ready(struct mtd_info *mtd) |
| 419 | { |
| 420 | return gpio_get_value(BFIN_NAND_PLAT_READY); |
| 421 | } |
| 422 | |
| 423 | static struct platform_nand_data bfin_plat_nand_data = { |
| 424 | .chip = { |
Marek Vasut | ef56609 | 2010-08-12 03:53:54 +0100 | [diff] [blame] | 425 | .nr_chips = 1, |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 426 | .chip_delay = 30, |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 427 | .part_probe_types = part_probes, |
| 428 | .partitions = bfin_plat_nand_partitions, |
| 429 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 430 | }, |
| 431 | .ctrl = { |
| 432 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, |
| 433 | .dev_ready = bfin_plat_nand_dev_ready, |
| 434 | }, |
| 435 | }; |
| 436 | |
| 437 | #define MAX(x, y) (x > y ? x : y) |
| 438 | static struct resource bfin_plat_nand_resources = { |
| 439 | .start = 0x20212000, |
| 440 | .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)), |
Mike Frysinger | 67d9963 | 2010-03-16 14:28:44 +0000 | [diff] [blame] | 441 | .flags = IORESOURCE_MEM, |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 442 | }; |
| 443 | |
| 444 | static struct platform_device bfin_async_nand_device = { |
| 445 | .name = "gen_nand", |
| 446 | .id = -1, |
| 447 | .num_resources = 1, |
| 448 | .resource = &bfin_plat_nand_resources, |
| 449 | .dev = { |
| 450 | .platform_data = &bfin_plat_nand_data, |
| 451 | }, |
| 452 | }; |
| 453 | |
| 454 | static void bfin_plat_nand_init(void) |
| 455 | { |
| 456 | gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat"); |
| 457 | } |
| 458 | #else |
| 459 | static void bfin_plat_nand_init(void) {} |
| 460 | #endif |
| 461 | |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 462 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 463 | static struct mtd_partition stamp_partitions[] = { |
| 464 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 465 | .name = "bootloader(nor)", |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 466 | .size = 0x40000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 467 | .offset = 0, |
| 468 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 469 | .name = "linux kernel(nor)", |
Grace Pan | 6ecb5b6 | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 470 | .size = 0x180000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 471 | .offset = MTDPART_OFS_APPEND, |
| 472 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 473 | .name = "file system(nor)", |
Grace Pan | 6ecb5b6 | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 474 | .size = 0x400000 - 0x40000 - 0x180000 - 0x10000, |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 475 | .offset = MTDPART_OFS_APPEND, |
| 476 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 477 | .name = "MAC Address(nor)", |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 478 | .size = MTDPART_SIZ_FULL, |
| 479 | .offset = 0x3F0000, |
| 480 | .mask_flags = MTD_WRITEABLE, |
| 481 | } |
| 482 | }; |
| 483 | |
| 484 | static struct physmap_flash_data stamp_flash_data = { |
| 485 | .width = 2, |
| 486 | .parts = stamp_partitions, |
| 487 | .nr_parts = ARRAY_SIZE(stamp_partitions), |
Barry Song | 38e7673 | 2010-01-15 03:24:39 +0000 | [diff] [blame] | 488 | #ifdef CONFIG_ROMKERNEL |
| 489 | .probe_type = "map_rom", |
| 490 | #endif |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 491 | }; |
| 492 | |
| 493 | static struct resource stamp_flash_resource = { |
| 494 | .start = 0x20000000, |
| 495 | .end = 0x203fffff, |
| 496 | .flags = IORESOURCE_MEM, |
| 497 | }; |
| 498 | |
| 499 | static struct platform_device stamp_flash_device = { |
| 500 | .name = "physmap-flash", |
| 501 | .id = 0, |
| 502 | .dev = { |
| 503 | .platform_data = &stamp_flash_data, |
| 504 | }, |
| 505 | .num_resources = 1, |
| 506 | .resource = &stamp_flash_resource, |
| 507 | }; |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 508 | #endif |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 509 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 510 | #if defined(CONFIG_MTD_M25P80) \ |
| 511 | || defined(CONFIG_MTD_M25P80_MODULE) |
| 512 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
| 513 | { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 514 | .name = "bootloader(spi)", |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 515 | .size = 0x00040000, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 516 | .offset = 0, |
| 517 | .mask_flags = MTD_CAP_ROM |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 518 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 519 | .name = "linux kernel(spi)", |
Grace Pan | 6ecb5b6 | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 520 | .size = 0x180000, |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 521 | .offset = MTDPART_OFS_APPEND, |
Mike Frysinger | 1f83b8f | 2007-07-12 22:58:21 +0800 | [diff] [blame] | 522 | }, { |
Robin Getz | aa58297 | 2008-08-05 17:47:29 +0800 | [diff] [blame] | 523 | .name = "file system(spi)", |
Mike Frysinger | edf0564 | 2008-02-25 11:38:11 +0800 | [diff] [blame] | 524 | .size = MTDPART_SIZ_FULL, |
| 525 | .offset = MTDPART_OFS_APPEND, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 526 | } |
| 527 | }; |
| 528 | |
| 529 | static struct flash_platform_data bfin_spi_flash_data = { |
| 530 | .name = "m25p80", |
| 531 | .parts = bfin_spi_flash_partitions, |
| 532 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), |
Michael Hennerich | 88a8078 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 533 | /* .type = "m25p64", */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 534 | }; |
| 535 | |
| 536 | /* SPI flash chip (m25p64) */ |
| 537 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
| 538 | .enable_dma = 0, /* use dma transfer with this chip*/ |
Yi Li | a65912c | 2010-04-06 05:53:16 +0000 | [diff] [blame] | 539 | }; |
| 540 | #endif |
| 541 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 542 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 543 | #include <linux/input/ad714x.h> |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 544 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 545 | static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 546 | { |
| 547 | .start_stage = 0, |
| 548 | .end_stage = 7, |
| 549 | .max_coord = 128, |
| 550 | }, |
| 551 | }; |
| 552 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 553 | static struct ad714x_button_plat ad7147_spi_button_plat[] = { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 554 | { |
| 555 | .keycode = BTN_FORWARD, |
| 556 | .l_mask = 0, |
| 557 | .h_mask = 0x600, |
| 558 | }, |
| 559 | { |
| 560 | .keycode = BTN_LEFT, |
| 561 | .l_mask = 0, |
| 562 | .h_mask = 0x500, |
| 563 | }, |
| 564 | { |
| 565 | .keycode = BTN_MIDDLE, |
| 566 | .l_mask = 0, |
| 567 | .h_mask = 0x800, |
| 568 | }, |
| 569 | { |
| 570 | .keycode = BTN_RIGHT, |
| 571 | .l_mask = 0x100, |
| 572 | .h_mask = 0x400, |
| 573 | }, |
| 574 | { |
| 575 | .keycode = BTN_BACK, |
| 576 | .l_mask = 0x200, |
| 577 | .h_mask = 0x400, |
| 578 | }, |
| 579 | }; |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 580 | static struct ad714x_platform_data ad7147_spi_platform_data = { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 581 | .slider_num = 1, |
| 582 | .button_num = 5, |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 583 | .slider = ad7147_spi_slider_plat, |
| 584 | .button = ad7147_spi_button_plat, |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 585 | .stage_cfg_reg = { |
| 586 | {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600}, |
| 587 | {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 588 | {0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 589 | {0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 590 | {0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 591 | {0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 592 | {0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650}, |
| 593 | {0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600}, |
| 594 | {0xFF7B, 0x3FFF, 0x506, 0x2626, 1100, 1100, 1150, 1150}, |
| 595 | {0xFDFE, 0x3FFF, 0x606, 0x2626, 1100, 1100, 1150, 1150}, |
| 596 | {0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300}, |
| 597 | {0xFFEF, 0x1FFF, 0x0, 0x2626, 1100, 1100, 1150, 1150}, |
| 598 | }, |
| 599 | .sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0}, |
| 600 | }; |
| 601 | #endif |
| 602 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 603 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 604 | #include <linux/input/ad714x.h> |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 605 | static struct ad714x_button_plat ad7142_i2c_button_plat[] = { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 606 | { |
| 607 | .keycode = BTN_1, |
| 608 | .l_mask = 0, |
| 609 | .h_mask = 0x1, |
| 610 | }, |
| 611 | { |
| 612 | .keycode = BTN_2, |
| 613 | .l_mask = 0, |
| 614 | .h_mask = 0x2, |
| 615 | }, |
| 616 | { |
| 617 | .keycode = BTN_3, |
| 618 | .l_mask = 0, |
| 619 | .h_mask = 0x4, |
| 620 | }, |
| 621 | { |
| 622 | .keycode = BTN_4, |
| 623 | .l_mask = 0x0, |
| 624 | .h_mask = 0x8, |
| 625 | }, |
| 626 | }; |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 627 | static struct ad714x_platform_data ad7142_i2c_platform_data = { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 628 | .button_num = 4, |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 629 | .button = ad7142_i2c_button_plat, |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 630 | .stage_cfg_reg = { |
| 631 | /* fixme: figure out right setting for all comoponent according |
| 632 | * to hardware feature of EVAL-AD7142EB board */ |
| 633 | {0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A}, |
| 634 | {0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A}, |
| 635 | {0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A}, |
| 636 | {0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A}, |
| 637 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 638 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 639 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 640 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 641 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 642 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 643 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 644 | {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320}, |
| 645 | }, |
| 646 | .sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0}, |
| 647 | }; |
| 648 | #endif |
| 649 | |
Graf Yang | f5f9531 | 2010-02-10 07:15:59 +0000 | [diff] [blame] | 650 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) |
| 651 | static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { |
| 652 | .enable_dma = 0, |
Graf Yang | f5f9531 | 2010-02-10 07:15:59 +0000 | [diff] [blame] | 653 | }; |
| 654 | #endif |
| 655 | |
Graf Yang | df6a949 | 2010-02-21 10:23:07 +0000 | [diff] [blame] | 656 | #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 657 | static unsigned short ad2s120x_platform_data[] = { |
Graf Yang | df6a949 | 2010-02-21 10:23:07 +0000 | [diff] [blame] | 658 | /* used as SAMPLE and RDVEL */ |
| 659 | GPIO_PF5, GPIO_PF6, 0 |
| 660 | }; |
| 661 | |
| 662 | static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { |
| 663 | .enable_dma = 0, |
Graf Yang | df6a949 | 2010-02-21 10:23:07 +0000 | [diff] [blame] | 664 | }; |
| 665 | #endif |
| 666 | |
Graf Yang | 848c51c | 2010-02-26 11:49:52 +0000 | [diff] [blame] | 667 | #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 668 | static unsigned short ad2s1210_platform_data[] = { |
Graf Yang | 848c51c | 2010-02-26 11:49:52 +0000 | [diff] [blame] | 669 | /* use as SAMPLE, A0, A1 */ |
| 670 | GPIO_PF7, GPIO_PF8, GPIO_PF9, |
| 671 | # if defined(CONFIG_AD2S1210_GPIO_INPUT) || defined(CONFIG_AD2S1210_GPIO_OUTPUT) |
| 672 | /* the RES0 and RES1 pins */ |
| 673 | GPIO_PF4, GPIO_PF5, |
| 674 | # endif |
| 675 | 0, |
| 676 | }; |
| 677 | |
| 678 | static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { |
| 679 | .enable_dma = 0, |
Graf Yang | 848c51c | 2010-02-26 11:49:52 +0000 | [diff] [blame] | 680 | }; |
| 681 | #endif |
| 682 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 683 | #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) |
| 684 | static struct bfin5xx_spi_chip ad7314_spi_chip_info = { |
| 685 | .enable_dma = 0, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 686 | }; |
| 687 | #endif |
| 688 | |
| 689 | #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) |
| 690 | static unsigned short ad7816_platform_data[] = { |
| 691 | GPIO_PF4, /* rdwr_pin */ |
| 692 | GPIO_PF5, /* convert_pin */ |
| 693 | GPIO_PF7, /* busy_pin */ |
| 694 | 0, |
| 695 | }; |
| 696 | |
| 697 | static struct bfin5xx_spi_chip ad7816_spi_chip_info = { |
| 698 | .enable_dma = 0, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 699 | }; |
| 700 | #endif |
| 701 | |
| 702 | #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) |
| 703 | static unsigned long adt7310_platform_data[3] = { |
| 704 | /* INT bound temperature alarm event. line 1 */ |
| 705 | IRQ_PG4, IRQF_TRIGGER_LOW, |
| 706 | /* CT bound temperature alarm event irq_flags. line 0 */ |
| 707 | IRQF_TRIGGER_LOW, |
| 708 | }; |
| 709 | |
| 710 | static struct bfin5xx_spi_chip adt7310_spi_chip_info = { |
| 711 | .enable_dma = 0, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 712 | }; |
| 713 | #endif |
| 714 | |
| 715 | #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) |
| 716 | static unsigned short ad7298_platform_data[] = { |
| 717 | GPIO_PF7, /* busy_pin */ |
| 718 | 0, |
| 719 | }; |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 720 | #endif |
| 721 | |
| 722 | #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) |
| 723 | static unsigned long adt7316_spi_data[2] = { |
| 724 | IRQF_TRIGGER_LOW, /* interrupt flags */ |
| 725 | GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ |
| 726 | }; |
| 727 | |
| 728 | static struct bfin5xx_spi_chip adt7316_spi_chip_info = { |
| 729 | .enable_dma = 0, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 730 | }; |
| 731 | #endif |
| 732 | |
Yi Li | f79ea4c | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 733 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
| 734 | #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 |
| 735 | |
| 736 | static int bfin_mmc_spi_init(struct device *dev, |
| 737 | irqreturn_t (*detect_int)(int, void *), void *data) |
| 738 | { |
| 739 | return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int, |
| 740 | IRQF_TRIGGER_FALLING, "mmc-spi-detect", data); |
| 741 | } |
| 742 | |
| 743 | static void bfin_mmc_spi_exit(struct device *dev, void *data) |
| 744 | { |
| 745 | free_irq(MMC_SPI_CARD_DETECT_INT, data); |
| 746 | } |
| 747 | |
| 748 | static struct mmc_spi_platform_data bfin_mmc_spi_pdata = { |
| 749 | .init = bfin_mmc_spi_init, |
| 750 | .exit = bfin_mmc_spi_exit, |
| 751 | .detect_delay = 100, /* msecs */ |
| 752 | }; |
| 753 | |
| 754 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
| 755 | .enable_dma = 0, |
Yi Li | e68d1eb | 2009-06-03 09:46:22 +0000 | [diff] [blame] | 756 | .pio_interrupt = 0, |
Yi Li | f79ea4c | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 757 | }; |
| 758 | #endif |
| 759 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 760 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 761 | #include <linux/spi/ad7877.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 762 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
| 763 | .model = 7877, |
| 764 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
| 765 | .x_plate_ohms = 419, |
| 766 | .y_plate_ohms = 486, |
| 767 | .pressure_max = 1000, |
| 768 | .pressure_min = 0, |
Michael Hennerich | 6ba255f | 2009-12-08 11:34:07 +0000 | [diff] [blame] | 769 | .stopacq_polarity = 1, |
| 770 | .first_conversion_delay = 3, |
| 771 | .acquisition_time = 1, |
| 772 | .averaging = 1, |
| 773 | .pen_down_acc_interval = 1, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 774 | }; |
| 775 | #endif |
| 776 | |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 777 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) |
| 778 | #include <linux/spi/ad7879.h> |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 779 | static const struct ad7879_platform_data bfin_ad7879_ts_info = { |
| 780 | .model = 7879, /* Model = AD7879 */ |
| 781 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ |
| 782 | .pressure_max = 10000, |
| 783 | .pressure_min = 0, |
Michael Hennerich | 6ba255f | 2009-12-08 11:34:07 +0000 | [diff] [blame] | 784 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ |
| 785 | .acquisition_time = 1, /* 4us acquisition time per sample */ |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 786 | .median = 2, /* do 8 measurements */ |
Michael Hennerich | 6ba255f | 2009-12-08 11:34:07 +0000 | [diff] [blame] | 787 | .averaging = 1, /* take the average of 4 middle samples */ |
| 788 | .pen_down_acc_interval = 255, /* 9.4 ms */ |
Michael Hennerich | 244d342 | 2009-12-18 09:29:39 +0000 | [diff] [blame] | 789 | .gpio_export = 1, /* Export GPIO to gpiolib */ |
| 790 | .gpio_base = -1, /* Dynamic allocation */ |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 791 | }; |
| 792 | #endif |
| 793 | |
Michael Hennerich | ffc4d8b | 2009-05-29 15:41:18 +0000 | [diff] [blame] | 794 | #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) |
Michael Hennerich | 57af8ed | 2009-10-16 12:35:20 +0000 | [diff] [blame] | 795 | #include <linux/input/adxl34x.h> |
Michael Hennerich | ffc4d8b | 2009-05-29 15:41:18 +0000 | [diff] [blame] | 796 | static const struct adxl34x_platform_data adxl34x_info = { |
| 797 | .x_axis_offset = 0, |
| 798 | .y_axis_offset = 0, |
| 799 | .z_axis_offset = 0, |
| 800 | .tap_threshold = 0x31, |
| 801 | .tap_duration = 0x10, |
| 802 | .tap_latency = 0x60, |
| 803 | .tap_window = 0xF0, |
| 804 | .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN, |
| 805 | .act_axis_control = 0xFF, |
| 806 | .activity_threshold = 5, |
| 807 | .inactivity_threshold = 3, |
| 808 | .inactivity_time = 4, |
| 809 | .free_fall_threshold = 0x7, |
| 810 | .free_fall_time = 0x20, |
| 811 | .data_rate = 0x8, |
| 812 | .data_range = ADXL_FULL_RES, |
| 813 | |
| 814 | .ev_type = EV_ABS, |
| 815 | .ev_code_x = ABS_X, /* EV_REL */ |
| 816 | .ev_code_y = ABS_Y, /* EV_REL */ |
| 817 | .ev_code_z = ABS_Z, /* EV_REL */ |
| 818 | |
Michael Hennerich | 57af8ed | 2009-10-16 12:35:20 +0000 | [diff] [blame] | 819 | .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */ |
Michael Hennerich | ffc4d8b | 2009-05-29 15:41:18 +0000 | [diff] [blame] | 820 | |
| 821 | /* .ev_code_ff = KEY_F,*/ /* EV_KEY */ |
| 822 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ |
| 823 | .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK, |
| 824 | .fifo_mode = ADXL_FIFO_STREAM, |
Michael Hennerich | 6ba255f | 2009-12-08 11:34:07 +0000 | [diff] [blame] | 825 | .orientation_enable = ADXL_EN_ORIENTATION_3D, |
| 826 | .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8, |
| 827 | .divisor_length = ADXL_LP_FILTER_DIVISOR_16, |
| 828 | /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */ |
| 829 | .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C}, |
Michael Hennerich | ffc4d8b | 2009-05-29 15:41:18 +0000 | [diff] [blame] | 830 | }; |
| 831 | #endif |
| 832 | |
Michael Hennerich | 85a192e | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 833 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) |
| 834 | static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { |
| 835 | .enable_dma = 1, |
Michael Hennerich | 85a192e | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 836 | }; |
| 837 | #endif |
| 838 | |
Michael Hennerich | efaf7cd | 2009-11-12 16:54:08 +0000 | [diff] [blame] | 839 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) |
Michael Hennerich | efaf7cd | 2009-11-12 16:54:08 +0000 | [diff] [blame] | 840 | #include <linux/spi/adf702x.h> |
| 841 | #define TXREG 0x0160A470 |
| 842 | static const u32 adf7021_regs[] = { |
| 843 | 0x09608FA0, |
| 844 | 0x00575011, |
| 845 | 0x00A7F092, |
| 846 | 0x2B141563, |
| 847 | 0x81F29E94, |
| 848 | 0x00003155, |
| 849 | 0x050A4F66, |
| 850 | 0x00000007, |
| 851 | 0x00000008, |
| 852 | 0x000231E9, |
| 853 | 0x3296354A, |
| 854 | 0x891A2B3B, |
| 855 | 0x00000D9C, |
| 856 | 0x0000000D, |
| 857 | 0x0000000E, |
| 858 | 0x0000000F, |
| 859 | }; |
| 860 | |
| 861 | static struct adf702x_platform_data adf7021_platform_data = { |
| 862 | .regs_base = (void *)SPORT1_TCR1, |
| 863 | .dma_ch_rx = CH_SPORT1_RX, |
| 864 | .dma_ch_tx = CH_SPORT1_TX, |
| 865 | .irq_sport_err = IRQ_SPORT1_ERROR, |
| 866 | .gpio_int_rfs = GPIO_PF8, |
| 867 | .pin_req = {P_SPORT1_DTPRI, P_SPORT1_RFS, P_SPORT1_DRPRI, |
| 868 | P_SPORT1_RSCLK, P_SPORT1_TSCLK, 0}, |
| 869 | .adf702x_model = MODEL_ADF7021, |
| 870 | .adf702x_regs = adf7021_regs, |
| 871 | .tx_reg = TXREG, |
| 872 | }; |
Mike Frysinger | 0531c46 | 2010-01-19 07:04:29 +0000 | [diff] [blame] | 873 | static inline void adf702x_mac_init(void) |
| 874 | { |
| 875 | random_ether_addr(adf7021_platform_data.mac_addr); |
| 876 | } |
| 877 | #else |
| 878 | static inline void adf702x_mac_init(void) {} |
Michael Hennerich | efaf7cd | 2009-11-12 16:54:08 +0000 | [diff] [blame] | 879 | #endif |
| 880 | |
Michael Hennerich | fe5b25c | 2010-02-04 14:41:39 +0000 | [diff] [blame] | 881 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
| 882 | #include <linux/spi/ads7846.h> |
Michael Hennerich | fe5b25c | 2010-02-04 14:41:39 +0000 | [diff] [blame] | 883 | static int ads7873_get_pendown_state(void) |
| 884 | { |
| 885 | return gpio_get_value(GPIO_PF6); |
| 886 | } |
| 887 | |
| 888 | static struct ads7846_platform_data __initdata ad7873_pdata = { |
| 889 | .model = 7873, /* AD7873 */ |
| 890 | .x_max = 0xfff, |
| 891 | .y_max = 0xfff, |
| 892 | .x_plate_ohms = 620, |
| 893 | .debounce_max = 1, |
| 894 | .debounce_rep = 0, |
| 895 | .debounce_tol = (~0), |
| 896 | .get_pendown_state = ads7873_get_pendown_state, |
| 897 | }; |
| 898 | #endif |
| 899 | |
Michael Hennerich | 8e9d5c7 | 2008-04-24 08:46:19 +0800 | [diff] [blame] | 900 | #if defined(CONFIG_MTD_DATAFLASH) \ |
| 901 | || defined(CONFIG_MTD_DATAFLASH_MODULE) |
Michael Hennerich | ceac265 | 2008-08-25 17:39:11 +0800 | [diff] [blame] | 902 | |
| 903 | static struct mtd_partition bfin_spi_dataflash_partitions[] = { |
| 904 | { |
| 905 | .name = "bootloader(spi)", |
| 906 | .size = 0x00040000, |
| 907 | .offset = 0, |
| 908 | .mask_flags = MTD_CAP_ROM |
| 909 | }, { |
| 910 | .name = "linux kernel(spi)", |
Grace Pan | 6ecb5b6 | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 911 | .size = 0x180000, |
Michael Hennerich | ceac265 | 2008-08-25 17:39:11 +0800 | [diff] [blame] | 912 | .offset = MTDPART_OFS_APPEND, |
| 913 | }, { |
| 914 | .name = "file system(spi)", |
| 915 | .size = MTDPART_SIZ_FULL, |
| 916 | .offset = MTDPART_OFS_APPEND, |
| 917 | } |
| 918 | }; |
| 919 | |
| 920 | static struct flash_platform_data bfin_spi_dataflash_data = { |
| 921 | .name = "SPI Dataflash", |
| 922 | .parts = bfin_spi_dataflash_partitions, |
| 923 | .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions), |
| 924 | }; |
| 925 | |
Michael Hennerich | 8e9d5c7 | 2008-04-24 08:46:19 +0800 | [diff] [blame] | 926 | /* DataFlash chip */ |
| 927 | static struct bfin5xx_spi_chip data_flash_chip_info = { |
| 928 | .enable_dma = 0, /* use dma transfer with this chip*/ |
Michael Hennerich | 57af8ed | 2009-10-16 12:35:20 +0000 | [diff] [blame] | 929 | }; |
| 930 | #endif |
| 931 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 932 | #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) |
| 933 | static struct bfin5xx_spi_chip spi_ad7476_chip_info = { |
| 934 | .enable_dma = 0, /* use dma transfer with this chip*/ |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 935 | }; |
| 936 | #endif |
| 937 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 938 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 939 | #if defined(CONFIG_MTD_M25P80) \ |
| 940 | || defined(CONFIG_MTD_M25P80_MODULE) |
| 941 | { |
| 942 | /* the modalias must be the same as spi device driver name */ |
| 943 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
| 944 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 945 | .bus_num = 0, /* Framework bus number */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 946 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ |
| 947 | .platform_data = &bfin_spi_flash_data, |
| 948 | .controller_data = &spi_flash_chip_info, |
| 949 | .mode = SPI_MODE_3, |
| 950 | }, |
| 951 | #endif |
Michael Hennerich | 8e9d5c7 | 2008-04-24 08:46:19 +0800 | [diff] [blame] | 952 | #if defined(CONFIG_MTD_DATAFLASH) \ |
| 953 | || defined(CONFIG_MTD_DATAFLASH_MODULE) |
| 954 | { /* DataFlash chip */ |
| 955 | .modalias = "mtd_dataflash", |
Michael Hennerich | ceac265 | 2008-08-25 17:39:11 +0800 | [diff] [blame] | 956 | .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ |
Michael Hennerich | 8e9d5c7 | 2008-04-24 08:46:19 +0800 | [diff] [blame] | 957 | .bus_num = 0, /* Framework bus number */ |
| 958 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ |
Michael Hennerich | ceac265 | 2008-08-25 17:39:11 +0800 | [diff] [blame] | 959 | .platform_data = &bfin_spi_dataflash_data, |
Michael Hennerich | 8e9d5c7 | 2008-04-24 08:46:19 +0800 | [diff] [blame] | 960 | .controller_data = &data_flash_chip_info, |
| 961 | .mode = SPI_MODE_3, |
| 962 | }, |
| 963 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 964 | |
Scott Jiang | d055636 | 2011-08-12 19:31:30 -0400 | [diff] [blame] | 965 | #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ |
| 966 | || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 967 | { |
Scott Jiang | d055636 | 2011-08-12 19:31:30 -0400 | [diff] [blame] | 968 | .modalias = "ad1836", |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 969 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 970 | .bus_num = 0, |
Barry Song | 7ba8006 | 2010-01-28 09:37:21 +0000 | [diff] [blame] | 971 | .chip_select = 4, |
Barry Song | d40bd71 | 2010-02-22 10:31:06 +0000 | [diff] [blame] | 972 | .platform_data = "ad1836", /* only includes chip name for the moment */ |
Barry Song | 8312440 | 2009-08-06 21:03:02 +0000 | [diff] [blame] | 973 | .mode = SPI_MODE_3, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 974 | }, |
| 975 | #endif |
Barry Song | d4b834c | 2009-06-04 10:14:17 +0000 | [diff] [blame] | 976 | |
Barry Song | 3b82790 | 2010-01-27 09:01:36 +0000 | [diff] [blame] | 977 | #if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) |
Barry Song | d4b834c | 2009-06-04 10:14:17 +0000 | [diff] [blame] | 978 | { |
Barry Song | 3b82790 | 2010-01-27 09:01:36 +0000 | [diff] [blame] | 979 | .modalias = "ad193x", |
Barry Song | d4b834c | 2009-06-04 10:14:17 +0000 | [diff] [blame] | 980 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 981 | .bus_num = 0, |
Barry Song | 08a54bf | 2009-09-18 09:14:38 +0000 | [diff] [blame] | 982 | .chip_select = 5, |
Barry Song | d4b834c | 2009-06-04 10:14:17 +0000 | [diff] [blame] | 983 | .mode = SPI_MODE_3, |
| 984 | }, |
| 985 | #endif |
| 986 | |
Lars-Peter Clausen | 080ae07 | 2011-08-30 13:33:06 -0400 | [diff] [blame] | 987 | #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADV80X_MODULE) |
Yi Li | a65912c | 2010-04-06 05:53:16 +0000 | [diff] [blame] | 988 | { |
Lars-Peter Clausen | 080ae07 | 2011-08-30 13:33:06 -0400 | [diff] [blame] | 989 | .modalias = "adav801", |
Yi Li | a65912c | 2010-04-06 05:53:16 +0000 | [diff] [blame] | 990 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 991 | .bus_num = 0, |
| 992 | .chip_select = 1, |
Yi Li | a65912c | 2010-04-06 05:53:16 +0000 | [diff] [blame] | 993 | .mode = SPI_MODE_3, |
| 994 | }, |
| 995 | #endif |
| 996 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 997 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 998 | { |
| 999 | .modalias = "ad714x_captouch", |
| 1000 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1001 | .irq = IRQ_PF4, |
| 1002 | .bus_num = 0, |
| 1003 | .chip_select = 5, |
| 1004 | .mode = SPI_MODE_3, |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 1005 | .platform_data = &ad7147_spi_platform_data, |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 1006 | }, |
| 1007 | #endif |
| 1008 | |
Graf Yang | f5f9531 | 2010-02-10 07:15:59 +0000 | [diff] [blame] | 1009 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) |
| 1010 | { |
| 1011 | .modalias = "ad2s90", |
| 1012 | .bus_num = 0, |
| 1013 | .chip_select = 3, /* change it for your board */ |
Barry Song | 6fbfa0c | 2010-04-12 05:04:15 +0000 | [diff] [blame] | 1014 | .mode = SPI_MODE_3, |
Graf Yang | f5f9531 | 2010-02-10 07:15:59 +0000 | [diff] [blame] | 1015 | .platform_data = NULL, |
| 1016 | .controller_data = &ad2s90_spi_chip_info, |
| 1017 | }, |
| 1018 | #endif |
| 1019 | |
Graf Yang | df6a949 | 2010-02-21 10:23:07 +0000 | [diff] [blame] | 1020 | #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) |
| 1021 | { |
| 1022 | .modalias = "ad2s120x", |
| 1023 | .bus_num = 0, |
| 1024 | .chip_select = 4, /* CS, change it for your board */ |
| 1025 | .platform_data = ad2s120x_platform_data, |
| 1026 | .controller_data = &ad2s120x_spi_chip_info, |
| 1027 | }, |
| 1028 | #endif |
| 1029 | |
Graf Yang | 848c51c | 2010-02-26 11:49:52 +0000 | [diff] [blame] | 1030 | #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) |
| 1031 | { |
| 1032 | .modalias = "ad2s1210", |
| 1033 | .max_speed_hz = 8192000, |
| 1034 | .bus_num = 0, |
| 1035 | .chip_select = 4, /* CS, change it for your board */ |
| 1036 | .platform_data = ad2s1210_platform_data, |
| 1037 | .controller_data = &ad2s1210_spi_chip_info, |
| 1038 | }, |
| 1039 | #endif |
| 1040 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 1041 | #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) |
| 1042 | { |
| 1043 | .modalias = "ad7314", |
| 1044 | .max_speed_hz = 1000000, |
| 1045 | .bus_num = 0, |
| 1046 | .chip_select = 4, /* CS, change it for your board */ |
| 1047 | .controller_data = &ad7314_spi_chip_info, |
| 1048 | .mode = SPI_MODE_1, |
| 1049 | }, |
| 1050 | #endif |
| 1051 | |
| 1052 | #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) |
| 1053 | { |
| 1054 | .modalias = "ad7818", |
| 1055 | .max_speed_hz = 1000000, |
| 1056 | .bus_num = 0, |
| 1057 | .chip_select = 4, /* CS, change it for your board */ |
| 1058 | .platform_data = ad7816_platform_data, |
| 1059 | .controller_data = &ad7816_spi_chip_info, |
| 1060 | .mode = SPI_MODE_3, |
| 1061 | }, |
| 1062 | #endif |
| 1063 | |
| 1064 | #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) |
| 1065 | { |
| 1066 | .modalias = "adt7310", |
| 1067 | .max_speed_hz = 1000000, |
| 1068 | .irq = IRQ_PG5, /* CT alarm event. Line 0 */ |
| 1069 | .bus_num = 0, |
| 1070 | .chip_select = 4, /* CS, change it for your board */ |
| 1071 | .platform_data = adt7310_platform_data, |
| 1072 | .controller_data = &adt7310_spi_chip_info, |
| 1073 | .mode = SPI_MODE_3, |
| 1074 | }, |
| 1075 | #endif |
| 1076 | |
| 1077 | #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) |
| 1078 | { |
| 1079 | .modalias = "ad7298", |
| 1080 | .max_speed_hz = 1000000, |
| 1081 | .bus_num = 0, |
| 1082 | .chip_select = 4, /* CS, change it for your board */ |
| 1083 | .platform_data = ad7298_platform_data, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 1084 | .mode = SPI_MODE_3, |
| 1085 | }, |
| 1086 | #endif |
| 1087 | |
| 1088 | #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) |
| 1089 | { |
| 1090 | .modalias = "adt7316", |
| 1091 | .max_speed_hz = 1000000, |
| 1092 | .irq = IRQ_PG5, /* interrupt line */ |
| 1093 | .bus_num = 0, |
| 1094 | .chip_select = 4, /* CS, change it for your board */ |
| 1095 | .platform_data = adt7316_spi_data, |
| 1096 | .controller_data = &adt7316_spi_chip_info, |
| 1097 | .mode = SPI_MODE_3, |
| 1098 | }, |
| 1099 | #endif |
| 1100 | |
Yi Li | f79ea4c | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 1101 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
| 1102 | { |
| 1103 | .modalias = "mmc_spi", |
| 1104 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
| 1105 | .bus_num = 0, |
| 1106 | .chip_select = 4, |
| 1107 | .platform_data = &bfin_mmc_spi_pdata, |
| 1108 | .controller_data = &mmc_spi_chip_info, |
| 1109 | .mode = SPI_MODE_3, |
| 1110 | }, |
| 1111 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1112 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
| 1113 | { |
| 1114 | .modalias = "ad7877", |
| 1115 | .platform_data = &bfin_ad7877_ts_info, |
| 1116 | .irq = IRQ_PF6, |
| 1117 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
Michael Hennerich | c7d4896 | 2007-11-15 21:33:31 +0800 | [diff] [blame] | 1118 | .bus_num = 0, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1119 | .chip_select = 1, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1120 | }, |
| 1121 | #endif |
Michael Hennerich | f515015 | 2008-10-16 23:23:18 +0800 | [diff] [blame] | 1122 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 1123 | { |
| 1124 | .modalias = "ad7879", |
| 1125 | .platform_data = &bfin_ad7879_ts_info, |
| 1126 | .irq = IRQ_PF7, |
| 1127 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
| 1128 | .bus_num = 0, |
| 1129 | .chip_select = 1, |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 1130 | .mode = SPI_CPHA | SPI_CPOL, |
| 1131 | }, |
| 1132 | #endif |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 1133 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
| 1134 | { |
| 1135 | .modalias = "spidev", |
| 1136 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
| 1137 | .bus_num = 0, |
| 1138 | .chip_select = 1, |
Michael Hennerich | 6e66893 | 2008-02-09 01:54:09 +0800 | [diff] [blame] | 1139 | }, |
| 1140 | #endif |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 1141 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
| 1142 | { |
| 1143 | .modalias = "bfin-lq035q1-spi", |
| 1144 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
| 1145 | .bus_num = 0, |
Michael Hennerich | 46aa04f | 2008-10-13 11:30:17 +0800 | [diff] [blame] | 1146 | .chip_select = 2, |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 1147 | .mode = SPI_CPHA | SPI_CPOL, |
| 1148 | }, |
| 1149 | #endif |
Michael Hennerich | 85a192e | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 1150 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) |
| 1151 | { |
| 1152 | .modalias = "enc28j60", |
| 1153 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
| 1154 | .irq = IRQ_PF6, |
| 1155 | .bus_num = 0, |
Barry Song | f9f0e3b | 2009-11-17 09:45:59 +0000 | [diff] [blame] | 1156 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ |
Michael Hennerich | 85a192e | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 1157 | .controller_data = &enc28j60_spi_chip_info, |
| 1158 | .mode = SPI_MODE_0, |
| 1159 | }, |
| 1160 | #endif |
Michael Hennerich | 57af8ed | 2009-10-16 12:35:20 +0000 | [diff] [blame] | 1161 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) |
| 1162 | { |
| 1163 | .modalias = "adxl34x", |
| 1164 | .platform_data = &adxl34x_info, |
| 1165 | .irq = IRQ_PF6, |
| 1166 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
| 1167 | .bus_num = 0, |
| 1168 | .chip_select = 2, |
Michael Hennerich | 57af8ed | 2009-10-16 12:35:20 +0000 | [diff] [blame] | 1169 | .mode = SPI_MODE_3, |
| 1170 | }, |
| 1171 | #endif |
Michael Hennerich | efaf7cd | 2009-11-12 16:54:08 +0000 | [diff] [blame] | 1172 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) |
| 1173 | { |
| 1174 | .modalias = "adf702x", |
| 1175 | .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ |
| 1176 | .bus_num = 0, |
Barry Song | f9f0e3b | 2009-11-17 09:45:59 +0000 | [diff] [blame] | 1177 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ |
Michael Hennerich | efaf7cd | 2009-11-12 16:54:08 +0000 | [diff] [blame] | 1178 | .platform_data = &adf7021_platform_data, |
| 1179 | .mode = SPI_MODE_0, |
| 1180 | }, |
| 1181 | #endif |
Michael Hennerich | fe5b25c | 2010-02-04 14:41:39 +0000 | [diff] [blame] | 1182 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
| 1183 | { |
| 1184 | .modalias = "ads7846", |
| 1185 | .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ |
| 1186 | .bus_num = 0, |
| 1187 | .irq = IRQ_PF6, |
| 1188 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ |
Michael Hennerich | fe5b25c | 2010-02-04 14:41:39 +0000 | [diff] [blame] | 1189 | .platform_data = &ad7873_pdata, |
| 1190 | .mode = SPI_MODE_0, |
| 1191 | }, |
| 1192 | #endif |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 1193 | #if defined(CONFIG_AD7476) \ |
| 1194 | || defined(CONFIG_AD7476_MODULE) |
| 1195 | { |
| 1196 | .modalias = "ad7476", /* Name of spi_driver for this device */ |
| 1197 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ |
| 1198 | .bus_num = 0, /* Framework bus number */ |
| 1199 | .chip_select = 1, /* Framework chip select. */ |
| 1200 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1201 | .controller_data = &spi_ad7476_chip_info, |
| 1202 | .mode = SPI_MODE_3, |
| 1203 | }, |
| 1204 | #endif |
| 1205 | #if defined(CONFIG_ADE7753) \ |
| 1206 | || defined(CONFIG_ADE7753_MODULE) |
| 1207 | { |
| 1208 | .modalias = "ade7753", |
| 1209 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1210 | .bus_num = 0, |
| 1211 | .chip_select = 1, /* CS, change it for your board */ |
| 1212 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1213 | .mode = SPI_MODE_1, |
| 1214 | }, |
| 1215 | #endif |
| 1216 | #if defined(CONFIG_ADE7754) \ |
| 1217 | || defined(CONFIG_ADE7754_MODULE) |
| 1218 | { |
| 1219 | .modalias = "ade7754", |
| 1220 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1221 | .bus_num = 0, |
| 1222 | .chip_select = 1, /* CS, change it for your board */ |
| 1223 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1224 | .mode = SPI_MODE_1, |
| 1225 | }, |
| 1226 | #endif |
| 1227 | #if defined(CONFIG_ADE7758) \ |
| 1228 | || defined(CONFIG_ADE7758_MODULE) |
| 1229 | { |
| 1230 | .modalias = "ade7758", |
| 1231 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1232 | .bus_num = 0, |
| 1233 | .chip_select = 1, /* CS, change it for your board */ |
| 1234 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1235 | .mode = SPI_MODE_1, |
| 1236 | }, |
| 1237 | #endif |
| 1238 | #if defined(CONFIG_ADE7759) \ |
| 1239 | || defined(CONFIG_ADE7759_MODULE) |
| 1240 | { |
| 1241 | .modalias = "ade7759", |
| 1242 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1243 | .bus_num = 0, |
| 1244 | .chip_select = 1, /* CS, change it for your board */ |
| 1245 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1246 | .mode = SPI_MODE_1, |
| 1247 | }, |
| 1248 | #endif |
| 1249 | #if defined(CONFIG_ADE7854_SPI) \ |
| 1250 | || defined(CONFIG_ADE7854_SPI_MODULE) |
| 1251 | { |
| 1252 | .modalias = "ade7854", |
| 1253 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1254 | .bus_num = 0, |
| 1255 | .chip_select = 1, /* CS, change it for your board */ |
| 1256 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1257 | .mode = SPI_MODE_3, |
| 1258 | }, |
| 1259 | #endif |
| 1260 | #if defined(CONFIG_ADIS16060) \ |
| 1261 | || defined(CONFIG_ADIS16060_MODULE) |
| 1262 | { |
| 1263 | .modalias = "adis16060_r", |
| 1264 | .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ |
| 1265 | .bus_num = 0, |
| 1266 | .chip_select = MAX_CTRL_CS + 1, /* CS for read, change it for your board */ |
| 1267 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1268 | .mode = SPI_MODE_0, |
| 1269 | }, |
| 1270 | { |
| 1271 | .modalias = "adis16060_w", |
| 1272 | .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ |
| 1273 | .bus_num = 0, |
| 1274 | .chip_select = 2, /* CS for write, change it for your board */ |
| 1275 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1276 | .mode = SPI_MODE_1, |
| 1277 | }, |
| 1278 | #endif |
| 1279 | #if defined(CONFIG_ADIS16130) \ |
| 1280 | || defined(CONFIG_ADIS16130_MODULE) |
| 1281 | { |
| 1282 | .modalias = "adis16130", |
| 1283 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1284 | .bus_num = 0, |
| 1285 | .chip_select = 1, /* CS for read, change it for your board */ |
| 1286 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1287 | .mode = SPI_MODE_3, |
| 1288 | }, |
| 1289 | #endif |
| 1290 | #if defined(CONFIG_ADIS16201) \ |
| 1291 | || defined(CONFIG_ADIS16201_MODULE) |
| 1292 | { |
| 1293 | .modalias = "adis16201", |
| 1294 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1295 | .bus_num = 0, |
| 1296 | .chip_select = 5, /* CS, change it for your board */ |
| 1297 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1298 | .mode = SPI_MODE_3, |
| 1299 | .irq = IRQ_PF4, |
| 1300 | }, |
| 1301 | #endif |
| 1302 | #if defined(CONFIG_ADIS16203) \ |
| 1303 | || defined(CONFIG_ADIS16203_MODULE) |
| 1304 | { |
| 1305 | .modalias = "adis16203", |
| 1306 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1307 | .bus_num = 0, |
| 1308 | .chip_select = 5, /* CS, change it for your board */ |
| 1309 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1310 | .mode = SPI_MODE_3, |
| 1311 | .irq = IRQ_PF4, |
| 1312 | }, |
| 1313 | #endif |
| 1314 | #if defined(CONFIG_ADIS16204) \ |
| 1315 | || defined(CONFIG_ADIS16204_MODULE) |
| 1316 | { |
| 1317 | .modalias = "adis16204", |
| 1318 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1319 | .bus_num = 0, |
| 1320 | .chip_select = 5, /* CS, change it for your board */ |
| 1321 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1322 | .mode = SPI_MODE_3, |
| 1323 | .irq = IRQ_PF4, |
| 1324 | }, |
| 1325 | #endif |
| 1326 | #if defined(CONFIG_ADIS16209) \ |
| 1327 | || defined(CONFIG_ADIS16209_MODULE) |
| 1328 | { |
| 1329 | .modalias = "adis16209", |
| 1330 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1331 | .bus_num = 0, |
| 1332 | .chip_select = 5, /* CS, change it for your board */ |
| 1333 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1334 | .mode = SPI_MODE_3, |
| 1335 | .irq = IRQ_PF4, |
| 1336 | }, |
| 1337 | #endif |
| 1338 | #if defined(CONFIG_ADIS16220) \ |
| 1339 | || defined(CONFIG_ADIS16220_MODULE) |
| 1340 | { |
| 1341 | .modalias = "adis16220", |
| 1342 | .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ |
| 1343 | .bus_num = 0, |
| 1344 | .chip_select = 5, /* CS, change it for your board */ |
| 1345 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1346 | .mode = SPI_MODE_3, |
| 1347 | .irq = IRQ_PF4, |
| 1348 | }, |
| 1349 | #endif |
| 1350 | #if defined(CONFIG_ADIS16240) \ |
| 1351 | || defined(CONFIG_ADIS16240_MODULE) |
| 1352 | { |
| 1353 | .modalias = "adis16240", |
| 1354 | .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ |
| 1355 | .bus_num = 0, |
| 1356 | .chip_select = 5, /* CS, change it for your board */ |
| 1357 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1358 | .mode = SPI_MODE_3, |
| 1359 | .irq = IRQ_PF4, |
| 1360 | }, |
| 1361 | #endif |
| 1362 | #if defined(CONFIG_ADIS16260) \ |
| 1363 | || defined(CONFIG_ADIS16260_MODULE) |
| 1364 | { |
| 1365 | .modalias = "adis16260", |
| 1366 | .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ |
| 1367 | .bus_num = 0, |
| 1368 | .chip_select = 5, /* CS, change it for your board */ |
| 1369 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1370 | .mode = SPI_MODE_3, |
| 1371 | .irq = IRQ_PF4, |
| 1372 | }, |
| 1373 | #endif |
| 1374 | #if defined(CONFIG_ADIS16261) \ |
| 1375 | || defined(CONFIG_ADIS16261_MODULE) |
| 1376 | { |
| 1377 | .modalias = "adis16261", |
| 1378 | .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */ |
| 1379 | .bus_num = 0, |
| 1380 | .chip_select = 1, /* CS, change it for your board */ |
| 1381 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1382 | .mode = SPI_MODE_3, |
| 1383 | }, |
| 1384 | #endif |
| 1385 | #if defined(CONFIG_ADIS16300) \ |
| 1386 | || defined(CONFIG_ADIS16300_MODULE) |
| 1387 | { |
| 1388 | .modalias = "adis16300", |
| 1389 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1390 | .bus_num = 0, |
| 1391 | .chip_select = 5, /* CS, change it for your board */ |
| 1392 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1393 | .mode = SPI_MODE_3, |
| 1394 | .irq = IRQ_PF4, |
| 1395 | }, |
| 1396 | #endif |
| 1397 | #if defined(CONFIG_ADIS16350) \ |
| 1398 | || defined(CONFIG_ADIS16350_MODULE) |
| 1399 | { |
| 1400 | .modalias = "adis16364", |
| 1401 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1402 | .bus_num = 0, |
| 1403 | .chip_select = 5, /* CS, change it for your board */ |
| 1404 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1405 | .mode = SPI_MODE_3, |
| 1406 | .irq = IRQ_PF4, |
| 1407 | }, |
| 1408 | #endif |
| 1409 | #if defined(CONFIG_ADIS16400) \ |
| 1410 | || defined(CONFIG_ADIS16400_MODULE) |
| 1411 | { |
| 1412 | .modalias = "adis16400", |
| 1413 | .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ |
| 1414 | .bus_num = 0, |
| 1415 | .chip_select = 1, /* CS, change it for your board */ |
| 1416 | .platform_data = NULL, /* No spi_driver specific config */ |
| 1417 | .mode = SPI_MODE_3, |
| 1418 | }, |
| 1419 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1420 | }; |
| 1421 | |
Mike Frysinger | 5bda272 | 2008-06-07 15:03:01 +0800 | [diff] [blame] | 1422 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1423 | /* SPI controller data */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1424 | static struct bfin5xx_spi_master bfin_spi0_info = { |
Barry Song | f9f0e3b | 2009-11-17 09:45:59 +0000 | [diff] [blame] | 1425 | .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1426 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
Bryan Wu | 5d448dd | 2007-11-12 23:24:42 +0800 | [diff] [blame] | 1427 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1428 | }; |
| 1429 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1430 | /* SPI (0) */ |
| 1431 | static struct resource bfin_spi0_resource[] = { |
| 1432 | [0] = { |
| 1433 | .start = SPI0_REGBASE, |
| 1434 | .end = SPI0_REGBASE + 0xFF, |
| 1435 | .flags = IORESOURCE_MEM, |
| 1436 | }, |
| 1437 | [1] = { |
| 1438 | .start = CH_SPI, |
| 1439 | .end = CH_SPI, |
Yi Li | e68d1eb | 2009-06-03 09:46:22 +0000 | [diff] [blame] | 1440 | .flags = IORESOURCE_DMA, |
| 1441 | }, |
| 1442 | [2] = { |
| 1443 | .start = IRQ_SPI, |
| 1444 | .end = IRQ_SPI, |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1445 | .flags = IORESOURCE_IRQ, |
| 1446 | }, |
| 1447 | }; |
| 1448 | |
| 1449 | static struct platform_device bfin_spi0_device = { |
| 1450 | .name = "bfin-spi", |
| 1451 | .id = 0, /* Bus number */ |
| 1452 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
| 1453 | .resource = bfin_spi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1454 | .dev = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1455 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1456 | }, |
| 1457 | }; |
| 1458 | #endif /* spi master and devices */ |
| 1459 | |
Cliff Cai | 1e9aa95 | 2009-03-28 23:28:51 +0800 | [diff] [blame] | 1460 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) |
| 1461 | |
| 1462 | /* SPORT SPI controller data */ |
| 1463 | static struct bfin5xx_spi_master bfin_sport_spi0_info = { |
| 1464 | .num_chipselect = 1, /* master only supports one device */ |
| 1465 | .enable_dma = 0, /* master don't support DMA */ |
| 1466 | .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI, |
| 1467 | P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0}, |
| 1468 | }; |
| 1469 | |
| 1470 | static struct resource bfin_sport_spi0_resource[] = { |
| 1471 | [0] = { |
| 1472 | .start = SPORT0_TCR1, |
| 1473 | .end = SPORT0_TCR1 + 0xFF, |
| 1474 | .flags = IORESOURCE_MEM, |
| 1475 | }, |
| 1476 | [1] = { |
| 1477 | .start = IRQ_SPORT0_ERROR, |
| 1478 | .end = IRQ_SPORT0_ERROR, |
| 1479 | .flags = IORESOURCE_IRQ, |
| 1480 | }, |
| 1481 | }; |
| 1482 | |
| 1483 | static struct platform_device bfin_sport_spi0_device = { |
| 1484 | .name = "bfin-sport-spi", |
| 1485 | .id = 1, /* Bus number */ |
| 1486 | .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource), |
| 1487 | .resource = bfin_sport_spi0_resource, |
| 1488 | .dev = { |
| 1489 | .platform_data = &bfin_sport_spi0_info, /* Passed to driver */ |
| 1490 | }, |
| 1491 | }; |
| 1492 | |
| 1493 | static struct bfin5xx_spi_master bfin_sport_spi1_info = { |
| 1494 | .num_chipselect = 1, /* master only supports one device */ |
| 1495 | .enable_dma = 0, /* master don't support DMA */ |
| 1496 | .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI, |
| 1497 | P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0}, |
| 1498 | }; |
| 1499 | |
| 1500 | static struct resource bfin_sport_spi1_resource[] = { |
| 1501 | [0] = { |
| 1502 | .start = SPORT1_TCR1, |
| 1503 | .end = SPORT1_TCR1 + 0xFF, |
| 1504 | .flags = IORESOURCE_MEM, |
| 1505 | }, |
| 1506 | [1] = { |
| 1507 | .start = IRQ_SPORT1_ERROR, |
| 1508 | .end = IRQ_SPORT1_ERROR, |
| 1509 | .flags = IORESOURCE_IRQ, |
| 1510 | }, |
| 1511 | }; |
| 1512 | |
| 1513 | static struct platform_device bfin_sport_spi1_device = { |
| 1514 | .name = "bfin-sport-spi", |
| 1515 | .id = 2, /* Bus number */ |
| 1516 | .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource), |
| 1517 | .resource = bfin_sport_spi1_resource, |
| 1518 | .dev = { |
| 1519 | .platform_data = &bfin_sport_spi1_info, /* Passed to driver */ |
| 1520 | }, |
| 1521 | }; |
| 1522 | |
| 1523 | #endif /* sport spi master and devices */ |
| 1524 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1525 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) |
| 1526 | static struct platform_device bfin_fb_device = { |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1527 | .name = "bf537-lq035", |
| 1528 | }; |
| 1529 | #endif |
| 1530 | |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 1531 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
| 1532 | #include <asm/bfin-lq035q1.h> |
| 1533 | |
| 1534 | static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { |
Michael Hennerich | d94a1aa | 2009-12-08 11:45:55 +0000 | [diff] [blame] | 1535 | .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, |
| 1536 | .ppi_mode = USE_RGB565_16_BIT_PPI, |
| 1537 | .use_bl = 0, /* let something else control the LCD Blacklight */ |
| 1538 | .gpio_bl = GPIO_PF7, |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 1539 | }; |
| 1540 | |
| 1541 | static struct resource bfin_lq035q1_resources[] = { |
| 1542 | { |
| 1543 | .start = IRQ_PPI_ERROR, |
| 1544 | .end = IRQ_PPI_ERROR, |
| 1545 | .flags = IORESOURCE_IRQ, |
| 1546 | }, |
| 1547 | }; |
| 1548 | |
| 1549 | static struct platform_device bfin_lq035q1_device = { |
| 1550 | .name = "bfin-lq035q1", |
| 1551 | .id = -1, |
Michael Hennerich | d94a1aa | 2009-12-08 11:45:55 +0000 | [diff] [blame] | 1552 | .num_resources = ARRAY_SIZE(bfin_lq035q1_resources), |
| 1553 | .resource = bfin_lq035q1_resources, |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 1554 | .dev = { |
| 1555 | .platform_data = &bfin_lq035q1_data, |
| 1556 | }, |
| 1557 | }; |
| 1558 | #endif |
| 1559 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1560 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Sonic Zhang | 233b28a | 2007-11-21 17:04:41 +0800 | [diff] [blame] | 1561 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1562 | static struct resource bfin_uart0_resources[] = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1563 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1564 | .start = UART0_THR, |
| 1565 | .end = UART0_GCTL+2, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1566 | .flags = IORESOURCE_MEM, |
Sonic Zhang | 233b28a | 2007-11-21 17:04:41 +0800 | [diff] [blame] | 1567 | }, |
Sonic Zhang | 233b28a | 2007-11-21 17:04:41 +0800 | [diff] [blame] | 1568 | { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1569 | .start = IRQ_UART0_RX, |
| 1570 | .end = IRQ_UART0_RX+1, |
| 1571 | .flags = IORESOURCE_IRQ, |
| 1572 | }, |
| 1573 | { |
| 1574 | .start = IRQ_UART0_ERROR, |
| 1575 | .end = IRQ_UART0_ERROR, |
| 1576 | .flags = IORESOURCE_IRQ, |
| 1577 | }, |
| 1578 | { |
| 1579 | .start = CH_UART0_TX, |
| 1580 | .end = CH_UART0_TX, |
| 1581 | .flags = IORESOURCE_DMA, |
| 1582 | }, |
| 1583 | { |
| 1584 | .start = CH_UART0_RX, |
| 1585 | .end = CH_UART0_RX, |
| 1586 | .flags = IORESOURCE_DMA, |
| 1587 | }, |
| 1588 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
| 1589 | { /* CTS pin */ |
| 1590 | .start = GPIO_PG7, |
| 1591 | .end = GPIO_PG7, |
| 1592 | .flags = IORESOURCE_IO, |
| 1593 | }, |
| 1594 | { /* RTS pin */ |
| 1595 | .start = GPIO_PG6, |
| 1596 | .end = GPIO_PG6, |
| 1597 | .flags = IORESOURCE_IO, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1598 | }, |
Sonic Zhang | 233b28a | 2007-11-21 17:04:41 +0800 | [diff] [blame] | 1599 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1600 | }; |
| 1601 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 1602 | static unsigned short bfin_uart0_peripherals[] = { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1603 | P_UART0_TX, P_UART0_RX, 0 |
| 1604 | }; |
| 1605 | |
| 1606 | static struct platform_device bfin_uart0_device = { |
| 1607 | .name = "bfin-uart", |
| 1608 | .id = 0, |
| 1609 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
| 1610 | .resource = bfin_uart0_resources, |
| 1611 | .dev = { |
| 1612 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ |
| 1613 | }, |
| 1614 | }; |
| 1615 | #endif |
| 1616 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 1617 | static struct resource bfin_uart1_resources[] = { |
| 1618 | { |
| 1619 | .start = UART1_THR, |
| 1620 | .end = UART1_GCTL+2, |
| 1621 | .flags = IORESOURCE_MEM, |
| 1622 | }, |
| 1623 | { |
| 1624 | .start = IRQ_UART1_RX, |
| 1625 | .end = IRQ_UART1_RX+1, |
| 1626 | .flags = IORESOURCE_IRQ, |
| 1627 | }, |
| 1628 | { |
| 1629 | .start = IRQ_UART1_ERROR, |
| 1630 | .end = IRQ_UART1_ERROR, |
| 1631 | .flags = IORESOURCE_IRQ, |
| 1632 | }, |
| 1633 | { |
| 1634 | .start = CH_UART1_TX, |
| 1635 | .end = CH_UART1_TX, |
| 1636 | .flags = IORESOURCE_DMA, |
| 1637 | }, |
| 1638 | { |
| 1639 | .start = CH_UART1_RX, |
| 1640 | .end = CH_UART1_RX, |
| 1641 | .flags = IORESOURCE_DMA, |
| 1642 | }, |
| 1643 | }; |
| 1644 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 1645 | static unsigned short bfin_uart1_peripherals[] = { |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1646 | P_UART1_TX, P_UART1_RX, 0 |
| 1647 | }; |
| 1648 | |
| 1649 | static struct platform_device bfin_uart1_device = { |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1650 | .name = "bfin-uart", |
| 1651 | .id = 1, |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1652 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
| 1653 | .resource = bfin_uart1_resources, |
| 1654 | .dev = { |
| 1655 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ |
| 1656 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1657 | }; |
| 1658 | #endif |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 1659 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1660 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1661 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1662 | #ifdef CONFIG_BFIN_SIR0 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1663 | static struct resource bfin_sir0_resources[] = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1664 | { |
| 1665 | .start = 0xFFC00400, |
| 1666 | .end = 0xFFC004FF, |
| 1667 | .flags = IORESOURCE_MEM, |
| 1668 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1669 | { |
| 1670 | .start = IRQ_UART0_RX, |
| 1671 | .end = IRQ_UART0_RX+1, |
| 1672 | .flags = IORESOURCE_IRQ, |
| 1673 | }, |
| 1674 | { |
| 1675 | .start = CH_UART0_RX, |
| 1676 | .end = CH_UART0_RX+1, |
| 1677 | .flags = IORESOURCE_DMA, |
| 1678 | }, |
| 1679 | }; |
| 1680 | |
| 1681 | static struct platform_device bfin_sir0_device = { |
| 1682 | .name = "bfin_sir", |
| 1683 | .id = 0, |
| 1684 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
| 1685 | .resource = bfin_sir0_resources, |
| 1686 | }; |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1687 | #endif |
| 1688 | #ifdef CONFIG_BFIN_SIR1 |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1689 | static struct resource bfin_sir1_resources[] = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1690 | { |
| 1691 | .start = 0xFFC02000, |
| 1692 | .end = 0xFFC020FF, |
| 1693 | .flags = IORESOURCE_MEM, |
| 1694 | }, |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1695 | { |
| 1696 | .start = IRQ_UART1_RX, |
| 1697 | .end = IRQ_UART1_RX+1, |
| 1698 | .flags = IORESOURCE_IRQ, |
| 1699 | }, |
| 1700 | { |
| 1701 | .start = CH_UART1_RX, |
| 1702 | .end = CH_UART1_RX+1, |
| 1703 | .flags = IORESOURCE_DMA, |
| 1704 | }, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1705 | }; |
| 1706 | |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1707 | static struct platform_device bfin_sir1_device = { |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1708 | .name = "bfin_sir", |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1709 | .id = 1, |
| 1710 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
| 1711 | .resource = bfin_sir1_resources, |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1712 | }; |
| 1713 | #endif |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1714 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 1715 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1716 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1717 | static struct resource bfin_twi0_resource[] = { |
| 1718 | [0] = { |
| 1719 | .start = TWI0_REGBASE, |
| 1720 | .end = TWI0_REGBASE, |
| 1721 | .flags = IORESOURCE_MEM, |
| 1722 | }, |
| 1723 | [1] = { |
| 1724 | .start = IRQ_TWI, |
| 1725 | .end = IRQ_TWI, |
| 1726 | .flags = IORESOURCE_IRQ, |
| 1727 | }, |
| 1728 | }; |
| 1729 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1730 | static struct platform_device i2c_bfin_twi_device = { |
| 1731 | .name = "i2c-bfin-twi", |
| 1732 | .id = 0, |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 1733 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), |
| 1734 | .resource = bfin_twi0_resource, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1735 | }; |
| 1736 | #endif |
| 1737 | |
Michael Hennerich | 51ed9ad | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 1738 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) |
Michael Hennerich | 51ed9ad | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 1739 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { |
| 1740 | [0] = KEY_GRAVE, |
| 1741 | [1] = KEY_1, |
| 1742 | [2] = KEY_2, |
| 1743 | [3] = KEY_3, |
| 1744 | [4] = KEY_4, |
| 1745 | [5] = KEY_5, |
| 1746 | [6] = KEY_6, |
| 1747 | [7] = KEY_7, |
| 1748 | [8] = KEY_8, |
| 1749 | [9] = KEY_9, |
| 1750 | [10] = KEY_0, |
| 1751 | [11] = KEY_MINUS, |
| 1752 | [12] = KEY_EQUAL, |
| 1753 | [13] = KEY_BACKSLASH, |
| 1754 | [15] = KEY_KP0, |
| 1755 | [16] = KEY_Q, |
| 1756 | [17] = KEY_W, |
| 1757 | [18] = KEY_E, |
| 1758 | [19] = KEY_R, |
| 1759 | [20] = KEY_T, |
| 1760 | [21] = KEY_Y, |
| 1761 | [22] = KEY_U, |
| 1762 | [23] = KEY_I, |
| 1763 | [24] = KEY_O, |
| 1764 | [25] = KEY_P, |
| 1765 | [26] = KEY_LEFTBRACE, |
| 1766 | [27] = KEY_RIGHTBRACE, |
| 1767 | [29] = KEY_KP1, |
| 1768 | [30] = KEY_KP2, |
| 1769 | [31] = KEY_KP3, |
| 1770 | [32] = KEY_A, |
| 1771 | [33] = KEY_S, |
| 1772 | [34] = KEY_D, |
| 1773 | [35] = KEY_F, |
| 1774 | [36] = KEY_G, |
| 1775 | [37] = KEY_H, |
| 1776 | [38] = KEY_J, |
| 1777 | [39] = KEY_K, |
| 1778 | [40] = KEY_L, |
| 1779 | [41] = KEY_SEMICOLON, |
| 1780 | [42] = KEY_APOSTROPHE, |
| 1781 | [43] = KEY_BACKSLASH, |
| 1782 | [45] = KEY_KP4, |
| 1783 | [46] = KEY_KP5, |
| 1784 | [47] = KEY_KP6, |
| 1785 | [48] = KEY_102ND, |
| 1786 | [49] = KEY_Z, |
| 1787 | [50] = KEY_X, |
| 1788 | [51] = KEY_C, |
| 1789 | [52] = KEY_V, |
| 1790 | [53] = KEY_B, |
| 1791 | [54] = KEY_N, |
| 1792 | [55] = KEY_M, |
| 1793 | [56] = KEY_COMMA, |
| 1794 | [57] = KEY_DOT, |
| 1795 | [58] = KEY_SLASH, |
| 1796 | [60] = KEY_KPDOT, |
| 1797 | [61] = KEY_KP7, |
| 1798 | [62] = KEY_KP8, |
| 1799 | [63] = KEY_KP9, |
| 1800 | [64] = KEY_SPACE, |
| 1801 | [65] = KEY_BACKSPACE, |
| 1802 | [66] = KEY_TAB, |
| 1803 | [67] = KEY_KPENTER, |
| 1804 | [68] = KEY_ENTER, |
| 1805 | [69] = KEY_ESC, |
| 1806 | [70] = KEY_DELETE, |
| 1807 | [74] = KEY_KPMINUS, |
| 1808 | [76] = KEY_UP, |
| 1809 | [77] = KEY_DOWN, |
| 1810 | [78] = KEY_RIGHT, |
| 1811 | [79] = KEY_LEFT, |
| 1812 | }; |
| 1813 | |
| 1814 | static struct adp5588_kpad_platform_data adp5588_kpad_data = { |
| 1815 | .rows = 8, |
| 1816 | .cols = 10, |
| 1817 | .keymap = adp5588_keymap, |
| 1818 | .keymapsize = ARRAY_SIZE(adp5588_keymap), |
| 1819 | .repeat = 0, |
| 1820 | }; |
| 1821 | #endif |
| 1822 | |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1823 | #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) |
| 1824 | #include <linux/mfd/adp5520.h> |
| 1825 | |
| 1826 | /* |
| 1827 | * ADP5520/5501 Backlight Data |
| 1828 | */ |
| 1829 | |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1830 | static struct adp5520_backlight_platform_data adp5520_backlight_data = { |
| 1831 | .fade_in = ADP5520_FADE_T_1200ms, |
| 1832 | .fade_out = ADP5520_FADE_T_1200ms, |
| 1833 | .fade_led_law = ADP5520_BL_LAW_LINEAR, |
| 1834 | .en_ambl_sens = 1, |
| 1835 | .abml_filt = ADP5520_BL_AMBL_FILT_640ms, |
| 1836 | .l1_daylight_max = ADP5520_BL_CUR_mA(15), |
| 1837 | .l1_daylight_dim = ADP5520_BL_CUR_mA(0), |
| 1838 | .l2_office_max = ADP5520_BL_CUR_mA(7), |
| 1839 | .l2_office_dim = ADP5520_BL_CUR_mA(0), |
| 1840 | .l3_dark_max = ADP5520_BL_CUR_mA(3), |
| 1841 | .l3_dark_dim = ADP5520_BL_CUR_mA(0), |
| 1842 | .l2_trip = ADP5520_L2_COMP_CURR_uA(700), |
| 1843 | .l2_hyst = ADP5520_L2_COMP_CURR_uA(50), |
| 1844 | .l3_trip = ADP5520_L3_COMP_CURR_uA(80), |
| 1845 | .l3_hyst = ADP5520_L3_COMP_CURR_uA(20), |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1846 | }; |
| 1847 | |
| 1848 | /* |
| 1849 | * ADP5520/5501 LEDs Data |
| 1850 | */ |
| 1851 | |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1852 | static struct led_info adp5520_leds[] = { |
| 1853 | { |
| 1854 | .name = "adp5520-led1", |
| 1855 | .default_trigger = "none", |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1856 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1857 | }, |
| 1858 | #ifdef ADP5520_EN_ALL_LEDS |
| 1859 | { |
| 1860 | .name = "adp5520-led2", |
| 1861 | .default_trigger = "none", |
| 1862 | .flags = FLAG_ID_ADP5520_LED2_ADP5501_LED1, |
| 1863 | }, |
| 1864 | { |
| 1865 | .name = "adp5520-led3", |
| 1866 | .default_trigger = "none", |
| 1867 | .flags = FLAG_ID_ADP5520_LED3_ADP5501_LED2, |
| 1868 | }, |
| 1869 | #endif |
| 1870 | }; |
| 1871 | |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1872 | static struct adp5520_leds_platform_data adp5520_leds_data = { |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1873 | .num_leds = ARRAY_SIZE(adp5520_leds), |
| 1874 | .leds = adp5520_leds, |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1875 | .fade_in = ADP5520_FADE_T_600ms, |
| 1876 | .fade_out = ADP5520_FADE_T_600ms, |
| 1877 | .led_on_time = ADP5520_LED_ONT_600ms, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1878 | }; |
| 1879 | |
| 1880 | /* |
| 1881 | * ADP5520 GPIO Data |
| 1882 | */ |
| 1883 | |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1884 | static struct adp5520_gpio_platform_data adp5520_gpio_data = { |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1885 | .gpio_start = 50, |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1886 | .gpio_en_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
| 1887 | .gpio_pullup_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1888 | }; |
| 1889 | |
| 1890 | /* |
| 1891 | * ADP5520 Keypad Data |
| 1892 | */ |
| 1893 | |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1894 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1895 | [ADP5520_KEY(0, 0)] = KEY_GRAVE, |
| 1896 | [ADP5520_KEY(0, 1)] = KEY_1, |
| 1897 | [ADP5520_KEY(0, 2)] = KEY_2, |
| 1898 | [ADP5520_KEY(0, 3)] = KEY_3, |
| 1899 | [ADP5520_KEY(1, 0)] = KEY_4, |
| 1900 | [ADP5520_KEY(1, 1)] = KEY_5, |
| 1901 | [ADP5520_KEY(1, 2)] = KEY_6, |
| 1902 | [ADP5520_KEY(1, 3)] = KEY_7, |
| 1903 | [ADP5520_KEY(2, 0)] = KEY_8, |
| 1904 | [ADP5520_KEY(2, 1)] = KEY_9, |
| 1905 | [ADP5520_KEY(2, 2)] = KEY_0, |
| 1906 | [ADP5520_KEY(2, 3)] = KEY_MINUS, |
| 1907 | [ADP5520_KEY(3, 0)] = KEY_EQUAL, |
| 1908 | [ADP5520_KEY(3, 1)] = KEY_BACKSLASH, |
| 1909 | [ADP5520_KEY(3, 2)] = KEY_BACKSPACE, |
| 1910 | [ADP5520_KEY(3, 3)] = KEY_ENTER, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1911 | }; |
| 1912 | |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1913 | static struct adp5520_keys_platform_data adp5520_keys_data = { |
| 1914 | .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0, |
| 1915 | .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1916 | .keymap = adp5520_keymap, |
| 1917 | .keymapsize = ARRAY_SIZE(adp5520_keymap), |
| 1918 | .repeat = 0, |
| 1919 | }; |
| 1920 | |
| 1921 | /* |
Stefan Weil | eef35c2 | 2010-08-06 21:11:15 +0200 | [diff] [blame] | 1922 | * ADP5520/5501 Multifunction Device Init Data |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1923 | */ |
| 1924 | |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1925 | static struct adp5520_platform_data adp5520_pdev_data = { |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1926 | .backlight = &adp5520_backlight_data, |
| 1927 | .leds = &adp5520_leds_data, |
| 1928 | .gpio = &adp5520_gpio_data, |
| 1929 | .keys = &adp5520_keys_data, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 1930 | }; |
| 1931 | |
| 1932 | #endif |
| 1933 | |
Michael Hennerich | ba877d4 | 2009-08-27 04:09:32 +0000 | [diff] [blame] | 1934 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) |
Michael Hennerich | 1d23dc8 | 2009-10-05 13:33:11 +0000 | [diff] [blame] | 1935 | static struct adp5588_gpio_platform_data adp5588_gpio_data = { |
Michael Hennerich | ba877d4 | 2009-08-27 04:09:32 +0000 | [diff] [blame] | 1936 | .gpio_start = 50, |
| 1937 | .pullup_dis_mask = 0, |
| 1938 | }; |
| 1939 | #endif |
| 1940 | |
Michael Hennerich | 78756c6 | 2009-10-13 15:28:33 +0000 | [diff] [blame] | 1941 | #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) |
| 1942 | #include <linux/i2c/adp8870.h> |
| 1943 | static struct led_info adp8870_leds[] = { |
| 1944 | { |
| 1945 | .name = "adp8870-led7", |
| 1946 | .default_trigger = "none", |
| 1947 | .flags = ADP8870_LED_D7 | ADP8870_LED_OFFT_600ms, |
| 1948 | }, |
| 1949 | }; |
| 1950 | |
| 1951 | |
| 1952 | static struct adp8870_backlight_platform_data adp8870_pdata = { |
| 1953 | .bl_led_assign = ADP8870_BL_D1 | ADP8870_BL_D2 | ADP8870_BL_D3 | |
| 1954 | ADP8870_BL_D4 | ADP8870_BL_D5 | ADP8870_BL_D6, /* 1 = Backlight 0 = Individual LED */ |
| 1955 | .pwm_assign = 0, /* 1 = Enables PWM mode */ |
| 1956 | |
| 1957 | .bl_fade_in = ADP8870_FADE_T_1200ms, /* Backlight Fade-In Timer */ |
| 1958 | .bl_fade_out = ADP8870_FADE_T_1200ms, /* Backlight Fade-Out Timer */ |
| 1959 | .bl_fade_law = ADP8870_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */ |
| 1960 | |
| 1961 | .en_ambl_sens = 1, /* 1 = enable ambient light sensor */ |
| 1962 | .abml_filt = ADP8870_BL_AMBL_FILT_320ms, /* Light sensor filter time */ |
| 1963 | |
| 1964 | .l1_daylight_max = ADP8870_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1965 | .l1_daylight_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1966 | .l2_bright_max = ADP8870_BL_CUR_mA(14), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1967 | .l2_bright_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1968 | .l3_office_max = ADP8870_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1969 | .l3_office_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1970 | .l4_indoor_max = ADP8870_BL_CUR_mA(3), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1971 | .l4_indor_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1972 | .l5_dark_max = ADP8870_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1973 | .l5_dark_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 1974 | |
| 1975 | .l2_trip = ADP8870_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ |
| 1976 | .l2_hyst = ADP8870_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ |
| 1977 | .l3_trip = ADP8870_L3_COMP_CURR_uA(389), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ |
| 1978 | .l3_hyst = ADP8870_L3_COMP_CURR_uA(54), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ |
| 1979 | .l4_trip = ADP8870_L4_COMP_CURR_uA(167), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ |
| 1980 | .l4_hyst = ADP8870_L4_COMP_CURR_uA(16), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */ |
| 1981 | .l5_trip = ADP8870_L5_COMP_CURR_uA(43), /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */ |
| 1982 | .l5_hyst = ADP8870_L5_COMP_CURR_uA(11), /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */ |
| 1983 | |
| 1984 | .leds = adp8870_leds, |
| 1985 | .num_leds = ARRAY_SIZE(adp8870_leds), |
| 1986 | .led_fade_law = ADP8870_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */ |
| 1987 | .led_fade_in = ADP8870_FADE_T_600ms, |
| 1988 | .led_fade_out = ADP8870_FADE_T_600ms, |
| 1989 | .led_on_time = ADP8870_LED_ONT_200ms, |
| 1990 | }; |
| 1991 | #endif |
| 1992 | |
Michael Hennerich | 72fa2e9 | 2010-02-24 21:05:35 +0000 | [diff] [blame] | 1993 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) |
| 1994 | #include <linux/i2c/adp8860.h> |
Paul Gortmaker | 8dc7a9c | 2011-08-09 11:05:22 -0400 | [diff] [blame^] | 1995 | #include <linux/export.h> |
Michael Hennerich | 72fa2e9 | 2010-02-24 21:05:35 +0000 | [diff] [blame] | 1996 | static struct led_info adp8860_leds[] = { |
| 1997 | { |
| 1998 | .name = "adp8860-led7", |
| 1999 | .default_trigger = "none", |
| 2000 | .flags = ADP8860_LED_D7 | ADP8860_LED_OFFT_600ms, |
| 2001 | }, |
| 2002 | }; |
| 2003 | |
| 2004 | static struct adp8860_backlight_platform_data adp8860_pdata = { |
| 2005 | .bl_led_assign = ADP8860_BL_D1 | ADP8860_BL_D2 | ADP8860_BL_D3 | |
| 2006 | ADP8860_BL_D4 | ADP8860_BL_D5 | ADP8860_BL_D6, /* 1 = Backlight 0 = Individual LED */ |
| 2007 | |
| 2008 | .bl_fade_in = ADP8860_FADE_T_1200ms, /* Backlight Fade-In Timer */ |
| 2009 | .bl_fade_out = ADP8860_FADE_T_1200ms, /* Backlight Fade-Out Timer */ |
| 2010 | .bl_fade_law = ADP8860_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */ |
| 2011 | |
| 2012 | .en_ambl_sens = 1, /* 1 = enable ambient light sensor */ |
| 2013 | .abml_filt = ADP8860_BL_AMBL_FILT_320ms, /* Light sensor filter time */ |
| 2014 | |
| 2015 | .l1_daylight_max = ADP8860_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2016 | .l1_daylight_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2017 | .l2_office_max = ADP8860_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2018 | .l2_office_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2019 | .l3_dark_max = ADP8860_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2020 | .l3_dark_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ |
| 2021 | |
| 2022 | .l2_trip = ADP8860_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ |
| 2023 | .l2_hyst = ADP8860_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ |
| 2024 | .l3_trip = ADP8860_L3_COMP_CURR_uA(43), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */ |
| 2025 | .l3_hyst = ADP8860_L3_COMP_CURR_uA(11), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */ |
| 2026 | |
| 2027 | .leds = adp8860_leds, |
| 2028 | .num_leds = ARRAY_SIZE(adp8860_leds), |
| 2029 | .led_fade_law = ADP8860_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */ |
| 2030 | .led_fade_in = ADP8860_FADE_T_600ms, |
| 2031 | .led_fade_out = ADP8860_FADE_T_600ms, |
| 2032 | .led_on_time = ADP8860_LED_ONT_200ms, |
| 2033 | }; |
| 2034 | #endif |
| 2035 | |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 2036 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) |
| 2037 | static struct regulator_consumer_supply ad5398_consumer = { |
| 2038 | .supply = "current", |
| 2039 | }; |
| 2040 | |
| 2041 | static struct regulator_init_data ad5398_regulator_data = { |
| 2042 | .constraints = { |
| 2043 | .name = "current range", |
| 2044 | .max_uA = 120000, |
| 2045 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS, |
| 2046 | }, |
| 2047 | .num_consumer_supplies = 1, |
| 2048 | .consumer_supplies = &ad5398_consumer, |
| 2049 | }; |
| 2050 | |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 2051 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ |
| 2052 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) |
| 2053 | static struct platform_device ad5398_virt_consumer_device = { |
| 2054 | .name = "reg-virt-consumer", |
| 2055 | .id = 0, |
| 2056 | .dev = { |
| 2057 | .platform_data = "current", /* Passed to driver */ |
| 2058 | }, |
| 2059 | }; |
| 2060 | #endif |
| 2061 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ |
| 2062 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) |
| 2063 | static struct regulator_bulk_data ad5398_bulk_data = { |
| 2064 | .supply = "current", |
| 2065 | }; |
| 2066 | |
| 2067 | static struct regulator_userspace_consumer_data ad5398_userspace_comsumer_data = { |
| 2068 | .name = "ad5398", |
| 2069 | .num_supplies = 1, |
| 2070 | .supplies = &ad5398_bulk_data, |
| 2071 | }; |
| 2072 | |
| 2073 | static struct platform_device ad5398_userspace_consumer_device = { |
| 2074 | .name = "reg-userspace-consumer", |
| 2075 | .id = 0, |
| 2076 | .dev = { |
| 2077 | .platform_data = &ad5398_userspace_comsumer_data, |
| 2078 | }, |
| 2079 | }; |
| 2080 | #endif |
| 2081 | #endif |
| 2082 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2083 | #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) |
| 2084 | /* INT bound temperature alarm event. line 1 */ |
| 2085 | static unsigned long adt7410_platform_data[2] = { |
| 2086 | IRQ_PG4, IRQF_TRIGGER_LOW, |
| 2087 | }; |
| 2088 | #endif |
| 2089 | |
| 2090 | #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) |
| 2091 | /* INT bound temperature alarm event. line 1 */ |
| 2092 | static unsigned long adt7316_i2c_data[2] = { |
| 2093 | IRQF_TRIGGER_LOW, /* interrupt flags */ |
| 2094 | GPIO_PF4, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ |
| 2095 | }; |
| 2096 | #endif |
| 2097 | |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2098 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
Barry Song | 92b20f7 | 2010-03-17 08:12:30 +0000 | [diff] [blame] | 2099 | #if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) |
| 2100 | { |
| 2101 | I2C_BOARD_INFO("ad1937", 0x04), |
| 2102 | }, |
| 2103 | #endif |
| 2104 | |
Lars-Peter Clausen | 080ae07 | 2011-08-30 13:33:06 -0400 | [diff] [blame] | 2105 | #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADAV80X_MODULE) |
Yi Li | a65912c | 2010-04-06 05:53:16 +0000 | [diff] [blame] | 2106 | { |
| 2107 | I2C_BOARD_INFO("adav803", 0x10), |
| 2108 | }, |
| 2109 | #endif |
| 2110 | |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 2111 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2112 | { |
Barry Song | 427f277 | 2009-07-17 07:04:55 +0000 | [diff] [blame] | 2113 | I2C_BOARD_INFO("ad7142_captouch", 0x2C), |
Barry Song | 4c94c3e | 2009-07-07 07:41:50 +0000 | [diff] [blame] | 2114 | .irq = IRQ_PG5, |
Mike Frysinger | 5b7c577 | 2009-10-12 15:56:58 +0000 | [diff] [blame] | 2115 | .platform_data = (void *)&ad7142_i2c_platform_data, |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2116 | }, |
| 2117 | #endif |
Barry Song | ad6720c | 2010-02-03 09:15:31 +0000 | [diff] [blame] | 2118 | |
| 2119 | #if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE) |
| 2120 | { |
| 2121 | I2C_BOARD_INFO("ad7150", 0x48), |
| 2122 | .irq = IRQ_PG5, /* fixme: use real interrupt number */ |
| 2123 | }, |
| 2124 | #endif |
| 2125 | |
| 2126 | #if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE) |
| 2127 | { |
| 2128 | I2C_BOARD_INFO("ad7152", 0x48), |
| 2129 | }, |
| 2130 | #endif |
| 2131 | |
| 2132 | #if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE) |
| 2133 | { |
| 2134 | I2C_BOARD_INFO("ad774x", 0x48), |
| 2135 | }, |
| 2136 | #endif |
| 2137 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2138 | #if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) |
| 2139 | { |
| 2140 | I2C_BOARD_INFO("ade7854", 0x38), |
| 2141 | }, |
| 2142 | #endif |
| 2143 | |
| 2144 | #if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE) |
| 2145 | { |
| 2146 | I2C_BOARD_INFO("adt75", 0x9), |
| 2147 | .irq = IRQ_PG5, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2148 | }, |
| 2149 | #endif |
| 2150 | |
| 2151 | #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) |
| 2152 | { |
| 2153 | I2C_BOARD_INFO("adt7410", 0x48), |
| 2154 | /* CT critical temperature event. line 0 */ |
| 2155 | .irq = IRQ_PG5, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2156 | .platform_data = (void *)&adt7410_platform_data, |
| 2157 | }, |
| 2158 | #endif |
| 2159 | |
| 2160 | #if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE) |
| 2161 | { |
| 2162 | I2C_BOARD_INFO("ad7291", 0x20), |
| 2163 | .irq = IRQ_PG5, |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2164 | }, |
| 2165 | #endif |
| 2166 | |
| 2167 | #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) |
| 2168 | { |
| 2169 | I2C_BOARD_INFO("adt7316", 0x48), |
| 2170 | .irq = IRQ_PG6, |
| 2171 | .platform_data = (void *)&adt7316_i2c_data, |
Sonic Zhang | ef8873e | 2010-02-25 10:27:48 +0000 | [diff] [blame] | 2172 | }, |
| 2173 | #endif |
| 2174 | |
Michael Hennerich | ebd5833 | 2009-07-02 11:00:38 +0000 | [diff] [blame] | 2175 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2176 | { |
| 2177 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2178 | }, |
| 2179 | #endif |
Michael Hennerich | 204844e | 2009-06-30 14:57:22 +0000 | [diff] [blame] | 2180 | #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2181 | { |
| 2182 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), |
Michael Hennerich | f515015 | 2008-10-16 23:23:18 +0800 | [diff] [blame] | 2183 | .irq = IRQ_PG6, |
| 2184 | }, |
| 2185 | #endif |
| 2186 | #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) |
| 2187 | { |
| 2188 | I2C_BOARD_INFO("ad7879", 0x2F), |
| 2189 | .irq = IRQ_PG5, |
| 2190 | .platform_data = (void *)&bfin_ad7879_ts_info, |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2191 | }, |
| 2192 | #endif |
Michael Hennerich | 51ed9ad | 2009-01-07 23:14:38 +0800 | [diff] [blame] | 2193 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) |
| 2194 | { |
| 2195 | I2C_BOARD_INFO("adp5588-keys", 0x34), |
| 2196 | .irq = IRQ_PG0, |
| 2197 | .platform_data = (void *)&adp5588_kpad_data, |
| 2198 | }, |
| 2199 | #endif |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 2200 | #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) |
| 2201 | { |
| 2202 | I2C_BOARD_INFO("pmic-adp5520", 0x32), |
Mike Frysinger | 4f84b6e | 2009-06-10 20:45:48 -0400 | [diff] [blame] | 2203 | .irq = IRQ_PG0, |
Michael Hennerich | 3ea5721 | 2009-03-28 22:15:07 +0800 | [diff] [blame] | 2204 | .platform_data = (void *)&adp5520_pdev_data, |
| 2205 | }, |
| 2206 | #endif |
Michael Hennerich | ffc4d8b | 2009-05-29 15:41:18 +0000 | [diff] [blame] | 2207 | #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) |
| 2208 | { |
| 2209 | I2C_BOARD_INFO("adxl34x", 0x53), |
| 2210 | .irq = IRQ_PG3, |
| 2211 | .platform_data = (void *)&adxl34x_info, |
| 2212 | }, |
| 2213 | #endif |
Michael Hennerich | ba877d4 | 2009-08-27 04:09:32 +0000 | [diff] [blame] | 2214 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) |
| 2215 | { |
| 2216 | I2C_BOARD_INFO("adp5588-gpio", 0x34), |
| 2217 | .platform_data = (void *)&adp5588_gpio_data, |
| 2218 | }, |
| 2219 | #endif |
Michael Hennerich | 50c4c08 | 2009-09-22 13:10:09 +0000 | [diff] [blame] | 2220 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) |
| 2221 | { |
| 2222 | I2C_BOARD_INFO("bfin-adv7393", 0x2B), |
| 2223 | }, |
| 2224 | #endif |
Michael Hennerich | ddcd7cb | 2009-09-22 15:36:55 +0000 | [diff] [blame] | 2225 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) |
| 2226 | { |
Sonic Zhang | 948ca1a | 2010-08-18 09:17:25 +0000 | [diff] [blame] | 2227 | I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F), |
Michael Hennerich | ddcd7cb | 2009-09-22 15:36:55 +0000 | [diff] [blame] | 2228 | }, |
| 2229 | #endif |
Michael Hennerich | 78756c6 | 2009-10-13 15:28:33 +0000 | [diff] [blame] | 2230 | #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) |
| 2231 | { |
| 2232 | I2C_BOARD_INFO("adp8870", 0x2B), |
| 2233 | .platform_data = (void *)&adp8870_pdata, |
| 2234 | }, |
| 2235 | #endif |
Cliff Cai | d53127f | 2009-10-15 02:33:04 +0000 | [diff] [blame] | 2236 | #if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE) |
| 2237 | { |
| 2238 | I2C_BOARD_INFO("adau1371", 0x1A), |
| 2239 | }, |
| 2240 | #endif |
Cliff Cai | 0426763 | 2009-10-28 06:50:36 +0000 | [diff] [blame] | 2241 | #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) |
| 2242 | { |
| 2243 | I2C_BOARD_INFO("adau1761", 0x38), |
| 2244 | }, |
| 2245 | #endif |
Cliff Cai | c48d767 | 2010-02-11 09:27:18 +0000 | [diff] [blame] | 2246 | #if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE) |
| 2247 | { |
| 2248 | I2C_BOARD_INFO("adau1361", 0x38), |
| 2249 | }, |
| 2250 | #endif |
Lars-Peter Clausen | 2fba06f | 2011-08-30 13:12:26 -0400 | [diff] [blame] | 2251 | #if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE) |
| 2252 | { |
| 2253 | I2C_BOARD_INFO("adau1701", 0x34), |
| 2254 | }, |
| 2255 | #endif |
Michael Hennerich | 1f13f2f | 2009-11-17 10:18:27 +0000 | [diff] [blame] | 2256 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) |
| 2257 | { |
| 2258 | I2C_BOARD_INFO("ad5258", 0x18), |
| 2259 | }, |
| 2260 | #endif |
Cliff Cai | 29bb3bc | 2010-01-14 08:28:38 +0000 | [diff] [blame] | 2261 | #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) |
| 2262 | { |
| 2263 | I2C_BOARD_INFO("ssm2602", 0x1b), |
| 2264 | }, |
| 2265 | #endif |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 2266 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) |
| 2267 | { |
| 2268 | I2C_BOARD_INFO("ad5398", 0xC), |
Sonic Zhang | 27e9f0b | 2010-06-02 08:24:18 +0000 | [diff] [blame] | 2269 | .platform_data = (void *)&ad5398_regulator_data, |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 2270 | }, |
| 2271 | #endif |
Michael Hennerich | 72fa2e9 | 2010-02-24 21:05:35 +0000 | [diff] [blame] | 2272 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) |
| 2273 | { |
| 2274 | I2C_BOARD_INFO("adp8860", 0x2A), |
| 2275 | .platform_data = (void *)&adp8860_pdata, |
| 2276 | }, |
| 2277 | #endif |
Cliff Cai | 3cbcb16 | 2010-04-22 05:55:56 +0000 | [diff] [blame] | 2278 | #if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) |
| 2279 | { |
| 2280 | I2C_BOARD_INFO("adau1373", 0x1A), |
| 2281 | }, |
| 2282 | #endif |
steven miao | 39d3c1c | 2010-08-26 08:25:13 +0000 | [diff] [blame] | 2283 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
| 2284 | { |
| 2285 | I2C_BOARD_INFO("ad5252", 0x2e), |
| 2286 | }, |
| 2287 | #endif |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2288 | }; |
Bryan Wu | 81d9c7f | 2008-03-26 10:02:13 +0800 | [diff] [blame] | 2289 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2290 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2291 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
| 2292 | static struct resource bfin_sport0_uart_resources[] = { |
| 2293 | { |
| 2294 | .start = SPORT0_TCR1, |
| 2295 | .end = SPORT0_MRCS3+4, |
| 2296 | .flags = IORESOURCE_MEM, |
| 2297 | }, |
| 2298 | { |
| 2299 | .start = IRQ_SPORT0_RX, |
| 2300 | .end = IRQ_SPORT0_RX+1, |
| 2301 | .flags = IORESOURCE_IRQ, |
| 2302 | }, |
| 2303 | { |
| 2304 | .start = IRQ_SPORT0_ERROR, |
| 2305 | .end = IRQ_SPORT0_ERROR, |
| 2306 | .flags = IORESOURCE_IRQ, |
| 2307 | }, |
| 2308 | }; |
| 2309 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 2310 | static unsigned short bfin_sport0_peripherals[] = { |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2311 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, |
Sonic Zhang | e54b673 | 2010-11-12 02:45:38 +0000 | [diff] [blame] | 2312 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0 |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2313 | }; |
| 2314 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2315 | static struct platform_device bfin_sport0_uart_device = { |
| 2316 | .name = "bfin-sport-uart", |
| 2317 | .id = 0, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2318 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), |
| 2319 | .resource = bfin_sport0_uart_resources, |
| 2320 | .dev = { |
| 2321 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ |
| 2322 | }, |
| 2323 | }; |
| 2324 | #endif |
| 2325 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
| 2326 | static struct resource bfin_sport1_uart_resources[] = { |
| 2327 | { |
| 2328 | .start = SPORT1_TCR1, |
| 2329 | .end = SPORT1_MRCS3+4, |
| 2330 | .flags = IORESOURCE_MEM, |
| 2331 | }, |
| 2332 | { |
| 2333 | .start = IRQ_SPORT1_RX, |
| 2334 | .end = IRQ_SPORT1_RX+1, |
| 2335 | .flags = IORESOURCE_IRQ, |
| 2336 | }, |
| 2337 | { |
| 2338 | .start = IRQ_SPORT1_ERROR, |
| 2339 | .end = IRQ_SPORT1_ERROR, |
| 2340 | .flags = IORESOURCE_IRQ, |
| 2341 | }, |
| 2342 | }; |
| 2343 | |
Mike Frysinger | a8b1988 | 2010-11-24 09:23:04 +0000 | [diff] [blame] | 2344 | static unsigned short bfin_sport1_peripherals[] = { |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2345 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, |
Sonic Zhang | e54b673 | 2010-11-12 02:45:38 +0000 | [diff] [blame] | 2346 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0 |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2347 | }; |
| 2348 | |
| 2349 | static struct platform_device bfin_sport1_uart_device = { |
| 2350 | .name = "bfin-sport-uart", |
| 2351 | .id = 1, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2352 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), |
| 2353 | .resource = bfin_sport1_uart_resources, |
| 2354 | .dev = { |
| 2355 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ |
| 2356 | }, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2357 | }; |
| 2358 | #endif |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2359 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2360 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2361 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2362 | #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE |
| 2363 | /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */ |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2364 | |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2365 | #ifdef CF_IDE_NAND_CARD_USE_HDD_INTERFACE |
| 2366 | #define PATA_INT IRQ_PF5 |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2367 | static struct pata_platform_info bfin_pata_platform_data = { |
| 2368 | .ioport_shift = 1, |
Yong Zhang | 7832bb5 | 2011-09-07 16:10:03 +0800 | [diff] [blame] | 2369 | .irq_flags = IRQF_TRIGGER_HIGH, |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2370 | }; |
| 2371 | |
| 2372 | static struct resource bfin_pata_resources[] = { |
| 2373 | { |
| 2374 | .start = 0x20314020, |
| 2375 | .end = 0x2031403F, |
| 2376 | .flags = IORESOURCE_MEM, |
| 2377 | }, |
| 2378 | { |
| 2379 | .start = 0x2031401C, |
| 2380 | .end = 0x2031401F, |
| 2381 | .flags = IORESOURCE_MEM, |
| 2382 | }, |
| 2383 | { |
| 2384 | .start = PATA_INT, |
| 2385 | .end = PATA_INT, |
| 2386 | .flags = IORESOURCE_IRQ, |
| 2387 | }, |
| 2388 | }; |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2389 | #elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE) |
| 2390 | static struct pata_platform_info bfin_pata_platform_data = { |
| 2391 | .ioport_shift = 0, |
| 2392 | }; |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 2393 | /* CompactFlash Storage Card Memory Mapped Addressing |
Michael Hennerich | 648882d | 2009-04-21 12:05:50 +0000 | [diff] [blame] | 2394 | * /REG = A11 = 1 |
| 2395 | */ |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2396 | static struct resource bfin_pata_resources[] = { |
| 2397 | { |
Michael Hennerich | 648882d | 2009-04-21 12:05:50 +0000 | [diff] [blame] | 2398 | .start = 0x20211800, |
| 2399 | .end = 0x20211807, |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2400 | .flags = IORESOURCE_MEM, |
| 2401 | }, |
| 2402 | { |
Michael Hennerich | 648882d | 2009-04-21 12:05:50 +0000 | [diff] [blame] | 2403 | .start = 0x2021180E, /* Device Ctl */ |
| 2404 | .end = 0x2021180E, |
Michael Hennerich | 2c8beb2 | 2009-03-28 22:13:43 +0800 | [diff] [blame] | 2405 | .flags = IORESOURCE_MEM, |
| 2406 | }, |
| 2407 | }; |
| 2408 | #endif |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2409 | |
| 2410 | static struct platform_device bfin_pata_device = { |
| 2411 | .name = "pata_platform", |
| 2412 | .id = -1, |
| 2413 | .num_resources = ARRAY_SIZE(bfin_pata_resources), |
| 2414 | .resource = bfin_pata_resources, |
| 2415 | .dev = { |
| 2416 | .platform_data = &bfin_pata_platform_data, |
| 2417 | } |
| 2418 | }; |
| 2419 | #endif |
| 2420 | |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 2421 | static const unsigned int cclk_vlev_datasheet[] = |
| 2422 | { |
| 2423 | VRPAIR(VLEV_085, 250000000), |
| 2424 | VRPAIR(VLEV_090, 376000000), |
| 2425 | VRPAIR(VLEV_095, 426000000), |
| 2426 | VRPAIR(VLEV_100, 426000000), |
| 2427 | VRPAIR(VLEV_105, 476000000), |
| 2428 | VRPAIR(VLEV_110, 476000000), |
| 2429 | VRPAIR(VLEV_115, 476000000), |
| 2430 | VRPAIR(VLEV_120, 500000000), |
| 2431 | VRPAIR(VLEV_125, 533000000), |
| 2432 | VRPAIR(VLEV_130, 600000000), |
| 2433 | }; |
| 2434 | |
| 2435 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { |
| 2436 | .tuple_tab = cclk_vlev_datasheet, |
| 2437 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), |
| 2438 | .vr_settling_time = 25 /* us */, |
| 2439 | }; |
| 2440 | |
| 2441 | static struct platform_device bfin_dpmc = { |
| 2442 | .name = "bfin dpmc", |
| 2443 | .dev = { |
| 2444 | .platform_data = &bfin_dmpc_vreg_data, |
| 2445 | }, |
| 2446 | }; |
| 2447 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2448 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ |
| 2449 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ |
| 2450 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) |
| 2451 | |
| 2452 | #define SPORT_REQ(x) \ |
| 2453 | [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ |
| 2454 | P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0} |
| 2455 | |
| 2456 | static const u16 bfin_snd_pin[][7] = { |
| 2457 | SPORT_REQ(0), |
| 2458 | SPORT_REQ(1), |
| 2459 | }; |
| 2460 | |
| 2461 | static struct bfin_snd_platform_data bfin_snd_data[] = { |
| 2462 | { |
| 2463 | .pin_req = &bfin_snd_pin[0][0], |
| 2464 | }, |
| 2465 | { |
| 2466 | .pin_req = &bfin_snd_pin[1][0], |
| 2467 | }, |
| 2468 | }; |
| 2469 | |
| 2470 | #define BFIN_SND_RES(x) \ |
| 2471 | [x] = { \ |
| 2472 | { \ |
| 2473 | .start = SPORT##x##_TCR1, \ |
| 2474 | .end = SPORT##x##_TCR1, \ |
| 2475 | .flags = IORESOURCE_MEM \ |
| 2476 | }, \ |
| 2477 | { \ |
| 2478 | .start = CH_SPORT##x##_RX, \ |
| 2479 | .end = CH_SPORT##x##_RX, \ |
| 2480 | .flags = IORESOURCE_DMA, \ |
| 2481 | }, \ |
| 2482 | { \ |
| 2483 | .start = CH_SPORT##x##_TX, \ |
| 2484 | .end = CH_SPORT##x##_TX, \ |
| 2485 | .flags = IORESOURCE_DMA, \ |
| 2486 | }, \ |
| 2487 | { \ |
| 2488 | .start = IRQ_SPORT##x##_ERROR, \ |
| 2489 | .end = IRQ_SPORT##x##_ERROR, \ |
| 2490 | .flags = IORESOURCE_IRQ, \ |
| 2491 | } \ |
| 2492 | } |
| 2493 | |
| 2494 | static struct resource bfin_snd_resources[][4] = { |
| 2495 | BFIN_SND_RES(0), |
| 2496 | BFIN_SND_RES(1), |
| 2497 | }; |
Scott Jiang | 2b6678c5 | 2011-07-05 19:27:25 -0400 | [diff] [blame] | 2498 | #endif |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2499 | |
Scott Jiang | 2b6678c5 | 2011-07-05 19:27:25 -0400 | [diff] [blame] | 2500 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
| 2501 | static struct platform_device bfin_i2s_pcm = { |
| 2502 | .name = "bfin-i2s-pcm-audio", |
| 2503 | .id = -1, |
| 2504 | }; |
| 2505 | #endif |
| 2506 | |
| 2507 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
| 2508 | static struct platform_device bfin_tdm_pcm = { |
| 2509 | .name = "bfin-tdm-pcm-audio", |
| 2510 | .id = -1, |
| 2511 | }; |
| 2512 | #endif |
| 2513 | |
| 2514 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) |
| 2515 | static struct platform_device bfin_ac97_pcm = { |
| 2516 | .name = "bfin-ac97-pcm-audio", |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2517 | .id = -1, |
| 2518 | }; |
| 2519 | #endif |
| 2520 | |
Scott Jiang | e0754d8 | 2011-08-16 19:08:42 -0400 | [diff] [blame] | 2521 | #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2522 | static struct platform_device bfin_ad73311_codec_device = { |
| 2523 | .name = "ad73311", |
| 2524 | .id = -1, |
| 2525 | }; |
| 2526 | #endif |
| 2527 | |
Lars-Peter Clausen | 080ae07 | 2011-08-30 13:33:06 -0400 | [diff] [blame] | 2528 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ |
| 2529 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) |
| 2530 | static struct platform_device bfin_eval_adav801_device = { |
| 2531 | .name = "bfin-eval-adav801", |
| 2532 | .id = -1, |
| 2533 | }; |
| 2534 | #endif |
| 2535 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2536 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2537 | static struct platform_device bfin_i2s = { |
| 2538 | .name = "bfin-i2s", |
| 2539 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2540 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
| 2541 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2542 | .dev = { |
| 2543 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2544 | }, |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2545 | }; |
| 2546 | #endif |
| 2547 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2548 | #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) |
Barry Song | 8312440 | 2009-08-06 21:03:02 +0000 | [diff] [blame] | 2549 | static struct platform_device bfin_tdm = { |
| 2550 | .name = "bfin-tdm", |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2551 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2552 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
| 2553 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2554 | .dev = { |
| 2555 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2556 | }, |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2557 | }; |
| 2558 | #endif |
| 2559 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2560 | #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2561 | static struct platform_device bfin_ac97 = { |
| 2562 | .name = "bfin-ac97", |
| 2563 | .id = CONFIG_SND_BF5XX_SPORT_NUM, |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2564 | .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), |
| 2565 | .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2566 | .dev = { |
| 2567 | .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], |
| 2568 | }, |
Barry Song | 8312440 | 2009-08-06 21:03:02 +0000 | [diff] [blame] | 2569 | }; |
| 2570 | #endif |
| 2571 | |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 2572 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) |
| 2573 | #define REGULATOR_ADP122 "adp122" |
| 2574 | #define REGULATOR_ADP122_UV 2500000 |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2575 | |
| 2576 | static struct regulator_consumer_supply adp122_consumers = { |
| 2577 | .supply = REGULATOR_ADP122, |
| 2578 | }; |
| 2579 | |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 2580 | static struct regulator_init_data adp_switch_regulator_data = { |
| 2581 | .constraints = { |
| 2582 | .name = REGULATOR_ADP122, |
| 2583 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 2584 | .min_uV = REGULATOR_ADP122_UV, |
| 2585 | .max_uV = REGULATOR_ADP122_UV, |
| 2586 | .min_uA = 0, |
| 2587 | .max_uA = 300000, |
| 2588 | }, |
| 2589 | .num_consumer_supplies = 1, /* only 1 */ |
| 2590 | .consumer_supplies = &adp122_consumers, |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2591 | }; |
| 2592 | |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 2593 | static struct fixed_voltage_config adp_switch_pdata = { |
| 2594 | .supply_name = REGULATOR_ADP122, |
| 2595 | .microvolts = REGULATOR_ADP122_UV, |
| 2596 | .gpio = GPIO_PF2, |
| 2597 | .enable_high = 1, |
| 2598 | .enabled_at_boot = 0, |
| 2599 | .init_data = &adp_switch_regulator_data, |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2600 | }; |
| 2601 | |
| 2602 | static struct platform_device adp_switch_device = { |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 2603 | .name = "reg-fixed-voltage", |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2604 | .id = 0, |
| 2605 | .dev = { |
| 2606 | .platform_data = &adp_switch_pdata, |
| 2607 | }, |
| 2608 | }; |
| 2609 | |
| 2610 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ |
| 2611 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) |
| 2612 | static struct regulator_bulk_data adp122_bulk_data = { |
| 2613 | .supply = REGULATOR_ADP122, |
| 2614 | }; |
| 2615 | |
| 2616 | static struct regulator_userspace_consumer_data adp122_userspace_comsumer_data = { |
| 2617 | .name = REGULATOR_ADP122, |
| 2618 | .num_supplies = 1, |
| 2619 | .supplies = &adp122_bulk_data, |
| 2620 | }; |
| 2621 | |
| 2622 | static struct platform_device adp122_userspace_consumer_device = { |
| 2623 | .name = "reg-userspace-consumer", |
| 2624 | .id = 0, |
| 2625 | .dev = { |
| 2626 | .platform_data = &adp122_userspace_comsumer_data, |
| 2627 | }, |
| 2628 | }; |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2629 | #endif |
| 2630 | #endif |
| 2631 | |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2632 | #if defined(CONFIG_IIO_GPIO_TRIGGER) || \ |
| 2633 | defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) |
| 2634 | |
| 2635 | static struct resource iio_gpio_trigger_resources[] = { |
| 2636 | [0] = { |
| 2637 | .start = IRQ_PF5, |
| 2638 | .end = IRQ_PF5, |
| 2639 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
| 2640 | }, |
| 2641 | }; |
| 2642 | |
| 2643 | static struct platform_device iio_gpio_trigger = { |
| 2644 | .name = "iio_gpio_trigger", |
| 2645 | .num_resources = ARRAY_SIZE(iio_gpio_trigger_resources), |
| 2646 | .resource = iio_gpio_trigger_resources, |
| 2647 | }; |
| 2648 | #endif |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2649 | |
Lars-Peter Clausen | af80d0d | 2011-08-30 14:02:50 -0400 | [diff] [blame] | 2650 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ |
| 2651 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) |
| 2652 | static struct platform_device bf5xx_adau1373_device = { |
| 2653 | .name = "bfin-eval-adau1373", |
| 2654 | }; |
| 2655 | #endif |
| 2656 | |
Lars-Peter Clausen | 2fba06f | 2011-08-30 13:12:26 -0400 | [diff] [blame] | 2657 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ |
| 2658 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) |
| 2659 | static struct platform_device bf5xx_adau1701_device = { |
| 2660 | .name = "bfin-eval-adau1701", |
| 2661 | }; |
| 2662 | #endif |
| 2663 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2664 | static struct platform_device *stamp_devices[] __initdata = { |
Michael Hennerich | 14b0320 | 2008-05-07 11:41:26 +0800 | [diff] [blame] | 2665 | |
| 2666 | &bfin_dpmc, |
| 2667 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2668 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) |
| 2669 | &bfin_pcmcia_cf_device, |
| 2670 | #endif |
| 2671 | |
| 2672 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 2673 | &rtc_device, |
| 2674 | #endif |
| 2675 | |
| 2676 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) |
| 2677 | &sl811_hcd_device, |
| 2678 | #endif |
| 2679 | |
| 2680 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
| 2681 | &isp1362_hcd_device, |
| 2682 | #endif |
| 2683 | |
Michael Hennerich | 3f37569 | 2008-11-18 17:48:22 +0800 | [diff] [blame] | 2684 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
| 2685 | &bfin_isp1760_device, |
| 2686 | #endif |
| 2687 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2688 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
| 2689 | &smc91x_device, |
| 2690 | #endif |
| 2691 | |
Alex Landau | f40d24d | 2007-07-12 12:11:48 +0800 | [diff] [blame] | 2692 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) |
| 2693 | &dm9000_device, |
| 2694 | #endif |
| 2695 | |
Barry Song | 706a01b | 2009-11-02 07:29:07 +0000 | [diff] [blame] | 2696 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
| 2697 | &bfin_can_device, |
| 2698 | #endif |
| 2699 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2700 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
Graf Yang | 6531962 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 2701 | &bfin_mii_bus, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2702 | &bfin_mac_device, |
| 2703 | #endif |
| 2704 | |
| 2705 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 2706 | &net2272_bfin_device, |
| 2707 | #endif |
| 2708 | |
| 2709 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2710 | &bfin_spi0_device, |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2711 | #endif |
| 2712 | |
Cliff Cai | 1e9aa95 | 2009-03-28 23:28:51 +0800 | [diff] [blame] | 2713 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) |
| 2714 | &bfin_sport_spi0_device, |
| 2715 | &bfin_sport_spi1_device, |
| 2716 | #endif |
| 2717 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2718 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) |
| 2719 | &bfin_fb_device, |
| 2720 | #endif |
| 2721 | |
Michael Hennerich | 2043f3f | 2008-10-13 14:46:30 +0800 | [diff] [blame] | 2722 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
| 2723 | &bfin_lq035q1_device, |
| 2724 | #endif |
| 2725 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2726 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
Sonic Zhang | 6bd1fbe | 2009-09-09 10:46:19 +0000 | [diff] [blame] | 2727 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 2728 | &bfin_uart0_device, |
| 2729 | #endif |
| 2730 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 2731 | &bfin_uart1_device, |
| 2732 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2733 | #endif |
| 2734 | |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 2735 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
Graf Yang | 42bd8bc | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 2736 | #ifdef CONFIG_BFIN_SIR0 |
| 2737 | &bfin_sir0_device, |
| 2738 | #endif |
| 2739 | #ifdef CONFIG_BFIN_SIR1 |
| 2740 | &bfin_sir1_device, |
| 2741 | #endif |
Graf Yang | 5be36d2 | 2008-04-25 03:09:15 +0800 | [diff] [blame] | 2742 | #endif |
| 2743 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2744 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
| 2745 | &i2c_bfin_twi_device, |
| 2746 | #endif |
| 2747 | |
| 2748 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2749 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2750 | &bfin_sport0_uart_device, |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2751 | #endif |
| 2752 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2753 | &bfin_sport1_uart_device, |
| 2754 | #endif |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2755 | #endif |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2756 | |
| 2757 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 2758 | &bfin_pata_device, |
| 2759 | #endif |
Michael Hennerich | 2463ef2 | 2008-01-27 16:49:48 +0800 | [diff] [blame] | 2760 | |
| 2761 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 2762 | &bfin_device_gpiokeys, |
| 2763 | #endif |
Mike Frysinger | cad2ab6 | 2008-02-22 17:01:31 +0800 | [diff] [blame] | 2764 | |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 2765 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
| 2766 | &bfin_async_nand_device, |
| 2767 | #endif |
| 2768 | |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 2769 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
Mike Frysinger | de8c43f | 2008-01-24 17:14:04 +0800 | [diff] [blame] | 2770 | &stamp_flash_device, |
Mike Frysinger | 793dc27 | 2008-03-26 08:09:12 +0800 | [diff] [blame] | 2771 | #endif |
Barry Song | 8312440 | 2009-08-06 21:03:02 +0000 | [diff] [blame] | 2772 | |
Scott Jiang | 2b6678c5 | 2011-07-05 19:27:25 -0400 | [diff] [blame] | 2773 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
| 2774 | &bfin_i2s_pcm, |
| 2775 | #endif |
| 2776 | |
| 2777 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
| 2778 | &bfin_tdm_pcm, |
| 2779 | #endif |
| 2780 | |
| 2781 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) |
| 2782 | &bfin_ac97_pcm, |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2783 | #endif |
| 2784 | |
Scott Jiang | e0754d8 | 2011-08-16 19:08:42 -0400 | [diff] [blame] | 2785 | #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2786 | &bfin_ad73311_codec_device, |
| 2787 | #endif |
| 2788 | |
| 2789 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2790 | &bfin_i2s, |
| 2791 | #endif |
| 2792 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2793 | #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) |
Barry Song | 8312440 | 2009-08-06 21:03:02 +0000 | [diff] [blame] | 2794 | &bfin_tdm, |
| 2795 | #endif |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2796 | |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2797 | #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) |
Barry Song | 336746e | 2009-10-13 09:19:18 +0000 | [diff] [blame] | 2798 | &bfin_ac97, |
| 2799 | #endif |
Scott Jiang | 6f53dbb | 2011-03-01 09:43:50 +0000 | [diff] [blame] | 2800 | |
Sonic Zhang | f32792d | 2010-02-09 02:47:09 +0000 | [diff] [blame] | 2801 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) |
| 2802 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ |
| 2803 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) |
| 2804 | &ad5398_virt_consumer_device, |
| 2805 | #endif |
| 2806 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ |
| 2807 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) |
| 2808 | &ad5398_userspace_consumer_device, |
| 2809 | #endif |
| 2810 | #endif |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2811 | |
Sonic Zhang | 1b04cbe | 2010-06-02 05:00:21 +0000 | [diff] [blame] | 2812 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2813 | &adp_switch_device, |
| 2814 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ |
| 2815 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) |
| 2816 | &adp122_userspace_consumer_device, |
Sonic Zhang | f8e6dbf | 2010-02-10 09:09:05 +0000 | [diff] [blame] | 2817 | #endif |
| 2818 | #endif |
Michael Hennerich | 0891bae | 2010-03-08 11:58:53 +0000 | [diff] [blame] | 2819 | |
| 2820 | #if defined(CONFIG_IIO_GPIO_TRIGGER) || \ |
| 2821 | defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) |
| 2822 | &iio_gpio_trigger, |
| 2823 | #endif |
Lars-Peter Clausen | 2fba06f | 2011-08-30 13:12:26 -0400 | [diff] [blame] | 2824 | |
Lars-Peter Clausen | af80d0d | 2011-08-30 14:02:50 -0400 | [diff] [blame] | 2825 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ |
| 2826 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) |
| 2827 | &bf5xx_adau1373_device, |
| 2828 | #endif |
| 2829 | |
Lars-Peter Clausen | 2fba06f | 2011-08-30 13:12:26 -0400 | [diff] [blame] | 2830 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ |
| 2831 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) |
| 2832 | &bf5xx_adau1701_device, |
| 2833 | #endif |
Lars-Peter Clausen | 080ae07 | 2011-08-30 13:33:06 -0400 | [diff] [blame] | 2834 | |
| 2835 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ |
| 2836 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) |
| 2837 | &bfin_eval_adav801_device, |
| 2838 | #endif |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2839 | }; |
| 2840 | |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 2841 | static int __init net2272_init(void) |
| 2842 | { |
| 2843 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) |
| 2844 | int ret; |
| 2845 | |
| 2846 | ret = gpio_request(GPIO_PF6, "net2272"); |
| 2847 | if (ret) |
| 2848 | return ret; |
| 2849 | |
| 2850 | /* Reset the USB chip */ |
| 2851 | gpio_direction_output(GPIO_PF6, 0); |
| 2852 | mdelay(2); |
| 2853 | gpio_set_value(GPIO_PF6, 1); |
| 2854 | #endif |
| 2855 | |
| 2856 | return 0; |
| 2857 | } |
| 2858 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2859 | static int __init stamp_init(void) |
| 2860 | { |
Harvey Harrison | b85d858 | 2008-04-23 09:39:01 +0800 | [diff] [blame] | 2861 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
Mike Frysinger | fc68911 | 2008-06-25 11:41:42 +0800 | [diff] [blame] | 2862 | bfin_plat_nand_init(); |
Mike Frysinger | 0531c46 | 2010-01-19 07:04:29 +0000 | [diff] [blame] | 2863 | adf702x_mac_init(); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2864 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
Sonic Zhang | df5de26 | 2009-09-23 05:01:56 +0000 | [diff] [blame] | 2865 | i2c_register_board_info(0, bfin_i2c_board_info, |
| 2866 | ARRAY_SIZE(bfin_i2c_board_info)); |
Mike Frysinger | 5bda272 | 2008-06-07 15:03:01 +0800 | [diff] [blame] | 2867 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2868 | |
Mike Frysinger | 9be8631 | 2011-05-04 11:20:15 -0400 | [diff] [blame] | 2869 | if (net2272_init()) |
| 2870 | pr_warning("unable to configure net2272; it probably won't work\n"); |
| 2871 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 2872 | return 0; |
| 2873 | } |
| 2874 | |
| 2875 | arch_initcall(stamp_init); |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2876 | |
Sonic Zhang | c13ce9f | 2009-09-23 09:37:46 +0000 | [diff] [blame] | 2877 | |
| 2878 | static struct platform_device *stamp_early_devices[] __initdata = { |
| 2879 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) |
| 2880 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
| 2881 | &bfin_uart0_device, |
| 2882 | #endif |
| 2883 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
| 2884 | &bfin_uart1_device, |
| 2885 | #endif |
| 2886 | #endif |
| 2887 | |
| 2888 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) |
| 2889 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
| 2890 | &bfin_sport0_uart_device, |
| 2891 | #endif |
| 2892 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
| 2893 | &bfin_sport1_uart_device, |
| 2894 | #endif |
| 2895 | #endif |
| 2896 | }; |
| 2897 | |
| 2898 | void __init native_machine_early_platform_add_devices(void) |
| 2899 | { |
| 2900 | printk(KERN_INFO "register early platform devices\n"); |
| 2901 | early_platform_add_devices(stamp_early_devices, |
| 2902 | ARRAY_SIZE(stamp_early_devices)); |
| 2903 | } |
| 2904 | |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2905 | void native_machine_restart(char *cmd) |
| 2906 | { |
| 2907 | /* workaround reboot hang when booting from SPI */ |
| 2908 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
Sonic Zhang | b52dae3 | 2009-02-04 16:49:45 +0800 | [diff] [blame] | 2909 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
Bryan Wu | c6c4d7b | 2007-10-11 01:20:06 +0800 | [diff] [blame] | 2910 | } |
Mike Frysinger | 137b152 | 2007-11-22 16:07:03 +0800 | [diff] [blame] | 2911 | |
| 2912 | /* |
| 2913 | * Currently the MAC address is saved in Flash by U-Boot |
| 2914 | */ |
| 2915 | #define FLASH_MAC 0x203f0000 |
Mike Frysinger | 9862cc5 | 2007-11-15 21:21:20 +0800 | [diff] [blame] | 2916 | void bfin_get_ether_addr(char *addr) |
Mike Frysinger | 137b152 | 2007-11-22 16:07:03 +0800 | [diff] [blame] | 2917 | { |
| 2918 | *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); |
| 2919 | *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); |
| 2920 | } |
Mike Frysinger | 9862cc5 | 2007-11-15 21:21:20 +0800 | [diff] [blame] | 2921 | EXPORT_SYMBOL(bfin_get_ether_addr); |