Skip to content

Playing with imx662#7239

Draft
6by9 wants to merge 4 commits intoraspberrypi:rpi-6.12.yfrom
6by9:rpi-6.12.y-imx662
Draft

Playing with imx662#7239
6by9 wants to merge 4 commits intoraspberrypi:rpi-6.12.yfrom
6by9:rpi-6.12.y-imx662

Conversation

@6by9
Copy link
Contributor

@6by9 6by9 commented Feb 12, 2026

Wanted for CI build artifacts.

6by9 added 4 commits February 12, 2026 14:56
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9 6by9 force-pushed the rpi-6.12.y-imx662 branch from 360282a to cbc933f Compare February 12, 2026 14:57
@d4c00
Copy link

d4c00 commented Mar 15, 2026

Thank you so much for working on IMX662 support—this PR is a real lifesaver for me! I recently bought an IMX662 module from 微象电子 (a Chinese manufacturer) specifically for my Raspberry Pi Zero 2 W. I really hope it can get full and seamless support soon.
My IMX662 setup on Pi Zero 2 W

Right now, using community open-source drivers for IMX662 feels a bit cumbersome to set up, and the results aren't always as optimal or stable as I'd like—especially on smaller boards like the Zero 2 W. Your official driver work here would make a huge difference in making it plug-and-play.

Your efforts mean a lot to me and many others relying on third-party low-light modules for compact projects like this. I'm really looking forward to seeing this merged so I can test it properly on my Zero 2 W. Huge thanks again for your amazing work!

@6by9
Copy link
Contributor Author

6by9 commented Mar 16, 2026

Right now, using community open-source drivers for IMX662 feels a bit cumbersome to set up, and the results aren't always as optimal or stable as I'd like—especially on smaller boards like the Zero 2 W. Your official driver work here would make a huge difference in making it plug-and-play.

Please note that this is NOT an official driver - just my tinkering.
As it happens a driver for imx662 has just been posted to linux-media, however it currently has issues. It claims to have solved a couple of the issues that I still had to address though, so between the two of us we may be able to knock it into shape.
https://lore.kernel.org/linux-media/20260312150437.1091195-1-eagle.alexander923@gmail.com/T/#m5a7b939dcc830749910b0f0fb254d9717cd40d02

The fact it has been posted to linux-media means that the sensor meets the libcamera requirements of having had a driver posted, so the libcamera support for it can be posted now :-)

I'm really looking forward to seeing this merged so I can test it properly on my Zero 2 W. Huge thanks again for your amazing work!

You can already test it. All Pull Requests get built by the CI system, and on Raspberry Pi OS you can then use sudo rpi-update pulls/7239 (where 7239 is the PR number) to download those pre-built kernels. Obviously be aware that things can be totally broken in the build, and it can break systems that rely on initramfs to have provided additional modules, but otherwise you can test out whatever improvements are being offered by the PR.

My module uses a 74.25 MHz crystal oscillator. It would be incredibly helpful if the dtoverlay could support customizing the clock frequency in /boot/firmware/config.txt,

Seeing as you've edited your post I'm guessing you found there already was the clock-frequency override provided by the overlay :-)

@d4c00
Copy link

d4c00 commented Mar 17, 2026

Thank you so much for the reply!

Please note that this is NOT an official driver - just my tinkering.
As it happens a driver for imx662 has just been posted to linux-media, however it currently has issues. It claims to have solved a couple of the issues that I still had to address though, so between the two of us we may be able to knock it into shape.
https://lore.kernel.org/linux-media/20260312150437.1091195-1-eagle.alexander923@gmail.com/T/#m5a7b939dcc830749910b0f0fb254d9717cd40d02

The fact it has been posted to linux-media means that the sensor meets the libcamera requirements of having had a driver posted, so the libcamera support for it can be posted now :-)

I'm sorry that I’m still a complete beginner and not very familiar with how things work on the mailing list or the libcamera development side yet. I'm afraid I don't have enough expertise to follow all the technical details or provide professional feedback.

You can already test it. All Pull Requests get built by the CI system, and on Raspberry Pi OS you can then use sudo rpi-update pulls/7239 (where 7239 is the PR number) to download those pre-built kernels. Obviously be aware that things can be totally broken in the build, and it can break systems that rely on initramfs to have provided additional modules, but otherwise you can test out whatever improvements are being offered by the PR.

I had no idea it was this simple to install a specific PR kernel! I originally thought I would have to compile it myself, which seemed too daunting to try, so thank you so much for pointing that out. I’ve already tried sudo rpi-update pulls/7239 as you suggested, and it works! I can now successfully capture RAW files using v4l2-ctl on my Zero 2 W. This is a huge help for my project.

Seeing as you've edited your post I'm guessing you found there already was the clock-frequency override provided by the overlay :-)

Yes, you’re right. I edited my post as soon as I realized the feature was already there. You caught me! :-)

Since I haven't learned how to handle the ISP pipeline or post-process RAW data yet, I’ll probably just add a long-pass IR filter and treat it as a monochrome sensor for now as a workaround.

It’s really exciting to see the progress being made on this sensor. I’ll be keeping an eye on the updates, and it would be amazing if one day I could get color images through Picamera2 thanks to efforts like yours.

Thank you again for making this technology so accessible to us!

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