-
-
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
Disable CM5's RTC to make Yellow's on-board RTC the primary one #3706
Conversation
With both RTCs enabled, the rpi_rtc is probed as the first one, making the on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.
📝 WalkthroughWalkthroughThe changes involve a patch to the device tree source file for the Raspberry Pi Compute Module 5 (CM5) specific to the Yellow board. The modification disables the Real-Time Clock (RTC) associated with the Raspberry Pi by adding a status property set to "disabled" in the device tree. This adjustment is necessary because the Yellow board uses its own I2C RTC and lacks the capability to power the RTC peripheral on the CM5. Changes
Sequence Diagram(s)sequenceDiagram
participant YellowBoard
participant CM5
participant RTC
YellowBoard->>CM5: Request RTC status
CM5->>RTC: Check power capability
RTC-->>CM5: No power available
CM5-->>YellowBoard: RTC disabled
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)buildroot-external/board/raspberrypi/yellow/patches/linux/0020-ARM-dts-bcm2712-yellow-Disable-rpi_rtc.patch (2)
The commit message clearly explains the rationale for disabling the RTC - Yellow has its own I2C RTC and CM5's RTC cannot be powered. The patch is properly signed-off.
The changes correctly disable the CM5's RTC:
Let's verify there are no other RTC-related configurations that might need adjustment: ✅ Verification successfulLGTM - RTC configuration is correct and consistent The changes are verified to be correct:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any other RTC-related configurations in DTS files
rg -t dts "rpi_rtc|rtc@|compatible.*rtc" arch/arm64/boot/dts/
Length of output: 91 Script: #!/bin/bash
# Search for RTC configurations in all files (not limiting to .dts extension)
rg "rpi_rtc|rtc@|compatible.*rtc" buildroot-external/board/raspberrypi/
Length of output: 641 Script: #!/bin/bash
# Let's examine the content of these RTC-related patches to understand the full context
for file in buildroot-external/board/raspberrypi/yellow/patches/linux/0{008,016,020}-*.patch; do
echo "=== $file ==="
cat "$file"
echo -e "\n\n"
done
Length of output: 27497 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 (
|
With both RTCs enabled, the rpi_rtc is probed as the first one, making the on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.
With both RTCs enabled, the rpi_rtc is probed as the first one, making the on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on Yellow, as the VBAT pin is not connected, disable it completely to fix RTC. (cherry picked from commit 9d643ed)
With both RTCs enabled, the rpi_rtc is probed as the first one, making the on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.
Summary by CodeRabbit
New Features
Bug Fixes