-
Notifications
You must be signed in to change notification settings - Fork 7.4k
drivers: video: add imx219 sensor (RPi Cam v2) #88011
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
base: main
Are you sure you want to change the base?
Conversation
Replace the ad-hoc register emulation by the dedicated I2C emulator, making it usable with the same APIs as every other image sensors. Signed-off-by: Josuah Demangeon <[email protected]>
Add a library for the Camera Common Interface, part of the MIPI CSI protocol standard defining methods to configure a camera device over I2C, such as which size for the register address/data. Signed-off-by: Josuah Demangeon <[email protected]>
Reduce the amount of code in the GC2145 driver by switching to the CCI helpers in video_common.c. The batch I2C write functions are not used to avoid increasing the size of the ROM, as struct video_reg is 8 bytes while the ad-hoc struct gc2145_reg is 2 bytes. Signed-off-by: Josuah Demangeon <[email protected]>
Use the newly introduced CCI library instead of local implementation of I2C read/write commands. Signed-off-by: Josuah Demangeon <[email protected]>
Fix bug introduced in 46a262f where the fie.index field was expected to be incremented by the driver, while it is the responsibility of the caller to increment it. Signed-off-by: Josuah Demangeon <[email protected]>
Imagers, also known as image sensors, have drivers that look very similar. Add common implementation that fits most image sensors, which can be bypassed wherever this does not make the implementation simpler. Signed-off-by: Josuah Demangeon <[email protected]>
Make the emulated imager use the shared implementation of all imagers, making shared implementation of the image sensor drivers be tested by CI. Signed-off-by: Josuah Demangeon <[email protected]>
Add support for the IMX219 MIPI-only image sensor, as present on the Raspberry Pi camera v2 module usable with various 15-pin and 22-pin MIPI lanes. Signed-off-by: Josuah Demangeon <[email protected]> Co-authored-by: Alan Shaju <[email protected]>
Force-push:
|
@josuah please put this PR into draft mode until the dependent PRs merged. |
Is there any way we can help with this? Looks great so far |
It might be possible yes! I need to rebase this driver on the latest And then it will be possible to test it on any of the Zephyr platform that supports MIPI/CSI, which for now is mostly the i.MXRT1170 and friends, but more are coming! I will have more time next week to prepare the way a little bit more... Thank you for offering your help! |
|
Split out of:
Dependency:
This was only tested on hardware that is out-of-tree and at 1920x1080 resolution for now (which will be submitted upstream in maybe April):
It works well though.
If you would rather have it submitted before #88003 is merged, let me know, I will refactor it so it can be merged earlier.
P.S.: Thank you Alan Shaju for the original work adapted into this PR!