Skip to content

Fix DSI display functionality on RPi5 #8294

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

CaWeissWz
Copy link

@CaWeissWz CaWeissWz commented Jun 13, 2025

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

Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

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 a093e35 and 7c83b39.

📒 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.

❤️ Share
🪧 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 @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

@github-actions github-actions bot added 08 Milestone: Third quarter release size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Jun 13, 2025
@coderabbitai coderabbitai bot requested a review from rpardini June 13, 2025 11:08
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 13, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
config/kernel/linux-bcm2711-current.config (1)

874-874: Verify module vs built-in configuration for I2C_DESIGNWARE_CORE

The DesignWare I2C core driver is currently set as a module (m). For CSI display on RPi5, early I2C availability at boot may be critical—ensure this module is auto-loaded before any dependent camera/display drivers initialize. Consider building it-in (y) if boot-time loading is unreliable.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1540733 and 33f25cd.

📒 Files selected for processing (3)
  • config/kernel/linux-bcm2711-current.config (1 hunks)
  • config/kernel/linux-bcm2711-edge.config (1 hunks)
  • config/kernel/linux-bcm2711-legacy.config (1 hunks)
🔇 Additional comments (4)
config/kernel/linux-bcm2711-edge.config (2)

859-859: Enable CONFIG_I2C_DESIGNWARE_CORE as module
Matches the other bcm2711 configurations in this PR, allowing the DesignWare I2C core driver to be loaded dynamically.


864-864: Enable CONFIG_I2C_SLAVE built-in
Consistent with the edge and legacy variants, this enables I2C slave support at build time.

config/kernel/linux-bcm2711-legacy.config (2)

817-817: Enable CONFIG_I2C_DESIGNWARE_CORE as module
Aligned with the edge configuration, this adds support for the DesignWare I2C core driver as a loadable module.


822-822: Enable CONFIG_I2C_SLAVE built-in
In line with other bcm2711 configs, this turns on I2C slave functionality at compile time.

@EvilOlaf
Copy link
Member

Providing logs for failed builds would be neat...

@CaWeissWz
Copy link
Author

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.

@EvilOlaf
Copy link
Member

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.

@EvilOlaf
Copy link
Member

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

reasonable

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 14, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 14, 2025
@EvilOlaf
Copy link
Member

@coderabbitai isn't CONFIG_I2C_DESIGNWARE_SLAVE=ymissing in legacy and edge too?

Copy link
Contributor

coderabbitai bot commented Jun 14, 2025

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 both CONFIG_I2C_DESIGNWARE_CORE=m and CONFIG_I2C_DESIGNWARE_SLAVE=y
  • linux-bcm2711-edge.config: Only has CONFIG_I2C_DESIGNWARE_CORE=m (missing CONFIG_I2C_DESIGNWARE_SLAVE=y)
  • linux-bcm2711-legacy.config: Only has CONFIG_I2C_DESIGNWARE_CORE=m (missing CONFIG_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*

@EvilOlaf
Copy link
Member

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.

@CaWeissWz
Copy link
Author

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.

OK, here are the logs for the legacy kernel:
https://paste.armbian.com/pahidusidi

Remove leading "+" sign on config variable, as this seems to be a typo
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
@coderabbitai coderabbitai bot requested review from EvilOlaf and igorpecovnik June 16, 2025 07:41
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
Added missing I2C designware slave functionality.
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
Added missing I2C designware slave functionality
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
@CaWeissWz
Copy link
Author

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.

@wwortel
Copy link
Collaborator

wwortel commented Jun 16, 2025

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.

@CaWeissWz CaWeissWz changed the title Fix CSI display functionality on RPi5 Fix DSI display functionality on RPi5 Jun 16, 2025
@CaWeissWz
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 Milestone: Third quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

3 participants