From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] DWC2 driver issues
Date: Mon, 02 Mar 2015 16:33:41 -0700 [thread overview]
Message-ID: <54F4F355.2050902@wwwdotorg.org> (raw)
In-Reply-To: <201503021242.14814.marex@denx.de>
On 03/02/2015 04:42 AM, Marek Vasut wrote:
> On Saturday, February 28, 2015 at 05:33:31 AM, Stephen Warren wrote:
>> On 02/19/2015 07:29 AM, Marek Vasut wrote:
>>> On Monday, February 16, 2015 at 07:28:45 PM, Stephen Warren wrote:
>>>> Following on from my Google+ post about DWC2/RPi USB host controller
>>>> issues in U-Boot.
>>
>> ...
>>
>>>> On an RPi with the DWC2 controller connected directly to a single
>>>> external USB connector (i.e model A, A+), a LS (and perhaps FS) device
>>>> pluged directly into the board doesn't work due to the small max packet
>>>> size limit.
>>>>
>>>> Your patch 9b1161af8c51 "usb: dwc2: Add support for multi-packet control
>>>> xfers" in u-boot-usb.git topic/dwc2 addresses this issue for control
>>>> transfers at least. With your patch, I can now enumerate a USB kbd on a
>>>> model A+. That's a great improvement; thanks for the quick response with
>>>> a patch.
>>>>
>>>> However, when I enable CONFIG_USB_KEYBOARD, I see errors when the USB
>>>>
>>>> keyboard input driver initializes:
>>>>> starting USB...
>>>>> USB0: Core Release: 2.80a
>>>>> scanning bus 0 for devices... 3 USB Device(s) found
>>>>>
>>>>> scanning usb for storage devices... 0 Storage Device(s) found
>>>>> scanning usb for ethernet devices... 0 Ethernet Device(s) found
>>>>>
>>>>> dev = 0df92ac0 pipe = 0x40408380 buf = 0db4a780 size = 8 int = 10
>>>>> Failed to get keyboard state from device 413c:2010
>>>>
>>>> I haven't investigated this further yet.
>>>
>>> Wow, this error is new, I have not seen this one on SoCFPGA.
>>
>> This error is because the keyboard driver uses interrupt transfers, and
>> these aren't implemented in DWC2.
>
> Uh, the debugging spit in submit_int_msg() should certainly be converted
> into something more human readable.
>
>> I worked around this by forcing the
>> keyboard driver to use control transfers, and fixing what I think is a
>> bug in this case; see patch below. With this, USB keyboard works on an
>> RPI A+
>
> Cool, good job.
>
>> although it hangs pretty quickly. I assume one of the busy loops
>> in dwc2.c without a time out isn't completing.
>
> Oh, dang. Those should certainly be fixed.
>
> Looking at the patch, could it be that CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
> support in usb_kbd.c is broken altogether ?
Well, once I applied that patch I did manage to type a few characters
into the U-Boot shell via usbkbd one of the two times I tested, so it's
not *completely* broken. It's still possible it's quite broken though,
given the hangs:-)
next prev parent reply other threads:[~2015-03-02 23:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 18:28 [U-Boot] DWC2 driver issues Stephen Warren
2015-02-19 14:29 ` Marek Vasut
2015-02-19 22:21 ` Dinh Nguyen
2015-02-20 3:22 ` Stephen Warren
2015-03-02 11:38 ` Marek Vasut
2015-03-02 14:04 ` Kishon Vijay Abraham I
2015-02-28 4:33 ` Stephen Warren
2015-03-02 11:42 ` Marek Vasut
2015-03-02 23:33 ` Stephen Warren [this message]
2015-03-05 20:59 ` Marek Vasut
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=54F4F355.2050902@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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.