vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 Texas Instruments Inc. |
| 3 | * |
| 4 | * Modified from mach-omap2/board-zoom2.c |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/input.h> |
| 15 | #include <linux/input/matrix_keypad.h> |
| 16 | #include <linux/gpio.h> |
Balaji T K | ebeb53e | 2009-12-15 20:09:02 +0530 | [diff] [blame] | 17 | #include <linux/i2c/twl.h> |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 18 | #include <linux/regulator/machine.h> |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 19 | #include <linux/regulator/fixed.h> |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame^] | 20 | #include <linux/wl12xx.h> |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 21 | |
| 22 | #include <asm/mach-types.h> |
| 23 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> |
| 25 | |
| 26 | #include <plat/common.h> |
| 27 | #include <plat/usb.h> |
| 28 | |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 29 | #include "mux.h" |
Adrian Hunter | d02a900b | 2010-02-15 10:03:34 -0800 | [diff] [blame] | 30 | #include "hsmmc.h" |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 31 | |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 32 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame^] | 33 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 34 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 35 | /* Zoom2 has Qwerty keyboard*/ |
| 36 | static int board_keymap[] = { |
| 37 | KEY(0, 0, KEY_E), |
| 38 | KEY(0, 1, KEY_R), |
| 39 | KEY(0, 2, KEY_T), |
| 40 | KEY(0, 3, KEY_HOME), |
| 41 | KEY(0, 6, KEY_I), |
| 42 | KEY(0, 7, KEY_LEFTSHIFT), |
| 43 | KEY(1, 0, KEY_D), |
| 44 | KEY(1, 1, KEY_F), |
| 45 | KEY(1, 2, KEY_G), |
| 46 | KEY(1, 3, KEY_SEND), |
| 47 | KEY(1, 6, KEY_K), |
| 48 | KEY(1, 7, KEY_ENTER), |
| 49 | KEY(2, 0, KEY_X), |
| 50 | KEY(2, 1, KEY_C), |
| 51 | KEY(2, 2, KEY_V), |
| 52 | KEY(2, 3, KEY_END), |
| 53 | KEY(2, 6, KEY_DOT), |
| 54 | KEY(2, 7, KEY_CAPSLOCK), |
| 55 | KEY(3, 0, KEY_Z), |
| 56 | KEY(3, 1, KEY_KPPLUS), |
| 57 | KEY(3, 2, KEY_B), |
| 58 | KEY(3, 3, KEY_F1), |
| 59 | KEY(3, 6, KEY_O), |
| 60 | KEY(3, 7, KEY_SPACE), |
| 61 | KEY(4, 0, KEY_W), |
| 62 | KEY(4, 1, KEY_Y), |
| 63 | KEY(4, 2, KEY_U), |
| 64 | KEY(4, 3, KEY_F2), |
| 65 | KEY(4, 4, KEY_VOLUMEUP), |
| 66 | KEY(4, 6, KEY_L), |
| 67 | KEY(4, 7, KEY_LEFT), |
| 68 | KEY(5, 0, KEY_S), |
| 69 | KEY(5, 1, KEY_H), |
| 70 | KEY(5, 2, KEY_J), |
| 71 | KEY(5, 3, KEY_F3), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 72 | KEY(5, 4, KEY_UNKNOWN), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 73 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 74 | KEY(5, 6, KEY_M), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 75 | KEY(5, 7, KEY_RIGHT), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 76 | KEY(6, 0, KEY_Q), |
| 77 | KEY(6, 1, KEY_A), |
| 78 | KEY(6, 2, KEY_N), |
| 79 | KEY(6, 3, KEY_BACKSPACE), |
| 80 | KEY(6, 6, KEY_P), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 81 | KEY(6, 7, KEY_UP), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 82 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ |
| 83 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ |
| 84 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ |
| 85 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 86 | KEY(7, 6, KEY_SELECT), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 87 | KEY(7, 7, KEY_DOWN) |
| 88 | }; |
| 89 | |
| 90 | static struct matrix_keymap_data board_map_data = { |
| 91 | .keymap = board_keymap, |
| 92 | .keymap_size = ARRAY_SIZE(board_keymap), |
| 93 | }; |
| 94 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 95 | static struct twl4030_keypad_data zoom_kp_twl4030_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 96 | .keymap_data = &board_map_data, |
| 97 | .rows = 8, |
| 98 | .cols = 8, |
| 99 | .rep = 1, |
| 100 | }; |
| 101 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 102 | static struct regulator_consumer_supply zoom_vmmc1_supply = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 103 | .supply = "vmmc", |
| 104 | }; |
| 105 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 106 | static struct regulator_consumer_supply zoom_vsim_supply = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 107 | .supply = "vmmc_aux", |
| 108 | }; |
| 109 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 110 | static struct regulator_consumer_supply zoom_vmmc2_supply = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 111 | .supply = "vmmc", |
| 112 | }; |
| 113 | |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 114 | static struct regulator_consumer_supply zoom_vmmc3_supply = { |
| 115 | .supply = "vmmc", |
| 116 | .dev_name = "mmci-omap-hs.2", |
| 117 | }; |
| 118 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 119 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 120 | static struct regulator_init_data zoom_vmmc1 = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 121 | .constraints = { |
| 122 | .min_uV = 1850000, |
| 123 | .max_uV = 3150000, |
| 124 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 125 | | REGULATOR_MODE_STANDBY, |
| 126 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 127 | | REGULATOR_CHANGE_MODE |
| 128 | | REGULATOR_CHANGE_STATUS, |
| 129 | }, |
| 130 | .num_consumer_supplies = 1, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 131 | .consumer_supplies = &zoom_vmmc1_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 132 | }; |
| 133 | |
| 134 | /* VMMC2 for MMC2 card */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 135 | static struct regulator_init_data zoom_vmmc2 = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 136 | .constraints = { |
| 137 | .min_uV = 1850000, |
| 138 | .max_uV = 1850000, |
| 139 | .apply_uV = true, |
| 140 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 141 | | REGULATOR_MODE_STANDBY, |
| 142 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 143 | | REGULATOR_CHANGE_STATUS, |
| 144 | }, |
| 145 | .num_consumer_supplies = 1, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 146 | .consumer_supplies = &zoom_vmmc2_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 147 | }; |
| 148 | |
| 149 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 150 | static struct regulator_init_data zoom_vsim = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 151 | .constraints = { |
| 152 | .min_uV = 1800000, |
| 153 | .max_uV = 3000000, |
| 154 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 155 | | REGULATOR_MODE_STANDBY, |
| 156 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 157 | | REGULATOR_CHANGE_MODE |
| 158 | | REGULATOR_CHANGE_STATUS, |
| 159 | }, |
| 160 | .num_consumer_supplies = 1, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 161 | .consumer_supplies = &zoom_vsim_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 162 | }; |
| 163 | |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 164 | static struct regulator_init_data zoom_vmmc3 = { |
| 165 | .constraints = { |
| 166 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 167 | }, |
| 168 | .num_consumer_supplies = 1, |
| 169 | .consumer_supplies = &zoom_vmmc3_supply, |
| 170 | }; |
| 171 | |
| 172 | static struct fixed_voltage_config zoom_vwlan = { |
| 173 | .supply_name = "vwl1271", |
| 174 | .microvolts = 1800000, /* 1.8V */ |
| 175 | .gpio = OMAP_ZOOM_WLAN_PMENA_GPIO, |
| 176 | .startup_delay = 70000, /* 70msec */ |
| 177 | .enable_high = 1, |
| 178 | .enabled_at_boot = 0, |
| 179 | .init_data = &zoom_vmmc3, |
| 180 | }; |
| 181 | |
| 182 | static struct platform_device omap_vwlan_device = { |
| 183 | .name = "reg-fixed-voltage", |
| 184 | .id = 1, |
| 185 | .dev = { |
| 186 | .platform_data = &zoom_vwlan, |
| 187 | }, |
| 188 | }; |
| 189 | |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame^] | 190 | struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { |
| 191 | .irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO), |
| 192 | /* ZOOM ref clock is 26 MHz */ |
| 193 | .board_ref_clock = 1, |
| 194 | }; |
| 195 | |
Adrian Hunter | 68ff042 | 2010-02-15 10:03:34 -0800 | [diff] [blame] | 196 | static struct omap2_hsmmc_info mmc[] __initdata = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 197 | { |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 198 | .name = "external", |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 199 | .mmc = 1, |
| 200 | .wires = 4, |
| 201 | .gpio_wp = -EINVAL, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 202 | .power_saving = true, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 203 | }, |
| 204 | { |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 205 | .name = "internal", |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 206 | .mmc = 2, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 207 | .wires = 8, |
| 208 | .gpio_cd = -EINVAL, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 209 | .gpio_wp = -EINVAL, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 210 | .nonremovable = true, |
| 211 | .power_saving = true, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 212 | }, |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame^] | 213 | { |
| 214 | .name = "wl1271", |
| 215 | .mmc = 3, |
| 216 | .wires = 4, |
| 217 | .gpio_wp = -EINVAL, |
| 218 | .gpio_cd = -EINVAL, |
| 219 | .nonremovable = true, |
| 220 | }, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 221 | {} /* Terminator */ |
| 222 | }; |
| 223 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 224 | static int zoom_twl_gpio_setup(struct device *dev, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 225 | unsigned gpio, unsigned ngpio) |
| 226 | { |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 227 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 228 | mmc[0].gpio_cd = gpio + 0; |
Adrian Hunter | 68ff042 | 2010-02-15 10:03:34 -0800 | [diff] [blame] | 229 | omap2_hsmmc_init(mmc); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 230 | |
| 231 | /* link regulators to MMC adapters ... we "know" the |
| 232 | * regulators will be set up only *after* we return. |
| 233 | */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 234 | zoom_vmmc1_supply.dev = mmc[0].dev; |
| 235 | zoom_vsim_supply.dev = mmc[0].dev; |
| 236 | zoom_vmmc2_supply.dev = mmc[1].dev; |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 237 | |
| 238 | return 0; |
| 239 | } |
| 240 | |
| 241 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 242 | static int zoom_batt_table[] = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 243 | /* 0 C*/ |
| 244 | 30800, 29500, 28300, 27100, |
| 245 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, |
| 246 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, |
| 247 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, |
| 248 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, |
| 249 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, |
| 250 | 4040, 3910, 3790, 3670, 3550 |
| 251 | }; |
| 252 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 253 | static struct twl4030_bci_platform_data zoom_bci_data = { |
| 254 | .battery_tmp_tbl = zoom_batt_table, |
| 255 | .tblsize = ARRAY_SIZE(zoom_batt_table), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 256 | }; |
| 257 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 258 | static struct twl4030_usb_data zoom_usb_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 259 | .usb_mode = T2_USB_MODE_ULPI, |
| 260 | }; |
| 261 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 262 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 263 | .gpio_base = OMAP_MAX_GPIO_LINES, |
| 264 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
| 265 | .irq_end = TWL4030_GPIO_IRQ_END, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 266 | .setup = zoom_twl_gpio_setup, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 267 | }; |
| 268 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 269 | static struct twl4030_madc_platform_data zoom_madc_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 270 | .irq_line = 1, |
| 271 | }; |
| 272 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 273 | static struct twl4030_codec_audio_data zoom_audio_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 274 | .audio_mclk = 26000000, |
| 275 | }; |
| 276 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 277 | static struct twl4030_codec_data zoom_codec_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 278 | .audio_mclk = 26000000, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 279 | .audio = &zoom_audio_data, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 280 | }; |
| 281 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 282 | static struct twl4030_platform_data zoom_twldata = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 283 | .irq_base = TWL4030_IRQ_BASE, |
| 284 | .irq_end = TWL4030_IRQ_END, |
| 285 | |
| 286 | /* platform_data for children goes here */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 287 | .bci = &zoom_bci_data, |
| 288 | .madc = &zoom_madc_data, |
| 289 | .usb = &zoom_usb_data, |
| 290 | .gpio = &zoom_gpio_data, |
| 291 | .keypad = &zoom_kp_twl4030_data, |
| 292 | .codec = &zoom_codec_data, |
Anand Gadiyar | aed79bc | 2009-12-11 16:16:36 -0800 | [diff] [blame] | 293 | .vmmc1 = &zoom_vmmc1, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 294 | .vmmc2 = &zoom_vmmc2, |
| 295 | .vsim = &zoom_vsim, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 296 | |
| 297 | }; |
| 298 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 299 | static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 300 | { |
vikram pandita | 6b61a83 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 301 | I2C_BOARD_INFO("twl5030", 0x48), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 302 | .flags = I2C_CLIENT_WAKE, |
| 303 | .irq = INT_34XX_SYS_NIRQ, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 304 | .platform_data = &zoom_twldata, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 305 | }, |
| 306 | }; |
| 307 | |
| 308 | static int __init omap_i2c_init(void) |
| 309 | { |
vikram pandita | 6b61a83 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 310 | omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 311 | ARRAY_SIZE(zoom_i2c_boardinfo)); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 312 | omap_register_i2c_bus(2, 400, NULL, 0); |
| 313 | omap_register_i2c_bus(3, 400, NULL, 0); |
| 314 | return 0; |
| 315 | } |
| 316 | |
Maulik Mankad | 884b836 | 2010-02-17 14:09:30 -0800 | [diff] [blame] | 317 | static struct omap_musb_board_data musb_board_data = { |
| 318 | .interface_type = MUSB_INTERFACE_ULPI, |
| 319 | .mode = MUSB_OTG, |
| 320 | .power = 100, |
| 321 | }; |
| 322 | |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 323 | static void enable_board_wakeup_source(void) |
| 324 | { |
| 325 | /* T2 interrupt line (keypad) */ |
| 326 | omap_mux_init_signal("sys_nirq", |
| 327 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
| 328 | } |
| 329 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 330 | void __init zoom_peripherals_init(void) |
| 331 | { |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame^] | 332 | if (wl12xx_set_platform_data(&omap_zoom_wlan_data)) |
| 333 | pr_err("error setting wl12xx data\n"); |
| 334 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 335 | omap_i2c_init(); |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 336 | platform_device_register(&omap_vwlan_device); |
Maulik Mankad | 884b836 | 2010-02-17 14:09:30 -0800 | [diff] [blame] | 337 | usb_musb_init(&musb_board_data); |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 338 | enable_board_wakeup_source(); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 339 | } |