blob: d4a115712290e12c9bdde4c9c9dcf9665cc0a291 [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 Hunterd02a900b2010-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
366static struct platform_device omap3_evm_dss_device = {
367 .name = "omapdss",
368 .id = -1,
369 .dev = {
370 .platform_data = &omap3_evm_dss_data,
371 },
372};
373
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800374static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
375 .supply = "vmmc",
376};
377
378static struct regulator_consumer_supply omap3evm_vsim_supply = {
379 .supply = "vmmc_aux",
380};
381
382/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
383static struct regulator_init_data omap3evm_vmmc1 = {
384 .constraints = {
385 .min_uV = 1850000,
386 .max_uV = 3150000,
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 },
393 .num_consumer_supplies = 1,
394 .consumer_supplies = &omap3evm_vmmc1_supply,
395};
396
397/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
398static struct regulator_init_data omap3evm_vsim = {
399 .constraints = {
400 .min_uV = 1800000,
401 .max_uV = 3000000,
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 .num_consumer_supplies = 1,
409 .consumer_supplies = &omap3evm_vsim_supply,
410};
411
Adrian Hunter68ff0422010-02-15 10:03:34 -0800412static struct omap2_hsmmc_info mmc[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700413 {
414 .mmc = 1,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000415 .caps = MMC_CAP_4_BIT_DATA,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700416 .gpio_cd = -EINVAL,
417 .gpio_wp = 63,
418 },
Eyal Reizer741927f2011-01-27 09:49:49 +0000419#ifdef CONFIG_WL12XX_PLATFORM_DATA
420 {
421 .name = "wl1271",
422 .mmc = 2,
423 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
424 .gpio_wp = -EINVAL,
425 .gpio_cd = -EINVAL,
426 .nonremovable = true,
427 },
428#endif
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700429 {} /* Terminator */
430};
431
432static struct gpio_led gpio_leds[] = {
433 {
434 .name = "omap3evm::ledb",
435 /* normally not visible (board underside) */
436 .default_trigger = "default-on",
437 .gpio = -EINVAL, /* gets replaced */
438 .active_low = true,
439 },
440};
441
442static struct gpio_led_platform_data gpio_led_info = {
443 .leds = gpio_leds,
444 .num_leds = ARRAY_SIZE(gpio_leds),
445};
446
447static struct platform_device leds_gpio = {
448 .name = "leds-gpio",
449 .id = -1,
450 .dev = {
451 .platform_data = &gpio_led_info,
452 },
453};
454
455
456static int omap3evm_twl_gpio_setup(struct device *dev,
457 unsigned gpio, unsigned ngpio)
458{
Vaibhav Hiremath42fc8ca2011-01-25 17:37:40 +0000459 int r;
460
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700461 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
Tony Lindgren4896e392009-12-11 16:16:32 -0800462 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700463 mmc[0].gpio_cd = gpio + 0;
Adrian Hunter68ff0422010-02-15 10:03:34 -0800464 omap2_hsmmc_init(mmc);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700465
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800466 /* link regulators to MMC adapters */
467 omap3evm_vmmc1_supply.dev = mmc[0].dev;
468 omap3evm_vsim_supply.dev = mmc[0].dev;
469
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700470 /*
471 * Most GPIOs are for USB OTG. Some are mostly sent to
472 * the P2 connector; notably LEDA for the LCD backlight.
473 */
474
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100475 /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
Vaibhav Hiremath42fc8ca2011-01-25 17:37:40 +0000476 r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
477 if (!r)
478 r = gpio_direction_output(gpio + TWL4030_GPIO_MAX,
479 (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0);
480 if (r)
481 printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100482
483 /* gpio + 7 == DVI Enable */
484 gpio_request(gpio + 7, "EN_DVI");
485 gpio_direction_output(gpio + 7, 0);
486
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700487 /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
488 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
489
490 platform_device_register(&leds_gpio);
491
492 return 0;
493}
494
495static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
496 .gpio_base = OMAP_MAX_GPIO_LINES,
497 .irq_base = TWL4030_GPIO_IRQ_BASE,
498 .irq_end = TWL4030_GPIO_IRQ_END,
499 .use_leds = true,
500 .setup = omap3evm_twl_gpio_setup,
501};
502
503static struct twl4030_usb_data omap3evm_usb_data = {
504 .usb_mode = T2_USB_MODE_ULPI,
505};
506
Manjunath Kondaiah Gbead4372010-10-08 10:01:13 -0700507static uint32_t board_keymap[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700508 KEY(0, 0, KEY_LEFT),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800509 KEY(0, 1, KEY_DOWN),
510 KEY(0, 2, KEY_ENTER),
511 KEY(0, 3, KEY_M),
512
513 KEY(1, 0, KEY_RIGHT),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700514 KEY(1, 1, KEY_UP),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800515 KEY(1, 2, KEY_I),
516 KEY(1, 3, KEY_N),
517
518 KEY(2, 0, KEY_A),
519 KEY(2, 1, KEY_E),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700520 KEY(2, 2, KEY_J),
Sanjeev Premi0621d752010-02-17 14:09:24 -0800521 KEY(2, 3, KEY_O),
522
523 KEY(3, 0, KEY_B),
524 KEY(3, 1, KEY_F),
525 KEY(3, 2, KEY_K),
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700526 KEY(3, 3, KEY_P)
527};
528
Tony Lindgren4f543332009-09-24 16:23:16 -0700529static struct matrix_keymap_data board_map_data = {
530 .keymap = board_keymap,
531 .keymap_size = ARRAY_SIZE(board_keymap),
532};
533
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700534static struct twl4030_keypad_data omap3evm_kp_data = {
Tony Lindgren4f543332009-09-24 16:23:16 -0700535 .keymap_data = &board_map_data,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700536 .rows = 4,
537 .cols = 4,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700538 .rep = 1,
539};
540
541static struct twl4030_madc_platform_data omap3evm_madc_data = {
542 .irq_line = 1,
543};
544
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300545static struct twl4030_codec_audio_data omap3evm_audio_data = {
546 .audio_mclk = 26000000,
547};
548
549static struct twl4030_codec_data omap3evm_codec_data = {
Peter Ujfalusi6df74ef2009-11-04 09:58:18 +0200550 .audio_mclk = 26000000,
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300551 .audio = &omap3evm_audio_data,
552};
553
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100554static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = {
555 .supply = "vdda_dac",
556 .dev = &omap3_evm_dss_device.dev,
557};
558
559/* VDAC for DSS driving S-Video */
560static struct regulator_init_data omap3_evm_vdac = {
561 .constraints = {
562 .min_uV = 1800000,
563 .max_uV = 1800000,
564 .apply_uV = true,
565 .valid_modes_mask = REGULATOR_MODE_NORMAL
566 | REGULATOR_MODE_STANDBY,
567 .valid_ops_mask = REGULATOR_CHANGE_MODE
568 | REGULATOR_CHANGE_STATUS,
569 },
570 .num_consumer_supplies = 1,
571 .consumer_supplies = &omap3_evm_vdda_dac_supply,
572};
573
574/* VPLL2 for digital video outputs */
Vaibhav Hiremathf3fe53c2010-03-19 11:21:19 +0000575static struct regulator_consumer_supply omap3_evm_vpll2_supply =
576 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100577
578static struct regulator_init_data omap3_evm_vpll2 = {
579 .constraints = {
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100580 .min_uV = 1800000,
581 .max_uV = 1800000,
582 .apply_uV = true,
583 .valid_modes_mask = REGULATOR_MODE_NORMAL
584 | REGULATOR_MODE_STANDBY,
585 .valid_ops_mask = REGULATOR_CHANGE_MODE
586 | REGULATOR_CHANGE_STATUS,
587 },
588 .num_consumer_supplies = 1,
589 .consumer_supplies = &omap3_evm_vpll2_supply,
590};
591
Vaibhav Hiremath410491d2011-01-25 17:37:38 +0000592/* ads7846 on SPI */
593static struct regulator_consumer_supply omap3evm_vio_supply =
594 REGULATOR_SUPPLY("vcc", "spi1.0");
595
596/* VIO for ads7846 */
597static struct regulator_init_data omap3evm_vio = {
598 .constraints = {
599 .min_uV = 1800000,
600 .max_uV = 1800000,
601 .apply_uV = true,
602 .valid_modes_mask = REGULATOR_MODE_NORMAL
603 | REGULATOR_MODE_STANDBY,
604 .valid_ops_mask = REGULATOR_CHANGE_MODE
605 | REGULATOR_CHANGE_STATUS,
606 },
607 .num_consumer_supplies = 1,
608 .consumer_supplies = &omap3evm_vio_supply,
609};
610
Eyal Reizer741927f2011-01-27 09:49:49 +0000611#ifdef CONFIG_WL12XX_PLATFORM_DATA
612
613#define OMAP3EVM_WLAN_PMENA_GPIO (150)
614#define OMAP3EVM_WLAN_IRQ_GPIO (149)
615
616static struct regulator_consumer_supply omap3evm_vmmc2_supply = {
617 .supply = "vmmc",
618 .dev_name = "mmci-omap-hs.1",
619};
620
621/* VMMC2 for driving the WL12xx module */
622static struct regulator_init_data omap3evm_vmmc2 = {
623 .constraints = {
624 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
625 },
626 .num_consumer_supplies = 1,
627 .consumer_supplies = &omap3evm_vmmc2_supply,
628};
629
630static struct fixed_voltage_config omap3evm_vwlan = {
631 .supply_name = "vwl1271",
632 .microvolts = 1800000, /* 1.80V */
633 .gpio = OMAP3EVM_WLAN_PMENA_GPIO,
634 .startup_delay = 70000, /* 70ms */
635 .enable_high = 1,
636 .enabled_at_boot = 0,
637 .init_data = &omap3evm_vmmc2,
638};
639
640static struct platform_device omap3evm_vwlan_device = {
641 .name = "reg-fixed-voltage",
642 .id = 1,
643 .dev = {
644 .platform_data = &omap3evm_vwlan,
645 },
646};
647
648struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
649 .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
650 /* ref clock is 38.4 MHz */
651 .board_ref_clock = 2,
652};
653#endif
654
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700655static struct twl4030_platform_data omap3evm_twldata = {
656 .irq_base = TWL4030_IRQ_BASE,
657 .irq_end = TWL4030_IRQ_END,
658
659 /* platform_data for children goes here */
660 .keypad = &omap3evm_kp_data,
661 .madc = &omap3evm_madc_data,
662 .usb = &omap3evm_usb_data,
663 .gpio = &omap3evm_gpio_data,
Peter Ujfalusie86fa0b2009-10-22 13:26:46 +0300664 .codec = &omap3evm_codec_data,
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100665 .vdac = &omap3_evm_vdac,
666 .vpll2 = &omap3_evm_vpll2,
Vaibhav Hiremath410491d2011-01-25 17:37:38 +0000667 .vio = &omap3evm_vio,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700668};
669
670static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
671 {
672 I2C_BOARD_INFO("twl4030", 0x48),
673 .flags = I2C_CLIENT_WAKE,
674 .irq = INT_34XX_SYS_NIRQ,
675 .platform_data = &omap3evm_twldata,
676 },
677};
678
679static int __init omap3_evm_i2c_init(void)
680{
Mike Rapoport1a7ec132009-11-22 10:11:29 -0800681 /*
682 * REVISIT: These entries can be set in omap3evm_twl_data
683 * after a merge with MFD tree
684 */
685 omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
686 omap3evm_twldata.vsim = &omap3evm_vsim;
687
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700688 omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
689 ARRAY_SIZE(omap3evm_i2c_boardinfo));
690 omap_register_i2c_bus(2, 400, NULL, 0);
691 omap_register_i2c_bus(3, 400, NULL, 0);
692 return 0;
693}
694
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700695static void ads7846_dev_init(void)
696{
697 if (gpio_request(OMAP3_EVM_TS_GPIO, "ADS7846 pendown") < 0)
698 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
699
700 gpio_direction_input(OMAP3_EVM_TS_GPIO);
Felipe Balbi48feb332010-05-26 14:42:24 -0700701 gpio_set_debounce(OMAP3_EVM_TS_GPIO, 310);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700702}
703
704static int ads7846_get_pendown_state(void)
705{
706 return !gpio_get_value(OMAP3_EVM_TS_GPIO);
707}
708
Manjunath Kondaiah G38815732010-10-08 09:56:37 -0700709static struct ads7846_platform_data ads7846_config = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700710 .x_max = 0x0fff,
711 .y_max = 0x0fff,
712 .x_plate_ohms = 180,
713 .pressure_max = 255,
714 .debounce_max = 10,
715 .debounce_tol = 3,
716 .debounce_rep = 1,
717 .get_pendown_state = ads7846_get_pendown_state,
718 .keep_vref_on = 1,
719 .settle_delay_usecs = 150,
Ranjith Lohithakshan7a44ad22010-05-08 12:39:21 +0530720 .wakeup = true,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700721};
722
723static struct omap2_mcspi_device_config ads7846_mcspi_config = {
724 .turbo_mode = 0,
725 .single_channel = 1, /* 0: slave, 1: master */
726};
727
Manjunath Kondaiah G38815732010-10-08 09:56:37 -0700728static struct spi_board_info omap3evm_spi_board_info[] = {
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700729 [0] = {
730 .modalias = "ads7846",
731 .bus_num = 1,
732 .chip_select = 0,
733 .max_speed_hz = 1500000,
734 .controller_data = &ads7846_mcspi_config,
735 .irq = OMAP_GPIO_IRQ(OMAP3_EVM_TS_GPIO),
736 .platform_data = &ads7846_config,
737 },
738};
739
Paul Walmsleyb3c6df32009-09-03 20:14:02 +0300740static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
Paul Walmsleyb3c6df32009-09-03 20:14:02 +0300741};
742
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -0800743static void __init omap3_evm_init_early(void)
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700744{
Paul Walmsleyb3c6df32009-09-03 20:14:02 +0300745 omap_board_config = omap3_evm_config;
746 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
Paul Walmsley48057342010-12-21 15:25:10 -0700747 omap2_init_common_infrastructure();
748 omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700749}
750
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700751static struct platform_device *omap3_evm_devices[] __initdata = {
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100752 &omap3_evm_dss_device,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700753};
754
Felipe Balbi6f69a182010-03-04 09:45:53 +0200755static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
Felipe Balbi58a54912009-11-22 10:11:01 -0800756
757 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
758 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
759 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
760
761 .phy_reset = true,
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800762 /* PHY reset GPIO will be runtime programmed based on EVM version */
Felipe Balbi58a54912009-11-22 10:11:01 -0800763 .reset_gpio_port[0] = -EINVAL,
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800764 .reset_gpio_port[1] = -EINVAL,
Felipe Balbi58a54912009-11-22 10:11:01 -0800765 .reset_gpio_port[2] = -EINVAL
766};
767
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800768#ifdef CONFIG_OMAP_MUX
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000769static struct omap_board_mux omap35x_board_mux[] __initdata = {
Sanjeev Premiaa6912d82010-02-17 14:09:23 -0800770 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
Ranjith Lohithakshanf3a8cde2010-05-03 17:07:51 +0530771 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
Sanjeev Premiaa6912d82010-02-17 14:09:23 -0800772 OMAP_PIN_OFF_WAKEUPENABLE),
Sanjeev Premi87520aa2010-02-17 14:09:24 -0800773 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
Vaibhav Hiremath854c1222011-01-25 17:37:41 +0000774 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
775 OMAP_PIN_OFF_WAKEUPENABLE),
Vaibhav Hiremath9bc64b82011-01-24 19:25:55 +0000776 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
777 OMAP_PIN_OFF_NONE),
778 OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
779 OMAP_PIN_OFF_NONE),
Eyal Reizer741927f2011-01-27 09:49:49 +0000780#ifdef CONFIG_WL12XX_PLATFORM_DATA
781 /* WLAN IRQ - GPIO 149 */
782 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
783
784 /* WLAN POWER ENABLE - GPIO 150 */
785 OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
786
787 /* MMC2 SDIO pin muxes for WL12xx */
788 OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
789 OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
790 OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
791 OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
792 OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
793 OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
794#endif
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800795 { .reg_offset = OMAP_MUX_TERMINATOR },
796};
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000797
798static struct omap_board_mux omap36x_board_mux[] __initdata = {
799 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
800 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
801 OMAP_PIN_OFF_WAKEUPENABLE),
802 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
Vaibhav Hiremath854c1222011-01-25 17:37:41 +0000803 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
804 OMAP_PIN_OFF_WAKEUPENABLE),
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000805 /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
806 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
807 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
808 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
809 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
810 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
811 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
812 OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
813 OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
814 OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
815 OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
816 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
817 OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
818
819 { .reg_offset = OMAP_MUX_TERMINATOR },
820};
821#else
822#define omap35x_board_mux NULL
823#define omap36x_board_mux NULL
Tony Lindgrenca5742b2009-12-11 16:16:32 -0800824#endif
825
Maulik Mankad884b8362010-02-17 14:09:30 -0800826static struct omap_musb_board_data musb_board_data = {
827 .interface_type = MUSB_INTERFACE_ULPI,
828 .mode = MUSB_OTG,
829 .power = 100,
830};
831
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700832static void __init omap3_evm_init(void)
833{
Ajay Kumar Guptadb408022009-11-22 10:11:27 -0800834 omap3_evm_get_revision();
Vaibhav Hiremath904c5452011-01-25 17:37:39 +0000835
836 if (cpu_is_omap3630())
837 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
838 else
839 omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
Ajay Kumar Guptadb408022009-11-22 10:11:27 -0800840
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700841 omap3_evm_i2c_init();
842
843 platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700844
845 spi_register_board_info(omap3evm_spi_board_info,
846 ARRAY_SIZE(omap3evm_spi_board_info));
847
848 omap_serial_init();
Maulik Mankad1a4f4632010-02-17 14:09:29 -0800849
Gupta, Ajay Kumare8e2ff42009-07-29 11:58:57 +0530850 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
851 usb_nop_xceiv_register();
Maulik Mankad1a4f4632010-02-17 14:09:29 -0800852
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800853 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
854 /* enable EHCI VBUS using GPIO22 */
Tony Lindgren4896e392009-12-11 16:16:32 -0800855 omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800856 gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
857 gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
858 gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
859
860 /* Select EHCI port on main board */
Tony Lindgren4896e392009-12-11 16:16:32 -0800861 omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800862 gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
863 gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
864 gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
865
866 /* setup EHCI phy reset config */
Tony Lindgren4896e392009-12-11 16:16:32 -0800867 omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800868 ehci_pdata.reset_gpio_port[1] = 21;
869
Ajay Kumar Gupta58815fa2010-03-25 13:25:27 +0200870 /* EVM REV >= E can supply 500mA with EXTVBUS programming */
871 musb_board_data.power = 500;
872 musb_board_data.extvbus = 1;
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800873 } else {
874 /* setup EHCI phy reset on MDC */
Tony Lindgren4896e392009-12-11 16:16:32 -0800875 omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
Ajay Kumar Guptae8e51d22009-11-22 10:11:28 -0800876 ehci_pdata.reset_gpio_port[1] = 135;
877 }
Maulik Mankad884b8362010-02-17 14:09:30 -0800878 usb_musb_init(&musb_board_data);
Felipe Balbi58a54912009-11-22 10:11:01 -0800879 usb_ehci_init(&ehci_pdata);
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700880 ads7846_dev_init();
Sriram562138a2009-11-22 10:11:30 -0800881 omap3evm_init_smsc911x();
Vaibhav Hiremath703e3062010-01-04 15:34:16 +0100882 omap3_evm_display_init();
Eyal Reizer741927f2011-01-27 09:49:49 +0000883
884#ifdef CONFIG_WL12XX_PLATFORM_DATA
885 /* WL12xx WLAN Init */
886 if (wl12xx_set_platform_data(&omap3evm_wlan_data))
887 pr_err("error setting wl12xx data\n");
888 platform_device_register(&omap3evm_vwlan_device);
889#endif
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700890}
891
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700892MACHINE_START(OMAP3EVM, "OMAP3 EVM")
893 /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700894 .boot_params = 0x80000100,
Russell King71ee7da2010-05-23 10:18:16 +0100895 .reserve = omap_reserve,
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -0800896 .map_io = omap3_map_io,
897 .init_early = omap3_evm_init_early,
898 .init_irq = omap_init_irq,
Syed Mohammed Khasim53c5ec32009-05-28 14:13:28 -0700899 .init_machine = omap3_evm_init,
900 .timer = &omap_timer,
901MACHINE_END