ODROID-C1/-C2 USB Detection only triggered by some devices

Martin Blumenstingl martin.blumenstingl at googlemail.com
Tue Jun 29 08:51:51 PDT 2021


Hi Alan,

Your help here is very much appreciated!

On Tue, Jun 29, 2021 at 5:05 PM Alan Stern <stern at rowland.harvard.edu> wrote:
[...]
> > The attached mon1.txt is the output I get
>
> Did you remove something from the beginning of this trace?  It starts
> with what appears to be the tail end of a resume sequence for the
> on-board Genesys Logic hub.  If you didn't remove anything then
> something is pretty wrong because the hub was apparently only
> partially suspended.
I have not removed anything from the output (at least not on purpose).
To verify I just re-tried and got a similar result

> Anyway, the trace says that when the lsusb command ran, the hub woke up
> and didn't see any connections on any of its ports.  This could be
> caused by a bug in the hub itself, a bug in the way the system handles
> the hub, or maybe a bug in the way it handles a PHY or other component
> external to the hub.
This reminds me of commit cc10ce0c51b13d ("usb: dwc2: disable
power_down on Amlogic devices") [0]
I checked and the code for this commit is still in mainline (so it was
not reverted - either on purpose or by accident).

[...]
> > In case it's relevant for your further analysis:
> > - Odroid-C1+ and Odroid-C2 both use the USB PHY driver from
> > drivers/phy/amlogic/phy-meson8b-usb2.c
> > - Odroid-C1+ and Odroid-C2 both use use the dwc2 driver (running in
> > host-only mode in this scenario. there's a second OTG capable dwc2
> > controller which is currently disabled in mainline Linux on both
> > devices)
> > - Odroid-C1+ and Odroid-C2 have a soldered down 4-port Genesys Logic USB hub
> > - Odroid-C1+ does not use any GPIO to control VBUS on usb1
>
> Since the problem may be related to runtime power management, you
> should try booting with the command line parameter
>
>         usbcore.autosuspend=-1
wow, this helps indeed
my steps are:
- power off my Odroid-C1+
- unplug all USB devices
- boot with usbcore.autosuspend=-1 in the kernel cmdline
- plugin my Corsair Voyager USB 3.0 flash drive (which was only
detected before if an additional USB 2.0 flash drive was plugged in
during boot)
-> without any lsusb magic the device was immediately recognized

> to disable default USB runtime suspends.  Also, check the contents of
> /sys/bus/usb/devices/1-2/power/autosuspend to make sure that runtime
> suspend really is disabled.  Does that make the problem go away?
with usbcore.autosuspend=-1 (after plugging in my Corsair Voyager):
# grep "" /sys/bus/usb/devices/*/power/autosuspend
/sys/bus/usb/devices/1-1.1/power/autosuspend:-1
/sys/bus/usb/devices/1-1/power/autosuspend:-1
/sys/bus/usb/devices/usb1/power/autosuspend:-1

after rebooting without usbcore.autosuspend=-1 (and no USB device
plugged in during boot):
# grep "" /sys/bus/usb/devices/*/power/autosuspend
/sys/bus/usb/devices/1-1/power/autosuspend:0
/sys/bus/usb/devices/usb1/power/autosuspend:0

I think the next step is narrowing down which component is causing this issue.

Interestingly my PC (running 5.12.13-arch1-2) also has two Genesys
Logic USB hubs with the same USB vendor and device IDs as my
Odroid-C1+: 05e3:0610.
These hubs are connected to my AMD Ryzen 5000 CPU or the B550 chipset:
usb1              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA]
(xhci-hcd 0000:02:00.0) hub
 1-3               05e3:0610 09 1IF  [USB 2.10,   480 Mbps, 100mA]
(GenesysLogic USB2.0 Hub) hub
[...]
 1-7               05e3:0610 09 1IF  [USB 2.00,   480 Mbps, 100mA]
(Genesys Logic, Inc. Hub) hub

So far I have not observed any problems on my PC.

This is the lsusb.py output on my Odroid-C1+:
usb1              1d6b:0002 09 1IF  [USB 2.00,   480 Mbps,   0mA]
(Linux 5.13.0-02058-g8452e2c291aa-dirty dwc2_hsotg DWC OTG Controller
c90c0000.usb) hub
 1-1               05e3:0610 09 1IF  [USB 2.00,   480 Mbps, 100mA]
(Genesys Logic, Inc. Hub) hub


Best regards,
Martin


[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/dwc2/params.c?id=cc10ce0c51b13d1566d0ec1dcb472fb86330b391



More information about the linux-amlogic mailing list