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> |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 21 | #include <linux/mmc/host.h> |
Tony Lindgren | 4b25408 | 2012-08-30 15:37:24 -0700 | [diff] [blame] | 22 | #include <linux/platform_data/gpio-omap.h> |
Kishon Vijay Abraham I | 51482be | 2013-02-06 18:58:50 +0530 | [diff] [blame^] | 23 | #include <linux/usb/phy.h> |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 24 | |
| 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <asm/mach/map.h> |
| 28 | |
Tony Lindgren | 4e65331 | 2011-11-10 22:45:17 +0100 | [diff] [blame] | 29 | #include "common.h" |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 30 | |
Tony Lindgren | 8599e7c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 31 | #include "board-zoom.h" |
Jarkko Nikula | 4b285c3 | 2010-09-23 19:11:54 +0300 | [diff] [blame] | 32 | |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 33 | #include "mux.h" |
Adrian Hunter | d02a900b | 2010-02-15 10:03:34 -0800 | [diff] [blame] | 34 | #include "hsmmc.h" |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 35 | #include "common-board-devices.h" |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 36 | |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 37 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) |
Peter Ujfalusi | eb775d3 | 2012-09-10 13:46:28 +0300 | [diff] [blame] | 38 | #define ZOOM2_HEADSET_EXTMUTE_GPIO (153) |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame] | 39 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 40 | |
Kishore Y | a649033 | 2010-11-15 07:09:03 +0100 | [diff] [blame] | 41 | #define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) |
| 42 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 43 | /* Zoom2 has Qwerty keyboard*/ |
Manjunath Kondaiah G | bead437 | 2010-10-08 10:01:13 -0700 | [diff] [blame] | 44 | static uint32_t board_keymap[] = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 45 | KEY(0, 0, KEY_E), |
| 46 | KEY(0, 1, KEY_R), |
| 47 | KEY(0, 2, KEY_T), |
| 48 | KEY(0, 3, KEY_HOME), |
| 49 | KEY(0, 6, KEY_I), |
| 50 | KEY(0, 7, KEY_LEFTSHIFT), |
| 51 | KEY(1, 0, KEY_D), |
| 52 | KEY(1, 1, KEY_F), |
| 53 | KEY(1, 2, KEY_G), |
| 54 | KEY(1, 3, KEY_SEND), |
| 55 | KEY(1, 6, KEY_K), |
| 56 | KEY(1, 7, KEY_ENTER), |
| 57 | KEY(2, 0, KEY_X), |
| 58 | KEY(2, 1, KEY_C), |
| 59 | KEY(2, 2, KEY_V), |
| 60 | KEY(2, 3, KEY_END), |
| 61 | KEY(2, 6, KEY_DOT), |
| 62 | KEY(2, 7, KEY_CAPSLOCK), |
| 63 | KEY(3, 0, KEY_Z), |
| 64 | KEY(3, 1, KEY_KPPLUS), |
| 65 | KEY(3, 2, KEY_B), |
| 66 | KEY(3, 3, KEY_F1), |
| 67 | KEY(3, 6, KEY_O), |
| 68 | KEY(3, 7, KEY_SPACE), |
| 69 | KEY(4, 0, KEY_W), |
| 70 | KEY(4, 1, KEY_Y), |
| 71 | KEY(4, 2, KEY_U), |
| 72 | KEY(4, 3, KEY_F2), |
| 73 | KEY(4, 4, KEY_VOLUMEUP), |
| 74 | KEY(4, 6, KEY_L), |
| 75 | KEY(4, 7, KEY_LEFT), |
| 76 | KEY(5, 0, KEY_S), |
| 77 | KEY(5, 1, KEY_H), |
| 78 | KEY(5, 2, KEY_J), |
| 79 | KEY(5, 3, KEY_F3), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 80 | KEY(5, 4, KEY_UNKNOWN), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 81 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 82 | KEY(5, 6, KEY_M), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 83 | KEY(5, 7, KEY_RIGHT), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 84 | KEY(6, 0, KEY_Q), |
| 85 | KEY(6, 1, KEY_A), |
| 86 | KEY(6, 2, KEY_N), |
| 87 | KEY(6, 3, KEY_BACKSPACE), |
| 88 | KEY(6, 6, KEY_P), |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 89 | KEY(6, 7, KEY_UP), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 90 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ |
| 91 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ |
| 92 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ |
| 93 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ |
Vimal Singh | 6b06ebd | 2010-01-08 10:29:07 -0800 | [diff] [blame] | 94 | KEY(7, 6, KEY_SELECT), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 95 | KEY(7, 7, KEY_DOWN) |
| 96 | }; |
| 97 | |
| 98 | static struct matrix_keymap_data board_map_data = { |
| 99 | .keymap = board_keymap, |
| 100 | .keymap_size = ARRAY_SIZE(board_keymap), |
| 101 | }; |
| 102 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 103 | static struct twl4030_keypad_data zoom_kp_twl4030_data = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 104 | .keymap_data = &board_map_data, |
| 105 | .rows = 8, |
| 106 | .cols = 8, |
| 107 | .rep = 1, |
| 108 | }; |
| 109 | |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 110 | static struct regulator_consumer_supply zoom_vmmc1_supply[] = { |
| 111 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 112 | }; |
| 113 | |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 114 | static struct regulator_consumer_supply zoom_vsim_supply[] = { |
| 115 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 116 | }; |
| 117 | |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 118 | static struct regulator_consumer_supply zoom_vmmc2_supply[] = { |
| 119 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 120 | }; |
| 121 | |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 122 | static struct regulator_consumer_supply zoom_vmmc3_supply[] = { |
| 123 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 124 | }; |
| 125 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 126 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 127 | static struct regulator_init_data zoom_vmmc1 = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 128 | .constraints = { |
| 129 | .min_uV = 1850000, |
| 130 | .max_uV = 3150000, |
| 131 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 132 | | REGULATOR_MODE_STANDBY, |
| 133 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 134 | | REGULATOR_CHANGE_MODE |
| 135 | | REGULATOR_CHANGE_STATUS, |
| 136 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 137 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply), |
| 138 | .consumer_supplies = zoom_vmmc1_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 139 | }; |
| 140 | |
| 141 | /* VMMC2 for MMC2 card */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 142 | static struct regulator_init_data zoom_vmmc2 = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 143 | .constraints = { |
| 144 | .min_uV = 1850000, |
| 145 | .max_uV = 1850000, |
| 146 | .apply_uV = true, |
| 147 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 148 | | REGULATOR_MODE_STANDBY, |
| 149 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 150 | | REGULATOR_CHANGE_STATUS, |
| 151 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 152 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply), |
| 153 | .consumer_supplies = zoom_vmmc2_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 154 | }; |
| 155 | |
| 156 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 157 | static struct regulator_init_data zoom_vsim = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 158 | .constraints = { |
| 159 | .min_uV = 1800000, |
| 160 | .max_uV = 3000000, |
| 161 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 162 | | REGULATOR_MODE_STANDBY, |
| 163 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 164 | | REGULATOR_CHANGE_MODE |
| 165 | | REGULATOR_CHANGE_STATUS, |
| 166 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 167 | .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply), |
| 168 | .consumer_supplies = zoom_vsim_supply, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 169 | }; |
| 170 | |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 171 | static struct regulator_init_data zoom_vmmc3 = { |
| 172 | .constraints = { |
| 173 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 174 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 175 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply), |
| 176 | .consumer_supplies = zoom_vmmc3_supply, |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | static struct fixed_voltage_config zoom_vwlan = { |
| 180 | .supply_name = "vwl1271", |
| 181 | .microvolts = 1800000, /* 1.8V */ |
| 182 | .gpio = OMAP_ZOOM_WLAN_PMENA_GPIO, |
| 183 | .startup_delay = 70000, /* 70msec */ |
| 184 | .enable_high = 1, |
| 185 | .enabled_at_boot = 0, |
| 186 | .init_data = &zoom_vmmc3, |
| 187 | }; |
| 188 | |
| 189 | static struct platform_device omap_vwlan_device = { |
| 190 | .name = "reg-fixed-voltage", |
| 191 | .id = 1, |
| 192 | .dev = { |
| 193 | .platform_data = &zoom_vwlan, |
| 194 | }, |
| 195 | }; |
| 196 | |
Nishanth Menon | 0ce3bb7 | 2011-01-06 19:49:29 -0800 | [diff] [blame] | 197 | static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { |
Vikram Narayanan | 224cd71 | 2012-09-26 22:12:22 +0530 | [diff] [blame] | 198 | .board_ref_clock = WL12XX_REFCLOCK_26, /* 26 MHz */ |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame] | 199 | }; |
| 200 | |
Bryan Wu | 1a6b592 | 2010-12-08 02:41:25 +0000 | [diff] [blame] | 201 | static struct omap2_hsmmc_info mmc[] = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 202 | { |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 203 | .name = "external", |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 204 | .mmc = 1, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 205 | .caps = MMC_CAP_4_BIT_DATA, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 206 | .gpio_wp = -EINVAL, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 207 | .power_saving = true, |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 208 | .deferred = true, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 209 | }, |
| 210 | { |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 211 | .name = "internal", |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 212 | .mmc = 2, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 213 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 214 | .gpio_cd = -EINVAL, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 215 | .gpio_wp = -EINVAL, |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 216 | .nonremovable = true, |
| 217 | .power_saving = true, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 218 | }, |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame] | 219 | { |
| 220 | .name = "wl1271", |
| 221 | .mmc = 3, |
Ohad Ben-Cohen | f8110364 | 2010-11-26 23:59:24 +0000 | [diff] [blame] | 222 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame] | 223 | .gpio_wp = -EINVAL, |
| 224 | .gpio_cd = -EINVAL, |
| 225 | .nonremovable = true, |
| 226 | }, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 227 | {} /* Terminator */ |
| 228 | }; |
| 229 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 230 | static int zoom_twl_gpio_setup(struct device *dev, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 231 | unsigned gpio, unsigned ngpio) |
| 232 | { |
Kishore Y | a649033 | 2010-11-15 07:09:03 +0100 | [diff] [blame] | 233 | int ret; |
| 234 | |
Madhusudhan Chikkature | ed32350 | 2009-12-11 16:16:37 -0800 | [diff] [blame] | 235 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 236 | mmc[0].gpio_cd = gpio + 0; |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 237 | omap_hsmmc_late_init(mmc); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 238 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 239 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, |
| 240 | "lcd enable"); |
| 241 | if (ret) |
Kishore Y | a649033 | 2010-11-15 07:09:03 +0100 | [diff] [blame] | 242 | pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n", |
| 243 | LCD_PANEL_ENABLE_GPIO); |
Kishore Y | a649033 | 2010-11-15 07:09:03 +0100 | [diff] [blame] | 244 | |
| 245 | return ret; |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 246 | } |
| 247 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 248 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 249 | .setup = zoom_twl_gpio_setup, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 250 | }; |
| 251 | |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 252 | static struct twl4030_platform_data zoom_twldata = { |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 253 | /* platform_data for children goes here */ |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 254 | .gpio = &zoom_gpio_data, |
| 255 | .keypad = &zoom_kp_twl4030_data, |
Anand Gadiyar | aed79bc | 2009-12-11 16:16:36 -0800 | [diff] [blame] | 256 | .vmmc1 = &zoom_vmmc1, |
vikram pandita | 62d0b336 | 2009-11-22 10:11:31 -0800 | [diff] [blame] | 257 | .vmmc2 = &zoom_vmmc2, |
| 258 | .vsim = &zoom_vsim, |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 259 | }; |
| 260 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 261 | static int __init omap_i2c_init(void) |
| 262 | { |
Peter Ujfalusi | 827ed9a | 2011-06-07 10:28:54 +0300 | [diff] [blame] | 263 | omap3_pmic_get_config(&zoom_twldata, |
Peter Ujfalusi | b252b0e | 2011-06-07 11:38:24 +0300 | [diff] [blame] | 264 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | |
| 265 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, |
| 266 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); |
Peter Ujfalusi | 827ed9a | 2011-06-07 10:28:54 +0300 | [diff] [blame] | 267 | |
Jarkko Nikula | 4b285c3 | 2010-09-23 19:11:54 +0300 | [diff] [blame] | 268 | if (machine_is_omap_zoom2()) { |
Peter Ujfalusi | 4ae6df5 | 2011-05-31 15:21:13 +0300 | [diff] [blame] | 269 | struct twl4030_codec_data *codec_data; |
| 270 | codec_data = zoom_twldata.audio->codec; |
Peter Ujfalusi | 827ed9a | 2011-06-07 10:28:54 +0300 | [diff] [blame] | 271 | |
Peter Ujfalusi | 4ae6df5 | 2011-05-31 15:21:13 +0300 | [diff] [blame] | 272 | codec_data->ramp_delay_value = 3; /* 161 ms */ |
| 273 | codec_data->hs_extmute = 1; |
Peter Ujfalusi | eb775d3 | 2012-09-10 13:46:28 +0300 | [diff] [blame] | 274 | codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO; |
Jarkko Nikula | 4b285c3 | 2010-09-23 19:11:54 +0300 | [diff] [blame] | 275 | } |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 276 | omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 277 | omap_register_i2c_bus(2, 400, NULL, 0); |
| 278 | omap_register_i2c_bus(3, 400, NULL, 0); |
| 279 | return 0; |
| 280 | } |
| 281 | |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 282 | static void enable_board_wakeup_source(void) |
| 283 | { |
| 284 | /* T2 interrupt line (keypad) */ |
| 285 | omap_mux_init_signal("sys_nirq", |
| 286 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
| 287 | } |
| 288 | |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 289 | void __init zoom_peripherals_init(void) |
| 290 | { |
Tarun Kanti DebBarma | 46a0a54 | 2012-03-29 08:41:01 -0700 | [diff] [blame] | 291 | int ret; |
| 292 | |
| 293 | omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO); |
| 294 | ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); |
Russell King | 70d669d | 2012-02-07 11:03:23 +0000 | [diff] [blame] | 295 | |
| 296 | if (ret) |
| 297 | pr_err("error setting wl12xx data: %d\n", ret); |
Ohad Ben-Cohen | 80b517f | 2010-09-16 01:32:30 +0200 | [diff] [blame] | 298 | |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 299 | omap_hsmmc_init(mmc); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 300 | omap_i2c_init(); |
Ohad Ben-Cohen | b642fde | 2010-09-16 01:32:09 +0200 | [diff] [blame] | 301 | platform_device_register(&omap_vwlan_device); |
Kishon Vijay Abraham I | 51482be | 2013-02-06 18:58:50 +0530 | [diff] [blame^] | 302 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); |
Mike Rapoport | 9e18630 | 2011-04-27 11:56:12 +0300 | [diff] [blame] | 303 | usb_musb_init(NULL); |
Lesly A M | a1e6364 | 2010-02-15 10:03:35 -0800 | [diff] [blame] | 304 | enable_board_wakeup_source(); |
Govindraj.R | 257f23d | 2010-09-27 20:21:05 +0530 | [diff] [blame] | 305 | omap_serial_init(); |
vikram pandita | 479f12c | 2009-11-22 10:11:30 -0800 | [diff] [blame] | 306 | } |