blob: 442028a764c71f3473a81f35bbe791a05ceb357a [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Dirk Behme220faba2009-01-28 21:39:57 +01002/*
3 * Maintainer : Steve Sakoman <steve@sakoman.com>
4 *
5 * Derived from Beagle Board, 3430 SDP, and OMAP3EVM code by
6 * Richard Woodruff <r-woodruff2@ti.com>
7 * Syed Mohammed Khasim <khasim@ti.com>
8 * Sunil Kumar <sunilsaini05@gmail.com>
9 * Shashi Ranjan <shashiranjanmca05@gmail.com>
10 *
11 * (C) Copyright 2004-2008
12 * Texas Instruments, <www.ti.com>
Dirk Behme220faba2009-01-28 21:39:57 +010013 */
14#include <common.h>
Simon Glassbc0f4ea2014-10-22 21:37:15 -060015#include <dm.h>
Simon Glass5e6201b2019-08-01 09:46:51 -060016#include <env.h>
Simon Glassbc0f4ea2014-10-22 21:37:15 -060017#include <ns16550.h>
Olof Johansson4963f922009-09-29 10:22:45 -040018#include <netdev.h>
Tom Rix0f2a8042009-06-28 12:52:30 -050019#include <twl4030.h>
Masahiro Yamada2b7a8732017-11-30 13:45:24 +090020#include <linux/mtd/rawnand.h>
Dirk Behme220faba2009-01-28 21:39:57 +010021#include <asm/io.h>
Steve Sakomanb7d80522010-09-19 21:21:07 -070022#include <asm/arch/mmc_host_def.h>
Dirk Behme220faba2009-01-28 21:39:57 +010023#include <asm/arch/mux.h>
Olof Johansson4963f922009-09-29 10:22:45 -040024#include <asm/arch/mem.h>
Dirk Behme220faba2009-01-28 21:39:57 +010025#include <asm/arch/sys_proto.h>
Sanjeev Premi7b3dc822011-09-08 10:51:01 -040026#include <asm/gpio.h>
Dirk Behme220faba2009-01-28 21:39:57 +010027#include <asm/mach-types.h>
28#include "overo.h"
29
Tom Riniceed5d22017-05-12 22:33:27 -040030#ifdef CONFIG_USB_EHCI_HCD
Stefan Herbrechtsmeier0c87e682014-09-16 17:51:09 +020031#include <usb.h>
32#include <asm/ehci-omap.h>
33#endif
34
Steve Sakoman0b880632010-09-20 08:05:14 -070035#define TWL4030_I2C_BUS 0
36#define EXPANSION_EEPROM_I2C_BUS 2
37#define EXPANSION_EEPROM_I2C_ADDRESS 0x51
38
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +020039#define GUMSTIX_EMPTY_EEPROM 0x0
40
Steve Sakoman0b880632010-09-20 08:05:14 -070041#define GUMSTIX_SUMMIT 0x01000200
42#define GUMSTIX_TOBI 0x02000200
43#define GUMSTIX_TOBI_DUO 0x03000200
44#define GUMSTIX_PALO35 0x04000200
45#define GUMSTIX_PALO43 0x05000200
46#define GUMSTIX_CHESTNUT43 0x06000200
47#define GUMSTIX_PINTO 0x07000200
48#define GUMSTIX_GALLOP43 0x08000200
Ash Charles7baad0f2014-05-21 14:04:53 -070049#define GUMSTIX_ALTO35 0x09000200
50#define GUMSTIX_STAGECOACH 0x0A000200
51#define GUMSTIX_THUMBO 0x0B000200
52#define GUMSTIX_TURTLECORE 0x0C000200
53#define GUMSTIX_ARBOR43C 0x0D000200
Steve Sakoman0b880632010-09-20 08:05:14 -070054
55#define ETTUS_USRP_E 0x01000300
56
57#define GUMSTIX_NO_EEPROM 0xffffffff
58
59static struct {
60 unsigned int device_vendor;
61 unsigned char revision;
62 unsigned char content;
63 char fab_revision[8];
64 char env_var[16];
65 char env_setting[64];
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +020066} expansion_config = {0x0};
Steve Sakoman0d1d0082010-08-12 21:07:02 -070067
Simon Glassbc0f4ea2014-10-22 21:37:15 -060068static const struct ns16550_platdata overo_serial = {
Adam Fordd1e22fa2016-03-07 21:08:49 -060069 .base = OMAP34XX_UART3,
70 .reg_shift = 2,
Heiko Schocher06f108e2017-01-18 08:05:49 +010071 .clock = V_NS16550_CLK,
72 .fcr = UART_FCR_DEFVAL,
Simon Glassbc0f4ea2014-10-22 21:37:15 -060073};
74
75U_BOOT_DEVICE(overo_uart) = {
Thomas Chou52ac4432015-11-19 21:48:12 +080076 "ns16550_serial",
Simon Glassbc0f4ea2014-10-22 21:37:15 -060077 &overo_serial
78};
79
Tom Rix558bb832009-04-01 22:02:20 -050080/*
Steve Sakoman541ce992010-08-24 10:37:29 -070081 * Routine: get_sdio2_config
82 * Description: Return information about the wifi module connection
83 * Returns 0 if the module connects though a level translator
84 * Returns 1 if the module connects directly
85 */
86int get_sdio2_config(void)
87{
88 int sdio_direct;
89
Sanjeev Premi7b3dc822011-09-08 10:51:01 -040090 if (!gpio_request(130, "") && !gpio_request(139, "")) {
Steve Sakoman541ce992010-08-24 10:37:29 -070091
Sanjeev Premi7b3dc822011-09-08 10:51:01 -040092 gpio_direction_output(130, 0);
93 gpio_direction_input(139);
Steve Sakoman541ce992010-08-24 10:37:29 -070094
95 sdio_direct = 1;
Sanjeev Premi7b3dc822011-09-08 10:51:01 -040096 gpio_set_value(130, 0);
97 if (gpio_get_value(139) == 0) {
98 gpio_set_value(130, 1);
99 if (gpio_get_value(139) == 1)
Steve Sakoman541ce992010-08-24 10:37:29 -0700100 sdio_direct = 0;
101 }
102
Joe Hershberger9b124d32011-10-12 10:31:44 +0000103 gpio_direction_input(130);
Steve Sakoman541ce992010-08-24 10:37:29 -0700104 } else {
Andreas Müllerb958a5d2012-01-04 15:26:20 +0000105 puts("Error: unable to acquire sdio2 clk GPIOs\n");
Steve Sakoman541ce992010-08-24 10:37:29 -0700106 sdio_direct = -1;
107 }
108
109 return sdio_direct;
110}
111
112/*
Steve Sakoman0b880632010-09-20 08:05:14 -0700113 * Routine: get_expansion_id
114 * Description: This function checks for expansion board by checking I2C
115 * bus 2 for the availability of an AT24C01B serial EEPROM.
116 * returns the device_vendor field from the EEPROM
117 */
118unsigned int get_expansion_id(void)
119{
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200120 if (expansion_config.device_vendor != 0x0)
121 return expansion_config.device_vendor;
122
Steve Sakoman0b880632010-09-20 08:05:14 -0700123 i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS);
124
125 /* return GUMSTIX_NO_EEPROM if eeprom doesn't respond */
126 if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) {
127 i2c_set_bus_num(TWL4030_I2C_BUS);
128 return GUMSTIX_NO_EEPROM;
129 }
130
131 /* read configuration data */
132 i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
133 sizeof(expansion_config));
134
135 i2c_set_bus_num(TWL4030_I2C_BUS);
136
137 return expansion_config.device_vendor;
138}
139
140/*
Dirk Behme220faba2009-01-28 21:39:57 +0100141 * Routine: misc_init_r
142 * Description: Configure board specific parts
Tom Rix558bb832009-04-01 22:02:20 -0500143 */
Dirk Behme220faba2009-01-28 21:39:57 +0100144int misc_init_r(void)
145{
Ash Charles7baad0f2014-05-21 14:04:53 -0700146 unsigned int expansion_id;
147
Tom Rix0f2a8042009-06-28 12:52:30 -0500148 twl4030_power_init();
Grazvydas Ignotas17887bf2009-12-10 17:10:21 +0200149 twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
Dirk Behme220faba2009-01-28 21:39:57 +0100150
Steve Sakoman5ddc70b2010-08-12 15:13:02 -0700151 printf("Board revision: %d\n", get_board_revision());
Steve Sakoman541ce992010-08-24 10:37:29 -0700152
153 switch (get_sdio2_config()) {
154 case 0:
Andreas Müllerb958a5d2012-01-04 15:26:20 +0000155 puts("Tranceiver detected on mmc2\n");
Steve Sakoman541ce992010-08-24 10:37:29 -0700156 MUX_OVERO_SDIO2_TRANSCEIVER();
157 break;
158 case 1:
Andreas Müllerb958a5d2012-01-04 15:26:20 +0000159 puts("Direct connection on mmc2\n");
Steve Sakoman541ce992010-08-24 10:37:29 -0700160 MUX_OVERO_SDIO2_DIRECT();
161 break;
162 default:
Andreas Müllerb958a5d2012-01-04 15:26:20 +0000163 puts("Unable to detect mmc2 connection type\n");
Steve Sakoman541ce992010-08-24 10:37:29 -0700164 }
165
Ash Charles7baad0f2014-05-21 14:04:53 -0700166 expansion_id = get_expansion_id();
167 switch (expansion_id) {
Steve Sakoman0b880632010-09-20 08:05:14 -0700168 case GUMSTIX_SUMMIT:
169 printf("Recognized Summit expansion board (rev %d %s)\n",
170 expansion_config.revision,
171 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200172 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600173 env_set("defaultdisplay", "dvi");
174 env_set("expansionname", "summit");
Steve Sakoman0b880632010-09-20 08:05:14 -0700175 break;
176 case GUMSTIX_TOBI:
177 printf("Recognized Tobi expansion board (rev %d %s)\n",
178 expansion_config.revision,
179 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200180 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600181 env_set("defaultdisplay", "dvi");
182 env_set("expansionname", "tobi");
Steve Sakoman0b880632010-09-20 08:05:14 -0700183 break;
184 case GUMSTIX_TOBI_DUO:
185 printf("Recognized Tobi Duo expansion board (rev %d %s)\n",
186 expansion_config.revision,
187 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200188 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600189 env_set("expansionname", "tobiduo");
Steve Sakoman0b880632010-09-20 08:05:14 -0700190 break;
191 case GUMSTIX_PALO35:
192 printf("Recognized Palo35 expansion board (rev %d %s)\n",
193 expansion_config.revision,
194 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200195 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600196 env_set("defaultdisplay", "lcd35");
197 env_set("expansionname", "palo35");
Steve Sakoman0b880632010-09-20 08:05:14 -0700198 break;
199 case GUMSTIX_PALO43:
200 printf("Recognized Palo43 expansion board (rev %d %s)\n",
201 expansion_config.revision,
202 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200203 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600204 env_set("defaultdisplay", "lcd43");
205 env_set("expansionname", "palo43");
Steve Sakoman0b880632010-09-20 08:05:14 -0700206 break;
207 case GUMSTIX_CHESTNUT43:
208 printf("Recognized Chestnut43 expansion board (rev %d %s)\n",
209 expansion_config.revision,
210 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200211 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600212 env_set("defaultdisplay", "lcd43");
213 env_set("expansionname", "chestnut43");
Steve Sakoman0b880632010-09-20 08:05:14 -0700214 break;
215 case GUMSTIX_PINTO:
216 printf("Recognized Pinto expansion board (rev %d %s)\n",
217 expansion_config.revision,
218 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200219 MUX_GUMSTIX();
Steve Sakoman0b880632010-09-20 08:05:14 -0700220 break;
221 case GUMSTIX_GALLOP43:
222 printf("Recognized Gallop43 expansion board (rev %d %s)\n",
223 expansion_config.revision,
224 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200225 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600226 env_set("defaultdisplay", "lcd43");
227 env_set("expansionname", "gallop43");
Steve Sakoman0b880632010-09-20 08:05:14 -0700228 break;
Ash Charles7baad0f2014-05-21 14:04:53 -0700229 case GUMSTIX_ALTO35:
230 printf("Recognized Alto35 expansion board (rev %d %s)\n",
231 expansion_config.revision,
232 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200233 MUX_GUMSTIX();
Ash Charles7baad0f2014-05-21 14:04:53 -0700234 MUX_ALTO35();
Simon Glass6a38e412017-08-03 12:22:09 -0600235 env_set("defaultdisplay", "lcd35");
236 env_set("expansionname", "alto35");
Ash Charles7baad0f2014-05-21 14:04:53 -0700237 break;
238 case GUMSTIX_STAGECOACH:
239 printf("Recognized Stagecoach expansion board (rev %d %s)\n",
240 expansion_config.revision,
241 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200242 MUX_GUMSTIX();
Ash Charles7baad0f2014-05-21 14:04:53 -0700243 break;
244 case GUMSTIX_THUMBO:
245 printf("Recognized Thumbo expansion board (rev %d %s)\n",
246 expansion_config.revision,
247 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200248 MUX_GUMSTIX();
Ash Charles7baad0f2014-05-21 14:04:53 -0700249 break;
250 case GUMSTIX_TURTLECORE:
251 printf("Recognized Turtlecore expansion board (rev %d %s)\n",
252 expansion_config.revision,
253 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200254 MUX_GUMSTIX();
Ash Charles7baad0f2014-05-21 14:04:53 -0700255 break;
256 case GUMSTIX_ARBOR43C:
257 printf("Recognized Arbor43C expansion board (rev %d %s)\n",
258 expansion_config.revision,
259 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200260 MUX_GUMSTIX();
Ash Charles7baad0f2014-05-21 14:04:53 -0700261 MUX_ARBOR43C();
Simon Glass6a38e412017-08-03 12:22:09 -0600262 env_set("defaultdisplay", "lcd43");
263 env_set("expansionname", "arbor43c");
Ash Charles7baad0f2014-05-21 14:04:53 -0700264 break;
Steve Sakoman0b880632010-09-20 08:05:14 -0700265 case ETTUS_USRP_E:
266 printf("Recognized Ettus Research USRP-E (rev %d %s)\n",
267 expansion_config.revision,
268 expansion_config.fab_revision);
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200269 MUX_GUMSTIX();
Steve Sakoman0b880632010-09-20 08:05:14 -0700270 MUX_USRP_E();
Simon Glass6a38e412017-08-03 12:22:09 -0600271 env_set("defaultdisplay", "dvi");
Steve Sakoman0b880632010-09-20 08:05:14 -0700272 break;
273 case GUMSTIX_NO_EEPROM:
Stefan Herbrechtsmeiere2f29a12014-09-16 17:51:08 +0200274 case GUMSTIX_EMPTY_EEPROM:
275 puts("No or empty EEPROM on expansion board\n");
276 MUX_GUMSTIX();
Simon Glass6a38e412017-08-03 12:22:09 -0600277 env_set("expansionname", "tobi");
Steve Sakoman0b880632010-09-20 08:05:14 -0700278 break;
279 default:
Ash Charles7baad0f2014-05-21 14:04:53 -0700280 printf("Unrecognized expansion board 0x%08x\n", expansion_id);
281 break;
Steve Sakoman0b880632010-09-20 08:05:14 -0700282 }
283
284 if (expansion_config.content == 1)
Simon Glass6a38e412017-08-03 12:22:09 -0600285 env_set(expansion_config.env_var, expansion_config.env_setting);
Steve Sakoman0b880632010-09-20 08:05:14 -0700286
Paul Kocialkowski6bc318e2015-08-27 19:37:13 +0200287 omap_die_id_display();
Dirk Behme12dbcf62009-03-12 19:30:50 +0100288
Ash Charles1bfdde62014-06-10 12:02:36 -0700289 if (get_cpu_family() == CPU_OMAP34XX)
Simon Glass6a38e412017-08-03 12:22:09 -0600290 env_set("boardname", "overo");
Ash Charles1bfdde62014-06-10 12:02:36 -0700291 else
Simon Glass6a38e412017-08-03 12:22:09 -0600292 env_set("boardname", "overo-storm");
Ash Charles1bfdde62014-06-10 12:02:36 -0700293
Dirk Behme220faba2009-01-28 21:39:57 +0100294 return 0;
295}
296
Arun Bharadwaj9a0475c2015-04-28 16:55:29 -0700297#if defined(CONFIG_CMD_NET)
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200298/* GPMC definitions for LAN9221 chips on Tobi expansion boards */
299static const u32 gpmc_lan_config[] = {
300 NET_LAN9221_GPMC_CONFIG1,
301 NET_LAN9221_GPMC_CONFIG2,
302 NET_LAN9221_GPMC_CONFIG3,
303 NET_LAN9221_GPMC_CONFIG4,
304 NET_LAN9221_GPMC_CONFIG5,
305 NET_LAN9221_GPMC_CONFIG6,
306 /*CONFIG7- computed as params */
307};
308
Olof Johansson4963f922009-09-29 10:22:45 -0400309/*
310 * Routine: setup_net_chip
311 * Description: Setting up the configuration GPMC registers specific to the
312 * Ethernet hardware.
313 */
314static void setup_net_chip(void)
315{
316 struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
317
Olof Johansson4963f922009-09-29 10:22:45 -0400318 /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
319 writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
320 /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
321 writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
322 /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
323 writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
324 &ctrl_base->gpmc_nadv_ale);
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200325}
Olof Johansson4963f922009-09-29 10:22:45 -0400326
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200327/*
328 * Routine: reset_net_chip
329 * Description: Reset the Ethernet hardware.
330 */
331static void reset_net_chip(void)
332{
Olof Johansson4963f922009-09-29 10:22:45 -0400333 /* Make GPIO 64 as output pin and send a magic pulse through it */
Sanjeev Premi7b3dc822011-09-08 10:51:01 -0400334 if (!gpio_request(64, "")) {
335 gpio_direction_output(64, 0);
336 gpio_set_value(64, 1);
Olof Johansson4963f922009-09-29 10:22:45 -0400337 udelay(1);
Sanjeev Premi7b3dc822011-09-08 10:51:01 -0400338 gpio_set_value(64, 0);
Olof Johansson4963f922009-09-29 10:22:45 -0400339 udelay(1);
Sanjeev Premi7b3dc822011-09-08 10:51:01 -0400340 gpio_set_value(64, 1);
Olof Johansson4963f922009-09-29 10:22:45 -0400341 }
342}
Olof Johansson4963f922009-09-29 10:22:45 -0400343
344int board_eth_init(bd_t *bis)
345{
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200346 unsigned int expansion_id;
Olof Johansson4963f922009-09-29 10:22:45 -0400347 int rc = 0;
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200348
Olof Johansson4963f922009-09-29 10:22:45 -0400349#ifdef CONFIG_SMC911X
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200350 expansion_id = get_expansion_id();
351 switch (expansion_id) {
352 case GUMSTIX_TOBI_DUO:
353 /* second lan chip */
354 enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[4],
355 0x2B000000, GPMC_SIZE_16M);
356 /* no break */
357 case GUMSTIX_TOBI:
358 case GUMSTIX_CHESTNUT43:
359 case GUMSTIX_STAGECOACH:
360 case GUMSTIX_NO_EEPROM:
361 case GUMSTIX_EMPTY_EEPROM:
362 /* first lan chip */
363 enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5],
364 0x2C000000, GPMC_SIZE_16M);
365
366 setup_net_chip();
367 reset_net_chip();
368
369 rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
370 break;
371 default:
372 break;
373 }
Olof Johansson4963f922009-09-29 10:22:45 -0400374#endif
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200375
Olof Johansson4963f922009-09-29 10:22:45 -0400376 return rc;
377}
Stefan Herbrechtsmeier59f72d22014-09-16 17:51:07 +0200378#endif
Steve Sakomanb7d80522010-09-19 21:21:07 -0700379
Tom Riniceed5d22017-05-12 22:33:27 -0400380#if defined(CONFIG_USB_EHCI_HCD)
Stefan Herbrechtsmeier0c87e682014-09-16 17:51:09 +0200381static struct omap_usbhs_board_data usbhs_bdata = {
382 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
383 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
384 .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED
385};
386
387#define GUMSTIX_GPIO_USBH_CPEN 168
388int ehci_hcd_init(int index, enum usb_init_type init,
389 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
390{
391 /* Enable USB power */
392 if (!gpio_request(GUMSTIX_GPIO_USBH_CPEN, "usbh_cpen"))
393 gpio_direction_output(GUMSTIX_GPIO_USBH_CPEN, 1);
394
395 return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
396}
397
398int ehci_hcd_stop(void)
399{
400 /* Disable USB power */
401 gpio_set_value(GUMSTIX_GPIO_USBH_CPEN, 0);
402 gpio_free(GUMSTIX_GPIO_USBH_CPEN);
403
404 return omap_ehci_hcd_stop();
405}
406
Tom Riniceed5d22017-05-12 22:33:27 -0400407#endif /* CONFIG_USB_EHCI_HCD */