mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: fsl-udc (USB gadget) anyone?
Date: Tue, 17 Aug 2010 17:13:16 +0300	[thread overview]
Message-ID: <20100817141315.GE9631@jasper.tkos.co.il> (raw)
In-Reply-To: <20100816070904.GG27749@pengutronix.de>

Hi Sascha,

On Mon, Aug 16, 2010 at 09:09:04AM +0200, Sascha Hauer wrote:
> On Mon, Aug 16, 2010 at 09:37:04AM +0300, Baruch Siach wrote:
> > Hi Barebox list,
> > 
> > I see that there are no in-tree fsl-udc driver users. Does anyone here have 
> > experience with this driver on an i.MX based system? What pre-probe() 
> > initialization does this driver require at the platform code?
> 
> 
> We are using it on a custom i.MX25 board (which is not in mainline
> because hardly anyone could make use of the code). Here is the platform
> initialization code (mixed with ehci host support). It works fine in DFU
> mode, serial support is probably not working. I have tried serial
> support, but had problems integrating it properly in barebox.

[snip]

> +static struct fsl_usb2_platform_data usb_pdata = {
> +	.operating_mode	= FSL_USB2_DR_DEVICE,
> +	.phy_mode	= FSL_USB2_PHY_UTMI,
> +};
> +
> +static struct device_d usbotg_dev = {
> +	.name     = "fsl-udc",
> +	.map_base = IMX_OTG_BASE,
> +	.size     = 0x200,
> +	.platform_data = &usb_pdata,
> +};

Thanks for the info. Unfortunately I was not able to get dfu work on both the 
i.MX25 PDK and our custom board. The board doesn't even get enumerated. The 
USB PHY wiring is the same on both.  After running the 'dfu' command as 
follows:

barebox:/ dfu -V 0x082d -P 0x2000 test(script)

I connect the board to my host and see the following on the host side:

[113870.024034] usb 2-1: new high speed USB device using ehci_hcd and address 101
[113870.092245] hub 2-0:1.0: unable to enumerate USB device on port 1
[113870.584048] usb 6-1: new full speed USB device using uhci_hcd and address 27
[113870.700071] hub 6-0:1.0: unable to enumerate USB device on port 1
[113871.080062] usb 6-1: new full speed USB device using uhci_hcd and address 28
[113871.200106] usb 6-1: device descriptor read/64, error -71
[113871.424073] usb 6-1: device descriptor read/64, error -71
[113871.640069] usb 6-1: new full speed USB device using uhci_hcd and address 29
[113871.760068] usb 6-1: device descriptor read/64, error -71
[113871.984068] usb 6-1: device descriptor read/64, error -71
[113872.200067] usb 6-1: new full speed USB device using uhci_hcd and address 30
[113872.608070] usb 6-1: device not accepting address 30, error -71
[113872.720073] usb 6-1: new full speed USB device using uhci_hcd and address 31
[113873.128058] usb 6-1: device not accepting address 31, error -71
[113873.128079] hub 6-0:1.0: unable to enumerate USB device on port 1

Sprinkling printfs over the fsl-udc driver code didn't reveal much, except 
from repeated USB_STS_PORT_CHANGE and USB_STS_RESET interrupts. Before giving 
up completely I thought I'd just report this failure, maybe someone has a 
clue.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2010-08-17 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16  6:37 Baruch Siach
2010-08-16  7:09 ` Sascha Hauer
2010-08-16  7:58   ` Eric Bénard
2010-08-17 14:13   ` Baruch Siach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100817141315.GE9631@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox