Need help with u-boot problem with usb-keyboard / kvm switch
Subsystems (2)
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
As part of this I want to also add support for usb keyboards, so as to get a full console without needing to solder wires to testpoints on some boards :)
So when I plug in the usb coming from my kvm I get this:
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
And the usb keyboard does not work.
If I plug in a single usb-2 hub (no ohci support for sunxi in u-boot yet), then things do work, but after a few minutes of inactivity the usb code starts spamming the console with:
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
...
Could this be a problem with the phy settings (iow a sunxi specific problem)?
When using the kvm on my pc, the tree structure looks like this:
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 4: Dev 9, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 1: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 1: Dev 10, If 2, Class=Human Interface Device, Driver=usbhid, 12M
Hmm, after a bit longer I also get these errors:
ERROR: v7_dcache_inval_range - start address is not aligned - 0xe59ff014
Could the problem be that the usb code is feeding unaligned buffers to the ehci controller ?
Regards,
Hans
Quoted 4 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
?
Luc Verhaegen.
Hi Hans,
Quoted 23 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
As part of this I want to also add support for usb keyboards, so as to get a full console without needing to solder wires to testpoints on some boards :)
So when I plug in the usb coming from my kvm I get this:
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) foundAnd the usb keyboard does not work.
If I plug in a single usb-2 hub (no ohci support for sunxi in u-boot yet), then things do work, but after a few minutes of inactivity the usb code starts spamming the console with:
Quoted 7 lines
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
...Could this be a problem with the phy settings (iow a sunxi specific problem)?
Probably not.
We've seen the same thing on SABRE Lite and Nitrogen6X boards.
U-Boot > usb start ; setenv stdin serial,usbkbd
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
6 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found
Timeout poll on interrupt endpoint
Failed to get keyboard state from device 1c4f:0002
U-Boot > usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 100mA)
Generic Mass Storage 4A3709D5
3 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-4 Hub (480 Mb/s, 2mA)
|
+-5 Human Interface (1.5 Mb/s, 100mA)
| Logitech USB Optical Mouse
|
+-6 Hub (480 Mb/s, 100mA)
| | USB 2.0 Hub
| |
| +-7 Human Interface (1.5 Mb/s, 98mA)
| USB USB Keykoard
|
+-8 (12 Mb/s, 100mA)Oddly, the issue seems to be specific to **some** USB keyboards.
We have some (mostly older) USB keyboards that just work and have had investigation on our to-do list for quite some time now.
I was going to start with a question to the list:
Is anyone else using USB keyboard support?
USB mass storage seems to be pretty reliable. We have folks using it as an alternate boot for emergency situations.
Regards,
Eric
Quoted 7 lines · Luc Verhaegen
Quoted 4 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
?
Your email is missing it's contents, is that at typo ?
Best regards,
Marek Vasut
Quoted 31 lines · Eric Nelson
Hi Hans,
Quoted 28 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
As part of this I want to also add support for usb keyboards, so as to get a full console without needing to solder wires to testpoints on some boards :)
So when I plug in the usb coming from my kvm I get this:
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80 3 USB Device(s) foundscanning usb for storage devices... 0 Storage Device(s) found
And the usb keyboard does not work.
If I plug in a single usb-2 hub (no ohci support for sunxi in u-boot yet), then things do work, but after a few minutes of inactivity the usb code starts spamming the console with:
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
...
Quoted 6 lines
Quoted 2 lines
Could this be a problem with the phy settings (iow a sunxi specific problem)?
Probably not.
We've seen the same thing on SABRE Lite and Nitrogen6X boards.
I agree, this happens. Which controller and driver do you use on the Sunxi hardware?
btw you can check if this is a cache issue by disabling dcache (set CONFIG_CMD_CACHE in the config and use 'dcache off' before 'usb start'). You can also patch the arch/arm/lib/cache-cp15.c functions to do additional alignment checks (always a good idea) , just like I did that in arch/arm/cpu/arm926ejs/cache.c
Best regards,
Marek Vasut
Hi,
Quoted 7 lines · Luc Verhaegen
Quoted 4 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
?
Cleaning up may not have been the best choice of words, I was talking about the rebase on top of upstream u-boot + the various fixes you already know about.
I plan to submit a patch-set to the kernel for the clock resource stuff for simplefb to the proper lists for that discussion soon, and assuming that gets accepted I would like to land the hdmi support in upstream u-boot soon.
Regards,
Hans
Quoted 10 lines · Hans de Goede
Hi,
Cleaning up may not have been the best choice of words, I was talking about the rebase on top of upstream u-boot + the various fixes you already know about.
I plan to submit a patch-set to the kernel for the clock resource stuff for simplefb to the proper lists for that discussion soon, and assuming that gets accepted I would like to land the hdmi support in upstream u-boot soon.
Ok, thanks for getting me up to date on this.
As for simplefb, i had given up on that, and wanted to cough up an alternate driver that simply wouldn't be called that. But as usual, i am all over the place. So let's see how the simplefb route goes. Good luck.
Thanks,
Luc Verhaegen.
Hi All,
Quoted 77 lines · Eric Nelson
Hi Hans,
Quoted 23 lines · Hans de Goede
Hi Marek, et al,
I'm working on cleaning up Luc's hdmi out support patchset for sunxi.
As part of this I want to also add support for usb keyboards, so as to get a full console without needing to solder wires to testpoints on some boards :)
So when I plug in the usb coming from my kvm I get this:
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) foundAnd the usb keyboard does not work.
If I plug in a single usb-2 hub (no ohci support for sunxi in u-boot yet), then things do work, but after a few minutes of inactivity the usb code starts spamming the console with:
Quoted 7 lines
EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
...Could this be a problem with the phy settings (iow a sunxi specific problem)?
Probably not.
We've seen the same thing on SABRE Lite and Nitrogen6X boards.
U-Boot > usb start ; setenv stdin serial,usbkbd
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 EHCI timed out on TD - token=0x80008c80
EHCI timed out on TD - token=0x80008c80
6 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found
Timeout poll on interrupt endpoint
Failed to get keyboard state from device 1c4f:0002
U-Boot > usb tree
USB device tree:1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Mass Storage (480 Mb/s, 100mA) Generic Mass Storage 4A3709D5 3 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-4 Hub (480 Mb/s, 2mA) | +-5 Human Interface (1.5 Mb/s, 100mA) | Logitech USB Optical Mouse | +-6 Hub (480 Mb/s, 100mA) | | USB 2.0 Hub | | | +-7 Human Interface (1.5 Mb/s, 98mA) | USB USB Keykoard | +-8 (12 Mb/s, 100mA)Oddly, the issue seems to be specific to **some** USB keyboards.
Quoted 7 lines
We have some (mostly older) USB keyboards that just work and have had investigation on our to-do list for quite some time now.
I was going to start with a question to the list:
Is anyone else using USB keyboard support?
I use the USB keyboard with following hack patch (which based on v2013.04), then it works well on my side.
--->8---
drivers/usb/host/ohci-hcd.c +0 -0
@@ -515,6 +515,7 @@ static inline int sohci_return_job(struct ohci *hc,
urb_priv_t *urb)
ohci_readl(®s->intrdisable); /* PCI posting
flush */
}
urb->actual_length = 0;
+#if 0
td_submit_job(
urb->dev,
urb->pipe,
@@ -523,6 +524,8 @@ static inline int sohci_return_job(struct ohci *hc,
urb_priv_t *urb)
NULL,
urb,
urb->interval);
+#endif
+ urb_free_priv(urb);
break;
case PIPE_CONTROL:
case PIPE_BULK:---8<---
Quoted 8 lines
USB mass storage seems to be pretty reliable. We have folks using it as an alternate boot for emergency situations.
Regards,
Eric
Best Regards,
Bo Shen