Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Board support file for OMAP4430 SDP. |
| 3 | * |
| 4 | * Copyright (C) 2009 Texas Instruments |
| 5 | * |
| 6 | * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> |
| 7 | * |
| 8 | * Based on mach-omap2/board-3430sdp.c |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. |
| 13 | */ |
| 14 | |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/io.h> |
| 19 | #include <linux/gpio.h> |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 20 | #include <linux/usb/otg.h> |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 21 | #include <linux/spi/spi.h> |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 22 | #include <linux/i2c/twl.h> |
Peter Ujfalusi | 8eaeb93 | 2012-04-03 11:56:51 +0300 | [diff] [blame] | 23 | #include <linux/mfd/twl6040.h> |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 24 | #include <linux/gpio_keys.h> |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 25 | #include <linux/regulator/machine.h> |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 26 | #include <linux/regulator/fixed.h> |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 27 | #include <linux/leds.h> |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 28 | #include <linux/leds_pwm.h> |
Felipe Balbi | 0f1142a | 2012-03-16 22:47:48 -0700 | [diff] [blame] | 29 | #include <linux/platform_data/omap4-keypad.h> |
Felipe Balbi | e8c4a7a | 2012-10-24 14:26:19 -0700 | [diff] [blame] | 30 | #include <linux/usb/musb.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 31 | |
Marc Zyngier | 6b2f55d | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 32 | #include <asm/hardware/gic.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/mach/arch.h> |
| 35 | #include <asm/mach/map.h> |
| 36 | |
Tony Lindgren | 4e65331 | 2011-11-10 22:45:17 +0100 | [diff] [blame] | 37 | #include "common.h" |
Tony Lindgren | 0e70156 | 2012-09-20 11:42:20 -0700 | [diff] [blame] | 38 | #include "omap4-keypad.h" |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 39 | #include <linux/wl12xx.h> |
Peter Ujfalusi | a433ffa | 2011-12-07 15:59:35 +0200 | [diff] [blame] | 40 | #include <linux/platform_data/omap-abe-twl6040.h> |
Manjunath Kondaiah G | 04aeae7 | 2010-10-08 09:58:35 -0700 | [diff] [blame] | 41 | |
Tony Lindgren | dbc0416 | 2012-08-31 10:59:07 -0700 | [diff] [blame] | 42 | #include "soc.h" |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 43 | #include "mux.h" |
Tony Lindgren | 68f39e7 | 2012-10-15 12:09:43 -0700 | [diff] [blame] | 44 | #include "mmc.h" |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 45 | #include "hsmmc.h" |
Paul Walmsley | 4814ced | 2010-10-08 11:40:20 -0600 | [diff] [blame] | 46 | #include "control.h" |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 47 | #include "common-board-devices.h" |
Tomi Valkeinen | 86cf29d | 2012-11-05 15:14:18 +0200 | [diff] [blame] | 48 | #include "dss-common.h" |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 49 | |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 50 | #define ETH_KS8851_IRQ 34 |
| 51 | #define ETH_KS8851_POWER_ON 48 |
| 52 | #define ETH_KS8851_QUART 138 |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 53 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
| 54 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 55 | |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 56 | #define GPIO_WIFI_PMENA 54 |
| 57 | #define GPIO_WIFI_IRQ 53 |
| 58 | |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 59 | static const int sdp4430_keymap[] = { |
| 60 | KEY(0, 0, KEY_E), |
| 61 | KEY(0, 1, KEY_R), |
| 62 | KEY(0, 2, KEY_T), |
| 63 | KEY(0, 3, KEY_HOME), |
| 64 | KEY(0, 4, KEY_F5), |
| 65 | KEY(0, 5, KEY_UNKNOWN), |
| 66 | KEY(0, 6, KEY_I), |
| 67 | KEY(0, 7, KEY_LEFTSHIFT), |
| 68 | |
| 69 | KEY(1, 0, KEY_D), |
| 70 | KEY(1, 1, KEY_F), |
| 71 | KEY(1, 2, KEY_G), |
| 72 | KEY(1, 3, KEY_SEND), |
| 73 | KEY(1, 4, KEY_F6), |
| 74 | KEY(1, 5, KEY_UNKNOWN), |
| 75 | KEY(1, 6, KEY_K), |
| 76 | KEY(1, 7, KEY_ENTER), |
| 77 | |
| 78 | KEY(2, 0, KEY_X), |
| 79 | KEY(2, 1, KEY_C), |
| 80 | KEY(2, 2, KEY_V), |
| 81 | KEY(2, 3, KEY_END), |
| 82 | KEY(2, 4, KEY_F7), |
| 83 | KEY(2, 5, KEY_UNKNOWN), |
| 84 | KEY(2, 6, KEY_DOT), |
| 85 | KEY(2, 7, KEY_CAPSLOCK), |
| 86 | |
| 87 | KEY(3, 0, KEY_Z), |
| 88 | KEY(3, 1, KEY_KPPLUS), |
| 89 | KEY(3, 2, KEY_B), |
| 90 | KEY(3, 3, KEY_F1), |
| 91 | KEY(3, 4, KEY_F8), |
| 92 | KEY(3, 5, KEY_UNKNOWN), |
| 93 | KEY(3, 6, KEY_O), |
| 94 | KEY(3, 7, KEY_SPACE), |
| 95 | |
| 96 | KEY(4, 0, KEY_W), |
| 97 | KEY(4, 1, KEY_Y), |
| 98 | KEY(4, 2, KEY_U), |
| 99 | KEY(4, 3, KEY_F2), |
| 100 | KEY(4, 4, KEY_VOLUMEUP), |
| 101 | KEY(4, 5, KEY_UNKNOWN), |
| 102 | KEY(4, 6, KEY_L), |
| 103 | KEY(4, 7, KEY_LEFT), |
| 104 | |
| 105 | KEY(5, 0, KEY_S), |
| 106 | KEY(5, 1, KEY_H), |
| 107 | KEY(5, 2, KEY_J), |
| 108 | KEY(5, 3, KEY_F3), |
| 109 | KEY(5, 4, KEY_F9), |
| 110 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 111 | KEY(5, 6, KEY_M), |
| 112 | KEY(5, 7, KEY_RIGHT), |
| 113 | |
| 114 | KEY(6, 0, KEY_Q), |
| 115 | KEY(6, 1, KEY_A), |
| 116 | KEY(6, 2, KEY_N), |
| 117 | KEY(6, 3, KEY_BACK), |
| 118 | KEY(6, 4, KEY_BACKSPACE), |
| 119 | KEY(6, 5, KEY_UNKNOWN), |
| 120 | KEY(6, 6, KEY_P), |
| 121 | KEY(6, 7, KEY_UP), |
| 122 | |
| 123 | KEY(7, 0, KEY_PROG1), |
| 124 | KEY(7, 1, KEY_PROG2), |
| 125 | KEY(7, 2, KEY_PROG3), |
| 126 | KEY(7, 3, KEY_PROG4), |
| 127 | KEY(7, 4, KEY_F4), |
| 128 | KEY(7, 5, KEY_UNKNOWN), |
| 129 | KEY(7, 6, KEY_OK), |
| 130 | KEY(7, 7, KEY_DOWN), |
| 131 | }; |
Bjarne Steinsbo | a368f77 | 2011-09-30 11:05:56 -0700 | [diff] [blame] | 132 | static struct omap_device_pad keypad_pads[] = { |
Shubhrajyoti Datta | f67df6c | 2011-07-05 03:38:24 -0700 | [diff] [blame] | 133 | { .name = "kpd_col1.kpd_col1", |
| 134 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 135 | }, |
| 136 | { .name = "kpd_col1.kpd_col1", |
| 137 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 138 | }, |
| 139 | { .name = "kpd_col2.kpd_col2", |
| 140 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 141 | }, |
| 142 | { .name = "kpd_col3.kpd_col3", |
| 143 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 144 | }, |
| 145 | { .name = "kpd_col4.kpd_col4", |
| 146 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 147 | }, |
| 148 | { .name = "kpd_col5.kpd_col5", |
| 149 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 150 | }, |
| 151 | { .name = "gpmc_a23.kpd_col7", |
| 152 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 153 | }, |
| 154 | { .name = "gpmc_a22.kpd_col6", |
| 155 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, |
| 156 | }, |
| 157 | { .name = "kpd_row0.kpd_row0", |
| 158 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 159 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 160 | }, |
| 161 | { .name = "kpd_row1.kpd_row1", |
| 162 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 163 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 164 | }, |
| 165 | { .name = "kpd_row2.kpd_row2", |
| 166 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 167 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 168 | }, |
| 169 | { .name = "kpd_row3.kpd_row3", |
| 170 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 171 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 172 | }, |
| 173 | { .name = "kpd_row4.kpd_row4", |
| 174 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 175 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 176 | }, |
| 177 | { .name = "kpd_row5.kpd_row5", |
| 178 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 179 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 180 | }, |
| 181 | { .name = "gpmc_a18.kpd_row6", |
| 182 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 183 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 184 | }, |
| 185 | { .name = "gpmc_a19.kpd_row7", |
| 186 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | |
| 187 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, |
| 188 | }, |
| 189 | }; |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 190 | |
| 191 | static struct matrix_keymap_data sdp4430_keymap_data = { |
| 192 | .keymap = sdp4430_keymap, |
| 193 | .keymap_size = ARRAY_SIZE(sdp4430_keymap), |
| 194 | }; |
| 195 | |
| 196 | static struct omap4_keypad_platform_data sdp4430_keypad_data = { |
| 197 | .keymap_data = &sdp4430_keymap_data, |
| 198 | .rows = 8, |
| 199 | .cols = 8, |
| 200 | }; |
Shubhrajyoti Datta | f67df6c | 2011-07-05 03:38:24 -0700 | [diff] [blame] | 201 | |
| 202 | static struct omap_board_data keypad_data = { |
| 203 | .id = 1, |
| 204 | .pads = keypad_pads, |
| 205 | .pads_cnt = ARRAY_SIZE(keypad_pads), |
| 206 | }; |
| 207 | |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 208 | static struct gpio_led sdp4430_gpio_leds[] = { |
| 209 | { |
| 210 | .name = "omap4:green:debug0", |
| 211 | .gpio = 61, |
| 212 | }, |
| 213 | { |
| 214 | .name = "omap4:green:debug1", |
| 215 | .gpio = 30, |
| 216 | }, |
| 217 | { |
| 218 | .name = "omap4:green:debug2", |
| 219 | .gpio = 7, |
| 220 | }, |
| 221 | { |
| 222 | .name = "omap4:green:debug3", |
| 223 | .gpio = 8, |
| 224 | }, |
| 225 | { |
| 226 | .name = "omap4:green:debug4", |
| 227 | .gpio = 50, |
| 228 | }, |
| 229 | { |
| 230 | .name = "omap4:blue:user", |
| 231 | .gpio = 169, |
| 232 | }, |
| 233 | { |
| 234 | .name = "omap4:red:user", |
| 235 | .gpio = 170, |
| 236 | }, |
| 237 | { |
| 238 | .name = "omap4:green:user", |
| 239 | .gpio = 139, |
| 240 | }, |
| 241 | |
| 242 | }; |
| 243 | |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 244 | static struct gpio_keys_button sdp4430_gpio_keys[] = { |
| 245 | { |
| 246 | .desc = "Proximity Sensor", |
| 247 | .type = EV_SW, |
| 248 | .code = SW_FRONT_PROXIMITY, |
| 249 | .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO, |
| 250 | .active_low = 0, |
| 251 | } |
| 252 | }; |
| 253 | |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 254 | static struct gpio_led_platform_data sdp4430_led_data = { |
| 255 | .leds = sdp4430_gpio_leds, |
| 256 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), |
| 257 | }; |
| 258 | |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 259 | static struct led_pwm sdp4430_pwm_leds[] = { |
| 260 | { |
| 261 | .name = "omap4:green:chrg", |
| 262 | .pwm_id = 1, |
| 263 | .max_brightness = 255, |
| 264 | .pwm_period_ns = 7812500, |
| 265 | }, |
| 266 | }; |
| 267 | |
| 268 | static struct led_pwm_platform_data sdp4430_pwm_data = { |
| 269 | .num_leds = ARRAY_SIZE(sdp4430_pwm_leds), |
| 270 | .leds = sdp4430_pwm_leds, |
| 271 | }; |
| 272 | |
| 273 | static struct platform_device sdp4430_leds_pwm = { |
| 274 | .name = "leds_pwm", |
| 275 | .id = -1, |
| 276 | .dev = { |
| 277 | .platform_data = &sdp4430_pwm_data, |
| 278 | }, |
| 279 | }; |
| 280 | |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 281 | static int omap_prox_activate(struct device *dev) |
| 282 | { |
| 283 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); |
| 284 | return 0; |
| 285 | } |
| 286 | |
| 287 | static void omap_prox_deactivate(struct device *dev) |
| 288 | { |
| 289 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0); |
| 290 | } |
| 291 | |
| 292 | static struct gpio_keys_platform_data sdp4430_gpio_keys_data = { |
| 293 | .buttons = sdp4430_gpio_keys, |
| 294 | .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys), |
| 295 | .enable = omap_prox_activate, |
| 296 | .disable = omap_prox_deactivate, |
| 297 | }; |
| 298 | |
| 299 | static struct platform_device sdp4430_gpio_keys_device = { |
| 300 | .name = "gpio-keys", |
| 301 | .id = -1, |
| 302 | .dev = { |
| 303 | .platform_data = &sdp4430_gpio_keys_data, |
| 304 | }, |
| 305 | }; |
| 306 | |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 307 | static struct platform_device sdp4430_leds_gpio = { |
| 308 | .name = "leds-gpio", |
| 309 | .id = -1, |
| 310 | .dev = { |
| 311 | .platform_data = &sdp4430_led_data, |
| 312 | }, |
| 313 | }; |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 314 | static struct spi_board_info sdp4430_spi_board_info[] __initdata = { |
| 315 | { |
| 316 | .modalias = "ks8851", |
| 317 | .bus_num = 1, |
| 318 | .chip_select = 0, |
| 319 | .max_speed_hz = 24000000, |
Uwe Kleine-König | 2534b4a | 2012-03-05 11:08:36 -0800 | [diff] [blame] | 320 | /* |
| 321 | * .irq is set to gpio_to_irq(ETH_KS8851_IRQ) |
| 322 | * in omap_4430sdp_init |
| 323 | */ |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 324 | }, |
| 325 | }; |
| 326 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 327 | static struct gpio sdp4430_eth_gpios[] __initdata = { |
| 328 | { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" }, |
| 329 | { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" }, |
| 330 | { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, |
| 331 | }; |
| 332 | |
Santosh Shilimkar | 89c4705 | 2011-05-30 00:11:45 -0700 | [diff] [blame] | 333 | static int __init omap_ethernet_init(void) |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 334 | { |
| 335 | int status; |
| 336 | |
| 337 | /* Request of GPIO lines */ |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 338 | status = gpio_request_array(sdp4430_eth_gpios, |
| 339 | ARRAY_SIZE(sdp4430_eth_gpios)); |
| 340 | if (status) |
| 341 | pr_err("Cannot request ETH GPIOs\n"); |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 342 | |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 343 | return status; |
| 344 | } |
| 345 | |
Peter Ujfalusi | 87b25c1 | 2011-06-01 11:30:38 +0300 | [diff] [blame] | 346 | static struct regulator_consumer_supply sdp4430_vbat_supply[] = { |
| 347 | REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), |
| 348 | REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), |
| 349 | }; |
| 350 | |
| 351 | static struct regulator_init_data sdp4430_vbat_data = { |
| 352 | .constraints = { |
| 353 | .always_on = 1, |
| 354 | }, |
| 355 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), |
| 356 | .consumer_supplies = sdp4430_vbat_supply, |
| 357 | }; |
| 358 | |
| 359 | static struct fixed_voltage_config sdp4430_vbat_pdata = { |
| 360 | .supply_name = "VBAT", |
| 361 | .microvolts = 3750000, |
| 362 | .init_data = &sdp4430_vbat_data, |
| 363 | .gpio = -EINVAL, |
| 364 | }; |
| 365 | |
| 366 | static struct platform_device sdp4430_vbat = { |
| 367 | .name = "reg-fixed-voltage", |
| 368 | .id = -1, |
| 369 | .dev = { |
| 370 | .platform_data = &sdp4430_vbat_pdata, |
| 371 | }, |
| 372 | }; |
| 373 | |
Peter Ujfalusi | 95712de | 2011-12-13 10:48:54 -0800 | [diff] [blame] | 374 | static struct platform_device sdp4430_dmic_codec = { |
| 375 | .name = "dmic-codec", |
| 376 | .id = -1, |
| 377 | }; |
| 378 | |
Ricardo Neri | 85dd0c5 | 2012-05-09 14:19:14 -0700 | [diff] [blame] | 379 | static struct platform_device sdp4430_hdmi_audio_codec = { |
| 380 | .name = "hdmi-audio-codec", |
| 381 | .id = -1, |
| 382 | }; |
| 383 | |
Peter Ujfalusi | a433ffa | 2011-12-07 15:59:35 +0200 | [diff] [blame] | 384 | static struct omap_abe_twl6040_data sdp4430_abe_audio_data = { |
| 385 | .card_name = "SDP4430", |
| 386 | .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
| 387 | .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
| 388 | .has_ep = 1, |
| 389 | .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
| 390 | .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
| 391 | |
| 392 | .has_dmic = 1, |
| 393 | .has_hsmic = 1, |
| 394 | .has_mainmic = 1, |
| 395 | .has_submic = 1, |
| 396 | .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
| 397 | |
| 398 | .jack_detection = 1, |
| 399 | /* MCLK input is 38.4MHz */ |
| 400 | .mclk_freq = 38400000, |
| 401 | }; |
| 402 | |
| 403 | static struct platform_device sdp4430_abe_audio = { |
| 404 | .name = "omap-abe-twl6040", |
| 405 | .id = -1, |
| 406 | .dev = { |
| 407 | .platform_data = &sdp4430_abe_audio_data, |
| 408 | }, |
| 409 | }; |
| 410 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 411 | static struct platform_device *sdp4430_devices[] __initdata = { |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 412 | &sdp4430_gpio_keys_device, |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 413 | &sdp4430_leds_gpio, |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 414 | &sdp4430_leds_pwm, |
Peter Ujfalusi | 87b25c1 | 2011-06-01 11:30:38 +0300 | [diff] [blame] | 415 | &sdp4430_vbat, |
Peter Ujfalusi | 95712de | 2011-12-13 10:48:54 -0800 | [diff] [blame] | 416 | &sdp4430_dmic_codec, |
Peter Ujfalusi | a433ffa | 2011-12-07 15:59:35 +0200 | [diff] [blame] | 417 | &sdp4430_abe_audio, |
Ricardo Neri | 85dd0c5 | 2012-05-09 14:19:14 -0700 | [diff] [blame] | 418 | &sdp4430_hdmi_audio_codec, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 419 | }; |
| 420 | |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 421 | static struct omap_musb_board_data musb_board_data = { |
| 422 | .interface_type = MUSB_INTERFACE_UTMI, |
Hema HK | 09e7200 | 2010-12-10 18:11:42 +0530 | [diff] [blame] | 423 | .mode = MUSB_OTG, |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 424 | .power = 100, |
| 425 | }; |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 426 | |
| 427 | static struct omap2_hsmmc_info mmc[] = { |
| 428 | { |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 429 | .mmc = 2, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 430 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 431 | .gpio_cd = -EINVAL, |
| 432 | .gpio_wp = -EINVAL, |
| 433 | .nonremovable = true, |
kishore kadiyala | 64be978 | 2010-10-01 16:35:28 -0700 | [diff] [blame] | 434 | .ocr_mask = MMC_VDD_29_30, |
Balaji T K | b1c1df7 | 2011-05-30 19:55:34 +0530 | [diff] [blame] | 435 | .no_off_init = true, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 436 | }, |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 437 | { |
| 438 | .mmc = 1, |
| 439 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
Silesh C V | 27a69d7 | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 440 | .gpio_cd = -EINVAL, |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 441 | .gpio_wp = -EINVAL, |
| 442 | }, |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 443 | { |
| 444 | .mmc = 5, |
| 445 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, |
Eliad Peller | fac1d93 | 2011-11-22 16:02:19 +0200 | [diff] [blame] | 446 | .pm_caps = MMC_PM_KEEP_POWER, |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 447 | .gpio_cd = -EINVAL, |
| 448 | .gpio_wp = -EINVAL, |
| 449 | .ocr_mask = MMC_VDD_165_195, |
| 450 | .nonremovable = true, |
| 451 | }, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 452 | {} /* Terminator */ |
| 453 | }; |
| 454 | |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 455 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 456 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 457 | }; |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 458 | |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 459 | static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = { |
| 460 | .supply = "vmmc", |
| 461 | .dev_name = "omap_hsmmc.4", |
| 462 | }; |
| 463 | |
| 464 | static struct regulator_init_data sdp4430_vmmc5 = { |
| 465 | .constraints = { |
| 466 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 467 | }, |
| 468 | .num_consumer_supplies = 1, |
| 469 | .consumer_supplies = &omap4_sdp4430_vmmc5_supply, |
| 470 | }; |
| 471 | |
| 472 | static struct fixed_voltage_config sdp4430_vwlan = { |
| 473 | .supply_name = "vwl1271", |
| 474 | .microvolts = 1800000, /* 1.8V */ |
| 475 | .gpio = GPIO_WIFI_PMENA, |
| 476 | .startup_delay = 70000, /* 70msec */ |
| 477 | .enable_high = 1, |
| 478 | .enabled_at_boot = 0, |
| 479 | .init_data = &sdp4430_vmmc5, |
| 480 | }; |
| 481 | |
| 482 | static struct platform_device omap_vwlan_device = { |
| 483 | .name = "reg-fixed-voltage", |
| 484 | .id = 1, |
| 485 | .dev = { |
| 486 | .platform_data = &sdp4430_vwlan, |
| 487 | }, |
| 488 | }; |
| 489 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 490 | static struct regulator_init_data sdp4430_vaux1 = { |
| 491 | .constraints = { |
| 492 | .min_uV = 1000000, |
| 493 | .max_uV = 3000000, |
| 494 | .apply_uV = true, |
| 495 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 496 | | REGULATOR_MODE_STANDBY, |
| 497 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 498 | | REGULATOR_CHANGE_MODE |
| 499 | | REGULATOR_CHANGE_STATUS, |
| 500 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 501 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 502 | .consumer_supplies = sdp4430_vaux_supply, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 503 | }; |
| 504 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 505 | static struct regulator_init_data sdp4430_vusim = { |
| 506 | .constraints = { |
| 507 | .min_uV = 1200000, |
| 508 | .max_uV = 2900000, |
| 509 | .apply_uV = true, |
| 510 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 511 | | REGULATOR_MODE_STANDBY, |
| 512 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 513 | | REGULATOR_CHANGE_MODE |
| 514 | | REGULATOR_CHANGE_STATUS, |
| 515 | }, |
| 516 | }; |
| 517 | |
Peter Ujfalusi | 8eaeb93 | 2012-04-03 11:56:51 +0300 | [diff] [blame] | 518 | static struct twl6040_codec_data twl6040_codec = { |
Misael Lopez Cruz | 1a4cdec | 2011-02-11 19:50:37 -0600 | [diff] [blame] | 519 | /* single-step ramp for headset and handsfree */ |
| 520 | .hs_left_step = 0x0f, |
| 521 | .hs_right_step = 0x0f, |
| 522 | .hf_left_step = 0x1d, |
| 523 | .hf_right_step = 0x1d, |
| 524 | }; |
| 525 | |
Peter Ujfalusi | 8eaeb93 | 2012-04-03 11:56:51 +0300 | [diff] [blame] | 526 | static struct twl6040_vibra_data twl6040_vibra = { |
Peter Ujfalusi | 87b25c1 | 2011-06-01 11:30:38 +0300 | [diff] [blame] | 527 | .vibldrv_res = 8, |
| 528 | .vibrdrv_res = 3, |
| 529 | .viblmotor_res = 10, |
| 530 | .vibrmotor_res = 10, |
| 531 | .vddvibl_uV = 0, /* fixed volt supply - VBAT */ |
| 532 | .vddvibr_uV = 0, /* fixed volt supply - VBAT */ |
| 533 | }; |
| 534 | |
Peter Ujfalusi | 8eaeb93 | 2012-04-03 11:56:51 +0300 | [diff] [blame] | 535 | static struct twl6040_platform_data twl6040_data = { |
Misael Lopez Cruz | 1a4cdec | 2011-02-11 19:50:37 -0600 | [diff] [blame] | 536 | .codec = &twl6040_codec, |
Peter Ujfalusi | 87b25c1 | 2011-06-01 11:30:38 +0300 | [diff] [blame] | 537 | .vibra = &twl6040_vibra, |
| 538 | .audpwron_gpio = 127, |
Peter Ujfalusi | 87b25c1 | 2011-06-01 11:30:38 +0300 | [diff] [blame] | 539 | }; |
| 540 | |
Peter Ujfalusi | 9495d1e | 2012-09-24 12:24:48 +0300 | [diff] [blame] | 541 | static struct i2c_board_info __initdata sdp4430_i2c_1_boardinfo[] = { |
| 542 | { |
| 543 | I2C_BOARD_INFO("twl6040", 0x4b), |
| 544 | .irq = 119 + OMAP44XX_IRQ_GIC_START, |
| 545 | .platform_data = &twl6040_data, |
| 546 | }, |
| 547 | }; |
| 548 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 549 | static struct twl4030_platform_data sdp4430_twldata = { |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 550 | /* Regulators */ |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 551 | .vusim = &sdp4430_vusim, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 552 | .vaux1 = &sdp4430_vaux1, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 553 | }; |
| 554 | |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 555 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { |
| 556 | { |
| 557 | I2C_BOARD_INFO("tmp105", 0x48), |
| 558 | }, |
Hemanth V | d048aca | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 559 | { |
| 560 | I2C_BOARD_INFO("bh1780", 0x29), |
| 561 | }, |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 562 | }; |
Shubhrajyoti Datta | 0df891b | 2010-09-23 18:22:47 -0700 | [diff] [blame] | 563 | static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { |
| 564 | { |
| 565 | I2C_BOARD_INFO("hmc5843", 0x1e), |
| 566 | }, |
| 567 | }; |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 568 | static int __init omap4_i2c_init(void) |
| 569 | { |
Peter Ujfalusi | b22f954 | 2011-06-07 10:26:46 +0300 | [diff] [blame] | 570 | omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB, |
| 571 | TWL_COMMON_REGULATOR_VDAC | |
| 572 | TWL_COMMON_REGULATOR_VAUX2 | |
| 573 | TWL_COMMON_REGULATOR_VAUX3 | |
| 574 | TWL_COMMON_REGULATOR_VMMC | |
| 575 | TWL_COMMON_REGULATOR_VPP | |
| 576 | TWL_COMMON_REGULATOR_VANA | |
| 577 | TWL_COMMON_REGULATOR_VCXIO | |
| 578 | TWL_COMMON_REGULATOR_VUSB | |
Peter Ujfalusi | 1fc631e | 2012-05-09 10:33:33 +0300 | [diff] [blame] | 579 | TWL_COMMON_REGULATOR_CLK32KG | |
| 580 | TWL_COMMON_REGULATOR_V1V8 | |
| 581 | TWL_COMMON_REGULATOR_V2V1); |
Peter Ujfalusi | 9495d1e | 2012-09-24 12:24:48 +0300 | [diff] [blame] | 582 | omap4_pmic_init("twl6030", &sdp4430_twldata, sdp4430_i2c_1_boardinfo, |
| 583 | ARRAY_SIZE(sdp4430_i2c_1_boardinfo)); |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 584 | omap_register_i2c_bus(2, 400, NULL, 0); |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 585 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
| 586 | ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); |
Shubhrajyoti Datta | 0df891b | 2010-09-23 18:22:47 -0700 | [diff] [blame] | 587 | omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, |
| 588 | ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 589 | return 0; |
| 590 | } |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 591 | |
| 592 | static void __init omap_sfh7741prox_init(void) |
| 593 | { |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 594 | int error; |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 595 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 596 | error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO, |
| 597 | GPIOF_OUT_INIT_LOW, "sfh7741"); |
| 598 | if (error < 0) |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 599 | pr_err("%s:failed to request GPIO %d, error %d\n", |
| 600 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 601 | } |
| 602 | |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 603 | #ifdef CONFIG_OMAP_MUX |
| 604 | static struct omap_board_mux board_mux[] __initdata = { |
Tony Lindgren | 7d4ca85 | 2011-01-11 15:31:45 -0800 | [diff] [blame] | 605 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
Peter Ujfalusi | c3fa201 | 2012-07-06 15:19:11 +0200 | [diff] [blame] | 606 | /* NIRQ2 for twl6040 */ |
| 607 | OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 | |
| 608 | OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), |
Peter Ujfalusi | e3a9ed7 | 2012-10-04 14:57:20 +0300 | [diff] [blame] | 609 | /* GPIO_127 for twl6040 */ |
| 610 | OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), |
| 611 | /* McPDM */ |
| 612 | OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 613 | OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 614 | OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), |
| 615 | OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 616 | OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 617 | /* DMIC */ |
| 618 | OMAP4_MUX(ABE_DMIC_CLK1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
| 619 | OMAP4_MUX(ABE_DMIC_DIN1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 620 | OMAP4_MUX(ABE_DMIC_DIN2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 621 | OMAP4_MUX(ABE_DMIC_DIN3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 622 | /* McBSP1 */ |
| 623 | OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 624 | OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 625 | OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT | |
| 626 | OMAP_PULL_ENA), |
| 627 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 628 | /* McBSP2 */ |
| 629 | OMAP4_MUX(ABE_MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 630 | OMAP4_MUX(ABE_MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), |
| 631 | OMAP4_MUX(ABE_MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT | |
| 632 | OMAP_PULL_ENA), |
| 633 | OMAP4_MUX(ABE_MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
| 634 | |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 635 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 636 | }; |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 637 | |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 638 | #else |
| 639 | #define board_mux NULL |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 640 | #endif |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 641 | |
Russell King | d5de63f | 2012-02-07 11:07:24 +0000 | [diff] [blame] | 642 | static void __init omap4_sdp4430_wifi_mux_init(void) |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 643 | { |
| 644 | omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | |
| 645 | OMAP_PIN_OFF_WAKEUPENABLE); |
| 646 | omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT); |
| 647 | |
| 648 | omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd", |
| 649 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 650 | omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk", |
| 651 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 652 | omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0", |
| 653 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 654 | omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1", |
| 655 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 656 | omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2", |
| 657 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 658 | omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3", |
| 659 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); |
| 660 | |
| 661 | } |
| 662 | |
| 663 | static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = { |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 664 | .board_ref_clock = WL12XX_REFCLOCK_26, |
| 665 | .board_tcxo_clock = WL12XX_TCXOCLOCK_26, |
| 666 | }; |
| 667 | |
Russell King | 70d669d | 2012-02-07 11:03:23 +0000 | [diff] [blame] | 668 | static void __init omap4_sdp4430_wifi_init(void) |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 669 | { |
Russell King | 70d669d | 2012-02-07 11:03:23 +0000 | [diff] [blame] | 670 | int ret; |
| 671 | |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 672 | omap4_sdp4430_wifi_mux_init(); |
Tarun Kanti DebBarma | 46a0a54 | 2012-03-29 08:41:01 -0700 | [diff] [blame] | 673 | omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ); |
Russell King | 70d669d | 2012-02-07 11:03:23 +0000 | [diff] [blame] | 674 | ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data); |
| 675 | if (ret) |
| 676 | pr_err("Error setting wl12xx data: %d\n", ret); |
| 677 | ret = platform_device_register(&omap_vwlan_device); |
| 678 | if (ret) |
| 679 | pr_err("Error registering wl12xx device: %d\n", ret); |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 680 | } |
| 681 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 682 | static void __init omap_4430sdp_init(void) |
| 683 | { |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 684 | int status; |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 685 | int package = OMAP_PACKAGE_CBS; |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 686 | |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 687 | if (omap_rev() == OMAP4430_REV_ES1_0) |
| 688 | package = OMAP_PACKAGE_CBL; |
Colin Cross | 21a42c9 | 2011-05-04 14:57:57 -0700 | [diff] [blame] | 689 | omap4_mux_init(board_mux, NULL, package); |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 690 | |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 691 | omap4_i2c_init(); |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 692 | omap_sfh7741prox_init(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 693 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
Govindraj.R | 7496ba3 | 2011-11-07 18:55:05 +0530 | [diff] [blame] | 694 | omap_serial_init(); |
Tony Lindgren | a4ca9db | 2011-08-22 23:57:23 -0700 | [diff] [blame] | 695 | omap_sdrc_init(NULL, NULL); |
Vishal Mahaveer | 6de8bae | 2011-07-05 03:38:23 -0700 | [diff] [blame] | 696 | omap4_sdp4430_wifi_init(); |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 697 | omap4_twl6030_hsmmc_init(mmc); |
Keshava Munegowda | 6aa85a5 | 2010-11-21 23:23:42 +0530 | [diff] [blame] | 698 | |
Felipe Balbi | 4696084 | 2010-12-07 09:57:59 +0200 | [diff] [blame] | 699 | usb_musb_init(&musb_board_data); |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 700 | |
| 701 | status = omap_ethernet_init(); |
| 702 | if (status) { |
| 703 | pr_err("Ethernet initialization failed: %d\n", status); |
| 704 | } else { |
| 705 | sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ); |
| 706 | spi_register_board_info(sdp4430_spi_board_info, |
| 707 | ARRAY_SIZE(sdp4430_spi_board_info)); |
| 708 | } |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 709 | |
Shubhrajyoti Datta | f67df6c | 2011-07-05 03:38:24 -0700 | [diff] [blame] | 710 | status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 711 | if (status) |
| 712 | pr_err("Keypad initialization failed: %d\n", status); |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 713 | |
| 714 | omap_4430sdp_display_init(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 715 | } |
| 716 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 717 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") |
| 718 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ |
Nicolas Pitre | 5e52b43 | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 719 | .atag_offset = 0x100, |
Marc Zyngier | 0691532 | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 720 | .smp = smp_ops(omap4_smp_ops), |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 721 | .reserve = omap_reserve, |
Tony Lindgren | e990a40 | 2011-09-26 14:52:55 -0700 | [diff] [blame] | 722 | .map_io = omap4_map_io, |
Tony Lindgren | 8f5b5a4 | 2011-08-22 23:57:24 -0700 | [diff] [blame] | 723 | .init_early = omap4430_init_early, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 724 | .init_irq = gic_init_irq, |
Marc Zyngier | 6b2f55d | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 725 | .handle_irq = gic_handle_irq, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 726 | .init_machine = omap_4430sdp_init, |
Shawn Guo | bbd707a | 2012-04-26 16:06:50 +0800 | [diff] [blame] | 727 | .init_late = omap4430_init_late, |
Tony Lindgren | e74984e | 2011-03-29 15:54:48 -0700 | [diff] [blame] | 728 | .timer = &omap4_timer, |
Paul Walmsley | 187e3e0 | 2012-10-29 20:56:12 -0600 | [diff] [blame] | 729 | .restart = omap44xx_restart, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 730 | MACHINE_END |