blob: a8b1fefc63db0fd5c3fee8a89fbd6a4a236c1bb8 [file] [log] [blame]
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -07001/*
2 * linux/arch/arm/mach-omap2/board-omap3evm.c
3 *
4 * Copyright (C) 2008 Texas Instruments
5 *
6 * Modified from mach-omap2/board-3430sdp.c
7 *
8 * Initial code: Syed Mohammed Khasim
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/delay.h>
19#include <linux/err.h>
20#include <linux/clk.h>
21#include <linux/gpio.h>
22#include <linux/input.h>
Janusz Krzysztofik61354342009-10-22 14:43:17 -070023#include <linux/input/matrix_keypad.h>
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070024#include <linux/leds.h>
Sriram562138a2009-11-22 10:11:30 -080025#include <linux/interrupt.h>
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070026
27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h>
Balaji T Kebeb53e2009-12-15 20:09:02 +053029#include <linux/i2c/twl.h>
Gupta, Ajay Kumare8e2ff42009-07-29 11:58:57 +053030#include <linux/usb/otg.h>
Sriram562138a2009-11-22 10:11:30 -080031#include <linux/smsc911x.h>
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070032
Eyal Reizer741927f2011-01-27 09:49:49 +000033#include <linux/wl12xx.h>
34#include <linux/regulator/fixed.h>
Mike Rapoport1a7ec132009-11-22 10:11:29 -080035#include <linux/regulator/machine.h>
Sukumar Ghorai3a638332010-09-15 14:49:23 +000036#include <linux/mmc/host.h>
Mike Rapoport1a7ec132009-11-22 10:11:29 -080037
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070038#include <mach/hardware.h>
39#include <asm/mach-types.h>
40#include <asm/mach/arch.h>
41#include <asm/mach/map.h>
42
Tony Lindgrence491cf2009-10-20 09:40:47 -070043#include <plat/board.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070044#include <plat/usb.h>
45#include <plat/common.h>
46#include <plat/mcspi.h>
Vaibhav Hiremath703e3062010-01-04 15:34:16 +010047#include <plat/display.h>
Bryan Wu89747c92010-11-17 13:34:34 +000048#include <plat/panel-generic-dpi.h>
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070049
Tony Lindgrenca5742b2009-12-11 16:16:32 -080050#include "mux.h"
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070051#include "sdram-micron-mt46h32m32lf-6.h"
Adrian Hunterd02a9002010-02-15 10:03:34 -080052#include "hsmmc.h"
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070053
54#define OMAP3_EVM_TS_GPIO 175
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -080055#define OMAP3_EVM_EHCI_VBUS 22
56#define OMAP3_EVM_EHCI_SELECT 61
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070057
58#define OMAP3EVM_ETHR_START 0x2c000000
59#define OMAP3EVM_ETHR_SIZE 1024
Ajay Kumar Guptadb408022009-11-22 10:11:27 -080060#define OMAP3EVM_ETHR_ID_REV 0x50
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070061#define OMAP3EVM_ETHR_GPIO_IRQ 176
Sriram562138a2009-11-22 10:11:30 -080062#define OMAP3EVM_SMSC911X_CS 5
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +000063/*
64 * Eth Reset signal
65 * 64 = Generation 1 (<=RevD)
66 * 7 = Generation 2 (>=RevE)
67 */
68#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64
69#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -070070
Ajay Kumar Guptadb408022009-11-22 10:11:27 -080071static u8 omap3_evm_version;
72
73u8 get_omap3_evm_rev(void)
74{
75 return omap3_evm_version;
76}
77EXPORT_SYMBOL(get_omap3_evm_rev);
78
79static void __init omap3_evm_get_revision(void)
80{
81 void __iomem *ioaddr;
82 unsigned int smsc_id;
83
84 /* Ethernet PHY ID is stored at ID_REV register */
85 ioaddr = ioremap_nocache(OMAP3EVM_ETHR_START, SZ_1K);
86 if (!ioaddr)
87 return;
88 smsc_id = readl(ioaddr + OMAP3EVM_ETHR_ID_REV) & 0xFFFF0000;
89 iounmap(ioaddr);
90
91 switch (smsc_id) {
92 /*SMSC9115 chipset*/
93 case 0x01150000:
94 omap3_evm_version = OMAP3EVM_BOARD_GEN_1;
95 break;
96 /*SMSC 9220 chipset*/
97 case 0x92200000:
98 default:
99 omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
100 }
101}
102
Sriram562138a2009-11-22 10:11:30 -0800103#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
104static struct resource omap3evm_smsc911x_resources[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700105 [0] = {
106 .start = OMAP3EVM_ETHR_START,
107 .end = (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
108 .flags = IORESOURCE_MEM,
109 },
110 [1] = {
111 .start = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
112 .end = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
Sriram562138a2009-11-22 10:11:30 -0800113 .flags = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700114 },
115};
116
Sriram562138a2009-11-22 10:11:30 -0800117static struct smsc911x_platform_config smsc911x_config = {
118 .phy_interface = PHY_INTERFACE_MODE_MII,
119 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
120 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
121 .flags = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700122};
123
Sriram562138a2009-11-22 10:11:30 -0800124static struct platform_device omap3evm_smsc911x_device = {
125 .name = "smsc911x",
126 .id = -1,
127 .num_resources = ARRAY_SIZE(omap3evm_smsc911x_resources),
128 .resource = &omap3evm_smsc911x_resources[0],
129 .dev = {
130 .platform_data = &smsc911x_config,
131 },
132};
133
134static inline void __init omap3evm_init_smsc911x(void)
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700135{
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +0000136 int eth_cs, eth_rst;
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700137 struct clk *l3ck;
138 unsigned int rate;
139
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +0000140 if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
141 eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST;
142 else
143 eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST;
144
Sriram562138a2009-11-22 10:11:30 -0800145 eth_cs = OMAP3EVM_SMSC911X_CS;
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700146
147 l3ck = clk_get(NULL, "l3_ck");
148 if (IS_ERR(l3ck))
149 rate = 100000000;
150 else
151 rate = clk_get_rate(l3ck);
152
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +0000153 /* Configure ethernet controller reset gpio */
154 if (cpu_is_omap3430()) {
155 if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
156 pr_err(KERN_ERR "Failed to request %d for smsc911x\n",
157 eth_rst);
158 return;
159 }
160
161 if (gpio_direction_output(eth_rst, 1) < 0) {
162 pr_err(KERN_ERR "Failed to set direction of %d for" \
163 " smsc911x\n", eth_rst);
164 return;
165 }
166 /* reset pulse to ethernet controller*/
167 usleep_range(150, 220);
168 gpio_set_value(eth_rst, 0);
169 usleep_range(150, 220);
170 gpio_set_value(eth_rst, 1);
171 usleep_range(1, 2);
172 }
173
Sriram562138a2009-11-22 10:11:30 -0800174 if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
175 printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700176 OMAP3EVM_ETHR_GPIO_IRQ);
177 return;
178 }
179
180 gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
Sriram562138a2009-11-22 10:11:30 -0800181 platform_device_register(&omap3evm_smsc911x_device);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700182}
183
Sriram562138a2009-11-22 10:11:30 -0800184#else
185static inline void __init omap3evm_init_smsc911x(void) { return; }
186#endif
187
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100188/*
189 * OMAP3EVM LCD Panel control signals
190 */
191#define OMAP3EVM_LCD_PANEL_LR 2
192#define OMAP3EVM_LCD_PANEL_UD 3
193#define OMAP3EVM_LCD_PANEL_INI 152
194#define OMAP3EVM_LCD_PANEL_ENVDD 153
195#define OMAP3EVM_LCD_PANEL_QVGA 154
196#define OMAP3EVM_LCD_PANEL_RESB 155
197#define OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO 210
198#define OMAP3EVM_DVI_PANEL_EN_GPIO 199
199
200static int lcd_enabled;
201static int dvi_enabled;
202
203static void __init omap3_evm_display_init(void)
204{
205 int r;
206
207 r = gpio_request(OMAP3EVM_LCD_PANEL_RESB, "lcd_panel_resb");
208 if (r) {
209 printk(KERN_ERR "failed to get lcd_panel_resb\n");
210 return;
211 }
212 gpio_direction_output(OMAP3EVM_LCD_PANEL_RESB, 1);
213
214 r = gpio_request(OMAP3EVM_LCD_PANEL_INI, "lcd_panel_ini");
215 if (r) {
216 printk(KERN_ERR "failed to get lcd_panel_ini\n");
217 goto err_1;
218 }
219 gpio_direction_output(OMAP3EVM_LCD_PANEL_INI, 1);
220
221 r = gpio_request(OMAP3EVM_LCD_PANEL_QVGA, "lcd_panel_qvga");
222 if (r) {
223 printk(KERN_ERR "failed to get lcd_panel_qvga\n");
224 goto err_2;
225 }
226 gpio_direction_output(OMAP3EVM_LCD_PANEL_QVGA, 0);
227
228 r = gpio_request(OMAP3EVM_LCD_PANEL_LR, "lcd_panel_lr");
229 if (r) {
230 printk(KERN_ERR "failed to get lcd_panel_lr\n");
231 goto err_3;
232 }
233 gpio_direction_output(OMAP3EVM_LCD_PANEL_LR, 1);
234
235 r = gpio_request(OMAP3EVM_LCD_PANEL_UD, "lcd_panel_ud");
236 if (r) {
237 printk(KERN_ERR "failed to get lcd_panel_ud\n");
238 goto err_4;
239 }
240 gpio_direction_output(OMAP3EVM_LCD_PANEL_UD, 1);
241
242 r = gpio_request(OMAP3EVM_LCD_PANEL_ENVDD, "lcd_panel_envdd");
243 if (r) {
244 printk(KERN_ERR "failed to get lcd_panel_envdd\n");
245 goto err_5;
246 }
247 gpio_direction_output(OMAP3EVM_LCD_PANEL_ENVDD, 0);
248
249 return;
250
251err_5:
252 gpio_free(OMAP3EVM_LCD_PANEL_UD);
253err_4:
254 gpio_free(OMAP3EVM_LCD_PANEL_LR);
255err_3:
256 gpio_free(OMAP3EVM_LCD_PANEL_QVGA);
257err_2:
258 gpio_free(OMAP3EVM_LCD_PANEL_INI);
259err_1:
260 gpio_free(OMAP3EVM_LCD_PANEL_RESB);
261
262}
263
264static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev)
265{
266 if (dvi_enabled) {
267 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
268 return -EINVAL;
269 }
270 gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
271
272 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000273 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100274 else
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000275 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100276
277 lcd_enabled = 1;
278 return 0;
279}
280
281static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev)
282{
283 gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
284
285 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000286 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100287 else
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000288 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100289
290 lcd_enabled = 0;
291}
292
293static struct omap_dss_device omap3_evm_lcd_device = {
294 .name = "lcd",
295 .driver_name = "sharp_ls_panel",
296 .type = OMAP_DISPLAY_TYPE_DPI,
297 .phy.dpi.data_lines = 18,
298 .platform_enable = omap3_evm_enable_lcd,
299 .platform_disable = omap3_evm_disable_lcd,
300};
301
302static int omap3_evm_enable_tv(struct omap_dss_device *dssdev)
303{
304 return 0;
305}
306
307static void omap3_evm_disable_tv(struct omap_dss_device *dssdev)
308{
309}
310
311static struct omap_dss_device omap3_evm_tv_device = {
312 .name = "tv",
313 .driver_name = "venc",
314 .type = OMAP_DISPLAY_TYPE_VENC,
315 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
316 .platform_enable = omap3_evm_enable_tv,
317 .platform_disable = omap3_evm_disable_tv,
318};
319
320static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
321{
322 if (lcd_enabled) {
323 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
324 return -EINVAL;
325 }
326
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000327 gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100328
329 dvi_enabled = 1;
330 return 0;
331}
332
333static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
334{
Vaibhav Hiremathf186e9b2011-01-25 17:37:37 +0000335 gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100336
337 dvi_enabled = 0;
338}
339
Bryan Wu89747c92010-11-17 13:34:34 +0000340static struct panel_generic_dpi_data dvi_panel = {
341 .name = "generic",
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100342 .platform_enable = omap3_evm_enable_dvi,
343 .platform_disable = omap3_evm_disable_dvi,
344};
345
Bryan Wu89747c92010-11-17 13:34:34 +0000346static struct omap_dss_device omap3_evm_dvi_device = {
347 .name = "dvi",
348 .type = OMAP_DISPLAY_TYPE_DPI,
349 .driver_name = "generic_dpi_panel",
350 .data = &dvi_panel,
351 .phy.dpi.data_lines = 24,
352};
353
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100354static struct omap_dss_device *omap3_evm_dss_devices[] = {
355 &omap3_evm_lcd_device,
356 &omap3_evm_tv_device,
357 &omap3_evm_dvi_device,
358};
359
360static struct omap_dss_board_info omap3_evm_dss_data = {
361 .num_devices = ARRAY_SIZE(omap3_evm_dss_devices),
362 .devices = omap3_evm_dss_devices,
363 .default_device = &omap3_evm_lcd_device,
364};
365
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800366static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
367 .supply = "vmmc",
368};
369
370static struct regulator_consumer_supply omap3evm_vsim_supply = {
371 .supply = "vmmc_aux",
372};
373
374/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
375static struct regulator_init_data omap3evm_vmmc1 = {
376 .constraints = {
377 .min_uV = 1850000,
378 .max_uV = 3150000,
379 .valid_modes_mask = REGULATOR_MODE_NORMAL
380 | REGULATOR_MODE_STANDBY,
381 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
382 | REGULATOR_CHANGE_MODE
383 | REGULATOR_CHANGE_STATUS,
384 },
385 .num_consumer_supplies = 1,
386 .consumer_supplies = &omap3evm_vmmc1_supply,
387};
388
389/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
390static struct regulator_init_data omap3evm_vsim = {
391 .constraints = {
392 .min_uV = 1800000,
393 .max_uV = 3000000,
394 .valid_modes_mask = REGULATOR_MODE_NORMAL
395 | REGULATOR_MODE_STANDBY,
396 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
397 | REGULATOR_CHANGE_MODE
398 | REGULATOR_CHANGE_STATUS,
399 },
400 .num_consumer_supplies = 1,
401 .consumer_supplies = &omap3evm_vsim_supply,
402};
403
Adrian Hunter68ff0422010-02-15 10:03:34 -0800404static struct omap2_hsmmc_info mmc[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700405 {
406 .mmc = 1,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000407 .caps = MMC_CAP_4_BIT_DATA,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700408 .gpio_cd = -EINVAL,
409 .gpio_wp = 63,
410 },
Eyal Reizer741927f2011-01-27 09:49:49 +0000411#ifdef CONFIG_WL12XX_PLATFORM_DATA
412 {
413 .name = "wl1271",
414 .mmc = 2,
415 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
416 .gpio_wp = -EINVAL,
417 .gpio_cd = -EINVAL,
418 .nonremovable = true,
419 },
420#endif
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700421 {} /* Terminator */
422};
423
424static struct gpio_led gpio_leds[] = {
425 {
426 .name = "omap3evm::ledb",
427 /* normally not visible (board underside) */
428 .default_trigger = "default-on",
429 .gpio = -EINVAL, /* gets replaced */
430 .active_low = true,
431 },
432};
433
434static struct gpio_led_platform_data gpio_led_info = {
435 .leds = gpio_leds,
436 .num_leds = ARRAY_SIZE(gpio_leds),
437};
438
439static struct platform_device leds_gpio = {
440 .name = "leds-gpio",
441 .id = -1,
442 .dev = {
443 .platform_data = &gpio_led_info,
444 },
445};
446
447
448static int omap3evm_twl_gpio_setup(struct device *dev,
449 unsigned gpio, unsigned ngpio)
450{
Vaibhav Hiremath42fc8ca2011-01-25 17:37:40 +0000451 int r;
452
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700453 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
Tony Lindgren4896e392009-12-11 16:16:32 -0800454 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700455 mmc[0].gpio_cd = gpio + 0;
Adrian Hunter68ff0422010-02-15 10:03:34 -0800456 omap2_hsmmc_init(mmc);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700457
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800458 /* link regulators to MMC adapters */
459 omap3evm_vmmc1_supply.dev = mmc[0].dev;
460 omap3evm_vsim_supply.dev = mmc[0].dev;
461
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700462 /*
463 * Most GPIOs are for USB OTG. Some are mostly sent to
464 * the P2 connector; notably LEDA for the LCD backlight.
465 */
466
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100467 /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
Vaibhav Hiremath42fc8ca2011-01-25 17:37:40 +0000468 r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
469 if (!r)
470 r = gpio_direction_output(gpio + TWL4030_GPIO_MAX,
471 (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0);
472 if (r)
473 printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100474
475 /* gpio + 7 == DVI Enable */
476 gpio_request(gpio + 7, "EN_DVI");
477 gpio_direction_output(gpio + 7, 0);
478
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700479 /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
480 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
481
482 platform_device_register(&leds_gpio);
483
484 return 0;
485}
486
487static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
488 .gpio_base = OMAP_MAX_GPIO_LINES,
489 .irq_base = TWL4030_GPIO_IRQ_BASE,
490 .irq_end = TWL4030_GPIO_IRQ_END,
491 .use_leds = true,
492 .setup = omap3evm_twl_gpio_setup,
493};
494
495static struct twl4030_usb_data omap3evm_usb_data = {
496 .usb_mode = T2_USB_MODE_ULPI,
497};
498
Manjunath Kondaiah Gbead4372010-10-08 10:01:13 -0700499static uint32_t board_keymap[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700500 KEY(0, 0, KEY_LEFT),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800501 KEY(0, 1, KEY_DOWN),
502 KEY(0, 2, KEY_ENTER),
503 KEY(0, 3, KEY_M),
504
505 KEY(1, 0, KEY_RIGHT),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700506 KEY(1, 1, KEY_UP),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800507 KEY(1, 2, KEY_I),
508 KEY(1, 3, KEY_N),
509
510 KEY(2, 0, KEY_A),
511 KEY(2, 1, KEY_E),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700512 KEY(2, 2, KEY_J),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800513 KEY(2, 3, KEY_O),
514
515 KEY(3, 0, KEY_B),
516 KEY(3, 1, KEY_F),
517 KEY(3, 2, KEY_K),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700518 KEY(3, 3, KEY_P)
519};
520
Tony Lindgren4f543332009-09-24 16:23:16 -0700521static struct matrix_keymap_data board_map_data = {
522 .keymap = board_keymap,
523 .keymap_size = ARRAY_SIZE(board_keymap),
524};
525
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700526static struct twl4030_keypad_data omap3evm_kp_data = {
Tony Lindgren4f543332009-09-24 16:23:16 -0700527 .keymap_data = &board_map_data,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700528 .rows = 4,
529 .cols = 4,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700530 .rep = 1,
531};
532
533static struct twl4030_madc_platform_data omap3evm_madc_data = {
534 .irq_line = 1,
535};
536
Ilkka Koskinen6a58baf2011-03-02 13:24:05 +0000537static struct twl4030_codec_audio_data omap3evm_audio_data;
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300538
539static struct twl4030_codec_data omap3evm_codec_data = {
Peter Ujfalusi6df74ef2009-11-04 09:58:18 +0200540 .audio_mclk = 26000000,
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300541 .audio = &omap3evm_audio_data,
542};
543
Senthilvadivu Guruswamy1dde9732011-01-24 06:21:53 +0000544static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
545 REGULATOR_SUPPLY("vdda_dac", "omapdss");
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100546
547/* VDAC for DSS driving S-Video */
548static struct regulator_init_data omap3_evm_vdac = {
549 .constraints = {
550 .min_uV = 1800000,
551 .max_uV = 1800000,
552 .apply_uV = true,
553 .valid_modes_mask = REGULATOR_MODE_NORMAL
554 | REGULATOR_MODE_STANDBY,
555 .valid_ops_mask = REGULATOR_CHANGE_MODE
556 | REGULATOR_CHANGE_STATUS,
557 },
558 .num_consumer_supplies = 1,
559 .consumer_supplies = &omap3_evm_vdda_dac_supply,
560};
561
562/* VPLL2 for digital video outputs */
Vaibhav Hiremathf3fe53c2010-03-19 11:21:19 +0000563static struct regulator_consumer_supply omap3_evm_vpll2_supply =
564 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100565
566static struct regulator_init_data omap3_evm_vpll2 = {
567 .constraints = {
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100568 .min_uV = 1800000,
569 .max_uV = 1800000,
570 .apply_uV = true,
571 .valid_modes_mask = REGULATOR_MODE_NORMAL
572 | REGULATOR_MODE_STANDBY,
573 .valid_ops_mask = REGULATOR_CHANGE_MODE
574 | REGULATOR_CHANGE_STATUS,
575 },
576 .num_consumer_supplies = 1,
577 .consumer_supplies = &omap3_evm_vpll2_supply,
578};
579
Vaibhav Hiremath410491d2011-01-25 17:37:38 +0000580/* ads7846 on SPI */
581static struct regulator_consumer_supply omap3evm_vio_supply =
582 REGULATOR_SUPPLY("vcc", "spi1.0");
583
584/* VIO for ads7846 */
585static struct regulator_init_data omap3evm_vio = {
586 .constraints = {
587 .min_uV = 1800000,
588 .max_uV = 1800000,
589 .apply_uV = true,
590 .valid_modes_mask = REGULATOR_MODE_NORMAL
591 | REGULATOR_MODE_STANDBY,
592 .valid_ops_mask = REGULATOR_CHANGE_MODE
593 | REGULATOR_CHANGE_STATUS,
594 },
595 .num_consumer_supplies = 1,
596 .consumer_supplies = &omap3evm_vio_supply,
597};
598
Eyal Reizer741927f2011-01-27 09:49:49 +0000599#ifdef CONFIG_WL12XX_PLATFORM_DATA
600
601#define OMAP3EVM_WLAN_PMENA_GPIO (150)
602#define OMAP3EVM_WLAN_IRQ_GPIO (149)
603
604static struct regulator_consumer_supply omap3evm_vmmc2_supply = {
605 .supply = "vmmc",
606 .dev_name = "mmci-omap-hs.1",
607};
608
609/* VMMC2 for driving the WL12xx module */
610static struct regulator_init_data omap3evm_vmmc2 = {
611 .constraints = {
612 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
613 },
614 .num_consumer_supplies = 1,
615 .consumer_supplies = &omap3evm_vmmc2_supply,
616};
617
618static struct fixed_voltage_config omap3evm_vwlan = {
619 .supply_name = "vwl1271",
620 .microvolts = 1800000, /* 1.80V */
621 .gpio = OMAP3EVM_WLAN_PMENA_GPIO,
622 .startup_delay = 70000, /* 70ms */
623 .enable_high = 1,
624 .enabled_at_boot = 0,
625 .init_data = &omap3evm_vmmc2,
626};
627
628static struct platform_device omap3evm_vwlan_device = {
629 .name = "reg-fixed-voltage",
630 .id = 1,
631 .dev = {
632 .platform_data = &omap3evm_vwlan,
633 },
634};
635
636struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
637 .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
638 /* ref clock is 38.4 MHz */
639 .board_ref_clock = 2,
640};
641#endif
642
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700643static struct twl4030_platform_data omap3evm_twldata = {
644 .irq_base = TWL4030_IRQ_BASE,
645 .irq_end = TWL4030_IRQ_END,
646
647 /* platform_data for children goes here */
648 .keypad = &omap3evm_kp_data,
649 .madc = &omap3evm_madc_data,
650 .usb = &omap3evm_usb_data,
651 .gpio = &omap3evm_gpio_data,
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300652 .codec = &omap3evm_codec_data,
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100653 .vdac = &omap3_evm_vdac,
654 .vpll2 = &omap3_evm_vpll2,
Vaibhav Hiremath410491d2011-01-25 17:37:38 +0000655 .vio = &omap3evm_vio,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700656};
657
658static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
659 {
660 I2C_BOARD_INFO("twl4030", 0x48),
661 .flags = I2C_CLIENT_WAKE,
662 .irq = INT_34XX_SYS_NIRQ,
663 .platform_data = &omap3evm_twldata,
664 },
665};
666
667static int __init omap3_evm_i2c_init(void)
668{
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800669 /*
670 * REVISIT: These entries can be set in omap3evm_twl_data
671 * after a merge with MFD tree
672 */
673 omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
674 omap3evm_twldata.vsim = &omap3evm_vsim;
675
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700676 omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
677 ARRAY_SIZE(omap3evm_i2c_boardinfo));
678 omap_register_i2c_bus(2, 400, NULL, 0);
679 omap_register_i2c_bus(3, 400, NULL, 0);
680 return 0;
681}
682
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700683static void ads7846_dev_init(void)
684{
685 if (gpio_request(OMAP3_EVM_TS_GPIO, "ADS7846 pendown") < 0)
686 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
687
688 gpio_direction_input(OMAP3_EVM_TS_GPIO);
Felipe Balbi48feb332010-05-26 14:42:24 -0700689 gpio_set_debounce(OMAP3_EVM_TS_GPIO, 310);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700690}
691
692static int ads7846_get_pendown_state(void)
693{
694 return !gpio_get_value(OMAP3_EVM_TS_GPIO);
695}
696
Manjunath Kondaiah G38815732010-10-08 09:56:37 -0700697static struct ads7846_platform_data ads7846_config = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700698 .x_max = 0x0fff,
699 .y_max = 0x0fff,
700 .x_plate_ohms = 180,
701 .pressure_max = 255,
702 .debounce_max = 10,
703 .debounce_tol = 3,
704 .debounce_rep = 1,
705 .get_pendown_state = ads7846_get_pendown_state,
706 .keep_vref_on = 1,
707 .settle_delay_usecs = 150,
Ranjith Lohithakshan7a44ad22010-05-08 12:39:21 +0530708 .wakeup = true,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700709};
710
711static struct omap2_mcspi_device_config ads7846_mcspi_config = {
712 .turbo_mode = 0,
713 .single_channel = 1, /* 0: slave, 1: master */
714};
715
Manjunath Kondaiah G38815732010-10-08 09:56:37 -0700716static struct spi_board_info omap3evm_spi_board_info[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700717 [0] = {
718 .modalias = "ads7846",
719 .bus_num = 1,
720 .chip_select = 0,
721 .max_speed_hz = 1500000,
722 .controller_data = &ads7846_mcspi_config,
723 .irq = OMAP_GPIO_IRQ(OMAP3_EVM_TS_GPIO),
724 .platform_data = &ads7846_config,
725 },
726};
727
Paul Walmsleyb3c6df32009-09-03 20:14:02 +0300728static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
Paul Walmsleyb3c6df32009-09-03 20:14:02 +0300729};
730
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -0800731static void __init omap3_evm_init_early(void)
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700732{
Paul Walmsley48057342010-12-21 15:25:10 -0700733 omap2_init_common_infrastructure();
734 omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700735}
736
Felipe Balbi6f69a182010-03-04 09:45:53 +0200737static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
Felipe Balbi58a54912009-11-22 10:11:01 -0800738
739 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
740 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
741 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
742
743 .phy_reset = true,
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800744 /* PHY reset GPIO will be runtime programmed based on EVM version */
Felipe Balbi58a54912009-11-22 10:11:01 -0800745 .reset_gpio_port[0] = -EINVAL,
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800746 .reset_gpio_port[1] = -EINVAL,
Felipe Balbi58a54912009-11-22 10:11:01 -0800747 .reset_gpio_port[2] = -EINVAL
748};
749
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800750#ifdef CONFIG_OMAP_MUX
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000751static struct omap_board_mux omap35x_board_mux[] __initdata = {
Sanjeev Premiaa6912d82010-02-17 14:09:23 -0800752 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
Ranjith Lohithakshanf3a8cde2010-05-03 17:07:51 +0530753 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
Sanjeev Premiaa6912d82010-02-17 14:09:23 -0800754 OMAP_PIN_OFF_WAKEUPENABLE),
Sanjeev Premi87520aa2010-02-17 14:09:24 -0800755 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
Vaibhav Hiremath854c1222011-01-25 17:37:41 +0000756 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
757 OMAP_PIN_OFF_WAKEUPENABLE),
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +0000758 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
759 OMAP_PIN_OFF_NONE),
760 OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
761 OMAP_PIN_OFF_NONE),
Eyal Reizer741927f2011-01-27 09:49:49 +0000762#ifdef CONFIG_WL12XX_PLATFORM_DATA
763 /* WLAN IRQ - GPIO 149 */
764 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
765
766 /* WLAN POWER ENABLE - GPIO 150 */
767 OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
768
769 /* MMC2 SDIO pin muxes for WL12xx */
770 OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
771 OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
772 OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
773 OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
774 OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
775 OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
776#endif
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800777 { .reg_offset = OMAP_MUX_TERMINATOR },
778};
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000779
780static struct omap_board_mux omap36x_board_mux[] __initdata = {
781 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
782 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
783 OMAP_PIN_OFF_WAKEUPENABLE),
784 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
Vaibhav Hiremath854c1222011-01-25 17:37:41 +0000785 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
786 OMAP_PIN_OFF_WAKEUPENABLE),
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000787 /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
788 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
789 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
790 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
791 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
792 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
793 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
794 OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
795 OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
796 OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
797 OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
798 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
799 OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
800
801 { .reg_offset = OMAP_MUX_TERMINATOR },
802};
803#else
804#define omap35x_board_mux NULL
805#define omap36x_board_mux NULL
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800806#endif
807
Maulik Mankad884b8362010-02-17 14:09:30 -0800808static struct omap_musb_board_data musb_board_data = {
809 .interface_type = MUSB_INTERFACE_ULPI,
810 .mode = MUSB_OTG,
811 .power = 100,
812};
813
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700814static void __init omap3_evm_init(void)
815{
Ajay Kumar Guptadb408022009-11-22 10:11:27 -0800816 omap3_evm_get_revision();
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000817
818 if (cpu_is_omap3630())
819 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
820 else
821 omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
Ajay Kumar Guptadb408022009-11-22 10:11:27 -0800822
Tony Lindgrene41cccf2011-02-24 14:36:03 -0800823 omap_board_config = omap3_evm_config;
824 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
825
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700826 omap3_evm_i2c_init();
827
Senthilvadivu Guruswamyd5e13222011-02-22 11:24:50 +0200828 omap_display_init(&omap3_evm_dss_data);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700829
830 spi_register_board_info(omap3evm_spi_board_info,
831 ARRAY_SIZE(omap3evm_spi_board_info));
832
833 omap_serial_init();
Maulik Mankad1a4f4632010-02-17 14:09:29 -0800834
Gupta, Ajay Kumare8e2ff42009-07-29 11:58:57 +0530835 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
836 usb_nop_xceiv_register();
Maulik Mankad1a4f4632010-02-17 14:09:29 -0800837
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800838 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
839 /* enable EHCI VBUS using GPIO22 */
Tony Lindgren4896e392009-12-11 16:16:32 -0800840 omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800841 gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
842 gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
843 gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
844
845 /* Select EHCI port on main board */
Tony Lindgren4896e392009-12-11 16:16:32 -0800846 omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800847 gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
848 gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
849 gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
850
851 /* setup EHCI phy reset config */
Tony Lindgren4896e392009-12-11 16:16:32 -0800852 omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800853 ehci_pdata.reset_gpio_port[1] = 21;
854
Ajay Kumar Gupta58815fa2010-03-25 13:25:27 +0200855 /* EVM REV >= E can supply 500mA with EXTVBUS programming */
856 musb_board_data.power = 500;
857 musb_board_data.extvbus = 1;
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800858 } else {
859 /* setup EHCI phy reset on MDC */
Tony Lindgren4896e392009-12-11 16:16:32 -0800860 omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800861 ehci_pdata.reset_gpio_port[1] = 135;
862 }
Maulik Mankad884b8362010-02-17 14:09:30 -0800863 usb_musb_init(&musb_board_data);
Felipe Balbi58a54912009-11-22 10:11:01 -0800864 usb_ehci_init(&ehci_pdata);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700865 ads7846_dev_init();
Sriram562138a2009-11-22 10:11:30 -0800866 omap3evm_init_smsc911x();
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100867 omap3_evm_display_init();
Eyal Reizer741927f2011-01-27 09:49:49 +0000868
869#ifdef CONFIG_WL12XX_PLATFORM_DATA
870 /* WL12xx WLAN Init */
871 if (wl12xx_set_platform_data(&omap3evm_wlan_data))
872 pr_err("error setting wl12xx data\n");
873 platform_device_register(&omap3evm_vwlan_device);
874#endif
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700875}
876
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700877MACHINE_START(OMAP3EVM, "OMAP3 EVM")
878 /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700879 .boot_params = 0x80000100,
Russell King71ee7da2010-05-23 10:18:16 +0100880 .reserve = omap_reserve,
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -0800881 .map_io = omap3_map_io,
882 .init_early = omap3_evm_init_early,
883 .init_irq = omap_init_irq,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700884 .init_machine = omap3_evm_init,
885 .timer = &omap_timer,
886MACHINE_END