Re: mxs-phy on i.MX233 not enumerating

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/13/12, Sean Cross <xobs@xxxxxxxx> wrote:
> We're trying to get USB host mode working on a Freescale i.MX233.  I'm
> using
> a chumby hacker board, but there are several people trying on an OlinuXino
> board as well.  We're running into a problem where every time the root hub
> is detected, it's disconnected.  This results in kernel messages such as:
>
> [ 66.410000] hub 1-0:1.0: unable to enumerate USB device on port 1
> [ 66.630000] hub 1-0:1.0: unable to enumerate USB device on port 1
> [ 66.850000] hub 1-0:1.0: unable to enumerate USB device on port 1
> [ 67.070000] hub 1-0:1.0: unable to enumerate USB device on port 1
>
> It looks like we're running into this chip issue described in the i.MX233
> reference manual:
>
>>    For host mode, enables high-speed disconnect detector. This signal
>>    allows the override of enabling the detection that is normally done in
>>    the UTMI controller. The UTMI controller enables this circuit whenever
>>    the host sends a start-of-frame packet. Due to a on chip issue (Errata
>>    #2791), software must pay attention to when to assert the
>>    ENHOSTDISCONDETECT bit in HW_USBPHY_CTRL register:
>>        1. Only set HW_USBPHY_CTRL.ENHOSTDISCONDETECT during high speed
>>        host mode.
>>        2. Do not set HW_USBPHY_CTRL.ENHOSTDISCONDETECT during the reset
>>        and speed negotiation period.
>>        3. Do not set HW_USBPHY_CTRL.ENHOSTDISCONDETECT during host
>>        suspend/resume sequence.
>
> We suspect this because we can get it to detect a USB device when it first
> boots by applying the following patch:
>
> diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
> index c1a67cb..23eeae6 100644
> --- a/drivers/usb/otg/mxs-phy.c
> +++ b/drivers/usb/otg/mxs-phy.c
> @@ -81,8 +81,6 @@ static int mxs_phy_on_connect(struct usb_phy *phy, int
> port)
>  	dev_dbg(phy->dev, "Connect on port %d\n", port);
>
>  	mxs_phy_hw_init(to_mxs_phy(phy));
> -	writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
> -			phy->io_priv + HW_USBPHY_CTRL_SET);
>
>  	return 0;
>  }

I applied this change and it allowed a mx23-olinuxino board to detect
a USB pen drive.

Peter,

Is this change related to this hack in FSL kernel?
http://opensource.freescale.com/git?p=imx/linux-2.6-imx.git;a=commitdiff;h=c44dc00d2aecfcbf30336180f5ecd6a3a633545d

What would be the proper way to handle HOSTDISCONDETECT so that it can
work for mx23 as well?

Thanks,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux