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> |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 23 | #include <linux/gpio_keys.h> |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 24 | #include <linux/regulator/machine.h> |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 25 | #include <linux/leds.h> |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 26 | #include <linux/leds_pwm.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 27 | |
| 28 | #include <mach/hardware.h> |
Santosh Shilimkar | fbc9be1 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 29 | #include <mach/omap4-common.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 30 | #include <asm/mach-types.h> |
| 31 | #include <asm/mach/arch.h> |
| 32 | #include <asm/mach/map.h> |
| 33 | |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 34 | #include <plat/board.h> |
| 35 | #include <plat/common.h> |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 36 | #include <plat/usb.h> |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 37 | #include <plat/mmc.h> |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 38 | #include <plat/omap4-keypad.h> |
Tomi Valkeinen | a0b38cc | 2011-05-11 14:05:07 +0300 | [diff] [blame] | 39 | #include <video/omapdss.h> |
Manjunath Kondaiah G | 04aeae7 | 2010-10-08 09:58:35 -0700 | [diff] [blame] | 40 | |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 41 | #include "mux.h" |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 42 | #include "hsmmc.h" |
Paul Walmsley | 4814ced | 2010-10-08 11:40:20 -0600 | [diff] [blame] | 43 | #include "control.h" |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 44 | #include "common-board-devices.h" |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 45 | |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 46 | #define ETH_KS8851_IRQ 34 |
| 47 | #define ETH_KS8851_POWER_ON 48 |
| 48 | #define ETH_KS8851_QUART 138 |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 49 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
| 50 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 51 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ |
| 52 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 53 | |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 54 | static const int sdp4430_keymap[] = { |
| 55 | KEY(0, 0, KEY_E), |
| 56 | KEY(0, 1, KEY_R), |
| 57 | KEY(0, 2, KEY_T), |
| 58 | KEY(0, 3, KEY_HOME), |
| 59 | KEY(0, 4, KEY_F5), |
| 60 | KEY(0, 5, KEY_UNKNOWN), |
| 61 | KEY(0, 6, KEY_I), |
| 62 | KEY(0, 7, KEY_LEFTSHIFT), |
| 63 | |
| 64 | KEY(1, 0, KEY_D), |
| 65 | KEY(1, 1, KEY_F), |
| 66 | KEY(1, 2, KEY_G), |
| 67 | KEY(1, 3, KEY_SEND), |
| 68 | KEY(1, 4, KEY_F6), |
| 69 | KEY(1, 5, KEY_UNKNOWN), |
| 70 | KEY(1, 6, KEY_K), |
| 71 | KEY(1, 7, KEY_ENTER), |
| 72 | |
| 73 | KEY(2, 0, KEY_X), |
| 74 | KEY(2, 1, KEY_C), |
| 75 | KEY(2, 2, KEY_V), |
| 76 | KEY(2, 3, KEY_END), |
| 77 | KEY(2, 4, KEY_F7), |
| 78 | KEY(2, 5, KEY_UNKNOWN), |
| 79 | KEY(2, 6, KEY_DOT), |
| 80 | KEY(2, 7, KEY_CAPSLOCK), |
| 81 | |
| 82 | KEY(3, 0, KEY_Z), |
| 83 | KEY(3, 1, KEY_KPPLUS), |
| 84 | KEY(3, 2, KEY_B), |
| 85 | KEY(3, 3, KEY_F1), |
| 86 | KEY(3, 4, KEY_F8), |
| 87 | KEY(3, 5, KEY_UNKNOWN), |
| 88 | KEY(3, 6, KEY_O), |
| 89 | KEY(3, 7, KEY_SPACE), |
| 90 | |
| 91 | KEY(4, 0, KEY_W), |
| 92 | KEY(4, 1, KEY_Y), |
| 93 | KEY(4, 2, KEY_U), |
| 94 | KEY(4, 3, KEY_F2), |
| 95 | KEY(4, 4, KEY_VOLUMEUP), |
| 96 | KEY(4, 5, KEY_UNKNOWN), |
| 97 | KEY(4, 6, KEY_L), |
| 98 | KEY(4, 7, KEY_LEFT), |
| 99 | |
| 100 | KEY(5, 0, KEY_S), |
| 101 | KEY(5, 1, KEY_H), |
| 102 | KEY(5, 2, KEY_J), |
| 103 | KEY(5, 3, KEY_F3), |
| 104 | KEY(5, 4, KEY_F9), |
| 105 | KEY(5, 5, KEY_VOLUMEDOWN), |
| 106 | KEY(5, 6, KEY_M), |
| 107 | KEY(5, 7, KEY_RIGHT), |
| 108 | |
| 109 | KEY(6, 0, KEY_Q), |
| 110 | KEY(6, 1, KEY_A), |
| 111 | KEY(6, 2, KEY_N), |
| 112 | KEY(6, 3, KEY_BACK), |
| 113 | KEY(6, 4, KEY_BACKSPACE), |
| 114 | KEY(6, 5, KEY_UNKNOWN), |
| 115 | KEY(6, 6, KEY_P), |
| 116 | KEY(6, 7, KEY_UP), |
| 117 | |
| 118 | KEY(7, 0, KEY_PROG1), |
| 119 | KEY(7, 1, KEY_PROG2), |
| 120 | KEY(7, 2, KEY_PROG3), |
| 121 | KEY(7, 3, KEY_PROG4), |
| 122 | KEY(7, 4, KEY_F4), |
| 123 | KEY(7, 5, KEY_UNKNOWN), |
| 124 | KEY(7, 6, KEY_OK), |
| 125 | KEY(7, 7, KEY_DOWN), |
| 126 | }; |
| 127 | |
| 128 | static struct matrix_keymap_data sdp4430_keymap_data = { |
| 129 | .keymap = sdp4430_keymap, |
| 130 | .keymap_size = ARRAY_SIZE(sdp4430_keymap), |
| 131 | }; |
| 132 | |
| 133 | static struct omap4_keypad_platform_data sdp4430_keypad_data = { |
| 134 | .keymap_data = &sdp4430_keymap_data, |
| 135 | .rows = 8, |
| 136 | .cols = 8, |
| 137 | }; |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 138 | static struct gpio_led sdp4430_gpio_leds[] = { |
| 139 | { |
| 140 | .name = "omap4:green:debug0", |
| 141 | .gpio = 61, |
| 142 | }, |
| 143 | { |
| 144 | .name = "omap4:green:debug1", |
| 145 | .gpio = 30, |
| 146 | }, |
| 147 | { |
| 148 | .name = "omap4:green:debug2", |
| 149 | .gpio = 7, |
| 150 | }, |
| 151 | { |
| 152 | .name = "omap4:green:debug3", |
| 153 | .gpio = 8, |
| 154 | }, |
| 155 | { |
| 156 | .name = "omap4:green:debug4", |
| 157 | .gpio = 50, |
| 158 | }, |
| 159 | { |
| 160 | .name = "omap4:blue:user", |
| 161 | .gpio = 169, |
| 162 | }, |
| 163 | { |
| 164 | .name = "omap4:red:user", |
| 165 | .gpio = 170, |
| 166 | }, |
| 167 | { |
| 168 | .name = "omap4:green:user", |
| 169 | .gpio = 139, |
| 170 | }, |
| 171 | |
| 172 | }; |
| 173 | |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 174 | static struct gpio_keys_button sdp4430_gpio_keys[] = { |
| 175 | { |
| 176 | .desc = "Proximity Sensor", |
| 177 | .type = EV_SW, |
| 178 | .code = SW_FRONT_PROXIMITY, |
| 179 | .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO, |
| 180 | .active_low = 0, |
| 181 | } |
| 182 | }; |
| 183 | |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 184 | static struct gpio_led_platform_data sdp4430_led_data = { |
| 185 | .leds = sdp4430_gpio_leds, |
| 186 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), |
| 187 | }; |
| 188 | |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 189 | static struct led_pwm sdp4430_pwm_leds[] = { |
| 190 | { |
| 191 | .name = "omap4:green:chrg", |
| 192 | .pwm_id = 1, |
| 193 | .max_brightness = 255, |
| 194 | .pwm_period_ns = 7812500, |
| 195 | }, |
| 196 | }; |
| 197 | |
| 198 | static struct led_pwm_platform_data sdp4430_pwm_data = { |
| 199 | .num_leds = ARRAY_SIZE(sdp4430_pwm_leds), |
| 200 | .leds = sdp4430_pwm_leds, |
| 201 | }; |
| 202 | |
| 203 | static struct platform_device sdp4430_leds_pwm = { |
| 204 | .name = "leds_pwm", |
| 205 | .id = -1, |
| 206 | .dev = { |
| 207 | .platform_data = &sdp4430_pwm_data, |
| 208 | }, |
| 209 | }; |
| 210 | |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 211 | static int omap_prox_activate(struct device *dev) |
| 212 | { |
| 213 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); |
| 214 | return 0; |
| 215 | } |
| 216 | |
| 217 | static void omap_prox_deactivate(struct device *dev) |
| 218 | { |
| 219 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0); |
| 220 | } |
| 221 | |
| 222 | static struct gpio_keys_platform_data sdp4430_gpio_keys_data = { |
| 223 | .buttons = sdp4430_gpio_keys, |
| 224 | .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys), |
| 225 | .enable = omap_prox_activate, |
| 226 | .disable = omap_prox_deactivate, |
| 227 | }; |
| 228 | |
| 229 | static struct platform_device sdp4430_gpio_keys_device = { |
| 230 | .name = "gpio-keys", |
| 231 | .id = -1, |
| 232 | .dev = { |
| 233 | .platform_data = &sdp4430_gpio_keys_data, |
| 234 | }, |
| 235 | }; |
| 236 | |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 237 | static struct platform_device sdp4430_leds_gpio = { |
| 238 | .name = "leds-gpio", |
| 239 | .id = -1, |
| 240 | .dev = { |
| 241 | .platform_data = &sdp4430_led_data, |
| 242 | }, |
| 243 | }; |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 244 | static struct spi_board_info sdp4430_spi_board_info[] __initdata = { |
| 245 | { |
| 246 | .modalias = "ks8851", |
| 247 | .bus_num = 1, |
| 248 | .chip_select = 0, |
| 249 | .max_speed_hz = 24000000, |
| 250 | .irq = ETH_KS8851_IRQ, |
| 251 | }, |
| 252 | }; |
| 253 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 254 | static struct gpio sdp4430_eth_gpios[] __initdata = { |
| 255 | { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" }, |
| 256 | { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" }, |
| 257 | { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, |
| 258 | }; |
| 259 | |
Santosh Shilimkar | 89c4705 | 2011-05-30 00:11:45 -0700 | [diff] [blame] | 260 | static int __init omap_ethernet_init(void) |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 261 | { |
| 262 | int status; |
| 263 | |
| 264 | /* Request of GPIO lines */ |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 265 | status = gpio_request_array(sdp4430_eth_gpios, |
| 266 | ARRAY_SIZE(sdp4430_eth_gpios)); |
| 267 | if (status) |
| 268 | pr_err("Cannot request ETH GPIOs\n"); |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 269 | |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 270 | return status; |
| 271 | } |
| 272 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 273 | static struct platform_device sdp4430_lcd_device = { |
| 274 | .name = "sdp4430_lcd", |
| 275 | .id = -1, |
| 276 | }; |
| 277 | |
| 278 | static struct platform_device *sdp4430_devices[] __initdata = { |
| 279 | &sdp4430_lcd_device, |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 280 | &sdp4430_gpio_keys_device, |
Hemanth V | 509b6d9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 281 | &sdp4430_leds_gpio, |
Hemanth V | f389f4c | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 282 | &sdp4430_leds_pwm, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 283 | }; |
| 284 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 285 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |
| 286 | .ctrl_name = "internal", |
| 287 | }; |
| 288 | |
| 289 | static struct omap_board_config_kernel sdp4430_config[] __initdata = { |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 290 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, |
| 291 | }; |
| 292 | |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 293 | static void __init omap_4430sdp_init_early(void) |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 294 | { |
Paul Walmsley | 4805734 | 2010-12-21 15:25:10 -0700 | [diff] [blame] | 295 | omap2_init_common_infrastructure(); |
| 296 | omap2_init_common_devices(NULL, NULL); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 297 | } |
| 298 | |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 299 | static struct omap_musb_board_data musb_board_data = { |
| 300 | .interface_type = MUSB_INTERFACE_UTMI, |
Hema HK | 09e7200 | 2010-12-10 18:11:42 +0530 | [diff] [blame] | 301 | .mode = MUSB_OTG, |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 302 | .power = 100, |
| 303 | }; |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 304 | |
Hema HK | e70357e | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 305 | static struct twl4030_usb_data omap4_usbphy_data = { |
| 306 | .phy_init = omap4430_phy_init, |
| 307 | .phy_exit = omap4430_phy_exit, |
| 308 | .phy_power = omap4430_phy_power, |
| 309 | .phy_set_clock = omap4430_phy_set_clk, |
Hema HK | ee896e3 | 2011-02-17 12:06:07 +0530 | [diff] [blame] | 310 | .phy_suspend = omap4430_phy_suspend, |
Hema HK | e70357e | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 311 | }; |
| 312 | |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 313 | static struct omap2_hsmmc_info mmc[] = { |
| 314 | { |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 315 | .mmc = 2, |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 316 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 317 | .gpio_cd = -EINVAL, |
| 318 | .gpio_wp = -EINVAL, |
| 319 | .nonremovable = true, |
kishore kadiyala | 64be978 | 2010-10-01 16:35:28 -0700 | [diff] [blame] | 320 | .ocr_mask = MMC_VDD_29_30, |
Balaji T K | b1c1df7 | 2011-05-30 19:55:34 +0530 | [diff] [blame] | 321 | .no_off_init = true, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 322 | }, |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 323 | { |
| 324 | .mmc = 1, |
| 325 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
| 326 | .gpio_wp = -EINVAL, |
| 327 | }, |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 328 | {} /* Terminator */ |
| 329 | }; |
| 330 | |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 331 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 332 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 333 | }; |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 334 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 335 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 336 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 337 | }; |
| 338 | |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 339 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
| 340 | { |
| 341 | int ret = 0; |
| 342 | struct platform_device *pdev = container_of(dev, |
| 343 | struct platform_device, dev); |
| 344 | struct omap_mmc_platform_data *pdata = dev->platform_data; |
| 345 | |
| 346 | /* Setting MMC1 Card detect Irq */ |
kishore kadiyala | 72f2e2c | 2010-09-24 17:13:20 +0000 | [diff] [blame] | 347 | if (pdev->id == 0) { |
| 348 | ret = twl6030_mmc_card_detect_config(); |
| 349 | if (ret) |
| 350 | pr_err("Failed configuring MMC1 card detect\n"); |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 351 | pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + |
| 352 | MMCDETECT_INTR_OFFSET; |
kishore kadiyala | 72f2e2c | 2010-09-24 17:13:20 +0000 | [diff] [blame] | 353 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; |
| 354 | } |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 355 | return ret; |
| 356 | } |
| 357 | |
| 358 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
| 359 | { |
Benoit Cousson | 531c21b | 2010-10-01 16:35:26 -0700 | [diff] [blame] | 360 | struct omap_mmc_platform_data *pdata; |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 361 | |
Benoit Cousson | 531c21b | 2010-10-01 16:35:26 -0700 | [diff] [blame] | 362 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ |
| 363 | if (!dev) { |
| 364 | pr_err("Failed %s\n", __func__); |
| 365 | return; |
| 366 | } |
| 367 | pdata = dev->platform_data; |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 368 | pdata->init = omap4_twl6030_hsmmc_late_init; |
| 369 | } |
| 370 | |
| 371 | static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) |
| 372 | { |
| 373 | struct omap2_hsmmc_info *c; |
| 374 | |
| 375 | omap2_hsmmc_init(controllers); |
| 376 | for (c = controllers; c->mmc; c++) |
| 377 | omap4_twl6030_hsmmc_set_late_init(c->dev); |
| 378 | |
| 379 | return 0; |
| 380 | } |
| 381 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 382 | static struct regulator_init_data sdp4430_vaux1 = { |
| 383 | .constraints = { |
| 384 | .min_uV = 1000000, |
| 385 | .max_uV = 3000000, |
| 386 | .apply_uV = true, |
| 387 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 388 | | REGULATOR_MODE_STANDBY, |
| 389 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 390 | | REGULATOR_CHANGE_MODE |
| 391 | | REGULATOR_CHANGE_STATUS, |
| 392 | }, |
Oleg Drokin | 786b01a | 2011-06-06 18:57:07 +0000 | [diff] [blame] | 393 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 394 | .consumer_supplies = sdp4430_vaux_supply, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 395 | }; |
| 396 | |
| 397 | static struct regulator_init_data sdp4430_vaux2 = { |
| 398 | .constraints = { |
| 399 | .min_uV = 1200000, |
| 400 | .max_uV = 2800000, |
| 401 | .apply_uV = true, |
| 402 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 403 | | REGULATOR_MODE_STANDBY, |
| 404 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 405 | | REGULATOR_CHANGE_MODE |
| 406 | | REGULATOR_CHANGE_STATUS, |
| 407 | }, |
| 408 | }; |
| 409 | |
| 410 | static struct regulator_init_data sdp4430_vaux3 = { |
| 411 | .constraints = { |
| 412 | .min_uV = 1000000, |
| 413 | .max_uV = 3000000, |
| 414 | .apply_uV = true, |
| 415 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 416 | | REGULATOR_MODE_STANDBY, |
| 417 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 418 | | REGULATOR_CHANGE_MODE |
| 419 | | REGULATOR_CHANGE_STATUS, |
| 420 | }, |
| 421 | }; |
| 422 | |
| 423 | /* VMMC1 for MMC1 card */ |
| 424 | static struct regulator_init_data sdp4430_vmmc = { |
| 425 | .constraints = { |
| 426 | .min_uV = 1200000, |
| 427 | .max_uV = 3000000, |
| 428 | .apply_uV = true, |
| 429 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 430 | | REGULATOR_MODE_STANDBY, |
| 431 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 432 | | REGULATOR_CHANGE_MODE |
| 433 | | REGULATOR_CHANGE_STATUS, |
| 434 | }, |
Santosh Shilimkar | 5026391 | 2010-08-02 13:18:03 +0300 | [diff] [blame] | 435 | .num_consumer_supplies = 1, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 436 | .consumer_supplies = sdp4430_vmmc_supply, |
| 437 | }; |
| 438 | |
| 439 | static struct regulator_init_data sdp4430_vpp = { |
| 440 | .constraints = { |
| 441 | .min_uV = 1800000, |
| 442 | .max_uV = 2500000, |
| 443 | .apply_uV = true, |
| 444 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 445 | | REGULATOR_MODE_STANDBY, |
| 446 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 447 | | REGULATOR_CHANGE_MODE |
| 448 | | REGULATOR_CHANGE_STATUS, |
| 449 | }, |
| 450 | }; |
| 451 | |
| 452 | static struct regulator_init_data sdp4430_vusim = { |
| 453 | .constraints = { |
| 454 | .min_uV = 1200000, |
| 455 | .max_uV = 2900000, |
| 456 | .apply_uV = true, |
| 457 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 458 | | REGULATOR_MODE_STANDBY, |
| 459 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 460 | | REGULATOR_CHANGE_MODE |
| 461 | | REGULATOR_CHANGE_STATUS, |
| 462 | }, |
| 463 | }; |
| 464 | |
| 465 | static struct regulator_init_data sdp4430_vana = { |
| 466 | .constraints = { |
| 467 | .min_uV = 2100000, |
| 468 | .max_uV = 2100000, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 469 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 470 | | REGULATOR_MODE_STANDBY, |
| 471 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 472 | | REGULATOR_CHANGE_STATUS, |
| 473 | }, |
| 474 | }; |
| 475 | |
| 476 | static struct regulator_init_data sdp4430_vcxio = { |
| 477 | .constraints = { |
| 478 | .min_uV = 1800000, |
| 479 | .max_uV = 1800000, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 480 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 481 | | REGULATOR_MODE_STANDBY, |
| 482 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 483 | | REGULATOR_CHANGE_STATUS, |
| 484 | }, |
| 485 | }; |
| 486 | |
| 487 | static struct regulator_init_data sdp4430_vdac = { |
| 488 | .constraints = { |
| 489 | .min_uV = 1800000, |
| 490 | .max_uV = 1800000, |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 491 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 492 | | REGULATOR_MODE_STANDBY, |
| 493 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 494 | | REGULATOR_CHANGE_STATUS, |
| 495 | }, |
| 496 | }; |
| 497 | |
| 498 | static struct regulator_init_data sdp4430_vusb = { |
| 499 | .constraints = { |
| 500 | .min_uV = 3300000, |
| 501 | .max_uV = 3300000, |
| 502 | .apply_uV = true, |
| 503 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 504 | | REGULATOR_MODE_STANDBY, |
| 505 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 506 | | REGULATOR_CHANGE_STATUS, |
| 507 | }, |
| 508 | }; |
| 509 | |
Balaji T K | 8af1b0d | 2011-02-10 18:45:26 +0530 | [diff] [blame] | 510 | static struct regulator_init_data sdp4430_clk32kg = { |
| 511 | .constraints = { |
| 512 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 513 | }, |
| 514 | }; |
| 515 | |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 516 | static struct twl4030_platform_data sdp4430_twldata = { |
| 517 | .irq_base = TWL6030_IRQ_BASE, |
| 518 | .irq_end = TWL6030_IRQ_END, |
| 519 | |
| 520 | /* Regulators */ |
| 521 | .vmmc = &sdp4430_vmmc, |
| 522 | .vpp = &sdp4430_vpp, |
| 523 | .vusim = &sdp4430_vusim, |
| 524 | .vana = &sdp4430_vana, |
| 525 | .vcxio = &sdp4430_vcxio, |
| 526 | .vdac = &sdp4430_vdac, |
| 527 | .vusb = &sdp4430_vusb, |
| 528 | .vaux1 = &sdp4430_vaux1, |
| 529 | .vaux2 = &sdp4430_vaux2, |
| 530 | .vaux3 = &sdp4430_vaux3, |
Balaji T K | 8af1b0d | 2011-02-10 18:45:26 +0530 | [diff] [blame] | 531 | .clk32kg = &sdp4430_clk32kg, |
Hema HK | e70357e | 2010-12-10 18:09:52 +0530 | [diff] [blame] | 532 | .usb = &omap4_usbphy_data |
Balaji T K | 6e30a7d | 2010-05-12 08:27:30 +0000 | [diff] [blame] | 533 | }; |
| 534 | |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 535 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { |
| 536 | { |
| 537 | I2C_BOARD_INFO("tmp105", 0x48), |
| 538 | }, |
Hemanth V | d048aca | 2010-12-17 18:15:08 -0800 | [diff] [blame] | 539 | { |
| 540 | I2C_BOARD_INFO("bh1780", 0x29), |
| 541 | }, |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 542 | }; |
Shubhrajyoti Datta | 0df891b | 2010-09-23 18:22:47 -0700 | [diff] [blame] | 543 | static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { |
| 544 | { |
| 545 | I2C_BOARD_INFO("hmc5843", 0x1e), |
| 546 | }, |
| 547 | }; |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 548 | static int __init omap4_i2c_init(void) |
| 549 | { |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame] | 550 | omap4_pmic_init("twl6030", &sdp4430_twldata); |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 551 | omap_register_i2c_bus(2, 400, NULL, 0); |
Shubhrajyoti Datta | 83078f9 | 2010-08-02 13:18:04 +0300 | [diff] [blame] | 552 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
| 553 | ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); |
Shubhrajyoti Datta | 0df891b | 2010-09-23 18:22:47 -0700 | [diff] [blame] | 554 | omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, |
| 555 | ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 556 | return 0; |
| 557 | } |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 558 | |
| 559 | static void __init omap_sfh7741prox_init(void) |
| 560 | { |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 561 | int error; |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 562 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 563 | error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO, |
| 564 | GPIOF_OUT_INIT_LOW, "sfh7741"); |
| 565 | if (error < 0) |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 566 | pr_err("%s:failed to request GPIO %d, error %d\n", |
| 567 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 568 | } |
| 569 | |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 570 | static void sdp4430_hdmi_mux_init(void) |
| 571 | { |
| 572 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ |
| 573 | omap_mux_init_signal("hdmi_hpd", |
| 574 | OMAP_PIN_INPUT_PULLUP); |
| 575 | omap_mux_init_signal("hdmi_cec", |
| 576 | OMAP_PIN_INPUT_PULLUP); |
| 577 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ |
| 578 | omap_mux_init_signal("hdmi_ddc_scl", |
| 579 | OMAP_PIN_INPUT_PULLUP); |
| 580 | omap_mux_init_signal("hdmi_ddc_sda", |
| 581 | OMAP_PIN_INPUT_PULLUP); |
| 582 | } |
| 583 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 584 | static struct gpio sdp4430_hdmi_gpios[] = { |
| 585 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, |
| 586 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
| 587 | }; |
| 588 | |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 589 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) |
| 590 | { |
| 591 | int status; |
| 592 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 593 | status = gpio_request_array(sdp4430_hdmi_gpios, |
| 594 | ARRAY_SIZE(sdp4430_hdmi_gpios)); |
| 595 | if (status) |
| 596 | pr_err("%s: Cannot request HDMI GPIOs\n", __func__); |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 597 | |
| 598 | return status; |
| 599 | } |
| 600 | |
| 601 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) |
| 602 | { |
| 603 | gpio_free(HDMI_GPIO_LS_OE); |
| 604 | gpio_free(HDMI_GPIO_HPD); |
| 605 | } |
| 606 | |
| 607 | static struct omap_dss_device sdp4430_hdmi_device = { |
| 608 | .name = "hdmi", |
| 609 | .driver_name = "hdmi_panel", |
| 610 | .type = OMAP_DISPLAY_TYPE_HDMI, |
Archit Taneja | 6cb07b2 | 2011-04-12 13:52:25 +0530 | [diff] [blame] | 611 | .clocks = { |
| 612 | .dispc = { |
| 613 | .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, |
| 614 | }, |
| 615 | .hdmi = { |
| 616 | .regn = 15, |
| 617 | .regm2 = 1, |
| 618 | }, |
| 619 | }, |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 620 | .platform_enable = sdp4430_panel_enable_hdmi, |
| 621 | .platform_disable = sdp4430_panel_disable_hdmi, |
| 622 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
| 623 | }; |
| 624 | |
| 625 | static struct omap_dss_device *sdp4430_dss_devices[] = { |
| 626 | &sdp4430_hdmi_device, |
| 627 | }; |
| 628 | |
| 629 | static struct omap_dss_board_info sdp4430_dss_data = { |
| 630 | .num_devices = ARRAY_SIZE(sdp4430_dss_devices), |
| 631 | .devices = sdp4430_dss_devices, |
| 632 | .default_device = &sdp4430_hdmi_device, |
| 633 | }; |
| 634 | |
| 635 | void omap_4430sdp_display_init(void) |
| 636 | { |
| 637 | sdp4430_hdmi_mux_init(); |
| 638 | omap_display_init(&sdp4430_dss_data); |
| 639 | } |
| 640 | |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 641 | #ifdef CONFIG_OMAP_MUX |
| 642 | static struct omap_board_mux board_mux[] __initdata = { |
Tony Lindgren | 7d4ca85 | 2011-01-11 15:31:45 -0800 | [diff] [blame] | 643 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 644 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 645 | }; |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 646 | |
| 647 | static struct omap_device_pad serial2_pads[] __initdata = { |
| 648 | OMAP_MUX_STATIC("uart2_cts.uart2_cts", |
| 649 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 650 | OMAP_MUX_STATIC("uart2_rts.uart2_rts", |
| 651 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 652 | OMAP_MUX_STATIC("uart2_rx.uart2_rx", |
| 653 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 654 | OMAP_MUX_STATIC("uart2_tx.uart2_tx", |
| 655 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 656 | }; |
| 657 | |
| 658 | static struct omap_device_pad serial3_pads[] __initdata = { |
| 659 | OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx", |
| 660 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
| 661 | OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd", |
| 662 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 663 | OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx", |
| 664 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), |
| 665 | OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx", |
| 666 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 667 | }; |
| 668 | |
| 669 | static struct omap_device_pad serial4_pads[] __initdata = { |
| 670 | OMAP_MUX_STATIC("uart4_rx.uart4_rx", |
| 671 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), |
| 672 | OMAP_MUX_STATIC("uart4_tx.uart4_tx", |
| 673 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
| 674 | }; |
| 675 | |
Santosh Shilimkar | 89c4705 | 2011-05-30 00:11:45 -0700 | [diff] [blame] | 676 | static struct omap_board_data serial2_data __initdata = { |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 677 | .id = 1, |
| 678 | .pads = serial2_pads, |
| 679 | .pads_cnt = ARRAY_SIZE(serial2_pads), |
| 680 | }; |
| 681 | |
Santosh Shilimkar | 89c4705 | 2011-05-30 00:11:45 -0700 | [diff] [blame] | 682 | static struct omap_board_data serial3_data __initdata = { |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 683 | .id = 2, |
| 684 | .pads = serial3_pads, |
| 685 | .pads_cnt = ARRAY_SIZE(serial3_pads), |
| 686 | }; |
| 687 | |
Santosh Shilimkar | 89c4705 | 2011-05-30 00:11:45 -0700 | [diff] [blame] | 688 | static struct omap_board_data serial4_data __initdata = { |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 689 | .id = 3, |
| 690 | .pads = serial4_pads, |
| 691 | .pads_cnt = ARRAY_SIZE(serial4_pads), |
| 692 | }; |
| 693 | |
| 694 | static inline void board_serial_init(void) |
| 695 | { |
| 696 | struct omap_board_data bdata; |
| 697 | bdata.flags = 0; |
| 698 | bdata.pads = NULL; |
| 699 | bdata.pads_cnt = 0; |
| 700 | bdata.id = 0; |
| 701 | /* pass dummy data for UART1 */ |
| 702 | omap_serial_init_port(&bdata); |
| 703 | |
| 704 | omap_serial_init_port(&serial2_data); |
| 705 | omap_serial_init_port(&serial3_data); |
| 706 | omap_serial_init_port(&serial4_data); |
| 707 | } |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 708 | #else |
| 709 | #define board_mux NULL |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 710 | |
| 711 | static inline void board_serial_init(void) |
| 712 | { |
| 713 | omap_serial_init(); |
| 714 | } |
| 715 | #endif |
Benoit Cousson | fb6bf63 | 2010-08-10 17:43:15 +0200 | [diff] [blame] | 716 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 717 | static void __init omap_4430sdp_init(void) |
| 718 | { |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 719 | int status; |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 720 | int package = OMAP_PACKAGE_CBS; |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 721 | |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 722 | if (omap_rev() == OMAP4430_REV_ES1_0) |
| 723 | package = OMAP_PACKAGE_CBL; |
Colin Cross | 21a42c9 | 2011-05-04 14:57:57 -0700 | [diff] [blame] | 724 | omap4_mux_init(board_mux, NULL, package); |
Benoit Cousson | 6fea7b0 | 2010-09-27 10:50:33 +0200 | [diff] [blame] | 725 | |
Tony Lindgren | e41cccf | 2011-02-24 14:36:03 -0800 | [diff] [blame] | 726 | omap_board_config = sdp4430_config; |
| 727 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); |
| 728 | |
Santosh Shilimkar | baeb73e | 2010-05-12 08:27:29 +0000 | [diff] [blame] | 729 | omap4_i2c_init(); |
Shubhrajyoti Datta | 94ce7a6 | 2010-09-23 18:22:49 -0700 | [diff] [blame] | 730 | omap_sfh7741prox_init(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 731 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
R Sricharan | dae3352 | 2011-03-11 06:04:44 +0000 | [diff] [blame] | 732 | board_serial_init(); |
kishore kadiyala | 717c1fb | 2010-05-15 18:21:06 +0000 | [diff] [blame] | 733 | omap4_twl6030_hsmmc_init(mmc); |
Keshava Munegowda | 6aa85a5 | 2010-11-21 23:23:42 +0530 | [diff] [blame] | 734 | |
Felipe Balbi | 4696084 | 2010-12-07 09:57:59 +0200 | [diff] [blame] | 735 | usb_musb_init(&musb_board_data); |
Abraham Arce | b2aa5e5 | 2010-05-14 12:05:26 -0700 | [diff] [blame] | 736 | |
| 737 | status = omap_ethernet_init(); |
| 738 | if (status) { |
| 739 | pr_err("Ethernet initialization failed: %d\n", status); |
| 740 | } else { |
| 741 | sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ); |
| 742 | spi_register_board_info(sdp4430_spi_board_info, |
| 743 | ARRAY_SIZE(sdp4430_spi_board_info)); |
| 744 | } |
Syed Rafiuddin | 5955676 | 2010-12-27 05:51:45 +0000 | [diff] [blame] | 745 | |
| 746 | status = omap4_keyboard_init(&sdp4430_keypad_data); |
| 747 | if (status) |
| 748 | pr_err("Keypad initialization failed: %d\n", status); |
Mythri P K | 0425b48 | 2011-03-08 18:50:09 +0530 | [diff] [blame] | 749 | |
| 750 | omap_4430sdp_display_init(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 751 | } |
| 752 | |
| 753 | static void __init omap_4430sdp_map_io(void) |
| 754 | { |
| 755 | omap2_set_globals_443x(); |
Tony Lindgren | 6fbd55d | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 756 | omap44xx_map_common_io(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 757 | } |
| 758 | |
| 759 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") |
| 760 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 761 | .boot_params = 0x80000100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 762 | .reserve = omap_reserve, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 763 | .map_io = omap_4430sdp_map_io, |
| 764 | .init_early = omap_4430sdp_init_early, |
| 765 | .init_irq = gic_init_irq, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 766 | .init_machine = omap_4430sdp_init, |
Tony Lindgren | e74984e | 2011-03-29 15:54:48 -0700 | [diff] [blame] | 767 | .timer = &omap4_timer, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 768 | MACHINE_END |