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

IMX415 support - rpi-6.6.y #6582

Merged
merged 6 commits into from
Jan 7, 2025
Merged

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Jan 6, 2025

Minor tweaks to the mainline imx415 driver to make it work with the Pi and libcamera. I will send them upstream in due course.

Tested with a https://www.waveshare.com/imx415-98-ir-cut-camera.htm module. @davidplowman now has one to do the tuning.

Don't worry about forward porting to 6.12 / 6.13 - I have a 6.12 branch with the required changes there, but was trying to resolve the general CFE issues there first.

tq-steina and others added 6 commits January 6, 2025 14:49
Commit b814b5b upstream.

Complete the list from "INCK Setting" section in IMX415-AAQR-C
(Rev. E19504, 2019/05/21). For consistency suffix all lane rate values by
UL, which is needed for 2376000000 anyway.

Signed-off-by: Alexander Stein <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This also requires that the ranges for the exposure control
are updated.

Signed-off-by: Dave Stevenson <[email protected]>
The control of HMAX documented in the datasheet is consistent
with being in terms of a scaled INCK, being always 72MHz or
74.25MHz. It is NOT link frequency dependent, but the minimum
value for HMAX is dictated by the link frequency.

If PIXEL_RATE is defined as being 12 times the 72 or 74.25MHz,
and all values are scaled down again when writing HMAX, then
the numbers all work out regardless of INCK or link frequency.
Retain an hmax_min (set to the same value as the previous fixed
hmax register value) to set as the default value to avoid changing
the behaviour for existing users.

Signed-off-by: Dave Stevenson <[email protected]>
The link frequencies are equally valid in 2 or 4 lane modes, but
they change the hmax_min value for the mode as the MIPI block
has to have sufficient time to send the pixel data for each line.

Remove the association with number of lanes, and add hmax_min
configuration for both lane options.

Signed-off-by: Dave Stevenson <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Jan 6, 2025

"Don't worry about forward porting to 6.12 / 6.13" translates to "Do worry about preventing the semi-automatic forward porting to 6.12". The sooner we can merge this, the more likely I am to remember...

@6by9 6by9 changed the title IMX415 support IMX415 support - rpi-6.6.y Jan 6, 2025
@6by9 6by9 mentioned this pull request Jan 6, 2025
@6by9
Copy link
Contributor Author

6by9 commented Jan 6, 2025

"Don't worry about forward porting to 6.12 / 6.13" translates to "Do worry about preventing the semi-automatic forward porting to 6.12". The sooner we can merge this, the more likely I am to remember...

This PR title updated to denote 6.6, and #6583 created with the 6.12 patches. Hopefully those steps will help with the memory.

d5df1c7 in 6.10 and above will cause oodles of conflicts with this series, so that would also likely jog the memory if you tried forward-porting.

I'm happy with the series, it's just if NP or DAP have any views or notice issues that would hold things up.

@naushir
Copy link
Contributor

naushir commented Jan 7, 2025

Can't see anything obviously wrong with the drive code changes!

@6by9
Copy link
Contributor Author

6by9 commented Jan 7, 2025

Can't see anything obviously wrong with the drive code changes!

Thanks. I'll throw them upstream in the next couple of days.
There's no need to hold up the 6.6 patches based on that, but could delay 6.12 to see if anyone reviews them.

@pelwell pelwell merged commit 0292614 into raspberrypi:rpi-6.6.y Jan 7, 2025
11 of 12 checks passed
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jan 9, 2025
See: raspberrypi/linux#6579

kernel: BCM2711, BCM2712 and RP1 UARTs are r1p5
See: raspberrypi/linux#6587

kernel: IMX415 support - rpi-6.6.y
See: raspberrypi/linux#6582

kernel: PCI: brcmstb: don't use ASPM state defines for register bits
See: raspberrypi/linux#6588

kernel: allo-piano-dac-plus: Trial patches for the second part of issue 6527
See: raspberrypi/linux#6590

kernel: configs: add CONFIG_CRYPTO_NHPOLY1305_NEON=m
See: raspberrypi/linux#6594
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 10, 2025
See: raspberrypi/linux#6579

kernel: BCM2711, BCM2712 and RP1 UARTs are r1p5
See: raspberrypi/linux#6587

kernel: IMX415 support - rpi-6.6.y
See: raspberrypi/linux#6582

kernel: PCI: brcmstb: don't use ASPM state defines for register bits
See: raspberrypi/linux#6588

kernel: allo-piano-dac-plus: Trial patches for the second part of issue 6527
See: raspberrypi/linux#6590

kernel: configs: add CONFIG_CRYPTO_NHPOLY1305_NEON=m
See: raspberrypi/linux#6594
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.

4 participants