blob: 795ffc46152212fccf3f4b23e75ac363b4e626f4 [file] [log] [blame]
David Andersb075f582010-08-02 13:18:05 +03001/*
2 * Board support file for OMAP4430 based PandaBoard.
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * Author: David Anders <x0132446@ti.com>
7 *
8 * Based on mach-omap2/board-4430sdp.c
9 *
10 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 *
12 * Based on mach-omap2/board-3430sdp.c
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/platform_device.h>
Anand Gadiyar1740d482011-01-10 14:42:15 +000022#include <linux/clk.h>
David Andersb075f582010-08-02 13:18:05 +030023#include <linux/io.h>
Ricardo Salveti de Araujo3da434a2010-09-23 18:22:49 -070024#include <linux/leds.h>
David Andersb075f582010-08-02 13:18:05 +030025#include <linux/gpio.h>
26#include <linux/usb/otg.h>
27#include <linux/i2c/twl.h>
28#include <linux/regulator/machine.h>
Panduranga Mallireddyedc84062011-02-15 03:40:34 -050029#include <linux/regulator/fixed.h>
Panduranga Mallireddyb17e09792011-02-15 03:40:35 -050030#include <linux/wl12xx.h>
David Andersb075f582010-08-02 13:18:05 +030031
32#include <mach/hardware.h>
33#include <mach/omap4-common.h>
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/map.h>
K, Mythri P17c84ef2011-03-14 23:57:42 -050037#include <plat/display.h>
David Andersb075f582010-08-02 13:18:05 +030038
39#include <plat/board.h>
40#include <plat/common.h>
David Andersb075f582010-08-02 13:18:05 +030041#include <plat/usb.h>
42#include <plat/mmc.h>
Manjunath Kondaiah G04aeae72010-10-08 09:58:35 -070043#include "timer-gp.h"
David Andersb075f582010-08-02 13:18:05 +030044
Paul Walmsley4814ced2010-10-08 11:40:20 -060045#include "hsmmc.h"
46#include "control.h"
sricharanfc63de822010-11-08 19:26:11 +053047#include "mux.h"
David Andersb075f582010-08-02 13:18:05 +030048
David Anders4415beb2010-10-07 19:36:30 +000049#define GPIO_HUB_POWER 1
50#define GPIO_HUB_NRESET 62
Panduranga Mallireddyedc84062011-02-15 03:40:34 -050051#define GPIO_WIFI_PMENA 43
Panduranga Mallireddyb17e09792011-02-15 03:40:35 -050052#define GPIO_WIFI_IRQ 53
K, Mythri P17c84ef2011-03-14 23:57:42 -050053#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
54#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
David Anders4415beb2010-10-07 19:36:30 +000055
Guy Eilamec179ea52011-02-25 06:52:35 +000056/* wl127x BT, FM, GPS connectivity chip */
57static int wl1271_gpios[] = {46, -1, -1};
58static struct platform_device wl1271_device = {
59 .name = "kim",
60 .id = -1,
61 .dev = {
62 .platform_data = &wl1271_gpios,
63 },
64};
65
Ricardo Salveti de Araujo3da434a2010-09-23 18:22:49 -070066static struct gpio_led gpio_leds[] = {
67 {
68 .name = "pandaboard::status1",
69 .default_trigger = "heartbeat",
70 .gpio = 7,
71 },
72 {
73 .name = "pandaboard::status2",
74 .default_trigger = "mmc0",
75 .gpio = 8,
76 },
77};
78
79static struct gpio_led_platform_data gpio_led_info = {
80 .leds = gpio_leds,
81 .num_leds = ARRAY_SIZE(gpio_leds),
82};
83
84static struct platform_device leds_gpio = {
85 .name = "leds-gpio",
86 .id = -1,
87 .dev = {
88 .platform_data = &gpio_led_info,
89 },
90};
91
92static struct platform_device *panda_devices[] __initdata = {
93 &leds_gpio,
Guy Eilamec179ea52011-02-25 06:52:35 +000094 &wl1271_device,
Ricardo Salveti de Araujo3da434a2010-09-23 18:22:49 -070095};
David Andersb075f582010-08-02 13:18:05 +030096
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -080097static void __init omap4_panda_init_early(void)
David Andersb075f582010-08-02 13:18:05 +030098{
Paul Walmsley48057342010-12-21 15:25:10 -070099 omap2_init_common_infrastructure();
100 omap2_init_common_devices(NULL, NULL);
David Andersb075f582010-08-02 13:18:05 +0300101}
102
David Anders4415beb2010-10-07 19:36:30 +0000103static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
104 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
105 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
106 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
107 .phy_reset = false,
108 .reset_gpio_port[0] = -EINVAL,
109 .reset_gpio_port[1] = -EINVAL,
110 .reset_gpio_port[2] = -EINVAL
111};
112
113static void __init omap4_ehci_init(void)
114{
115 int ret;
Anand Gadiyar1740d482011-01-10 14:42:15 +0000116 struct clk *phy_ref_clk;
David Anders4415beb2010-10-07 19:36:30 +0000117
Anand Gadiyar1740d482011-01-10 14:42:15 +0000118 /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
119 phy_ref_clk = clk_get(NULL, "auxclk3_ck");
120 if (IS_ERR(phy_ref_clk)) {
121 pr_err("Cannot request auxclk3\n");
122 goto error1;
123 }
124 clk_set_rate(phy_ref_clk, 19200000);
125 clk_enable(phy_ref_clk);
David Anders4415beb2010-10-07 19:36:30 +0000126
127 /* disable the power to the usb hub prior to init */
128 ret = gpio_request(GPIO_HUB_POWER, "hub_power");
129 if (ret) {
130 pr_err("Cannot request GPIO %d\n", GPIO_HUB_POWER);
131 goto error1;
132 }
133 gpio_export(GPIO_HUB_POWER, 0);
134 gpio_direction_output(GPIO_HUB_POWER, 0);
135 gpio_set_value(GPIO_HUB_POWER, 0);
136
137 /* reset phy+hub */
138 ret = gpio_request(GPIO_HUB_NRESET, "hub_nreset");
139 if (ret) {
140 pr_err("Cannot request GPIO %d\n", GPIO_HUB_NRESET);
141 goto error2;
142 }
143 gpio_export(GPIO_HUB_NRESET, 0);
144 gpio_direction_output(GPIO_HUB_NRESET, 0);
145 gpio_set_value(GPIO_HUB_NRESET, 0);
146 gpio_set_value(GPIO_HUB_NRESET, 1);
147
148 usb_ehci_init(&ehci_pdata);
149
150 /* enable power to hub */
151 gpio_set_value(GPIO_HUB_POWER, 1);
152 return;
153
154error2:
155 gpio_free(GPIO_HUB_POWER);
156error1:
157 pr_err("Unable to initialize EHCI power/reset\n");
158 return;
159
160}
161
David Andersb075f582010-08-02 13:18:05 +0300162static struct omap_musb_board_data musb_board_data = {
163 .interface_type = MUSB_INTERFACE_UTMI,
Hema HK09e72002010-12-10 18:11:42 +0530164 .mode = MUSB_OTG,
David Andersb075f582010-08-02 13:18:05 +0300165 .power = 100,
166};
167
Hema HKe70357e2010-12-10 18:09:52 +0530168static struct twl4030_usb_data omap4_usbphy_data = {
169 .phy_init = omap4430_phy_init,
170 .phy_exit = omap4430_phy_exit,
171 .phy_power = omap4430_phy_power,
172 .phy_set_clock = omap4430_phy_set_clk,
173};
174
David Andersb075f582010-08-02 13:18:05 +0300175static struct omap2_hsmmc_info mmc[] = {
176 {
177 .mmc = 1,
Sukumar Ghorai3a638332010-09-15 14:49:23 +0000178 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
David Andersb075f582010-08-02 13:18:05 +0300179 .gpio_wp = -EINVAL,
Raghuveer Murthy5b59cc22010-12-21 14:14:34 +0000180 .gpio_cd = -EINVAL,
David Andersb075f582010-08-02 13:18:05 +0300181 },
Panduranga Mallireddyb17e09792011-02-15 03:40:35 -0500182 {
183 .name = "wl1271",
184 .mmc = 5,
185 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
186 .gpio_wp = -EINVAL,
187 .gpio_cd = -EINVAL,
188 .ocr_mask = MMC_VDD_165_195,
189 .nonremovable = true,
190 },
David Andersb075f582010-08-02 13:18:05 +0300191 {} /* Terminator */
192};
193
194static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
195 {
196 .supply = "vmmc",
Kishore Kadiyala0005ae72011-02-28 20:48:05 +0530197 .dev_name = "omap_hsmmc.0",
David Andersb075f582010-08-02 13:18:05 +0300198 },
David Andersb075f582010-08-02 13:18:05 +0300199};
200
Panduranga Mallireddyedc84062011-02-15 03:40:34 -0500201static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
202 .supply = "vmmc",
Kishore Kadiyala0005ae72011-02-28 20:48:05 +0530203 .dev_name = "omap_hsmmc.4",
Panduranga Mallireddyedc84062011-02-15 03:40:34 -0500204};
205
206static struct regulator_init_data panda_vmmc5 = {
207 .constraints = {
208 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
209 },
210 .num_consumer_supplies = 1,
211 .consumer_supplies = &omap4_panda_vmmc5_supply,
212};
213
214static struct fixed_voltage_config panda_vwlan = {
215 .supply_name = "vwl1271",
216 .microvolts = 1800000, /* 1.8V */
217 .gpio = GPIO_WIFI_PMENA,
218 .startup_delay = 70000, /* 70msec */
219 .enable_high = 1,
220 .enabled_at_boot = 0,
221 .init_data = &panda_vmmc5,
222};
223
224static struct platform_device omap_vwlan_device = {
225 .name = "reg-fixed-voltage",
226 .id = 1,
227 .dev = {
228 .platform_data = &panda_vwlan,
229 },
230};
231
Panduranga Mallireddyb17e09792011-02-15 03:40:35 -0500232struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
233 .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
234 /* PANDA ref clock is 38.4 MHz */
235 .board_ref_clock = 2,
236};
237
David Andersb075f582010-08-02 13:18:05 +0300238static int omap4_twl6030_hsmmc_late_init(struct device *dev)
239{
240 int ret = 0;
241 struct platform_device *pdev = container_of(dev,
242 struct platform_device, dev);
243 struct omap_mmc_platform_data *pdata = dev->platform_data;
244
Menon, Nishanthbf56f0a2010-10-19 09:50:25 -0500245 if (!pdata) {
246 dev_err(dev, "%s: NULL platform data\n", __func__);
247 return -EINVAL;
248 }
David Andersb075f582010-08-02 13:18:05 +0300249 /* Setting MMC1 Card detect Irq */
Menon, Nishanthbf56f0a2010-10-19 09:50:25 -0500250 if (pdev->id == 0) {
251 ret = twl6030_mmc_card_detect_config();
252 if (ret)
253 dev_err(dev, "%s: Error card detect config(%d)\n",
254 __func__, ret);
255 else
256 pdata->slots[0].card_detect = twl6030_mmc_card_detect;
257 }
David Andersb075f582010-08-02 13:18:05 +0300258 return ret;
259}
260
261static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
262{
David Andersb9b52622010-10-07 19:36:29 +0000263 struct omap_mmc_platform_data *pdata;
264
265 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
266 if (!dev) {
267 pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n");
268 return;
269 }
270 pdata = dev->platform_data;
David Andersb075f582010-08-02 13:18:05 +0300271
272 pdata->init = omap4_twl6030_hsmmc_late_init;
273}
274
275static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
276{
277 struct omap2_hsmmc_info *c;
278
279 omap2_hsmmc_init(controllers);
280 for (c = controllers; c->mmc; c++)
281 omap4_twl6030_hsmmc_set_late_init(c->dev);
282
283 return 0;
284}
285
286static struct regulator_init_data omap4_panda_vaux1 = {
287 .constraints = {
288 .min_uV = 1000000,
289 .max_uV = 3000000,
290 .apply_uV = true,
291 .valid_modes_mask = REGULATOR_MODE_NORMAL
292 | REGULATOR_MODE_STANDBY,
293 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
294 | REGULATOR_CHANGE_MODE
295 | REGULATOR_CHANGE_STATUS,
296 },
297};
298
299static struct regulator_init_data omap4_panda_vaux2 = {
300 .constraints = {
301 .min_uV = 1200000,
302 .max_uV = 2800000,
303 .apply_uV = true,
304 .valid_modes_mask = REGULATOR_MODE_NORMAL
305 | REGULATOR_MODE_STANDBY,
306 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
307 | REGULATOR_CHANGE_MODE
308 | REGULATOR_CHANGE_STATUS,
309 },
310};
311
312static struct regulator_init_data omap4_panda_vaux3 = {
313 .constraints = {
314 .min_uV = 1000000,
315 .max_uV = 3000000,
316 .apply_uV = true,
317 .valid_modes_mask = REGULATOR_MODE_NORMAL
318 | REGULATOR_MODE_STANDBY,
319 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
320 | REGULATOR_CHANGE_MODE
321 | REGULATOR_CHANGE_STATUS,
322 },
323};
324
325/* VMMC1 for MMC1 card */
326static struct regulator_init_data omap4_panda_vmmc = {
327 .constraints = {
328 .min_uV = 1200000,
329 .max_uV = 3000000,
330 .apply_uV = true,
331 .valid_modes_mask = REGULATOR_MODE_NORMAL
332 | REGULATOR_MODE_STANDBY,
333 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
334 | REGULATOR_CHANGE_MODE
335 | REGULATOR_CHANGE_STATUS,
336 },
David Anders191183b2010-10-07 19:36:28 +0000337 .num_consumer_supplies = 1,
David Andersb075f582010-08-02 13:18:05 +0300338 .consumer_supplies = omap4_panda_vmmc_supply,
339};
340
341static struct regulator_init_data omap4_panda_vpp = {
342 .constraints = {
343 .min_uV = 1800000,
344 .max_uV = 2500000,
345 .apply_uV = true,
346 .valid_modes_mask = REGULATOR_MODE_NORMAL
347 | REGULATOR_MODE_STANDBY,
348 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
349 | REGULATOR_CHANGE_MODE
350 | REGULATOR_CHANGE_STATUS,
351 },
352};
353
354static struct regulator_init_data omap4_panda_vusim = {
355 .constraints = {
356 .min_uV = 1200000,
357 .max_uV = 2900000,
358 .apply_uV = true,
359 .valid_modes_mask = REGULATOR_MODE_NORMAL
360 | REGULATOR_MODE_STANDBY,
361 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
362 | REGULATOR_CHANGE_MODE
363 | REGULATOR_CHANGE_STATUS,
364 },
365};
366
367static struct regulator_init_data omap4_panda_vana = {
368 .constraints = {
369 .min_uV = 2100000,
370 .max_uV = 2100000,
David Andersb075f582010-08-02 13:18:05 +0300371 .valid_modes_mask = REGULATOR_MODE_NORMAL
372 | REGULATOR_MODE_STANDBY,
373 .valid_ops_mask = REGULATOR_CHANGE_MODE
374 | REGULATOR_CHANGE_STATUS,
375 },
376};
377
378static struct regulator_init_data omap4_panda_vcxio = {
379 .constraints = {
380 .min_uV = 1800000,
381 .max_uV = 1800000,
David Andersb075f582010-08-02 13:18:05 +0300382 .valid_modes_mask = REGULATOR_MODE_NORMAL
383 | REGULATOR_MODE_STANDBY,
384 .valid_ops_mask = REGULATOR_CHANGE_MODE
385 | REGULATOR_CHANGE_STATUS,
386 },
387};
388
389static struct regulator_init_data omap4_panda_vdac = {
390 .constraints = {
391 .min_uV = 1800000,
392 .max_uV = 1800000,
David Andersb075f582010-08-02 13:18:05 +0300393 .valid_modes_mask = REGULATOR_MODE_NORMAL
394 | REGULATOR_MODE_STANDBY,
395 .valid_ops_mask = REGULATOR_CHANGE_MODE
396 | REGULATOR_CHANGE_STATUS,
397 },
398};
399
400static struct regulator_init_data omap4_panda_vusb = {
401 .constraints = {
402 .min_uV = 3300000,
403 .max_uV = 3300000,
404 .apply_uV = true,
405 .valid_modes_mask = REGULATOR_MODE_NORMAL
406 | REGULATOR_MODE_STANDBY,
407 .valid_ops_mask = REGULATOR_CHANGE_MODE
408 | REGULATOR_CHANGE_STATUS,
409 },
410};
411
412static struct twl4030_platform_data omap4_panda_twldata = {
413 .irq_base = TWL6030_IRQ_BASE,
414 .irq_end = TWL6030_IRQ_END,
415
416 /* Regulators */
417 .vmmc = &omap4_panda_vmmc,
418 .vpp = &omap4_panda_vpp,
419 .vusim = &omap4_panda_vusim,
420 .vana = &omap4_panda_vana,
421 .vcxio = &omap4_panda_vcxio,
422 .vdac = &omap4_panda_vdac,
423 .vusb = &omap4_panda_vusb,
424 .vaux1 = &omap4_panda_vaux1,
425 .vaux2 = &omap4_panda_vaux2,
426 .vaux3 = &omap4_panda_vaux3,
Hema HKe70357e2010-12-10 18:09:52 +0530427 .usb = &omap4_usbphy_data,
David Andersb075f582010-08-02 13:18:05 +0300428};
429
430static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
431 {
432 I2C_BOARD_INFO("twl6030", 0x48),
433 .flags = I2C_CLIENT_WAKE,
434 .irq = OMAP44XX_IRQ_SYS_1N,
435 .platform_data = &omap4_panda_twldata,
436 },
437};
438static int __init omap4_panda_i2c_init(void)
439{
440 /*
441 * Phoenix Audio IC needs I2C1 to
442 * start with 400 KHz or less
443 */
444 omap_register_i2c_bus(1, 400, omap4_panda_i2c_boardinfo,
445 ARRAY_SIZE(omap4_panda_i2c_boardinfo));
446 omap_register_i2c_bus(2, 400, NULL, 0);
447 omap_register_i2c_bus(3, 400, NULL, 0);
448 omap_register_i2c_bus(4, 400, NULL, 0);
449 return 0;
450}
sricharanfc63de822010-11-08 19:26:11 +0530451
452#ifdef CONFIG_OMAP_MUX
453static struct omap_board_mux board_mux[] __initdata = {
Panduranga Mallireddy66e171a2011-02-15 03:40:32 -0500454 /* WLAN IRQ - GPIO 53 */
455 OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
456 /* WLAN POWER ENABLE - GPIO 43 */
457 OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
458 /* WLAN SDIO: MMC5 CMD */
459 OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
460 /* WLAN SDIO: MMC5 CLK */
461 OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
462 /* WLAN SDIO: MMC5 DAT[0-3] */
463 OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
464 OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
465 OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
466 OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
sricharanfc63de822010-11-08 19:26:11 +0530467 { .reg_offset = OMAP_MUX_TERMINATOR },
468};
469#else
470#define board_mux NULL
471#endif
472
K, Mythri P17c84ef2011-03-14 23:57:42 -0500473static void omap4_panda_hdmi_mux_init(void)
474{
475 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
476 omap_mux_init_signal("hdmi_hpd",
477 OMAP_PIN_INPUT_PULLUP);
478 omap_mux_init_signal("hdmi_cec",
479 OMAP_PIN_INPUT_PULLUP);
480 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
481 omap_mux_init_signal("hdmi_ddc_scl",
482 OMAP_PIN_INPUT_PULLUP);
483 omap_mux_init_signal("hdmi_ddc_sda",
484 OMAP_PIN_INPUT_PULLUP);
485}
486
487static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
488{
489 int status;
490
491 status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
492 "hdmi_gpio_hpd");
493 if (status) {
494 pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
495 return status;
496 }
497 status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
498 "hdmi_gpio_ls_oe");
499 if (status) {
500 pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
501 goto error1;
502 }
503
504 return 0;
505
506error1:
507 gpio_free(HDMI_GPIO_HPD);
508
509 return status;
510}
511
512static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
513{
514 gpio_free(HDMI_GPIO_LS_OE);
515 gpio_free(HDMI_GPIO_HPD);
516}
517
518static struct omap_dss_device omap4_panda_hdmi_device = {
519 .name = "hdmi",
520 .driver_name = "hdmi_panel",
521 .type = OMAP_DISPLAY_TYPE_HDMI,
522 .platform_enable = omap4_panda_panel_enable_hdmi,
523 .platform_disable = omap4_panda_panel_disable_hdmi,
524 .channel = OMAP_DSS_CHANNEL_DIGIT,
525};
526
527static struct omap_dss_device *omap4_panda_dss_devices[] = {
528 &omap4_panda_hdmi_device,
529};
530
531static struct omap_dss_board_info omap4_panda_dss_data = {
532 .num_devices = ARRAY_SIZE(omap4_panda_dss_devices),
533 .devices = omap4_panda_dss_devices,
534 .default_device = &omap4_panda_hdmi_device,
535};
536
537void omap4_panda_display_init(void)
538{
539 omap4_panda_hdmi_mux_init();
540 omap_display_init(&omap4_panda_dss_data);
541}
542
David Andersb075f582010-08-02 13:18:05 +0300543static void __init omap4_panda_init(void)
544{
sricharanfc63de822010-11-08 19:26:11 +0530545 int package = OMAP_PACKAGE_CBS;
546
547 if (omap_rev() == OMAP4430_REV_ES1_0)
548 package = OMAP_PACKAGE_CBL;
549 omap4_mux_init(board_mux, package);
550
Panduranga Mallireddyb17e09792011-02-15 03:40:35 -0500551 if (wl12xx_set_platform_data(&omap_panda_wlan_data))
552 pr_err("error setting wl12xx data\n");
553
David Andersb075f582010-08-02 13:18:05 +0300554 omap4_panda_i2c_init();
Ricardo Salveti de Araujo3da434a2010-09-23 18:22:49 -0700555 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
Panduranga Mallireddyedc84062011-02-15 03:40:34 -0500556 platform_device_register(&omap_vwlan_device);
David Andersb075f582010-08-02 13:18:05 +0300557 omap_serial_init();
558 omap4_twl6030_hsmmc_init(mmc);
David Anders4415beb2010-10-07 19:36:30 +0000559 omap4_ehci_init();
Felipe Balbi1ea7f352010-12-01 13:48:54 +0200560 usb_musb_init(&musb_board_data);
K, Mythri P17c84ef2011-03-14 23:57:42 -0500561 omap4_panda_display_init();
David Andersb075f582010-08-02 13:18:05 +0300562}
563
564static void __init omap4_panda_map_io(void)
565{
566 omap2_set_globals_443x();
567 omap44xx_map_common_io();
568}
569
570MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
571 /* Maintainer: David Anders - Texas Instruments Inc */
David Andersb075f582010-08-02 13:18:05 +0300572 .boot_params = 0x80000100,
Raghuveer Murthyd920e522010-12-17 18:15:07 -0800573 .reserve = omap_reserve,
David Andersb075f582010-08-02 13:18:05 +0300574 .map_io = omap4_panda_map_io,
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -0800575 .init_early = omap4_panda_init_early,
576 .init_irq = gic_init_irq,
David Andersb075f582010-08-02 13:18:05 +0300577 .init_machine = omap4_panda_init,
578 .timer = &omap_timer,
579MACHINE_END