[PATCH 2/6] usb: xhci: Set up endpoints for the first 2 interfaces
Mark Kettenis
mark.kettenis at xs4all.nl
Mon Feb 26 21:42:36 CET 2024
> Date: Sun, 25 Feb 2024 22:47:41 +0100
> From: Marek Vasut <marex at denx.de>
>
> On 2/25/24 4:28 PM, Janne Grunau wrote:
> >
> >
> > On Wed, Feb 21, 2024, at 13:39, Marek Vasut wrote:
> >> On 2/21/24 08:25, Janne Grunau via B4 Relay wrote:
> >>> From: Janne Grunau <j at jannau.net>
> >>>
> >>> Apple USB keyboards carry the HID keyboard boot protocol on the second
> >>> interface. Using the second interface in the USB keyboard driver does
> >>> not work since the xhci has not allocated a transfer ring.
> >>
> >> So, what does this patch do ? That is not clear from the commit message.
> >
> > rewritten for v2:
> > | usb: xhci: Set up endpoints for the first 2 interfaces
> > |
> > | The xhci driver currently only does the necessary initialization for
> > | endpoints found in the first interface descriptor. Apple USB keyboards
> > | (released 2021) use the second interface descriptor for the HID keyboard
> > | boot protocol. To allow USB drivers to use endpoints from other
> > | interface descriptors the xhci driver needs to ensure these endpoints
> > | are initialized as well.
> > | Use USB_MAX_ACTIVE_INTERFACES to control how many interface descriptors
> > | are initialized and useable. Currently defined to 2 as that is enough to
> > | make the Apple keyboard usable.
>
> Would it make sense to make this a tunable Kconfig option ?
Maybe, but it should probably be enabled everywhere where
CONFIG_USB_KEYBOARD as folks will connect their Apple keyboard to
non-Apple hardware as well. And I think someone mentioned on the
#asahi irc channel that there are othe keyboards that have the boot
protocol on the second interface descriptor.
Cheers,
Mark
More information about the U-Boot
mailing list