UBUNTU: SAUCE: omap3: beagle: if rev unknown, assume xM revision C
[linux-flexiantxendom0-natty.git] / arch / arm / mach-omap2 / board-omap3beagle.c
1 /*
2  * linux/arch/arm/mach-omap2/board-omap3beagle.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/io.h>
22 #include <linux/leds.h>
23 #include <linux/gpio.h>
24 #include <linux/input.h>
25 #include <linux/gpio_keys.h>
26
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/partitions.h>
29 #include <linux/mtd/nand.h>
30 #include <linux/mmc/host.h>
31
32 #include <linux/regulator/machine.h>
33 #include <linux/i2c/twl.h>
34
35 #include <mach/hardware.h>
36 #include <asm/mach-types.h>
37 #include <asm/mach/arch.h>
38 #include <asm/mach/map.h>
39 #include <asm/mach/flash.h>
40
41 #include <plat/board.h>
42 #include <plat/common.h>
43 #include <plat/display.h>
44 #include <plat/panel-generic-dpi.h>
45 #include <plat/gpmc.h>
46 #include <plat/nand.h>
47 #include <plat/usb.h>
48
49 #include "mux.h"
50 #include "hsmmc.h"
51 #include "timer-gp.h"
52
53 #define NAND_BLOCK_SIZE         SZ_128K
54
55 /*
56  * OMAP3 Beagle revision
57  * Run time detection of Beagle revision is done by reading GPIO.
58  * GPIO ID -
59  *      AXBX    = GPIO173, GPIO172, GPIO171: 1 1 1
60  *      C1_3    = GPIO173, GPIO172, GPIO171: 1 1 0
61  *      C4      = GPIO173, GPIO172, GPIO171: 1 0 1
62  *      XMA     = GPIO173, GPIO172, GPIO171: 0 0 0
63  *      XMB     = GPIO173, GPIO172, GPIO171: 0 0 1
64  *      XMC     = GPIO173, GPIO172, GPIO171: 0 1 0
65  */
66 enum {
67         OMAP3BEAGLE_BOARD_UNKN = 0,
68         OMAP3BEAGLE_BOARD_AXBX,
69         OMAP3BEAGLE_BOARD_C1_3,
70         OMAP3BEAGLE_BOARD_C4,
71         OMAP3BEAGLE_BOARD_XM,
72         OMAP3BEAGLE_BOARD_XMC,
73 };
74
75 static u8 omap3_beagle_version;
76
77 static u8 omap3_beagle_get_rev(void)
78 {
79         return omap3_beagle_version;
80 }
81
82 static void __init omap3_beagle_init_rev(void)
83 {
84         int ret;
85         u16 beagle_rev = 0;
86
87         omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP);
88         omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP);
89         omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP);
90
91         ret = gpio_request(171, "rev_id_0");
92         if (ret < 0)
93                 goto fail0;
94
95         ret = gpio_request(172, "rev_id_1");
96         if (ret < 0)
97                 goto fail1;
98
99         ret = gpio_request(173, "rev_id_2");
100         if (ret < 0)
101                 goto fail2;
102
103         gpio_direction_input(171);
104         gpio_direction_input(172);
105         gpio_direction_input(173);
106
107         beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1)
108                         | (gpio_get_value(173) << 2);
109
110         switch (beagle_rev) {
111         case 7:
112                 printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
113                 omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
114                 break;
115         case 6:
116                 printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
117                 omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
118                 break;
119         case 5:
120                 printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
121                 omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
122                 break;
123         case 0:
124                 printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n");
125                 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
126                 break;
127         case 1:
128                 printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n");
129                 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
130                 break;
131         case 2:
132                 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
133                 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
134                 break;
135         default:
136                 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd, "
137                                  "assuming xM C or newer\n", beagle_rev);
138                 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
139         }
140
141         return;
142
143 fail2:
144         gpio_free(172);
145 fail1:
146         gpio_free(171);
147 fail0:
148         printk(KERN_ERR "Unable to get revision detection GPIO pins\n");
149         omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
150
151         return;
152 }
153
154 static struct mtd_partition omap3beagle_nand_partitions[] = {
155         /* All the partition sizes are listed in terms of NAND block size */
156         {
157                 .name           = "X-Loader",
158                 .offset         = 0,
159                 .size           = 4 * NAND_BLOCK_SIZE,
160                 .mask_flags     = MTD_WRITEABLE,        /* force read-only */
161         },
162         {
163                 .name           = "U-Boot",
164                 .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x80000 */
165                 .size           = 15 * NAND_BLOCK_SIZE,
166                 .mask_flags     = MTD_WRITEABLE,        /* force read-only */
167         },
168         {
169                 .name           = "U-Boot Env",
170                 .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x260000 */
171                 .size           = 1 * NAND_BLOCK_SIZE,
172         },
173         {
174                 .name           = "Kernel",
175                 .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x280000 */
176                 .size           = 32 * NAND_BLOCK_SIZE,
177         },
178         {
179                 .name           = "File System",
180                 .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x680000 */
181                 .size           = MTDPART_SIZ_FULL,
182         },
183 };
184
185 static struct omap_nand_platform_data omap3beagle_nand_data = {
186         .options        = NAND_BUSWIDTH_16,
187         .parts          = omap3beagle_nand_partitions,
188         .nr_parts       = ARRAY_SIZE(omap3beagle_nand_partitions),
189         .dma_channel    = -1,           /* disable DMA in OMAP NAND driver */
190         .nand_setup     = NULL,
191         .dev_ready      = NULL,
192 };
193
194 /* DSS */
195
196 static int beagle_enable_dvi(struct omap_dss_device *dssdev)
197 {
198         if (gpio_is_valid(dssdev->reset_gpio))
199                 gpio_set_value(dssdev->reset_gpio, 1);
200
201         return 0;
202 }
203
204 static void beagle_disable_dvi(struct omap_dss_device *dssdev)
205 {
206         if (gpio_is_valid(dssdev->reset_gpio))
207                 gpio_set_value(dssdev->reset_gpio, 0);
208 }
209
210 static struct panel_generic_dpi_data dvi_panel = {
211         .name = "generic",
212         .platform_enable = beagle_enable_dvi,
213         .platform_disable = beagle_disable_dvi,
214 };
215
216 static struct omap_dss_device beagle_dvi_device = {
217         .type = OMAP_DISPLAY_TYPE_DPI,
218         .name = "dvi",
219         .driver_name = "generic_dpi_panel",
220         .data = &dvi_panel,
221         .phy.dpi.data_lines = 24,
222         .reset_gpio = -EINVAL,
223 };
224
225 static struct omap_dss_device beagle_tv_device = {
226         .name = "tv",
227         .driver_name = "venc",
228         .type = OMAP_DISPLAY_TYPE_VENC,
229         .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
230 };
231
232 static struct omap_dss_device *beagle_dss_devices[] = {
233         &beagle_dvi_device,
234         &beagle_tv_device,
235 };
236
237 static struct omap_dss_board_info beagle_dss_data = {
238         .num_devices = ARRAY_SIZE(beagle_dss_devices),
239         .devices = beagle_dss_devices,
240         .default_device = &beagle_dvi_device,
241 };
242
243 static struct platform_device beagle_dss_device = {
244         .name          = "omapdss",
245         .id            = -1,
246         .dev            = {
247                 .platform_data = &beagle_dss_data,
248         },
249 };
250
251 static struct regulator_consumer_supply beagle_vdac_supply =
252         REGULATOR_SUPPLY("vdda_dac", "omapdss");
253
254 static struct regulator_consumer_supply beagle_vdds_supplies[] = {
255         REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
256         REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
257 };
258
259 static void __init beagle_display_init(void)
260 {
261         int r;
262
263         /* DVI reset GPIO is different between beagle revisions */
264         if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
265                         (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC))
266                 beagle_dvi_device.reset_gpio = 129;
267         else
268                 beagle_dvi_device.reset_gpio = 170;
269
270         r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
271         if (r < 0) {
272                 printk(KERN_ERR "Unable to get DVI reset GPIO\n");
273                 return;
274         }
275
276         gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
277 }
278
279 #include "sdram-micron-mt46h32m32lf-6.h"
280
281 static struct omap2_hsmmc_info mmc[] = {
282         {
283                 .mmc            = 1,
284                 .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
285                 .gpio_wp        = 29,
286         },
287         {}      /* Terminator */
288 };
289
290 static struct regulator_consumer_supply beagle_vmmc1_supply = {
291         .supply                 = "vmmc",
292 };
293
294 static struct regulator_consumer_supply beagle_vsim_supply = {
295         .supply                 = "vmmc_aux",
296 };
297
298 static struct gpio_led gpio_leds[];
299
300 static int beagle_twl_gpio_setup(struct device *dev,
301                 unsigned gpio, unsigned ngpio)
302 {
303         int r;
304
305         if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
306                         (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
307                 mmc[0].gpio_wp = -EINVAL;
308         } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
309                 (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
310                 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
311                 mmc[0].gpio_wp = 23;
312         } else {
313                 omap_mux_init_gpio(29, OMAP_PIN_INPUT);
314         }
315         /* gpio + 0 is "mmc0_cd" (input/IRQ) */
316         mmc[0].gpio_cd = gpio + 0;
317         omap2_hsmmc_init(mmc);
318
319         /* link regulators to MMC adapters */
320         beagle_vmmc1_supply.dev = mmc[0].dev;
321         beagle_vsim_supply.dev = mmc[0].dev;
322
323         /* REVISIT: need ehci-omap hooks for external VBUS
324          * power switch and overcurrent detect
325          */
326         if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) &&
327                         (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
328                 r = gpio_request(gpio + 1, "EHCI_nOC");
329                 if (!r) {
330                         r = gpio_direction_input(gpio + 1);
331                         if (r)
332                                 gpio_free(gpio + 1);
333                 }
334                 if (r)
335                         pr_err("%s: unable to configure EHCI_nOC\n", __func__);
336         }
337
338         /*
339          * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
340          * high / others active low)
341          */
342         gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
343         if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
344                 gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
345         else
346                 gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
347
348         /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
349         gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
350
351         /*
352          * gpio + 1 on Xm controls the TFP410's enable line (active low)
353          * gpio + 2 control varies depending on the board rev as follows:
354          * P7/P8 revisions(prototype): Camera EN
355          * A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
356          */
357         if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
358                         (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
359                 r = gpio_request(gpio + 1, "nDVI_PWR_EN");
360                 if (!r) {
361                         r = gpio_direction_output(gpio + 1, 0);
362                         if (r)
363                                 gpio_free(gpio + 1);
364                 }
365                 if (r)
366                         pr_err("%s: unable to configure nDVI_PWR_EN\n",
367                                 __func__);
368                 r = gpio_request(gpio + 2, "DVI_LDO_EN");
369                 if (!r) {
370                         r = gpio_direction_output(gpio + 2, 1);
371                         if (r)
372                                 gpio_free(gpio + 2);
373                 }
374                 if (r)
375                         pr_err("%s: unable to configure DVI_LDO_EN\n",
376                                 __func__);
377         }
378
379         return 0;
380 }
381
382 static struct twl4030_gpio_platform_data beagle_gpio_data = {
383         .gpio_base      = OMAP_MAX_GPIO_LINES,
384         .irq_base       = TWL4030_GPIO_IRQ_BASE,
385         .irq_end        = TWL4030_GPIO_IRQ_END,
386         .use_leds       = true,
387         .pullups        = BIT(1),
388         .pulldowns      = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
389                                 | BIT(15) | BIT(16) | BIT(17),
390         .setup          = beagle_twl_gpio_setup,
391 };
392
393 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
394 static struct regulator_init_data beagle_vmmc1 = {
395         .constraints = {
396                 .min_uV                 = 1850000,
397                 .max_uV                 = 3150000,
398                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
399                                         | REGULATOR_MODE_STANDBY,
400                 .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
401                                         | REGULATOR_CHANGE_MODE
402                                         | REGULATOR_CHANGE_STATUS,
403         },
404         .num_consumer_supplies  = 1,
405         .consumer_supplies      = &beagle_vmmc1_supply,
406 };
407
408 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
409 static struct regulator_init_data beagle_vsim = {
410         .constraints = {
411                 .min_uV                 = 1800000,
412                 .max_uV                 = 3000000,
413                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
414                                         | REGULATOR_MODE_STANDBY,
415                 .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
416                                         | REGULATOR_CHANGE_MODE
417                                         | REGULATOR_CHANGE_STATUS,
418         },
419         .num_consumer_supplies  = 1,
420         .consumer_supplies      = &beagle_vsim_supply,
421 };
422
423 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
424 static struct regulator_init_data beagle_vdac = {
425         .constraints = {
426                 .min_uV                 = 1800000,
427                 .max_uV                 = 1800000,
428                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
429                                         | REGULATOR_MODE_STANDBY,
430                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
431                                         | REGULATOR_CHANGE_STATUS,
432         },
433         .num_consumer_supplies  = 1,
434         .consumer_supplies      = &beagle_vdac_supply,
435 };
436
437 /* VPLL2 for digital video outputs */
438 static struct regulator_init_data beagle_vpll2 = {
439         .constraints = {
440                 .min_uV                 = 1800000,
441                 .max_uV                 = 1800000,
442                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
443                                         | REGULATOR_MODE_STANDBY,
444                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
445                                         | REGULATOR_CHANGE_STATUS,
446         },
447         .num_consumer_supplies  = ARRAY_SIZE(beagle_vdds_supplies),
448         .consumer_supplies      = beagle_vdds_supplies,
449 };
450
451 static struct twl4030_usb_data beagle_usb_data = {
452         .usb_mode       = T2_USB_MODE_ULPI,
453 };
454
455 static struct twl4030_codec_audio_data beagle_audio_data = {
456         .audio_mclk = 26000000,
457 };
458
459 static struct twl4030_codec_data beagle_codec_data = {
460         .audio_mclk = 26000000,
461         .audio = &beagle_audio_data,
462 };
463
464 static struct twl4030_platform_data beagle_twldata = {
465         .irq_base       = TWL4030_IRQ_BASE,
466         .irq_end        = TWL4030_IRQ_END,
467
468         /* platform_data for children goes here */
469         .usb            = &beagle_usb_data,
470         .gpio           = &beagle_gpio_data,
471         .codec          = &beagle_codec_data,
472         .vmmc1          = &beagle_vmmc1,
473         .vsim           = &beagle_vsim,
474         .vdac           = &beagle_vdac,
475         .vpll2          = &beagle_vpll2,
476 };
477
478 static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
479         {
480                 I2C_BOARD_INFO("twl4030", 0x48),
481                 .flags = I2C_CLIENT_WAKE,
482                 .irq = INT_34XX_SYS_NIRQ,
483                 .platform_data = &beagle_twldata,
484         },
485 };
486
487 static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
488        {
489                I2C_BOARD_INFO("eeprom", 0x50),
490        },
491 };
492
493 static int __init omap3_beagle_i2c_init(void)
494 {
495         omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
496                         ARRAY_SIZE(beagle_i2c_boardinfo));
497         /* Bus 3 is attached to the DVI port where devices like the pico DLP
498          * projector don't work reliably with 400kHz */
499         omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
500         return 0;
501 }
502
503 static struct gpio_led gpio_leds[] = {
504         {
505                 .name                   = "beagleboard::usr0",
506                 .default_trigger        = "heartbeat",
507                 .gpio                   = 150,
508         },
509         {
510                 .name                   = "beagleboard::usr1",
511                 .default_trigger        = "mmc0",
512                 .gpio                   = 149,
513         },
514         {
515                 .name                   = "beagleboard::pmu_stat",
516                 .gpio                   = -EINVAL,      /* gets replaced */
517                 .active_low             = true,
518         },
519 };
520
521 static struct gpio_led_platform_data gpio_led_info = {
522         .leds           = gpio_leds,
523         .num_leds       = ARRAY_SIZE(gpio_leds),
524 };
525
526 static struct platform_device leds_gpio = {
527         .name   = "leds-gpio",
528         .id     = -1,
529         .dev    = {
530                 .platform_data  = &gpio_led_info,
531         },
532 };
533
534 static struct gpio_keys_button gpio_buttons[] = {
535         {
536                 .code                   = BTN_EXTRA,
537                 .gpio                   = 7,
538                 .desc                   = "user",
539                 .wakeup                 = 1,
540         },
541 };
542
543 static struct gpio_keys_platform_data gpio_key_info = {
544         .buttons        = gpio_buttons,
545         .nbuttons       = ARRAY_SIZE(gpio_buttons),
546 };
547
548 static struct platform_device keys_gpio = {
549         .name   = "gpio-keys",
550         .id     = -1,
551         .dev    = {
552                 .platform_data  = &gpio_key_info,
553         },
554 };
555
556 static void __init omap3_beagle_init_irq(void)
557 {
558         omap2_init_common_infrastructure();
559         omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
560                                   mt46h32m32lf6_sdrc_params);
561         omap_init_irq();
562 #ifdef CONFIG_OMAP_32K_TIMER
563         omap2_gp_clockevent_set_gptimer(12);
564 #endif
565 }
566
567 static struct platform_device *omap3_beagle_devices[] __initdata = {
568         &leds_gpio,
569         &keys_gpio,
570         &beagle_dss_device,
571 };
572
573 static void __init omap3beagle_flash_init(void)
574 {
575         u8 cs = 0;
576         u8 nandcs = GPMC_CS_NUM + 1;
577
578         /* find out the chip-select on which NAND exists */
579         while (cs < GPMC_CS_NUM) {
580                 u32 ret = 0;
581                 ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
582
583                 if ((ret & 0xC00) == 0x800) {
584                         printk(KERN_INFO "Found NAND on CS%d\n", cs);
585                         if (nandcs > GPMC_CS_NUM)
586                                 nandcs = cs;
587                 }
588                 cs++;
589         }
590
591         if (nandcs > GPMC_CS_NUM) {
592                 printk(KERN_INFO "NAND: Unable to find configuration "
593                                  "in GPMC\n ");
594                 return;
595         }
596
597         if (nandcs < GPMC_CS_NUM) {
598                 omap3beagle_nand_data.cs = nandcs;
599
600                 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
601                 if (gpmc_nand_init(&omap3beagle_nand_data) < 0)
602                         printk(KERN_ERR "Unable to register NAND device\n");
603         }
604 }
605
606 static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
607
608         .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
609         .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
610         .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
611
612         .phy_reset  = true,
613         .reset_gpio_port[0]  = -EINVAL,
614         .reset_gpio_port[1]  = 147,
615         .reset_gpio_port[2]  = -EINVAL
616 };
617
618 #ifdef CONFIG_OMAP_MUX
619 static struct omap_board_mux board_mux[] __initdata = {
620         { .reg_offset = OMAP_MUX_TERMINATOR },
621 };
622 #endif
623
624 static struct omap_musb_board_data musb_board_data = {
625         .interface_type         = MUSB_INTERFACE_ULPI,
626         .mode                   = MUSB_OTG,
627         .power                  = 100,
628 };
629
630 static void __init omap3_beagle_init(void)
631 {
632         omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
633         omap3_beagle_init_rev();
634         omap3_beagle_i2c_init();
635         platform_add_devices(omap3_beagle_devices,
636                         ARRAY_SIZE(omap3_beagle_devices));
637         omap_serial_init();
638
639         usb_musb_init(&musb_board_data);
640         usb_ehci_init(&ehci_pdata);
641         omap3beagle_flash_init();
642
643         /* Ensure SDRC pins are mux'd for self-refresh */
644         omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
645         omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
646
647         beagle_display_init();
648 }
649
650 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
651         /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
652         .boot_params    = 0x80000100,
653         .map_io         = omap3_map_io,
654         .reserve        = omap_reserve,
655         .init_irq       = omap3_beagle_init_irq,
656         .init_machine   = omap3_beagle_init,
657         .timer          = &omap_timer,
658 MACHINE_END