From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fastboot and MUSB driver on OMAP3
Date: Wed, 24 Dec 2014 13:58:56 +0100 [thread overview]
Message-ID: <1419425936.2269.7.camel@aldrin> (raw)
In-Reply-To: <1418663178.2544.8.camel@collins>
> The SET_ADDRESS request is received just fine, it then sets
> musb->ep0_state = MUSB_EP0_STAGE_STATUSIN; but no IRQ arrives to trigger
> another call to musb_g_ep0_irq. Eventually, the host just sends back
> another SET_REQUEST. Looking at dmesg on the host (Device not responding
> to set address), I guess that the device should send something back and
> it apparently doesn't.
>
> Do you have any clue?
To get a better understanding of what is going on, I added debug prints
to the Linux kernel (since that musb-new driver is apparently a direct
copy of the Linux code). In Linux, everything is working nicely (for
instance with ADB on Android). The relevant part is this:
[ 8.616943] adb_open
[ 8.674926] generic_interrupt: 1 0 0
[ 8.678680] ** IRQ peripheral usb0001 tx0000 rx0000
[ 8.683807] [ED_MC]1-2.<INT>USB_SUSPEND
[ 8.777709] generic_interrupt: 4 0 0
[ 8.781433] ** IRQ peripheral usb0004 tx0000 rx0000
[ 8.893463] omapdss DSI error: DSI CIO error, cio irqstatus 400
[ 8.893493] DSI CIO IRQ 0x400: ERRCONTROL1
[ 8.929138] generic_interrupt: 8 1 0
[ 8.932922] ** IRQ peripheral usb0008 tx0001 rx0000
[ 8.938049] musb_g_ep0_irq: Current EP0 state is 0x1
[ 8.943267] service_zero_data_request: SET_ADDRESS
[ 8.948303] new ep0 state is 4
[ 8.951507] Writing ACKPEND 0x48
[ 8.954925] generic_interrupt: 8 1 0
[ 8.958679] ** IRQ peripheral usb0008 tx0001 rx0000
[ 8.963806] musb_g_ep0_irq: Current EP0 state is 0x4
[ 8.969024] musb_g_ep0_irq: Actually setting address now!
[ 8.974670] musb_g_ep0_irq: MUSB_EP0_STAGE_STATUSOUT now
[ 8.983337] omapdss DSI error: DSI CIO error, cio irqstatus 100400
[ 8.983367] DSI CIO IRQ 0x100400: ERRCONTROL1 ERRCONTENTIONLP0_1
[ 9.077239] generic_interrupt: 8 1 0
[ 9.080993] ** IRQ peripheral usb0008 tx0001 rx0000
[ 9.086120] musb_g_ep0_irq: Current EP0 state is 0x0
[ 9.091400] generic_interrupt: 8 1 0
To put in perspective with my current U-Boot log:
musb_register
musb_init_controller
omap2430_musb_init
HS USB OTG: revision 0x40, sysconfig 0x1008, sysstatus 0x1, intrfsel
0x1, simenable 0x0
omap2430_musb_disable
musb_gadget_setup
USB Peripheral mode controller at 480ab000 using PIO, IRQ 0
Hit any key to stop autoboot: 0
usb_gadget_register_driver
musb_gadget_start
musb_start
omap2430_musb_enable
fastboot_add
adding 'f_fastboot'/9fe50480 to config 'usb_dnload'/9fe503c0
fastboot_bind IN
fastboot_bind OUT
generic_interrupt: 45 1 0
** IRQ peripheral usb002d tx0001 rx0000
<== Power=f0, DevCtl=98, int_usb=0x2d
csr 0001, count 8, myaddr 0, ep0stage idle
musb-hdrc: peripheral reset irq lost!
musb_g_ep0_irq: power: 0xf0 speed: 0x3
new ep0 state is 6
service_zero_data_request()
service_zero_data_request: SET_ADDRESS
new ep0 state is 4
Writing ACKPEND 0x48
generic_interrupt: 1 0 0
** IRQ peripheral usb0001 tx0000 rx0000
<== Power=e0, DevCtl=99, int_usb=0x1
generic_interrupt: 4 0 0
** IRQ peripheral usb0004 tx0000 rx0000
<== Power=f0, DevCtl=99, int_usb=0x4
generic_interrupt: 8 0 0
** IRQ peripheral usb0008 tx0000 rx0000
<== Power=f0, DevCtl=99, int_usb=0x8
generic_interrupt: 8 0 0
** IRQ peripheral usb0008 tx0000 rx0000
<== Power=f0, DevCtl=99, int_usb=0x8
The difference between both is apparently that the first IRQ I get in
U-Boot has, in addition to TX, an USB IRQ with value 0x2D.
0x2D is MUSB_INTR_DISCONNECT | MUSB_INTR_SUSPEND | MUSB_INTR_RESET |
MUSB_INTR_BABBLE
I'm a bit worried about MUSB_INTR_DISCONNECT, which normally indicates
that the device was disconnected. In any case, I'm not getting the
second TX message which is supposed to let the actual address set take
place.
I would appreciate a some highlights from people using this on the
BeagleBoard, where it is apparently supposed to work. My current code
(including debug prints) is at:
http://git.code.paulk.fr/gitweb/?p=u-boot-sniper.git;a=shortlog;h=refs/heads/debug
Thanks, have a nice holiday season!
--
Paul Kocialkowski, Replicant developer
Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.
Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141224/fc14c762/attachment.pgp>
next prev parent reply other threads:[~2014-12-24 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 12:30 [U-Boot] Fastboot and MUSB driver on OMAP3 Paul Kocialkowski
2014-12-15 17:06 ` Paul Kocialkowski
2014-12-24 12:58 ` Paul Kocialkowski [this message]
2015-01-15 11:41 ` Paul Kocialkowski
2015-01-18 16:33 ` Paul Kocialkowski
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=1419425936.2269.7.camel@aldrin \
--to=contact@paulk.fr \
--cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.