Fix DSI display functionality on RPi5
Description
Fix Raspberry Pi 5 DSI functionality.
Context:
A display connected to the DSI connector of Raspberry Pi 5 does not work. Dmesg reveals the following information:
[ 13.283052] mipi-dsi 1f00118000.dsi.0: deferred probe pending: mipi-dsi: supplier 2.reg_bridge not ready [ 13.283060] platform 1.panel_disp: deferred probe pending: platform: wait for supplier /axi/pcie@120000/rp1/i2c@88000/reg_display@45
The problem could be traced back to a missing I2C Driver. See: https://forum.armbian.com/topic/50963-dsi-display-does-not-work-on-raspberry-pi-5/
Documentation summary for feature / change
Add module to kernel configuration: CONFIG_I2C_DESIGNWARE_CORE
How Has This Been Tested?
Local build of armbian bookworm minimal and test if DSI display works
- [OK] kernel linux-bcm2711-current
- [fail] kernel linux-bcm2711-edge
- [fail] kernel linux-bcm2711-legacy
Both edge and legacy images failed to build, but the failure seems unrelated to the change.
Checklist:
Please delete options that are not relevant.
- [not applicable] My code follows the style guidelines of this project
- [OK] I have performed a self-review of my own code
- [not applicable] I have commented my code, particularly in hard-to-understand areas
- [OK] My changes generate no new warnings
- [not applicable] Any dependent changes have been merged and published in downstream modules
Walkthrough
The changes add support for the DesignWare I2C core driver as a loadable module (CONFIG_I2C_DESIGNWARE_CORE=m) and enable I2C slave mode support (CONFIG_I2C_SLAVE=y) along with the DesignWare I2C slave driver (CONFIG_I2C_DESIGNWARE_SLAVE=y) as built-in in three bcm2711 platform kernel configuration files. No existing configuration options were removed or altered.
Suggested labels
ready to merge
Suggested reviewers
- EvilOlaf
- igorpecovnik
๐ Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
๐ฅ Commits
Reviewing files that changed from the base of the PR and between a093e35cd1f6b496ee872c770cb2c4d3534a1cb4 and 7c83b391617c38afe8ac82b91b5404bc65ea9c03.
๐ Files selected for processing (1)
-
config/kernel/linux-bcm2711-legacy.config(1 hunks)
๐ง Files skipped from review as they are similar to previous changes (1)
- config/kernel/linux-bcm2711-legacy.config
โจ Finishing Touches
๐งช Generate Unit Tests
- [ ] Create PR with Unit Tests
- [ ] Commit Unit Tests in branch
main - [ ] Post Copyable Unit Tests in Comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
๐ชง Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Explain this complex logic. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai explain this code block. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read src/utils.ts and explain its main purpose. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
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)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR. -
@coderabbitai auto-generate unit teststo generate unit tests for this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Providing logs for failed builds would be neat...
Providing logs for failed builds would be neat...
Here are the logs of the edge kernel build: log-build-f989a1c2-5029-47fe-948c-5bd0d60e195d.log
Unfortunately, the logs of the legacy kernel build are lost. I will re-try the build and post the logs on monday.
Please use either SHARE_LOG=yes or one of the curl commands provided at the end of each build run to upload logs manually to a random paste server. They'll include highlighting for those and make it overall easier to read them.
Seems like the build failure is unrelated to the suggested change but for some reason apt update failed within chroot:
--> (10430) COMMAND: DEBIAN_FRONTEND=noninteractive apt-get -y -q -o Dpkg::Use-Pty=0 -o APT::Get::List-Cleanup=0 update
-->--> command failed with error code 100 after 9 seconds
--> (10439) WARNING: stacktrace for failed command [ exit code 100:chroot /home/carsten/Workspace/armbian/build/.tmp/rootfs-f989a1c2-5029-47fe-948c-5bd0d60e195d /usr/bin/env bash -e -o pipefail -c DEBIAN_FRONTEND=noninteractive apt-get -y -q -o Dpkg::Use-Pty=0 -o APT::Get::List-Cleanup=0 update
@coderabbitai isn't CONFIG_I2C_DESIGNWARE_SLAVE=ymissing in legacy and edge too?
[!TIP] For best results, initiate chat on the files or code changes.
๐งฉ Analysis chain
@EvilOlaf, let me check the configuration files to verify this observation.
๐ Script executed:
#!/bin/bash
echo "=== Checking CONFIG_I2C_DESIGNWARE_SLAVE in all three bcm2711 kernel configs ==="
echo ""
echo "linux-bcm2711-current.config:"
grep "CONFIG_I2C_DESIGNWARE_SLAVE" config/kernel/linux-bcm2711-current.config || echo "Not found"
echo ""
echo "linux-bcm2711-edge.config:"
grep "CONFIG_I2C_DESIGNWARE_SLAVE" config/kernel/linux-bcm2711-edge.config || echo "Not found"
echo ""
echo "linux-bcm2711-legacy.config:"
grep "CONFIG_I2C_DESIGNWARE_SLAVE" config/kernel/linux-bcm2711-legacy.config || echo "Not found"
echo ""
echo "=== Checking all I2C_DESIGNWARE related configs ==="
echo ""
echo "linux-bcm2711-current.config:"
grep "CONFIG_I2C_DESIGNWARE" config/kernel/linux-bcm2711-current.config
echo ""
echo "linux-bcm2711-edge.config:"
grep "CONFIG_I2C_DESIGNWARE" config/kernel/linux-bcm2711-edge.config
echo ""
echo "linux-bcm2711-legacy.config:"
grep "CONFIG_I2C_DESIGNWARE" config/kernel/linux-bcm2711-legacy.config
Length of output: 1395
@EvilOlaf, you're absolutely correct! The verification shows that CONFIG_I2C_DESIGNWARE_SLAVE=y is indeed missing from both the edge and legacy configurations:
Current status:
- โ
linux-bcm2711-current.config: Has bothCONFIG_I2C_DESIGNWARE_CORE=mandCONFIG_I2C_DESIGNWARE_SLAVE=y - โ
linux-bcm2711-edge.config: Only hasCONFIG_I2C_DESIGNWARE_CORE=m(missingCONFIG_I2C_DESIGNWARE_SLAVE=y) - โ
linux-bcm2711-legacy.config: Only hasCONFIG_I2C_DESIGNWARE_CORE=m(missingCONFIG_I2C_DESIGNWARE_SLAVE=y)
This inconsistency should be addressed. If the DSI display functionality requires both configuration options for proper operation, then the edge and legacy kernel configurations are incomplete and may not work correctly. The CONFIG_I2C_DESIGNWARE_SLAVE=y option should be added to both edge and legacy configurations to ensure consistent behavior across all kernel variants.
๐ฐ
( o.o )
> ^ <
*curious ears*
Did manual tests for current and edge using kernel-config and it is selected automatically this way. So yeah, @CaWeissWz please either verify it works as it is or address accordingly.
Please use either
SHARE_LOG=yesor one of thecurlcommands provided at the end of each build run to upload logs manually to a random paste server. They'll include highlighting for those and make it overall easier to read them.
OK, here are the logs for the legacy kernel: https://paste.armbian.com/pahidusidi
The initial 'current' image I testet did not have the CONFIG_I2C_DESIGNWARE_SLAVE config set, but DSI had worked for me. Nevertheless, I added the config line in question for all 3 configurations, just to be save. I guess that it won't hurt either.
Would it be possible to change the title of this PR into 'Fix DSI display functionality on RPi5'. The C in CSI is about interfacing camera signals, not applicable here. This PR is about interfacing certain screens that combine the MIPI DSI and I2C buses on one flexible flat cable and use the I2C bus to register and initialize the MIPI DSI bus, sometimes combined with touch screen communication via I2C.
Would it be possible to change the title of this PR into 'Fix DSI display functionality on RPi5'. The C in CSI is about interfacing camera signals, not applicable here. This PR is about interfacing certain screens that combine the MIPI DSI and I2C buses on one flexible flat cable and use the I2C bus to register and initialize the MIPI DSI bus, sometimes combined with touch screen communication via I2C.
You're absolutely right, this was a typo.
Thanks a lot!