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

imx290 HCG and analogue gain updates #5859

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

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Jan 17, 2024

No description provided.

@6by9
Copy link
Contributor Author

6by9 commented Jan 17, 2024

Hit the wrong button and created the PR before I'd described it :-(

For testing on https://forums.raspberrypi.com/viewtopic.php?t=363696

@geoffrey-vl
Copy link

Hi 6by9, I'm wondering if you could also add IMX462 to the driver:

{ .compatible = "sony,imx462lqr", .data = &imx290_models[IMX290_MODEL_IMX327LQR], },

@6by9
Copy link
Contributor Author

6by9 commented Nov 8, 2024

IIRC then there's little point in doing so as it is identical to one of the others (I'd need to check which one)

When there was the belief that imx462 could do 12bit 120fps readout then it would have been worth it, but that has been confirmed by Sony not to be the case and was an error on the flyer.

@geoffrey-vl
Copy link

OK, well, I was suggesting it just to have the binding explicitly defined. Anyway, now that there is a small difference in max analog gain wouldn't we also need to modify the device three overlays for IMX462 so that it binds more correctly?

@6by9
Copy link
Contributor Author

6by9 commented Nov 11, 2024

IMX462 has a max gain of 29.4dB, same as IMX327.

Now 2d41947 did add differences in the register initialisation between 327 and 290, and I haven't checked through which option is correct for 462. If we had that, then it would be worth adding in 462 as well.
I'm afraid it's not a priority for at the moment though, and I can't share the required datasheets as they are under NDA.

@geoffrey-vl
Copy link

Would it be OK enough to check if the IMX327 binding works for IMX462? Because that's something I could do.

@6by9
Copy link
Contributor Author

6by9 commented Nov 12, 2024

I know the 462 produces frames with the 290 or 327 configuration. It's very minor changes to some image quality that are different between the sensor models.

@6by9 6by9 force-pushed the rpi-6.6.y-cams branch 2 times, most recently from db78f99 to 4b2e42f Compare November 12, 2024 14:21
@6by9
Copy link
Contributor Author

6by9 commented Nov 12, 2024

I got distracted, so did the comparison of the registers. There's only one register different from imx290, however max analog gain is only 29.4dB vs 30.0dB.

PR updated to include adding a new compatible for imx462 (both mono and colour variants)

@geoffrey-vl
Copy link

Looks to be working. Will you further upstream this one to mainline?

@6by9
Copy link
Contributor Author

6by9 commented Nov 14, 2024

Sent upstream - https://lore.kernel.org/linux-media/[email protected]/

I noted one minor change needed whilst reviewing it, so I'll update this again and then it should be good to merge.

The sensor has Low Conversion Gain (HCG) and High Conversion Gain (HCG)
modes, with the supposedly the HCG mode having better noise performance
at high gains.

As this parameter changes the gain range of the sensor, it isn't
possible to make this an automatic property, and there is no
suitable V4L2 control to set it, so just add it as a module parameter.

Signed-off-by: Dave Stevenson <[email protected]>
The imx327 only supports up to 29.4dB of analogue gain, vs
the imx290 going up to 30dB. Both are in 0.3dB steps.

As we now have model specific config, fix this mismatch,
and delete the comment referencing it.

Signed-off-by: Dave Stevenson <[email protected]>
IMX462 is the successor to IMX290, which is supportable by
the existing IMX290 driver via a new compatible string.

Signed-off-by: Dave Stevenson <[email protected]>
IMX462 is the successor to IMX290, and wants very minor
changes to the register setup.

Add the relevant configuration to support it.

Signed-off-by: Dave Stevenson <[email protected]>
Now that imx462 has a separate compatible string, make use of it.

Signed-off-by: Dave Stevenson <[email protected]>
@6by9 6by9 marked this pull request as ready for review November 14, 2024 16:32
@6by9 6by9 requested a review from naushir November 14, 2024 16:32
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