Skip to content

RFC Improve USB Keyboard support for rpi3/rpi4

Jason Wessel u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest6 patches 0 repliesNew
  2. v2 RFC5 patches 0 repliesSuperseded
  3. v1 RFC3 patches 0 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xhci: Add polling support for USB keyboardsdrivers/usb/host/xhci-ring.c drivers/usb/host/xhci.c include/usb/xhci.h+26 -160 replies
2/6usb_kbd: Do not fail the keyboard if it does not have an interrupt pendingcommon/usb_kbd.c+3 -10 replies
3/6common/usb.c: Work around keyboard reporting "USB device not accepting new address"common/usb.c+5 -40 replies
4/6xhci-ring.c: Add the poll_pend state to properly abort transactionsdrivers/usb/host/xhci-ring.c+70 -160 replies
5/6xhci-ring: Fix crash when issuing "usb reset"drivers/usb/host/xhci-ring.c+12 -50 replies
6/6usb.c: Add a retry in the usb_prepare_device()common/usb.c+9 -00 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [RFC PATCH v3 0/6] Improve USB Keyboard support for rpi3/rpi4

At this point all the USB keyboards I had laying around now work and I can USB boot the rpi3 and rpi4, so perhaps this series can move beyond the RFC stage. More testing will occur over the next week or so.

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

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.

v1:

For testing this patch series, I did apply the USB patches for the rpi4 board which had not been merged yet. Once the rpi4 USB changes are eventually merged the keyboard delay issues will show up and I imagine this issue is already a problem for other boards. This series does not depend on rpi4 patches as the changes are in the core USB functions.

I performed tests with a number of usb modules attached including storage, ethernet, serial, wifi, keyboard, and
mouse without any issues.

----------------------------------------------------------------
Jason Wessel (6):
xhci: Add polling support for USB keyboards
usb_kbd: Do not fail the keyboard if it does not have an interrupt 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                 |  18 +++++++++---
 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, 122 insertions(+), 39 deletions(-)