board-omap3beagle.c 15 KB

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