-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
xHCI reset timeout during s2idle resume of Raspberry Pi 4 B #1931
Comments
Important note: this issue is only reproducible with Raspberry Pi 4 boards without EEPROM for the VL805 firmware. The newer boards which have a EEPROM for the VL805 firmware are not affected by this issue:
|
You've got that backwards:
So it sounds like it is actually the newer boards that suffer from this issue. If memory serves, on boards without a separate EEPROM chip for the VL805 firmware, the VPU firmware running on the SoC (BCM2711) is responsible for sending the firmware to the VL805, so I'm guessing that after an xHCI reset the VL805 needs its firmware reloading. Which seems to be confimed by https://forums.raspberrypi.com/viewtopic.php?t=375483#p2246599 and https://forums.raspberrypi.com/viewtopic.php?t=317494#p1900532. I suspect you need to make the mailbox call timg236 mentions in https://forums.raspberrypi.com/viewtopic.php?t=375483#p2246599. I think I've found the driver that does this at https://github.com/raspberrypi/linux/blob/rpi-6.6.y/drivers/reset/reset-raspberrypi.c. |
@andrum993 Thanks you for the feedback. My problem is that most of my Raspberry Pi 4 boards are prototype boards. All i can say is that the affected PCB (bad case) hasn't a EEPROM (8 pins) assembled near the VL805 and the good case PCB has a EEPROM assembled. You are correct regarding the VL805 firmware reloading process that the VPU is responsible and the reset-raspberrypi driver triggers this process. As you can see from the traces above the necessary mailbox call is successfully send in both cases (bad and good case):
I assume the call doesn't confirm that the VL805 firmware is actually uploaded, because of the sleeps in the reset driver. I tried to increase the sleep in reset-raspberrypi but it doesn't help. So that's the reason, why i asked how can i figure out that the VL805 firmware is actually loaded? |
I found this helpful comment by @timg236 Before s2idle (bad case):
After s2idle (bad case):
So it seems to me the VL805 firmware is not loaded. |
Why do you need this to work on old prototype boards? I suggest you test each of the production board variants and if it works on those, then there isn't a problem. |
Sorry, i spend now a lot of my spare time to upstream s2idle for Raspberry Pi boards since July 2024. The test feedback so far was very little and believe me as an ex kernel maintainer these weren't trivial issues. I tested it with 4 Raspberry Pi 4 and 3 of them showed this issue. So why should i buy a new one, while it's very likely to be a software issue? |
I don't believe the VL805 chip ROM supports a firmware reload interface - at a minimum you'd have to do a PCIe fundamental reset, I don't know if that's guaranteed to fully reset the VL805 though. Running the VL805 w/o flash is not well supported by VIA so I'm not hopefully about this. |
@timg236 Thanks for the hint. The DT binding / pcie driver defines possible 4 different types of reset (perst, rescal, bridge, swinit) and 3 regulators (vpcie3v3, vpcie3v3aux, vpcie12v), but none of them are defined in the RPi 4 DT. Does this really represent the actual hardware? I've seen in the CM4 datasheet there is a pin PCIe_nRST. Is this pin connected to the VL805 in case of RPi 4? |
Is this the right place for my bug report?
It seems related to the VL805 firmware, so i'm not sure.
Describe the bug
I'm doing some s2idle tests with the Raspberry Pi 4B. It seems to work except of xHCI (VIA VL805), which timeouts after xHCI reset command during the resume phase. Here is the kernel log with some additional log messages:
How can i figure out that the VL805 firmware is really functional after
raspberrypi-reset soc:firmware:reset: Notify xHCI reset
?Is it possible that HCD stop cause this issue?
To reproduce
Expected behaviour
xHCI reset command is successful like during driver probe
Actual behaviour
xHCI reset timeouts during resume, Heartbeat LED is blocked during this timeout
System
Raspberry Pi 4 Model B (without EEPROM for VL805)
vcgencmd version
)?2024-09-13T15:58:42
uname -a
)?Mainline kernel Linux 6.12 ( see https://github.com/lategoodbye/linux-dev/commits/v6.12-pm_v2/ )
VL805 firmware:
000138a1
The text was updated successfully, but these errors were encountered: