Thread (19 messages) 19 messages, 5 authors, 2021-07-11

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

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: 2021-06-30 23:09:47
Also in: linux-amlogic

Hi Minas,

On Tue, Jun 29, 2021 at 6:30 PM Martin Blumenstingl
[off-list ref] wrote:
Hi Alan,

On Tue, Jun 29, 2021 at 6:18 PM Alan Stern [off-list ref] wrote:
[...]
quoted
quoted
quoted
        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
That does show pretty convincingly that runtime suspend is causing the
problem.  But I still have no idea why the problem affects some devices
and not others.  It's a mystery.
Maybe because there's two related problems (I am guessing here):
The first issue is that USB hotplug is not working at all on my
Odroid-C1+ (which means: dwc2 + GL852G USB hub).
The second issue is that the workaround we had before (running lsusb
-vv to make "hot plugged" devices show up) is not working for some USB
devices.

It seems that using a different workaround (usbcore.autosuspend=-1)
makes *all* USB devices show up - even without any "lsusb -vv" call.
So I think we should focus on the first issue as it may also fix the
other problem as well.
above paragraph sums up the issues which Matt and I are seeing (on
Odroid-C1+ and Odroid-C2) in case you didn't follow the full email
thread
[...]
quoted
quoted
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.
Maybe Minas can help.  He knows a lot more about dwc2 than I do (which
is practically nothing).
I'll wait for Minas then
I have attached the dwc2 debugfs output to this email as well as I
think that it'll be useful
unfortunately I could not attach the "regdump" because that hangs my
Odroid-C1+ (not sure but this seems like an unrelated issue?)

in params.c dwc2_set_amlogic_params is used to override a few hardware
parameters.
power_down is one of them (although Alan's comment suggests that it
may not be related) is overwritten there to
DWC2_POWER_DOWN_PARAM_NONE. When removing that overriding then the
value (probably as set by the designer) is
DWC2_POWER_DOWN_PARAM_PARTIAL.


Best regards,
Martin

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help