Skip to content

sunxi: musb: Fix "usb reset" handling

Maxime Ripard u-boot 1 version New

Get series with b4
b4 am 20150626111127.GN2266@lukather

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] sunxi: musb: Fix "usb reset" handling
Quoted 27 lines · Hans de Goede

Hi,

Quoted 24 lines · Maxime Ripard

Hi,

Quoted 20 lines · Hans de Goede

Paul, can you test these with gadget mode? Specifically if they help the problem you were seeing when switching roles?

Also this bit from the kernel code for the sunxi glue may be relevant to your problems:

        if ((musb->int_usb & MUSB_INTR_RESET) && !is_host_active(musb)) {
                /* ep0 FADDR must be 0 when (re)entering peripheral mode */
                musb_ep_select(musb->mregs, 0);
                musb_writeb(musb->mregs, MUSB_FADDR, 0);
        }

This is from the interrupt handler in the sunxi-musb glue in the kernel, maybe we can do the same, and/or maybe we need to do:

	/* ep0 FADDR must be 0 when (re)entering peripheral mode */
	musb_ep_select(musb->mregs, 0);
	musb_writeb(musb->mregs, MUSB_FADDR, 0);

From sunxi_musb_disable?

Quoted 7 lines
Quoted 2 lines

So, I was affected by this issue on a SinA33, even when not switching roles (since the SinA33 is peripheral only).

Missed this the first reply, are you sure, that is somewhat weird. I mean it is possible if they did not hook up the id pin, or do not allow you to send out +5v, but it is weird. I guess they did route the real usb-host to an USB-A receptacle on that board, so it is not a big deal, right ?

Yeah, I'm sure, or at least that's what the schematics say. VBUS comes straight from the DC-5V (without any GPIO in between), goes through a jumper (you read me right....), which is even un-populated on the boards Chen-Yu and I got.

So it seems like while the board has the ID pin routed, it's actually not able to provide VBUS (which is kind of weird, but anyway).

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150626/9e9b9abd/attachment.sig>