board-omap3pandora.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. /*
  2. * board-omap3pandora.c (Pandora Handheld Console)
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  16. * 02110-1301 USA
  17. *
  18. */
  19. #include <linux/init.h>
  20. #include <linux/kernel.h>
  21. #include <linux/platform_device.h>
  22. #include <linux/spi/spi.h>
  23. #include <linux/spi/ads7846.h>
  24. #include <linux/regulator/machine.h>
  25. #include <linux/i2c/twl.h>
  26. #include <linux/wl12xx.h>
  27. #include <linux/leds.h>
  28. #include <linux/input.h>
  29. #include <linux/input/matrix_keypad.h>
  30. #include <linux/gpio_keys.h>
  31. #include <asm/mach-types.h>
  32. #include <asm/mach/arch.h>
  33. #include <asm/mach/map.h>
  34. #include <plat/board.h>
  35. #include <plat/common.h>
  36. #include <mach/gpio.h>
  37. #include <mach/hardware.h>
  38. #include <plat/mcspi.h>
  39. #include <plat/usb.h>
  40. #include <plat/display.h>
  41. #include "mux.h"
  42. #include "sdram-micron-mt46h32m32lf-6.h"
  43. #include "hsmmc.h"
  44. #define OMAP3_PANDORA_TS_GPIO 94
  45. /* hardware debounce: (value + 1) * 31us */
  46. #define GPIO_DEBOUNCE_TIME 127
  47. static struct gpio_led pandora_gpio_leds[] = {
  48. {
  49. .name = "pandora::sd1",
  50. .default_trigger = "mmc0",
  51. .gpio = 128,
  52. }, {
  53. .name = "pandora::sd2",
  54. .default_trigger = "mmc1",
  55. .gpio = 129,
  56. }, {
  57. .name = "pandora::bluetooth",
  58. .gpio = 158,
  59. }, {
  60. .name = "pandora::wifi",
  61. .gpio = 159,
  62. },
  63. };
  64. static struct gpio_led_platform_data pandora_gpio_led_data = {
  65. .leds = pandora_gpio_leds,
  66. .num_leds = ARRAY_SIZE(pandora_gpio_leds),
  67. };
  68. static struct platform_device pandora_leds_gpio = {
  69. .name = "leds-gpio",
  70. .id = -1,
  71. .dev = {
  72. .platform_data = &pandora_gpio_led_data,
  73. },
  74. };
  75. #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \
  76. { \
  77. .gpio = gpio_num, \
  78. .type = ev_type, \
  79. .code = ev_code, \
  80. .active_low = act_low, \
  81. .desc = "btn " descr, \
  82. }
  83. #define GPIO_BUTTON_LOW(gpio_num, event_code, description) \
  84. GPIO_BUTTON(gpio_num, EV_KEY, event_code, 1, description)
  85. static struct gpio_keys_button pandora_gpio_keys[] = {
  86. GPIO_BUTTON_LOW(110, KEY_UP, "up"),
  87. GPIO_BUTTON_LOW(103, KEY_DOWN, "down"),
  88. GPIO_BUTTON_LOW(96, KEY_LEFT, "left"),
  89. GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"),
  90. GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"),
  91. GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"),
  92. GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"),
  93. GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"),
  94. GPIO_BUTTON_LOW(102, BTN_TL, "l"),
  95. GPIO_BUTTON_LOW(97, BTN_TL2, "l2"),
  96. GPIO_BUTTON_LOW(105, BTN_TR, "r"),
  97. GPIO_BUTTON_LOW(107, BTN_TR2, "r2"),
  98. GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"),
  99. GPIO_BUTTON_LOW(99, KEY_MENU, "menu"),
  100. GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"),
  101. GPIO_BUTTON(100, EV_KEY, KEY_LEFTALT, 0, "alt"),
  102. GPIO_BUTTON(108, EV_SW, SW_LID, 1, "lid"),
  103. };
  104. static struct gpio_keys_platform_data pandora_gpio_key_info = {
  105. .buttons = pandora_gpio_keys,
  106. .nbuttons = ARRAY_SIZE(pandora_gpio_keys),
  107. };
  108. static struct platform_device pandora_keys_gpio = {
  109. .name = "gpio-keys",
  110. .id = -1,
  111. .dev = {
  112. .platform_data = &pandora_gpio_key_info,
  113. },
  114. };
  115. static void __init pandora_keys_gpio_init(void)
  116. {
  117. /* set debounce time for GPIO banks 4 and 6 */
  118. gpio_set_debounce(32 * 3, GPIO_DEBOUNCE_TIME);
  119. gpio_set_debounce(32 * 5, GPIO_DEBOUNCE_TIME);
  120. }
  121. static int board_keymap[] = {
  122. /* row, col, code */
  123. KEY(0, 0, KEY_9),
  124. KEY(0, 1, KEY_8),
  125. KEY(0, 2, KEY_I),
  126. KEY(0, 3, KEY_J),
  127. KEY(0, 4, KEY_N),
  128. KEY(0, 5, KEY_M),
  129. KEY(1, 0, KEY_0),
  130. KEY(1, 1, KEY_7),
  131. KEY(1, 2, KEY_U),
  132. KEY(1, 3, KEY_H),
  133. KEY(1, 4, KEY_B),
  134. KEY(1, 5, KEY_SPACE),
  135. KEY(2, 0, KEY_BACKSPACE),
  136. KEY(2, 1, KEY_6),
  137. KEY(2, 2, KEY_Y),
  138. KEY(2, 3, KEY_G),
  139. KEY(2, 4, KEY_V),
  140. KEY(2, 5, KEY_FN),
  141. KEY(3, 0, KEY_O),
  142. KEY(3, 1, KEY_5),
  143. KEY(3, 2, KEY_T),
  144. KEY(3, 3, KEY_F),
  145. KEY(3, 4, KEY_C),
  146. KEY(4, 0, KEY_P),
  147. KEY(4, 1, KEY_4),
  148. KEY(4, 2, KEY_R),
  149. KEY(4, 3, KEY_D),
  150. KEY(4, 4, KEY_X),
  151. KEY(5, 0, KEY_K),
  152. KEY(5, 1, KEY_3),
  153. KEY(5, 2, KEY_E),
  154. KEY(5, 3, KEY_S),
  155. KEY(5, 4, KEY_Z),
  156. KEY(6, 0, KEY_L),
  157. KEY(6, 1, KEY_2),
  158. KEY(6, 2, KEY_W),
  159. KEY(6, 3, KEY_A),
  160. KEY(6, 4, KEY_DOT),
  161. KEY(7, 0, KEY_ENTER),
  162. KEY(7, 1, KEY_1),
  163. KEY(7, 2, KEY_Q),
  164. KEY(7, 3, KEY_LEFTSHIFT),
  165. KEY(7, 4, KEY_COMMA),
  166. };
  167. static struct matrix_keymap_data board_map_data = {
  168. .keymap = board_keymap,
  169. .keymap_size = ARRAY_SIZE(board_keymap),
  170. };
  171. static struct twl4030_keypad_data pandora_kp_data = {
  172. .keymap_data = &board_map_data,
  173. .rows = 8,
  174. .cols = 6,
  175. .rep = 1,
  176. };
  177. static struct omap_dss_device pandora_lcd_device = {
  178. .name = "lcd",
  179. .driver_name = "tpo_td043mtea1_panel",
  180. .type = OMAP_DISPLAY_TYPE_DPI,
  181. .phy.dpi.data_lines = 24,
  182. .reset_gpio = 157,
  183. };
  184. static struct omap_dss_device pandora_tv_device = {
  185. .name = "tv",
  186. .driver_name = "venc",
  187. .type = OMAP_DISPLAY_TYPE_VENC,
  188. .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
  189. };
  190. static struct omap_dss_device *pandora_dss_devices[] = {
  191. &pandora_lcd_device,
  192. &pandora_tv_device,
  193. };
  194. static struct omap_dss_board_info pandora_dss_data = {
  195. .num_devices = ARRAY_SIZE(pandora_dss_devices),
  196. .devices = pandora_dss_devices,
  197. .default_device = &pandora_lcd_device,
  198. };
  199. static struct platform_device pandora_dss_device = {
  200. .name = "omapdss",
  201. .id = -1,
  202. .dev = {
  203. .platform_data = &pandora_dss_data,
  204. },
  205. };
  206. static struct omap2_hsmmc_info omap3pandora_mmc[] = {
  207. {
  208. .mmc = 1,
  209. .wires = 4,
  210. .gpio_cd = -EINVAL,
  211. .gpio_wp = 126,
  212. .ext_clock = 0,
  213. },
  214. {
  215. .mmc = 2,
  216. .wires = 4,
  217. .gpio_cd = -EINVAL,
  218. .gpio_wp = 127,
  219. .ext_clock = 1,
  220. .transceiver = true,
  221. },
  222. {
  223. .mmc = 3,
  224. .wires = 4,
  225. .gpio_cd = -EINVAL,
  226. .gpio_wp = -EINVAL,
  227. },
  228. {} /* Terminator */
  229. };
  230. static int omap3pandora_twl_gpio_setup(struct device *dev,
  231. unsigned gpio, unsigned ngpio)
  232. {
  233. /* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */
  234. omap3pandora_mmc[0].gpio_cd = gpio + 0;
  235. omap3pandora_mmc[1].gpio_cd = gpio + 1;
  236. omap2_hsmmc_init(omap3pandora_mmc);
  237. return 0;
  238. }
  239. static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
  240. .gpio_base = OMAP_MAX_GPIO_LINES,
  241. .irq_base = TWL4030_GPIO_IRQ_BASE,
  242. .irq_end = TWL4030_GPIO_IRQ_END,
  243. .setup = omap3pandora_twl_gpio_setup,
  244. };
  245. static struct regulator_consumer_supply pandora_vmmc1_supply =
  246. REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
  247. static struct regulator_consumer_supply pandora_vmmc2_supply =
  248. REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
  249. static struct regulator_consumer_supply pandora_vdda_dac_supply =
  250. REGULATOR_SUPPLY("vdda_dac", "omapdss");
  251. static struct regulator_consumer_supply pandora_vdds_supplies[] = {
  252. REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
  253. REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
  254. };
  255. static struct regulator_consumer_supply pandora_vcc_lcd_supply =
  256. REGULATOR_SUPPLY("vcc", "display0");
  257. static struct regulator_consumer_supply pandora_usb_phy_supply =
  258. REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
  259. /* ads7846 on SPI and 2 nub controllers on I2C */
  260. static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
  261. REGULATOR_SUPPLY("vcc", "spi1.0"),
  262. REGULATOR_SUPPLY("vcc", "3-0066"),
  263. REGULATOR_SUPPLY("vcc", "3-0067"),
  264. };
  265. static struct regulator_consumer_supply pandora_adac_supply =
  266. REGULATOR_SUPPLY("vcc", "soc-audio");
  267. /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
  268. static struct regulator_init_data pandora_vmmc1 = {
  269. .constraints = {
  270. .min_uV = 1850000,
  271. .max_uV = 3150000,
  272. .valid_modes_mask = REGULATOR_MODE_NORMAL
  273. | REGULATOR_MODE_STANDBY,
  274. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  275. | REGULATOR_CHANGE_MODE
  276. | REGULATOR_CHANGE_STATUS,
  277. },
  278. .num_consumer_supplies = 1,
  279. .consumer_supplies = &pandora_vmmc1_supply,
  280. };
  281. /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */
  282. static struct regulator_init_data pandora_vmmc2 = {
  283. .constraints = {
  284. .min_uV = 1850000,
  285. .max_uV = 3150000,
  286. .valid_modes_mask = REGULATOR_MODE_NORMAL
  287. | REGULATOR_MODE_STANDBY,
  288. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  289. | REGULATOR_CHANGE_MODE
  290. | REGULATOR_CHANGE_STATUS,
  291. },
  292. .num_consumer_supplies = 1,
  293. .consumer_supplies = &pandora_vmmc2_supply,
  294. };
  295. /* VDAC for DSS driving S-Video */
  296. static struct regulator_init_data pandora_vdac = {
  297. .constraints = {
  298. .min_uV = 1800000,
  299. .max_uV = 1800000,
  300. .apply_uV = true,
  301. .valid_modes_mask = REGULATOR_MODE_NORMAL
  302. | REGULATOR_MODE_STANDBY,
  303. .valid_ops_mask = REGULATOR_CHANGE_MODE
  304. | REGULATOR_CHANGE_STATUS,
  305. },
  306. .num_consumer_supplies = 1,
  307. .consumer_supplies = &pandora_vdda_dac_supply,
  308. };
  309. /* VPLL2 for digital video outputs */
  310. static struct regulator_init_data pandora_vpll2 = {
  311. .constraints = {
  312. .min_uV = 1800000,
  313. .max_uV = 1800000,
  314. .apply_uV = true,
  315. .valid_modes_mask = REGULATOR_MODE_NORMAL
  316. | REGULATOR_MODE_STANDBY,
  317. .valid_ops_mask = REGULATOR_CHANGE_MODE
  318. | REGULATOR_CHANGE_STATUS,
  319. },
  320. .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies),
  321. .consumer_supplies = pandora_vdds_supplies,
  322. };
  323. /* VAUX1 for LCD */
  324. static struct regulator_init_data pandora_vaux1 = {
  325. .constraints = {
  326. .min_uV = 3000000,
  327. .max_uV = 3000000,
  328. .apply_uV = true,
  329. .valid_modes_mask = REGULATOR_MODE_NORMAL
  330. | REGULATOR_MODE_STANDBY,
  331. .valid_ops_mask = REGULATOR_CHANGE_MODE
  332. | REGULATOR_CHANGE_STATUS,
  333. },
  334. .num_consumer_supplies = 1,
  335. .consumer_supplies = &pandora_vcc_lcd_supply,
  336. };
  337. /* VAUX2 for USB host PHY */
  338. static struct regulator_init_data pandora_vaux2 = {
  339. .constraints = {
  340. .min_uV = 1800000,
  341. .max_uV = 1800000,
  342. .apply_uV = true,
  343. .valid_modes_mask = REGULATOR_MODE_NORMAL
  344. | REGULATOR_MODE_STANDBY,
  345. .valid_ops_mask = REGULATOR_CHANGE_MODE
  346. | REGULATOR_CHANGE_STATUS,
  347. },
  348. .num_consumer_supplies = 1,
  349. .consumer_supplies = &pandora_usb_phy_supply,
  350. };
  351. /* VAUX4 for ads7846 and nubs */
  352. static struct regulator_init_data pandora_vaux4 = {
  353. .constraints = {
  354. .min_uV = 2800000,
  355. .max_uV = 2800000,
  356. .apply_uV = true,
  357. .valid_modes_mask = REGULATOR_MODE_NORMAL
  358. | REGULATOR_MODE_STANDBY,
  359. .valid_ops_mask = REGULATOR_CHANGE_MODE
  360. | REGULATOR_CHANGE_STATUS,
  361. },
  362. .num_consumer_supplies = ARRAY_SIZE(pandora_vaux4_supplies),
  363. .consumer_supplies = pandora_vaux4_supplies,
  364. };
  365. /* VSIM for audio DAC */
  366. static struct regulator_init_data pandora_vsim = {
  367. .constraints = {
  368. .min_uV = 2800000,
  369. .max_uV = 2800000,
  370. .apply_uV = true,
  371. .valid_modes_mask = REGULATOR_MODE_NORMAL
  372. | REGULATOR_MODE_STANDBY,
  373. .valid_ops_mask = REGULATOR_CHANGE_MODE
  374. | REGULATOR_CHANGE_STATUS,
  375. },
  376. .num_consumer_supplies = 1,
  377. .consumer_supplies = &pandora_adac_supply,
  378. };
  379. static struct twl4030_usb_data omap3pandora_usb_data = {
  380. .usb_mode = T2_USB_MODE_ULPI,
  381. };
  382. static struct twl4030_codec_audio_data omap3pandora_audio_data = {
  383. .audio_mclk = 26000000,
  384. };
  385. static struct twl4030_codec_data omap3pandora_codec_data = {
  386. .audio_mclk = 26000000,
  387. .audio = &omap3pandora_audio_data,
  388. };
  389. static struct twl4030_platform_data omap3pandora_twldata = {
  390. .irq_base = TWL4030_IRQ_BASE,
  391. .irq_end = TWL4030_IRQ_END,
  392. .gpio = &omap3pandora_gpio_data,
  393. .usb = &omap3pandora_usb_data,
  394. .codec = &omap3pandora_codec_data,
  395. .vmmc1 = &pandora_vmmc1,
  396. .vmmc2 = &pandora_vmmc2,
  397. .vdac = &pandora_vdac,
  398. .vpll2 = &pandora_vpll2,
  399. .vaux1 = &pandora_vaux1,
  400. .vaux2 = &pandora_vaux2,
  401. .vaux4 = &pandora_vaux4,
  402. .vsim = &pandora_vsim,
  403. .keypad = &pandora_kp_data,
  404. };
  405. static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = {
  406. {
  407. I2C_BOARD_INFO("tps65950", 0x48),
  408. .flags = I2C_CLIENT_WAKE,
  409. .irq = INT_34XX_SYS_NIRQ,
  410. .platform_data = &omap3pandora_twldata,
  411. },
  412. };
  413. static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
  414. {
  415. I2C_BOARD_INFO("bq27500", 0x55),
  416. .flags = I2C_CLIENT_WAKE,
  417. },
  418. };
  419. static int __init omap3pandora_i2c_init(void)
  420. {
  421. omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo,
  422. ARRAY_SIZE(omap3pandora_i2c_boardinfo));
  423. /* i2c2 pins are not connected */
  424. omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
  425. ARRAY_SIZE(omap3pandora_i2c3_boardinfo));
  426. return 0;
  427. }
  428. static void __init omap3pandora_ads7846_init(void)
  429. {
  430. int gpio = OMAP3_PANDORA_TS_GPIO;
  431. int ret;
  432. ret = gpio_request(gpio, "ads7846_pen_down");
  433. if (ret < 0) {
  434. printk(KERN_ERR "Failed to request GPIO %d for "
  435. "ads7846 pen down IRQ\n", gpio);
  436. return;
  437. }
  438. gpio_direction_input(gpio);
  439. }
  440. static int ads7846_get_pendown_state(void)
  441. {
  442. return !gpio_get_value(OMAP3_PANDORA_TS_GPIO);
  443. }
  444. static struct ads7846_platform_data ads7846_config = {
  445. .x_max = 0x0fff,
  446. .y_max = 0x0fff,
  447. .x_plate_ohms = 180,
  448. .pressure_max = 255,
  449. .debounce_max = 10,
  450. .debounce_tol = 3,
  451. .debounce_rep = 1,
  452. .get_pendown_state = ads7846_get_pendown_state,
  453. .keep_vref_on = 1,
  454. };
  455. static struct omap2_mcspi_device_config ads7846_mcspi_config = {
  456. .turbo_mode = 0,
  457. .single_channel = 1, /* 0: slave, 1: master */
  458. };
  459. static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
  460. {
  461. .modalias = "ads7846",
  462. .bus_num = 1,
  463. .chip_select = 0,
  464. .max_speed_hz = 1500000,
  465. .controller_data = &ads7846_mcspi_config,
  466. .irq = OMAP_GPIO_IRQ(OMAP3_PANDORA_TS_GPIO),
  467. .platform_data = &ads7846_config,
  468. }, {
  469. .modalias = "tpo_td043mtea1_panel_spi",
  470. .bus_num = 1,
  471. .chip_select = 1,
  472. .max_speed_hz = 375000,
  473. .platform_data = &pandora_lcd_device,
  474. }
  475. };
  476. static void __init omap3pandora_init_irq(void)
  477. {
  478. omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
  479. mt46h32m32lf6_sdrc_params);
  480. omap_init_irq();
  481. omap_gpio_init();
  482. }
  483. static struct platform_device *omap3pandora_devices[] __initdata = {
  484. &pandora_leds_gpio,
  485. &pandora_keys_gpio,
  486. &pandora_dss_device,
  487. };
  488. static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
  489. .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
  490. .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  491. .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  492. .phy_reset = true,
  493. .reset_gpio_port[0] = 16,
  494. .reset_gpio_port[1] = -EINVAL,
  495. .reset_gpio_port[2] = -EINVAL
  496. };
  497. #ifdef CONFIG_OMAP_MUX
  498. static struct omap_board_mux board_mux[] __initdata = {
  499. { .reg_offset = OMAP_MUX_TERMINATOR },
  500. };
  501. #else
  502. #define board_mux NULL
  503. #endif
  504. static struct omap_musb_board_data musb_board_data = {
  505. .interface_type = MUSB_INTERFACE_ULPI,
  506. .mode = MUSB_OTG,
  507. .power = 100,
  508. };
  509. static void __init omap3pandora_init(void)
  510. {
  511. omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  512. omap3pandora_i2c_init();
  513. platform_add_devices(omap3pandora_devices,
  514. ARRAY_SIZE(omap3pandora_devices));
  515. omap_serial_init();
  516. spi_register_board_info(omap3pandora_spi_board_info,
  517. ARRAY_SIZE(omap3pandora_spi_board_info));
  518. omap3pandora_ads7846_init();
  519. usb_ehci_init(&ehci_pdata);
  520. pandora_keys_gpio_init();
  521. usb_musb_init(&musb_board_data);
  522. /* Ensure SDRC pins are mux'd for self-refresh */
  523. omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
  524. omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
  525. }
  526. static void __init omap3pandora_map_io(void)
  527. {
  528. omap2_set_globals_343x();
  529. omap34xx_map_common_io();
  530. }
  531. MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
  532. .phys_io = 0x48000000,
  533. .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
  534. .boot_params = 0x80000100,
  535. .map_io = omap3pandora_map_io,
  536. .reserve = omap_reserve,
  537. .init_irq = omap3pandora_init_irq,
  538. .init_machine = omap3pandora_init,
  539. .timer = &omap_timer,
  540. MACHINE_END