Skip to content
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

arm64: dts: Sort out CM5 and I/O board I2C ports #6441

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Oct 24, 2024

There is a difference in I2C usage between CM4IO and CM5IO. Present a simple, consistent view of the world by moving the assignment of the bus IDs into carrier-specific files.

Fixes: 36faab6 ("dts: bcm2712-rpi: Add aliases for the CSI/DSI I2Cs")
See: #6421

@@ -0,0 +1,24 @@
// SPDX-License-Identifier: GPL-2.0

i2c_csi_dsi0: &i2c0 { // Note: For CAM0 and DISP0 connectors
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't looked at the pinout, but CM5 only has 2 MIPI PHY ports, so do CAM0 and DISP0 actually connect to anything other than the I2C?

I'm sure Dominic made a comment in passing yesterday that CAM0 and DISP0 pins on the CM were repurposed for USB3.

Copy link
Contributor Author

@pelwell pelwell Oct 24, 2024

Choose a reason for hiding this comment

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

This is the connectivity table I ended up with:

CM5        CM4IO        CM5IO
---        -----        -----
DPHY0      CAM1         CAMDISP0
DPHY1      DISP1        CAMDISP1
GPIO0/1    CAM0, DISP0  CAMDISP1
GPIO38/39  CAM1, DISP1  CAMDISP0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means that CAM0 and DISP0 are not usable for cameras or displays, which is the better of the two options because that I2C port is effectively shared with ID_SC and ID_SD. The i2c_csi_dsi0 parameter is there for compatibility with any existing I2C setup. i2c_csi_dsi1 (and its alias i2c_csi_dsi) is assigned to CAM1 and DISP1.

symlink = "i2c-10";
};

i2c_csi_dsi1: &i2c6 { // Note: For CAM1, DISP1, on-board RTC, and fan controller
Copy link
Contributor

Choose a reason for hiding this comment

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

And seeing as CAM1 and DISP1 share an I2C port, if the above is true about the MIPI wiring, that means we can't run two identical cameras or displays on CM5 with CM4IO (fine on CM5IO).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I believe that's correct.

@raspberrypi raspberrypi deleted a comment from 6by9 Oct 24, 2024
@pelwell
Copy link
Contributor Author

pelwell commented Oct 24, 2024

I believe this is the best we can do for CM4IO - people should use CM5IO to get the most out of CM5.

There is a difference in I2C usage between CM4IO and CM5IO. Present a
simple, consistent view of the world by moving the assignment of the
bus IDs into carrier-specific files.

CM5 has reduced connectivity on CM4IO - the DPHYs are connected to
CAM1 and DISP1. Keep i2c-10 for use with that pair, as is the case for
CM4 on CM4IO.

Fixes: 36faab6 ("dts: bcm2712-rpi: Add aliases for the CSI/DSI I2Cs")
See: raspberrypi#6421

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor Author

pelwell commented Oct 24, 2024

Unless somebody discovers a problem, this is the final iteration. From the updated commit message:

CM5 has reduced connectivity on CM4IO - the DPHYs are connected to
CAM1 and DISP1. Keep i2c-10 for use with that pair, as is the case for
CM4 on CM4IO.

@pelwell pelwell merged commit 4622323 into raspberrypi:rpi-6.6.y Oct 30, 2024
11 of 12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 1, 2024
kernel: drivers: media: bcm2835_isp: Cache LS table dmabuf
See: raspberrypi/linux#6429

kernel: arm64: dts: Sort out CM5 and I/O board I2C ports
See: raspberrypi/linux#6441

kernel: cgroup: Use kernel command line to disable memory cgroup
See: raspberrypi/linux#6439
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 1, 2024
kernel: drivers: media: bcm2835_isp: Cache LS table dmabuf
See: raspberrypi/linux#6429

kernel: arm64: dts: Sort out CM5 and I/O board I2C ports
See: raspberrypi/linux#6441

kernel: cgroup: Use kernel command line to disable memory cgroup
See: raspberrypi/linux#6439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants