Uboot RPI2 can get USB to scan, but doesn't see keyboard

Karl Denninger karl at denninger.net
Fri Jul 15 18:37:35 UTC 2016


On 7/15/2016 13:29, Ian Lepore wrote:
> On Fri, 2016-07-15 at 13:23 -0500, Karl Denninger wrote:
>> I have successfully patched the u-boot code to obtain a USB scan
>> during
>> pre-boot (so in theory a USB keyboard would work during u-boot time
>> on
>> the Pi) but it appears that something is missing in that either the
>> usb
>> keyboard never attaches (despite being declared as a legitimate input
>> source in stdin) or it is not being picked up in the first place.
>>
>> I'm not sure which is the case and the uboot output doesn't make
>> clear
>> which is the case -- has anyone else worked on this?  From what I can
>> discern it *does* work with Linux distributions, so it has to be
>> something in our config file for u-boot and not an inherently
>> impossibility with u-boot on this platform.
>>
> u-boot on rpi has long been able to handle full speed and high speed
> devices (not sure what you would have patch, since this has always
> worked), but not low speed devices such as a keyboard.  It may be that
> mainline u-boot has finally gotten that bug fixed (a fix was said to be
> in testing when I checked a few months ago).  If so, we need to update
> our u-boot ports for rpi.
>
> -- Ian
Our config file for the 2015-04 port did not specify "usb start" in the
preboot stanza so the USB subsystem was never probed by default.  You
could turn it on via the serial console (if you had one) but not having
it there in the first place leads to a chicken-and-egg problem.  It also
appeared that reading the uEnv.txt file is not enabled so there was no
way to 'stuff' that command in (even once) for a system without a serial
console.

The lack of low-speed may be why although the usb probes the keyboard
doesn't attach.

The git repo specifically references the following though for the Pi in
the defaults file

158
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l158>
/* Environment */
159
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l159>
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
160
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l160>
#define ENV_DEVICE_SETTINGS \
161
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l161>
        "stdin=serial,usbkbd\0" \
162
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l162>
        "stdout=serial,lcd\0" \
163
<http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/rpi.h;h=dbbb81efa99f527b2617e0f5c33a2c8ecee5ac38;hb=HEAD#l163>
        "stderr=serial,lcd\0"

And in addition it ALSO specifies "usb start" in the default preboot stanza.

That STRONGLY implies that the code has been fixed and a USB keyboard
will work.

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160715/0217ef4a/attachment.bin>


More information about the freebsd-arm mailing list