
On 09/09/2019 18:03, Neil Armstrong wrote:
Hi Bin,
On 08/09/2019 14:35, Bin Meng wrote:
Hi Neil,
On Sun, Sep 8, 2019 at 8:33 PM Neil Armstrong narmstrong@baylibre.com wrote:
Hi Bin,
Le 07/09/2019 à 05:44, Bin Meng a écrit :
Hi Neil,
On Thu, Sep 5, 2019 at 11:48 PM Neil Armstrong narmstrong@baylibre.com wrote:
Hi Bin,
I've been having the same behavior on the Amlogic S905X SoC with a DWC3 XHCI controller connected to 2 HS-only PHYs and no SS PHY.
When a device is connected on the second PHY, I have the same BUG(), but no more when a device is also connected on the first PHY, and no issues at all on the first PHY.
XHCI timeout on event type 33... cannot recover.
What kind of debug output would you need to debug this ?
=> When Port 1 is disconnected, but Port 2 is populated: usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0 clear port connect change, actual port 2 status = 0x6e1 ... usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0 ... usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 SPEED = FULLSPEED ... usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0 ... usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 SPEED = FULLSPEED ... usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0 clear port reset change, actual port 2 status = 0x603
=> When Port 1 is populated: usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0 clear port connect change, actual port 2 status = 0x6e1 ... usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0 ... usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 SPEED = FULLSPEED ... usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0 ... usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4 SPEED = HIGHSPEED ... usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0 clear port reset change, actual port 2 status = 0xe03
When Port 1 is populated, Port 2 status correctly switches to HIGHSPEED, but why ?
This looks really strange. Sounds like a hardware internal state depends on the first USB port. Do you know if Linux works?
Yes, Linux works fine, is it worth tracing the Linux XHCI driver aswell ?
Yes, that will definitely help.
I did a extensive debug and print session today agains the amlogic u-boot release and Linux,
and only : clrbits_le32(&dwc3_reg->g_usb2phycfg, DWC3_GUSB2PHYCFG_SUSPHY);
was missing in drivers/usb/host/xhci-dwc3.c
because xhci-dwc3 is not using the dwc3 core init.
it should use the dwc3 core init instead of a copy, that correctly handles the quirks.
I posted today the v4 of a series that uses the DWC3 core for host operations.
Can you give it try? The goal is ultimately to be able to replace platform-specific dwc3 host implementation.
JJ
Neil
Regards, Bin