From 9680bdaeeb0af9d41f6b96ce45dc72b268a6aafa Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 9 Nov 2012 15:37:05 +0100 Subject: colibri_t20: USB: fix Ethernet detection fault Turns out we completely missed properly resetting the ASIX USB to FastEthernet chip which from time-to-time on certain modules caused severe Ethernet detection faults only a complete hardware reset or power-cycle could eliminate. Properly resetting the chip for 5 microseconds after VBUS is stable seems to fix the issue. --- board/toradex/common/usb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/board/toradex/common/usb.c b/board/toradex/common/usb.c index 63accf8394..f0f4a47453 100644 --- a/board/toradex/common/usb.c +++ b/board/toradex/common/usb.c @@ -212,6 +212,15 @@ void usbf_reset_controller(enum periph_id id, struct usb_ctlr *usbctlr) /* Enable ASIX AX88772B V_BUS */ gpio_direction_output(GPIO_PBB1, 1); pinmux_tristate_disable(PINGRP_DTE); + + /* Reset */ + gpio_direction_output(GPIO_PV4, 0); + pinmux_tristate_disable(PINGRP_GPV); + + udelay(5); + + /* Unreset */ + gpio_set_value(GPIO_PV4, 1); } /* -- cgit v1.2.3