From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Fri, 26 Jun 2015 13:02:51 +0200 Subject: [U-Boot] [PATCH 0/2] sunxi: musb: Fix "usb reset" handling In-Reply-To: <20150626102058.GM2266@lukather> References: <1434278413-21157-1-git-send-email-hdegoede@redhat.com> <20150626102058.GM2266@lukather> Message-ID: <558D315B.5030503@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 26-06-15 12:20, Maxime Ripard wrote: > Hi, > > On Sun, Jun 14, 2015 at 12:40:11PM +0200, Hans de Goede wrote: >> 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? > > 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 ? Regards, Hans