Source: u-boot
Version: 2019.01+dfsg-7
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
keyboard is not detected.

The keyboard firmware pauses for 2 seconds to allow reflashing its
firmware, and U-Boot needs to wait equally long to detect it as a HID
device.  Issuing a "usb reset" works occationally, possibly because that
pulls the power triggering a reboot of the keyboard controller.

U-Boot offers KConfig setting CONFIG_INITIAL_USB_SCAN_DELAY which
apparently fails to work, seemingly because that adds a delay _before_
the USB hub is powered on which (pure guesswork) fails to work if the
keyboard draws its power from the USB hub.

A working solution is to set environment variable usb_pgood_delay before
initially calling "usb start": Seemingly that variable adds a delay
_after_ powering up the USB hub but before devices are probed.

U-Boot environment variables is set in include/configs/<yourboard>.h or
with KConfig settings CONFIG_USE_PREBOOT and CONFIG_PREBOOT.  Sunxi
devices share a common file include/configs/sunxi_common.h which
complicates setting env directly and also messes with preboot setting in
ways not overridable with KConfig.

The patch setting usb_pgood_delay therefore requires another patch to
allow overriding preboot.

A working patchset is pushed to git branch wip-teres-i-keyboard:
https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard

I have tested the patchset only on the Teres-I device, where keyboard is
succesfully detected 5 times in a row power-cycling in-between.

I have also tested that the preboot patch applied alone causes no change
to preboot config value.

This patchset is not in mainline U-Boot, but I intent to propose it.

 - Jonas

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAl1ZP+AACgkQLHwxRsGg
ASHTYhAAiygm195o4LU4o8hH5gaoQpbeYmYQdudxU5LCbSrkE/ZoHO7DImOwfWX/
e1OPLTIcMVTQA5KcGX/I378uvh5mQzhdmaEHRRne2sggRqTLncQ8uVh6YKHyw974
Hdej57lZsQkjVR214Y/Qjgfidn6Vi8KHHNSBtxej7xaks0ASta2Y/o2+ufZDY7Om
YPEgjp3Ve0lwbUobK+wXUw4Sb/EWQADQtof+3ie2ESiKwEKUtHIwvHGByvdEMWH/
8ST3Wu0roi161OPN46IaGlRuL0xI3LdlRWbq3bZuUH8XEb4rPDJz0TdPs79swct2
z141SgvdRsW+5SlAKBzK4GZbOn3gj1UXKlCXrOHcMLipN1oyPnoTZ5c99sggzUdn
L3rXFbBvnUn3zP50WJQzvlKi3Xs3OxOfFtIq9E/I5fmp6PC3/y1YZkBDoW2PJ4Hq
1DCJQIKe5txzGGrloI7oMVeryVfo9Yecv79jLYAcAk9ZqwrXXOdpdUWvrG6vAHgY
uELkgiZbeNfz3jDXSrr0Jqa3M4aA7g1fRCc0CpD5+vhNuQZQkAt5Etj2pkos9DMA
JqDlEpR5WW9a+knrCwG5Zq/dTGNbZiM7k3LkrsSBqV5tMxZGN16ICG4I5m+2fxVy
tZDwWFbMcijuWxXUyDqKBJNBcRLHue2Ns2DtP0r8jq4IDS5bHo8=
=pDyY
-----END PGP SIGNATURE-----

Reply via email to