Can't register /dev/videoX

Hi all,

I have an iMX8M Plus here, with a custom camera connected to the CSI connector.
I2C communication works, I can read from it just fine.

My problem is that when I manually load the module, the /dev/videoX device is not registered.
I expect some V4L2 info message about registration but nothing comes up.

So I got the code from the Framos IMX662 example on Toradex website, and I compiled the module manually, removing some power stuff which I do not have the headers for. The result is the same. It finalizes the probing routine but no video device is registered.

I expected that v4l2_async_register_subdev_sensor would be enough to do the trick. I have gone through lots of forums but no answer so far.

My question is: what could cause the device to not register?

Here are some information:

  • iMX8M Plus - Verdin WiFi
  • Using Torizon Core Builder
  • Torizon OS 6.7.0

Thanks in advance,
Filipe

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Filipe,

Thank you for reaching out with your question. It sounds like you’re encountering a challenging issue with your custom camera setup on the iMX8M Plus. Here are some steps you can take to troubleshoot the problem of your camera not registering as a /dev/videoX device:

  1. Device Tree Overlay: Ensure that the appropriate device tree overlay for your camera is applied. This is essential for the system to recognize and configure the camera hardware correctly. You can verify and modify the overlays in the /boot/overlays.txt file. For instance, if you’re using a Framos IMX662, make sure the verdin-imx8mp_imx662_overlay.dtbo is applied.

  2. Kernel Logs: Check the kernel logs for any error messages or warnings during the module loading process. You can do this by running dmesg in the terminal. Look for any messages related to the camera or the V4L2 subsystem that might provide clues about the issue.

  3. Driver Compatibility: Confirm that the camera driver you are using is compatible with the version of Torizon OS installed. Since you mentioned modifying the Framos IMX662 example, ensure that any changes made do not interfere with the driver’s ability to register the device.

  4. Video Device Registration: Use the v4l2-ctl tool from the v4l2-utils package to list video devices and check if the camera is recognized. Run v4l2-ctl --list-devices to see if your camera appears in the list.

  5. GStreamer Pipeline: If the device is registered, you can test video capture using a GStreamer pipeline. This can help verify that the camera is functioning correctly once registered.

By following these steps, you should be able to identify and resolve the issue preventing your camera from registering as a /dev/videoX device. I hope this helps, and please feel free to reach out if you have further questions.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

https://community.nxp.com/t5/i-MX-Processors/i-mx8M-Mini-OV5640-fps-limitation/m-p/874358

AR0521 Camera Firmware Issue.

Hello @filipedoo ,

When you are following the instructions for the first steps with framos Cameras in Torizon, when running the isp-imx container, there is a script (start_isp.sh) that is executed that would probe the module and after that the video device should appear. There are specific instructions for the Framos Cameras in there. Perhaps you will have to make some changes on this script (and on other ones that might be called by this one) for your use case.

Also, you can find some more information about everything that is being changed on the original isp-imx application for getting the framos cameras working on this patch. Perhaps you can find something that would be missing for your use case.

Best Regards,

Marcio

Thank you Marcio.

Indeed I was missing some steps. It wasn’t clear but now it is.
If anyone ends up here: the start_isp.sh script will remove some IMX media related modules, insert the camera module first, and then re-insert those modules. That’s how it is able to register the device.

Thanks!