-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Reduce time of mmc0 interface random hangs on Yellow+CM5 boot #3700
Conversation
For yet unknown root cause, the eMMC interface sometimes fails to initialize properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a better patch is found.
📝 WalkthroughWalkthroughThe changes involve a patch to the device tree source file for the Broadcom BCM2712 Raspberry Pi Compute Module 5 (CM5). The patch disables SD and SDIO modes on the eMMC interface to mitigate performance issues related to command delays caused by an improperly initialized eMMC card. This modification is intended to significantly reduce the total reset time associated with the eMMC initialization process. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant System
participant eMMC
User->>System: Initialize eMMC
System->>eMMC: Send commands
eMMC-->>System: Respond with delays (up to 10 seconds)
System->>User: Report long reset time (over 130 seconds)
Note over System: Apply patch to disable SD/SDIO modes
User->>System: Reinitialize eMMC
System->>eMMC: Send commands
eMMC-->>System: Respond with reduced delays
System->>User: Report improved reset time (reduced by 100 seconds)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
buildroot-external/board/raspberrypi/yellow/patches/linux/0018-ARM-dts-bcm2712-yellow-Disable-SD-SDIO-modes-on-eMMC.patch (2)
10-18
: Enhance commit message with additional detailsWhile the commit message effectively explains the immediate problem and solution, consider adding:
- Whether this is intended as a temporary or permanent solution
- Any potential limitations or side effects of disabling these modes
- Reference to any tracking issue for the root cause investigation
If the eMMC card is not initialized properly (probably a side-effect of its usage in U-Boot), every command sent to it takes over 10 seconds before timeout. With SD and SDIO modes not disabled in the device tree, it takes up over 130 seconds before the card is reset. Disabling these two modes reduces this by 100 seconds. -While this is added as a partial workaround for the issue, disabling these mode -should make no harm anyway. +This is added as a temporary workaround while the root cause in U-Boot +initialization is being investigated (see issue #XXXX). Disabling these modes +is safe as the Yellow board only uses this interface in eMMC mode, and the +hardware configuration doesn't support SD/SDIO operation on this interface.
1-44
: Consider long-term solution and documentationWhile this workaround effectively reduces boot delays, consider:
- Documenting this change in the board's README or documentation
- Creating a tracking issue for investigating the root cause in U-Boot
- Adding a comment in U-Boot configuration about this DTS workaround
This will help maintain context for future debugging and ensure the root cause isn't forgotten.
Would you like me to help create:
- Documentation updates explaining this change?
- A GitHub issue tracking the U-Boot investigation?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
buildroot-external/board/raspberrypi/yellow/patches/linux/0018-ARM-dts-bcm2712-yellow-Disable-SD-SDIO-modes-on-eMMC.patch
(1 hunks)
🔇 Additional comments (2)
buildroot-external/board/raspberrypi/yellow/patches/linux/0018-ARM-dts-bcm2712-yellow-Disable-SD-SDIO-modes-on-eMMC.patch (2)
32-36
: LGTM: Clear and descriptive comment
The comment effectively explains the purpose and safety of this change.
37-40
: Verify driver support for these properties
The implementation looks correct, but let's verify:
- That sdio1 is indeed the eMMC interface
- That the driver supports these properties
✅ Verification successful
Properties are valid for this hardware configuration
Looking at the device tree patches and context:
sdio1
is indeed the eMMC interface, confirmed by the device tree showing it supports eMMC-specific modes likemmc-hs400-1_8v
- The
no-sd
andno-sdio
properties are being used to explicitly disable SD and SDIO modes on this interface, which is appropriate since it's dedicated for eMMC use - This is consistent with the hardware configuration where sdio1 is connected to eMMC
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the DTS configuration and driver support
# Check if sdio1 is referenced elsewhere in DTS files
rg -A 5 "sdio1" arch/arm64/boot/dts/broadcom/
# Verify driver support for these properties
rg -A 5 "no-sd|no-sdio" drivers/mmc/
Length of output: 207
Script:
#!/bin/bash
# Let's search in the patch directory and the entire codebase for these properties
# First, let's find all DTS files in the repository
fd -e dts
# Then search for sdio1 references
rg "sdio1"
# And search for these properties in the codebase
rg "no-sd|no-sdio"
Length of output: 1063
Script:
#!/bin/bash
# Let's look at the related patches to understand the context better
cat buildroot-external/board/raspberrypi/yellow/patches/linux/0016-ARM-dts-bcm2712-Add-device-tree-for-CM5-on-HA-Yellow.patch
# Also check the sync patch
cat buildroot-external/board/raspberrypi/yellow/patches/linux/0017-ARM-dts-bcm2712-yellow-Sync-sdio1-and-sd_io_1v8_reg-.patch
# Search for MMC driver properties in general
rg "\.compatible.*=.*\"brcm,bcm.*-sdhci\"" -A 5
Length of output: 25999
For yet unknown root cause, the eMMC interface sometimes fails to initialize properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a better patch is found. (cherry picked from commit 489de0b)
For yet unknown root cause, the eMMC interface sometimes fails to initialize properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a better patch is found.
Summary by CodeRabbit
New Features
Bug Fixes