board-overo.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /*
  2. * board-overo.c (Gumstix Overo)
  3. *
  4. * Initial code: Steve Sakoman <steve@sakoman.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  18. * 02110-1301 USA
  19. *
  20. */
  21. #include <linux/clk.h>
  22. #include <linux/delay.h>
  23. #include <linux/err.h>
  24. #include <linux/init.h>
  25. #include <linux/io.h>
  26. #include <linux/gpio.h>
  27. #include <linux/kernel.h>
  28. #include <linux/platform_device.h>
  29. #include <linux/i2c/twl.h>
  30. #include <linux/regulator/machine.h>
  31. #include <linux/regulator/fixed.h>
  32. #include <linux/spi/spi.h>
  33. #include <linux/mtd/mtd.h>
  34. #include <linux/mtd/nand.h>
  35. #include <linux/mtd/partitions.h>
  36. #include <linux/mmc/host.h>
  37. #include <asm/mach-types.h>
  38. #include <asm/mach/arch.h>
  39. #include <asm/mach/flash.h>
  40. #include <asm/mach/map.h>
  41. #include <plat/board.h>
  42. #include <plat/common.h>
  43. #include <video/omapdss.h>
  44. #include <video/omap-panel-generic-dpi.h>
  45. #include <plat/gpmc.h>
  46. #include <mach/hardware.h>
  47. #include <plat/nand.h>
  48. #include <plat/mcspi.h>
  49. #include <plat/mux.h>
  50. #include <plat/usb.h>
  51. #include "mux.h"
  52. #include "sdram-micron-mt46h32m32lf-6.h"
  53. #include "hsmmc.h"
  54. #include "common-board-devices.h"
  55. #define OVERO_GPIO_BT_XGATE 15
  56. #define OVERO_GPIO_W2W_NRESET 16
  57. #define OVERO_GPIO_PENDOWN 114
  58. #define OVERO_GPIO_BT_NRESET 164
  59. #define OVERO_GPIO_USBH_CPEN 168
  60. #define OVERO_GPIO_USBH_NRESET 183
  61. #define OVERO_SMSC911X_CS 5
  62. #define OVERO_SMSC911X_GPIO 176
  63. #define OVERO_SMSC911X2_CS 4
  64. #define OVERO_SMSC911X2_GPIO 65
  65. #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
  66. defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
  67. /* fixed regulator for ads7846 */
  68. static struct regulator_consumer_supply ads7846_supply =
  69. REGULATOR_SUPPLY("vcc", "spi1.0");
  70. static struct regulator_init_data vads7846_regulator = {
  71. .constraints = {
  72. .valid_ops_mask = REGULATOR_CHANGE_STATUS,
  73. },
  74. .num_consumer_supplies = 1,
  75. .consumer_supplies = &ads7846_supply,
  76. };
  77. static struct fixed_voltage_config vads7846 = {
  78. .supply_name = "vads7846",
  79. .microvolts = 3300000, /* 3.3V */
  80. .gpio = -EINVAL,
  81. .startup_delay = 0,
  82. .init_data = &vads7846_regulator,
  83. };
  84. static struct platform_device vads7846_device = {
  85. .name = "reg-fixed-voltage",
  86. .id = 1,
  87. .dev = {
  88. .platform_data = &vads7846,
  89. },
  90. };
  91. static void __init overo_ads7846_init(void)
  92. {
  93. omap_ads7846_init(1, OVERO_GPIO_PENDOWN, 0, NULL);
  94. platform_device_register(&vads7846_device);
  95. }
  96. #else
  97. static inline void __init overo_ads7846_init(void) { return; }
  98. #endif
  99. #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
  100. #include <linux/smsc911x.h>
  101. #include <plat/gpmc-smsc911x.h>
  102. static struct omap_smsc911x_platform_data smsc911x_cfg = {
  103. .id = 0,
  104. .cs = OVERO_SMSC911X_CS,
  105. .gpio_irq = OVERO_SMSC911X_GPIO,
  106. .gpio_reset = -EINVAL,
  107. .flags = SMSC911X_USE_32BIT,
  108. };
  109. static struct omap_smsc911x_platform_data smsc911x2_cfg = {
  110. .id = 1,
  111. .cs = OVERO_SMSC911X2_CS,
  112. .gpio_irq = OVERO_SMSC911X2_GPIO,
  113. .gpio_reset = -EINVAL,
  114. .flags = SMSC911X_USE_32BIT,
  115. };
  116. static void __init overo_init_smsc911x(void)
  117. {
  118. gpmc_smsc911x_init(&smsc911x_cfg);
  119. gpmc_smsc911x_init(&smsc911x2_cfg);
  120. }
  121. #else
  122. static inline void __init overo_init_smsc911x(void) { return; }
  123. #endif
  124. /* DSS */
  125. static int lcd_enabled;
  126. static int dvi_enabled;
  127. #define OVERO_GPIO_LCD_EN 144
  128. #define OVERO_GPIO_LCD_BL 145
  129. static struct gpio overo_dss_gpios[] __initdata = {
  130. { OVERO_GPIO_LCD_EN, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_EN" },
  131. { OVERO_GPIO_LCD_BL, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_BL" },
  132. };
  133. static void __init overo_display_init(void)
  134. {
  135. if (gpio_request_array(overo_dss_gpios, ARRAY_SIZE(overo_dss_gpios))) {
  136. printk(KERN_ERR "could not obtain DSS control GPIOs\n");
  137. return;
  138. }
  139. gpio_export(OVERO_GPIO_LCD_EN, 0);
  140. gpio_export(OVERO_GPIO_LCD_BL, 0);
  141. }
  142. static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
  143. {
  144. if (lcd_enabled) {
  145. printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
  146. return -EINVAL;
  147. }
  148. dvi_enabled = 1;
  149. return 0;
  150. }
  151. static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
  152. {
  153. dvi_enabled = 0;
  154. }
  155. static struct panel_generic_dpi_data dvi_panel = {
  156. .name = "generic",
  157. .platform_enable = overo_panel_enable_dvi,
  158. .platform_disable = overo_panel_disable_dvi,
  159. };
  160. static struct omap_dss_device overo_dvi_device = {
  161. .name = "dvi",
  162. .type = OMAP_DISPLAY_TYPE_DPI,
  163. .driver_name = "generic_dpi_panel",
  164. .data = &dvi_panel,
  165. .phy.dpi.data_lines = 24,
  166. };
  167. static struct omap_dss_device overo_tv_device = {
  168. .name = "tv",
  169. .driver_name = "venc",
  170. .type = OMAP_DISPLAY_TYPE_VENC,
  171. .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
  172. };
  173. static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
  174. {
  175. if (dvi_enabled) {
  176. printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
  177. return -EINVAL;
  178. }
  179. gpio_set_value(OVERO_GPIO_LCD_EN, 1);
  180. gpio_set_value(OVERO_GPIO_LCD_BL, 1);
  181. lcd_enabled = 1;
  182. return 0;
  183. }
  184. static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
  185. {
  186. gpio_set_value(OVERO_GPIO_LCD_EN, 0);
  187. gpio_set_value(OVERO_GPIO_LCD_BL, 0);
  188. lcd_enabled = 0;
  189. }
  190. static struct panel_generic_dpi_data lcd43_panel = {
  191. .name = "samsung_lte430wq_f0c",
  192. .platform_enable = overo_panel_enable_lcd,
  193. .platform_disable = overo_panel_disable_lcd,
  194. };
  195. static struct omap_dss_device overo_lcd43_device = {
  196. .name = "lcd43",
  197. .type = OMAP_DISPLAY_TYPE_DPI,
  198. .driver_name = "generic_dpi_panel",
  199. .data = &lcd43_panel,
  200. .phy.dpi.data_lines = 24,
  201. };
  202. #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
  203. defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
  204. static struct omap_dss_device overo_lcd35_device = {
  205. .type = OMAP_DISPLAY_TYPE_DPI,
  206. .name = "lcd35",
  207. .driver_name = "lgphilips_lb035q02_panel",
  208. .phy.dpi.data_lines = 24,
  209. .platform_enable = overo_panel_enable_lcd,
  210. .platform_disable = overo_panel_disable_lcd,
  211. };
  212. #endif
  213. static struct omap_dss_device *overo_dss_devices[] = {
  214. &overo_dvi_device,
  215. &overo_tv_device,
  216. #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
  217. defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
  218. &overo_lcd35_device,
  219. #endif
  220. &overo_lcd43_device,
  221. };
  222. static struct omap_dss_board_info overo_dss_data = {
  223. .num_devices = ARRAY_SIZE(overo_dss_devices),
  224. .devices = overo_dss_devices,
  225. .default_device = &overo_dvi_device,
  226. };
  227. static struct regulator_consumer_supply overo_vdda_dac_supply =
  228. REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
  229. static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
  230. REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
  231. REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
  232. };
  233. static struct mtd_partition overo_nand_partitions[] = {
  234. {
  235. .name = "xloader",
  236. .offset = 0, /* Offset = 0x00000 */
  237. .size = 4 * NAND_BLOCK_SIZE,
  238. .mask_flags = MTD_WRITEABLE
  239. },
  240. {
  241. .name = "uboot",
  242. .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
  243. .size = 14 * NAND_BLOCK_SIZE,
  244. },
  245. {
  246. .name = "uboot environment",
  247. .offset = MTDPART_OFS_APPEND, /* Offset = 0x240000 */
  248. .size = 2 * NAND_BLOCK_SIZE,
  249. },
  250. {
  251. .name = "linux",
  252. .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
  253. .size = 32 * NAND_BLOCK_SIZE,
  254. },
  255. {
  256. .name = "rootfs",
  257. .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
  258. .size = MTDPART_SIZ_FULL,
  259. },
  260. };
  261. static struct omap2_hsmmc_info mmc[] = {
  262. {
  263. .mmc = 1,
  264. .caps = MMC_CAP_4_BIT_DATA,
  265. .gpio_cd = -EINVAL,
  266. .gpio_wp = -EINVAL,
  267. },
  268. {
  269. .mmc = 2,
  270. .caps = MMC_CAP_4_BIT_DATA,
  271. .gpio_cd = -EINVAL,
  272. .gpio_wp = -EINVAL,
  273. .transceiver = true,
  274. .ocr_mask = 0x00100000, /* 3.3V */
  275. },
  276. {} /* Terminator */
  277. };
  278. static struct regulator_consumer_supply overo_vmmc1_supply = {
  279. .supply = "vmmc",
  280. };
  281. #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
  282. #include <linux/leds.h>
  283. static struct gpio_led gpio_leds[] = {
  284. {
  285. .name = "overo:red:gpio21",
  286. .default_trigger = "heartbeat",
  287. .gpio = 21,
  288. .active_low = true,
  289. },
  290. {
  291. .name = "overo:blue:gpio22",
  292. .default_trigger = "none",
  293. .gpio = 22,
  294. .active_low = true,
  295. },
  296. {
  297. .name = "overo:blue:COM",
  298. .default_trigger = "mmc0",
  299. .gpio = -EINVAL, /* gets replaced */
  300. .active_low = true,
  301. },
  302. };
  303. static struct gpio_led_platform_data gpio_leds_pdata = {
  304. .leds = gpio_leds,
  305. .num_leds = ARRAY_SIZE(gpio_leds),
  306. };
  307. static struct platform_device gpio_leds_device = {
  308. .name = "leds-gpio",
  309. .id = -1,
  310. .dev = {
  311. .platform_data = &gpio_leds_pdata,
  312. },
  313. };
  314. static void __init overo_init_led(void)
  315. {
  316. platform_device_register(&gpio_leds_device);
  317. }
  318. #else
  319. static inline void __init overo_init_led(void) { return; }
  320. #endif
  321. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  322. #include <linux/input.h>
  323. #include <linux/gpio_keys.h>
  324. static struct gpio_keys_button gpio_buttons[] = {
  325. {
  326. .code = BTN_0,
  327. .gpio = 23,
  328. .desc = "button0",
  329. .wakeup = 1,
  330. },
  331. {
  332. .code = BTN_1,
  333. .gpio = 14,
  334. .desc = "button1",
  335. .wakeup = 1,
  336. },
  337. };
  338. static struct gpio_keys_platform_data gpio_keys_pdata = {
  339. .buttons = gpio_buttons,
  340. .nbuttons = ARRAY_SIZE(gpio_buttons),
  341. };
  342. static struct platform_device gpio_keys_device = {
  343. .name = "gpio-keys",
  344. .id = -1,
  345. .dev = {
  346. .platform_data = &gpio_keys_pdata,
  347. },
  348. };
  349. static void __init overo_init_keys(void)
  350. {
  351. platform_device_register(&gpio_keys_device);
  352. }
  353. #else
  354. static inline void __init overo_init_keys(void) { return; }
  355. #endif
  356. static int overo_twl_gpio_setup(struct device *dev,
  357. unsigned gpio, unsigned ngpio)
  358. {
  359. omap2_hsmmc_init(mmc);
  360. overo_vmmc1_supply.dev = mmc[0].dev;
  361. #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
  362. /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
  363. gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
  364. #endif
  365. return 0;
  366. }
  367. static struct twl4030_gpio_platform_data overo_gpio_data = {
  368. .gpio_base = OMAP_MAX_GPIO_LINES,
  369. .irq_base = TWL4030_GPIO_IRQ_BASE,
  370. .irq_end = TWL4030_GPIO_IRQ_END,
  371. .use_leds = true,
  372. .setup = overo_twl_gpio_setup,
  373. };
  374. static struct twl4030_usb_data overo_usb_data = {
  375. .usb_mode = T2_USB_MODE_ULPI,
  376. };
  377. static struct regulator_init_data overo_vmmc1 = {
  378. .constraints = {
  379. .min_uV = 1850000,
  380. .max_uV = 3150000,
  381. .valid_modes_mask = REGULATOR_MODE_NORMAL
  382. | REGULATOR_MODE_STANDBY,
  383. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  384. | REGULATOR_CHANGE_MODE
  385. | REGULATOR_CHANGE_STATUS,
  386. },
  387. .num_consumer_supplies = 1,
  388. .consumer_supplies = &overo_vmmc1_supply,
  389. };
  390. /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
  391. static struct regulator_init_data overo_vdac = {
  392. .constraints = {
  393. .min_uV = 1800000,
  394. .max_uV = 1800000,
  395. .valid_modes_mask = REGULATOR_MODE_NORMAL
  396. | REGULATOR_MODE_STANDBY,
  397. .valid_ops_mask = REGULATOR_CHANGE_MODE
  398. | REGULATOR_CHANGE_STATUS,
  399. },
  400. .num_consumer_supplies = 1,
  401. .consumer_supplies = &overo_vdda_dac_supply,
  402. };
  403. /* VPLL2 for digital video outputs */
  404. static struct regulator_init_data overo_vpll2 = {
  405. .constraints = {
  406. .name = "VDVI",
  407. .min_uV = 1800000,
  408. .max_uV = 1800000,
  409. .valid_modes_mask = REGULATOR_MODE_NORMAL
  410. | REGULATOR_MODE_STANDBY,
  411. .valid_ops_mask = REGULATOR_CHANGE_MODE
  412. | REGULATOR_CHANGE_STATUS,
  413. },
  414. .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
  415. .consumer_supplies = overo_vdds_dsi_supply,
  416. };
  417. static struct twl4030_codec_audio_data overo_audio_data;
  418. static struct twl4030_codec_data overo_codec_data = {
  419. .audio_mclk = 26000000,
  420. .audio = &overo_audio_data,
  421. };
  422. static struct twl4030_platform_data overo_twldata = {
  423. .irq_base = TWL4030_IRQ_BASE,
  424. .irq_end = TWL4030_IRQ_END,
  425. .gpio = &overo_gpio_data,
  426. .usb = &overo_usb_data,
  427. .codec = &overo_codec_data,
  428. .vmmc1 = &overo_vmmc1,
  429. .vdac = &overo_vdac,
  430. .vpll2 = &overo_vpll2,
  431. };
  432. static int __init overo_i2c_init(void)
  433. {
  434. omap3_pmic_init("tps65950", &overo_twldata);
  435. /* i2c2 pins are used for gpio */
  436. omap_register_i2c_bus(3, 400, NULL, 0);
  437. return 0;
  438. }
  439. static struct spi_board_info overo_spi_board_info[] __initdata = {
  440. #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
  441. defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
  442. {
  443. .modalias = "lgphilips_lb035q02_panel-spi",
  444. .bus_num = 1,
  445. .chip_select = 1,
  446. .max_speed_hz = 500000,
  447. .mode = SPI_MODE_3,
  448. },
  449. #endif
  450. };
  451. static int __init overo_spi_init(void)
  452. {
  453. overo_ads7846_init();
  454. spi_register_board_info(overo_spi_board_info,
  455. ARRAY_SIZE(overo_spi_board_info));
  456. return 0;
  457. }
  458. static void __init overo_init_early(void)
  459. {
  460. omap2_init_common_infrastructure();
  461. omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
  462. mt46h32m32lf6_sdrc_params);
  463. }
  464. static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
  465. .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
  466. .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
  467. .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
  468. .phy_reset = true,
  469. .reset_gpio_port[0] = -EINVAL,
  470. .reset_gpio_port[1] = OVERO_GPIO_USBH_NRESET,
  471. .reset_gpio_port[2] = -EINVAL
  472. };
  473. #ifdef CONFIG_OMAP_MUX
  474. static struct omap_board_mux board_mux[] __initdata = {
  475. { .reg_offset = OMAP_MUX_TERMINATOR },
  476. };
  477. #endif
  478. static struct gpio overo_bt_gpios[] __initdata = {
  479. { OVERO_GPIO_BT_XGATE, GPIOF_OUT_INIT_LOW, "lcd enable" },
  480. { OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" },
  481. };
  482. static void __init overo_init(void)
  483. {
  484. int ret;
  485. omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  486. overo_i2c_init();
  487. omap_display_init(&overo_dss_data);
  488. omap_serial_init();
  489. omap_nand_flash_init(0, overo_nand_partitions,
  490. ARRAY_SIZE(overo_nand_partitions));
  491. usb_musb_init(NULL);
  492. usbhs_init(&usbhs_bdata);
  493. overo_spi_init();
  494. overo_ads7846_init();
  495. overo_init_smsc911x();
  496. overo_display_init();
  497. overo_init_led();
  498. overo_init_keys();
  499. /* Ensure SDRC pins are mux'd for self-refresh */
  500. omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
  501. omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
  502. ret = gpio_request_one(OVERO_GPIO_W2W_NRESET, GPIOF_OUT_INIT_HIGH,
  503. "OVERO_GPIO_W2W_NRESET");
  504. if (ret == 0) {
  505. gpio_export(OVERO_GPIO_W2W_NRESET, 0);
  506. gpio_set_value(OVERO_GPIO_W2W_NRESET, 0);
  507. udelay(10);
  508. gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
  509. } else {
  510. printk(KERN_ERR "could not obtain gpio for "
  511. "OVERO_GPIO_W2W_NRESET\n");
  512. }
  513. ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios));
  514. if (ret) {
  515. pr_err("%s: could not obtain BT gpios\n", __func__);
  516. } else {
  517. gpio_export(OVERO_GPIO_BT_XGATE, 0);
  518. gpio_export(OVERO_GPIO_BT_NRESET, 0);
  519. gpio_set_value(OVERO_GPIO_BT_NRESET, 0);
  520. mdelay(6);
  521. gpio_set_value(OVERO_GPIO_BT_NRESET, 1);
  522. }
  523. ret = gpio_request_one(OVERO_GPIO_USBH_CPEN, GPIOF_OUT_INIT_HIGH,
  524. "OVERO_GPIO_USBH_CPEN");
  525. if (ret == 0)
  526. gpio_export(OVERO_GPIO_USBH_CPEN, 0);
  527. else
  528. printk(KERN_ERR "could not obtain gpio for "
  529. "OVERO_GPIO_USBH_CPEN\n");
  530. }
  531. MACHINE_START(OVERO, "Gumstix Overo")
  532. .boot_params = 0x80000100,
  533. .reserve = omap_reserve,
  534. .map_io = omap3_map_io,
  535. .init_early = overo_init_early,
  536. .init_irq = omap3_init_irq,
  537. .init_machine = overo_init,
  538. .timer = &omap3_timer,
  539. MACHINE_END