Skip to content
Snippets Groups Projects
Commit b724d929 authored by cinap_lenrek's avatar cinap_lenrek
Browse files

reset usb hub after usb_stop() (thanks sigrid!)

parent 278763f0
No related branches found
No related tags found
No related merge requests found
Pipeline #843 canceled
......@@ -359,17 +359,23 @@ void board_set_default_env(void)
board_eth_addresses();
}
static void
reset_usb_hub(void)
{
// Reform: Reset USB hub
imx_iomux_v3_setup_pad(IMX8MQ_PAD_GPIO1_IO14__GPIO1_IO14 | MUX_PAD_CTRL(WEAK_PULLUP));
gpio_request(IMX_GPIO_NR(1, 14), "usb1_rst");
gpio_direction_output(IMX_GPIO_NR(1, 14), 1);
gpio_set_value(IMX_GPIO_NR(1, 14), 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(1, 14), 1);
}
int board_late_init(void)
{
set_env_vars();
// Reform: Reset USB hub
imx_iomux_v3_setup_pad(IMX8MQ_PAD_GPIO1_IO14__GPIO1_IO14 | MUX_PAD_CTRL(WEAK_PULLUP));
gpio_request(IMX_GPIO_NR(1, 14), "usb1_rst");
gpio_direction_output(IMX_GPIO_NR(1, 14), 1);
gpio_set_value(IMX_GPIO_NR(1, 14), 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(1, 14), 1);
reset_usb_hub();
#if defined(CONFIG_USB_FUNCTION_FASTBOOT) || defined(CONFIG_CMD_DFU)
addserial_env("serial#");
......@@ -398,6 +404,7 @@ board_quiesce_devices(void)
extern void video_hw_exit(void); /* lcdif.c */
usb_stop();
reset_usb_hub();
/*
* Linux kermel mode setting seems to fail to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment