1

I'm trying to enable USB 2.0 Host on an AST2500 based board. I'm using the latest obmc-phosphor-image from GitHub which contains Linux 5.10.30. EHCI seems to start in QEMU but fails on real HW. I enabled ehci0 (or ehci1) in the device tree, added the necessary drivers to Linux and I get the following error message during boot-up:

ehci-platform 1e6a1000.usb: USB 2.0, controller refused to start: -110

I investigated EHCI registers a bit and found that when ehci_run() function in ehci-hcd.c would start EHCI (by setting CMD_RUN bit) it remains halted, HCHalted bit in USBSTS register remains 1. I also saw that the frame index register starts to count when CMD_RUN is asserted. Clock and reset bits in SCU registers are set properly by pinctrl and clk drivers. Contents of the periodic list buffer and the asynchronous QH buffer seem to be OK. But EHCI still doesn't start. Strangely UHCI (USB 1.1 host) seems to work properly.

Did maybe somebody manage to get EHCI working on real AST2500 or similar hardware? Thanks for any advice.

bkardos
  • 11
  • 2
  • Update: I happen to have this board which also hosts AST2500: https://146a55aca6f00848c565-a7635525d40ac1c70300198708936b4e.ssl.cf1.rackcdn.com/images/abae5b679799253dbda0bff990b6ec400d3014c4.pdf – bkardos May 11 '21 at 12:31
  • AST2500 on this board boots Linux 3.14-17-AMI. During boot it displays: [ 1.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.040000] Initializing ASPEED-SoC USB Host Controller [ 1.070000] aspeed-ehci aspeed-ehci.1: ASPEED EHCI [ 1.070000] aspeed-ehci aspeed-ehci.1: new USB bus registered, assigned bus number 1 [ 1.080000] aspeed-ehci aspeed-ehci.1: irq 13, io mem 0x1e6a3000 [ 1.100000] aspeed-ehci aspeed-ehci.1: USB 2.0 started, EHCI 1.00 – bkardos May 11 '21 at 12:38
  • Did somebody meet this "aspeed-ehci" driver? – bkardos May 11 '21 at 12:39
  • Currently the compatible string is "aspeed,ast2500-ehci" https://github.com/AspeedTech-BMC/linux/blob/196c4235a56a0afe98fa5a5fa2a87751836dfb05/arch/arm/boot/dts/aspeed-g5.dtsi#L179 which corresponds to the driver https://github.com/openbmc/linux/blob/67c9407e1f03a3c40bd6101aa3db32fce5717a58/drivers/usb/host/ehci-platform.c#L299 – kostr22 Feb 13 '23 at 18:40

0 Answers0