From: Simon South <simon@simonsouth.net>
To: u-boot@lists.denx.de
Subject: Pinebook Pro keyboard (RK3399 OHCI)?
Date: Thu, 01 Oct 2020 10:56:44 -0400 [thread overview]
Message-ID: <87362y6llf.fsf@simonsouth.net> (raw)
In-Reply-To: <87zh8388d6.fsf@simonsouth.net> (Simon South's message of "Mon, 13 Jul 2020 16:31:33 -0400")
Simon South <simon@simonsouth.net> writes:
> Has anyone managed to get the built-in keyboard of the Pinebook Pro
> working with U-Boot?
>
> Even using the latest code, having USB started makes the U-boot
> console feel sluggish while pressing keys on the keyboard produces no
> result.
To follow up on this, for anyone looking into it in the future:
The issue is that the Pinebook Pro's keyboard firmware does not actually
implement the keyboard boot protocol (described in the USB HID
specification[1]). It also doesn't support retrieving input reports via
its control interface, meaning neither of the two mechanisms U-Boot
normally uses for polling keyboard data are functional.
The firmware does recognize the Set_Protocol request, and will even
store the supplied value in the controller's memory and return it in
response to Get_Protocol. But it doesn't actually change how the
keyboard operates.
As such, the keyboard continues to NAK every interrupt-transfer request
it sees (whenever the user isn't pressing a key), despite U-Boot
expecting it to return a report at least once each 40-millisecond
period. Consequently the submit_common_msg() routine in
drivers/usb/host/ohci-hcd.c is continually timing out waiting for a
response, and this slows down the U-Boot console considerably.
Arnaud Patard has pointed out setting the
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE configuration option seems to
improve the keyboard's responsiveness somewhat, and while this is true,
I suspect all this does is increase the likelihood U-Boot will happen to
be polling the keyboard at the same moment the user is pressing a
key. It doesn't address the underlying problem.
In fact, nothing seems likely to address this unless and until new
keyboard firmware is created for the Pinebook Pro. There has actually
been some progress in this area[2], but the complexity involved in using
an external programmer with the controller[3] (and the possibility of
bricking it without one) makes it risky for an end-user to experiment
with anything beyond very minor changes to the existing code.
[1] https://www.usb.org/document-library/device-class-definition-hid-111
[2] https://github.com/jackhumbert/pinebook-pro-keyboard-updater/tree/master/firmware
[3] https://electronics.stackexchange.com/a/277395
--
Simon South
simon at simonsouth.net
next prev parent reply other threads:[~2020-10-01 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 20:31 Pinebook Pro keyboard (RK3399 OHCI)? Simon South
2020-07-14 8:07 ` Peter Robinson
2020-07-14 10:48 ` Simon South
2020-07-14 10:53 ` Peter Robinson
2020-07-14 15:05 ` Arnaud Patard
2020-07-14 15:29 ` Simon South
2020-07-14 15:40 ` Peter Robinson
2020-07-14 16:04 ` Arnaud Patard
2020-07-14 17:18 ` Simon South
2020-10-01 14:56 ` Simon South [this message]
2020-10-02 8:07 ` Arnaud Patard
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=87362y6llf.fsf@simonsouth.net \
--to=simon@simonsouth.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox