[PATCH 0/6] Improve USB Keyboard support for all rpi boards

Jason Wessel jason.wessel at windriver.com
Wed Jul 15 15:51:35 CEST 2020


Prior to this patch set, I had just a small number of USB keyboards
function properly with the Rasbpberry Pi boards.  Nearly every
composite USB keyboard/mouse I had access to including the Raritan
IP/KVM devices would not initialize properly.

At this point I have tested all generations of the Raspberry Pi boards
(0-4) and the USB keyboards I use day to day are working properly.

For the RPi4, I tested against the rpi-master branch which now has the
required USB patches, all the other boards were tested against the
master branch.

v1:
  - Testing completed against all generations of raspberry pi boards
  - check patch warnings add errors have been fixed

rfc v3:
  - Add in patch 6
  - Finally got the GearHead keyboard + mouse composite USB device working

rfc v2: 
  - Minor cleanups to patches 1-3 based on prior review
  - Patch 4 & 5 are new to fix various xhchi crashes
    while having additional devices plugged in along with
    booting off the usb port.  The nonblocking mode turned
    out to be somewhat complex.

rfc v1:

The original purpose of the patch set was to fix problems with the USB
keyboard support with the rpi4.  The generic xhci code lacks a non
blocking call to read an event.  This causes major problems for the
sleep function as well as for ethernet downloads where a keyboard poll
for interrupting the download blocks for 5 seconds.

----------------------------------------------------------------
Jason Wessel (6):
      xhci: Add polling support for USB keyboards
      usb_kbd: succeed even if no interrupt is pending
      common/usb.c: Work around keyboard reporting "USB device not accepting new address"
      xhci-ring.c: Add the poll_pend state to properly abort transactions
      xhci-ring: Fix crash when issuing "usb reset"
      usb.c: Add a retry in the usb_prepare_device()

 common/usb.c                 |  16 +++++++++++++---
 common/usb_kbd.c             |   4 +++-
 drivers/usb/host/xhci-ring.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
 drivers/usb/host/xhci.c      |  11 ++++++-----
 include/usb/xhci.h           |   5 +++--
 5 files changed, 121 insertions(+), 38 deletions(-)


More information about the U-Boot mailing list