New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.18.y - dwc2 module inactive #4992
Comments
The bleeding edge kernels (anything newer than stable 5.15, but especially the latest -rc version is for testing rather than for use in a stable system. But there are always regressions in a new kernel. Either bugs from upstream, or changes to how modules are configured (that perhaps need new A quick check doesn't look like any changes in
I'd suggest you stick with a more stable kernel if this is important to you. |
Thanks, I asked at the mailing list https://marc.info/?l=linux-usb&m=164984983207760&w=2 , I believe it will be resolved fast. |
Hi Pavel, |
A bit of troubleshooting identified the culprit. File arch/arm64/configs/bcm2711_defconfig added by RPi in commit e0ad0c0 to branch rpi-5.17.y (and to branch rpi-5.16.y and previous...) contains option
However, the equivalent commit 4845771 pushed to branch rpi-5.18.y does not have this config set. As a result the option does not get transferred to .config when running the command as described in https://www.raspberrypi.com/documentation/computers/linux_kernel.html#64-bit-configs Therefore the raspberrypi-power driver does not get built into the kernel image, causing the status of the soc:power supplier in the dwc2 module as DL_STATE_DORMANT instead of DL_STATE_AVAILABLE, leading to the deferred status of the driver upon probing. Setting this option in .config resolved the issue, the dwc2 gadget works OK now. popcornmix - please can you fix the issue? Both arch/arm/configs/bcm2711_defconfig and arch/arm64/configs/bcm2711_defconfig lack this config in 5.18.y. Thanks a lot. |
I can confirm that this fix works on RPi Zero 2 W |
@pavhofman thanks for tracking that down. I've added |
@pavhofman is this issue resolved for you now? Okay to close? |
Yes please. |
I am experiencing an issue on the Raspberry Pi 4 that sounds similar to this - I am trying to emulate a HID keyboard with the Pi, and this was working before I upgraded to "Bullseye". Now nothing is reported in dmesg when I plug an Android pixel 6a into the PI, whereas before the upgrade it worked. How can I confirm if the dwc2 module is not in the correct power state? |
If your .config contains CONFIG_RASPBERRYPI_POWER=y, the cause is most likely something else. |
I didn’t build the kernel, I just used rpi-update. |
@carylewis Could you please tell the kernel version before and after the update? |
The corresponding kernel config for a kernel is typically copied to /boot/ by debian kernel packages. You can grep that text file. |
Run the following commands on the updated kernel and report the output:
|
Thanks for you help, it appears as though the power setting is correct:
I don't know what changed but at one point the key mime pi project worked and now it doesn't. I get this error:
I will reflash to buster and see if I can get it working again. |
Describe the bug
I am trying to test the dwc2 in gadget mode on the latest 5.18.y branch, in order to test the latest usb gadget patches submitted to mainline 5.18. Loading the dwc2 module does not produce any log in dmesg, neither any feXXXXX entry gets created in /sys/kernel/debug/usb/. My compiled version includes the latest patches pushed to https://github.com/raspberrypi/linux/blob/rpi-5.18.y/arch/arm/boot/dts/overlays/dwc2-overlay.dts.
5.17 with basically identical .config (by RPi) loads dwc2 OK, working OK too.
Please is the 5.18.y branch already capable of testing, or should I wait for more rpi-specific patches to be pushed to make dwc2 work?
Thanks a lot.
Pavel.
Steps to reproduce the behaviour
modprobe dwc2
root@raspberrypi:/sys/kernel/debug/usb# ls
devices xhci
Device (s)
Raspberry Pi 4 Mod. B
System
root@raspberrypi:/sys/kernel/debug/usb# cat /etc/rpi-issue
Raspberry Pi reference 2021-10-30
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, c12b1df4ed6416fb0df33ba1731c5b13c1bdbdf8, stage4
root@raspberrypi:/sys/kernel/debug/usb# vcgencmd version
Oct 29 2021 10:47:33
Copyright (c) 2012 Broadcom
version b8a114e5a9877e91ca8f26d1a5ce904b2ad3cf13 (clean) (release) (start)
root@raspberrypi:/sys/kernel/debug/usb# uname -a
Linux raspberrypi 5.18.0-rc2-v8+ #2 SMP PREEMPT Wed Apr 13 05:52:51 UTC 2022 aarch64 GNU/Linux
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: