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

Add DTS override for CAMx_REG GPIOs for the Raspberry Pi 5 #6210

Open
wants to merge 1 commit into
base: rpi-6.6.y
Choose a base branch
from

Conversation

colerd24
Copy link

@colerd24 colerd24 commented Jun 6, 2024

Adds overrides for using the CAMx_REG pins on the CAM/DISP connectors as generic GPIO. The rationale for the override is to use this GPIO as a reset pin for MIPI DSI displays.

This PR mirrors how it is done on the CM3 and CM4. I didn't add the overrides for manual specification of the camera regulator GPIO pin (as done in the Compute Modules) considering the GPIO on the CAM/DISP connector is fixed. However, if that feature is desired I can add it to this pull request.

This forum post by @6by9 implies that this functionality was also intended for the Raspberry Pi 5. Because there is no __override__ for cam0_reg or cam1_reg, adding dtparam=cam0_reg=off or dtparam=cam1_reg=off causes an error when parsing config.txt as shown in vclog --msg output. The resulting effect is that the GPIOs are still listed as used and they cannot be accessed in userspace.

Thanks in advance for considering this pull request!

Add overrides for using CAM/DISP regulators as generic GPIOs

Signed-off-by: Roy Cole <colerd24@gmail.com>
@colerd24 colerd24 force-pushed the rpi-6.6.y-rpi5_cam_reg_override branch from 370176e to b579f02 Compare June 7, 2024 03:12
@colerd24
Copy link
Author

colerd24 commented Jun 7, 2024

Fixed the missing git signoff

@6by9
Copy link
Contributor

6by9 commented Jun 7, 2024

Yes it's valid to have the override for Pi5.

It's been a while since I looked at this, but I can't think of any reason why the override shouldn't just apply to all variants, and just move into bcm270x.dtsi.
@pelwell what do you think?

@pelwell
Copy link
Contributor

pelwell commented Jun 7, 2024

Looking at the increasing mess that is the downstream bcm2711 DTS files, I think we need to split out our common modifications into files that get included by each platform, rather than have the bcm2711 devices include some but not all of bcm270x stuff. However, that is a job for another day. For now it can go on bcm270x.dtsi.

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.

None yet

3 participants