Hi Toradex team,
Hardware:
Machine model: Toradex Verdin iMX8M Plus WB on Verdin Development Board
Two camera modules: Toradex CSI Camera Set 5MP AR0521 Color v1.0A x1,
Toradex CSI Camera Set 5MP AR0521 Color v1.1A x1
The two camera modules are connected to the MIPI CSI-2 connectors on the carrier board and the mezzanine board (Alternate jumper positions are chosen for the control GPIOs) respectively.
Software:
Torizon OS with meta-ar0521 layer added per instructions
Cameras tested to work with the gstreamer example one at a time by enabling the corresponding DTO.
Moving onto enabling both cameras at the same time.
TorizonCore Builder used to add DTO for the second camera per instructions. Files attached below:
tcbuild.yaml (831 Bytes)
dmesg_with_two_cameras_enabled.txt (43.3 KB)
verdin-imx8mp_ar0521_overlay.dts (1.6 KB)
verdin-imx8mp_mezzanine_ar0521_second-alt-jumpers_overlay.dts (1.9 KB)
As seen in the dmesg, both cameras are detected, but the media capture device is not available for either of them. Interestingly, only one sensor subdevice gets registered:
[ 19.736765] mx8-img-md: Registered sensor subdevice: ar0521 2-0042 (1)
Kindly help with the fixes needed to enable both cameras to function at the same time.
Appreciate the support.
Thanks,
KK
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
Interfacing two MIPI CSI-2 cameras simultaneously on the Toradex Verdin iMX8M Plus platform requires careful configuration of the device tree overlays (DTOs) to ensure both cameras are correctly initialized and recognized by the system. Based on the information provided, it appears that the system is only recognizing one of the camera sensors at a time. This issue could be due to several factors, including device tree configuration, power management, or resource conflicts.
-
Device Tree Configuration: Ensure that both device tree overlays correctly configure the MIPI CSI-2 interfaces and that there are no conflicts between them. Each camera should have its unique I2C address and MIPI CSI-2 channel. Verify that the verdin-imx8mp_ar0521_overlay.dts
and verdin-imx8mp_mezzanine_ar0521_second-alt-jumpers_overlay.dts
files correctly specify these parameters without overlap.
-
Alternate Jumper Positions for Control GPIOs: Confirm that the alternate jumper positions do not cause any conflicts or issues with GPIO assignments used for camera control. It’s crucial that the GPIOs for power enable, reset, or any other control signals do not interfere with each other or with other system functions.
-
GStreamer Pipeline: When testing both cameras simultaneously, ensure that your GStreamer pipeline is correctly set up to handle multiple video sources. This might involve specifying the correct device nodes for each camera.
-
Kernel Configuration: Check the kernel configuration to ensure that support for multiple MIPI CSI-2 cameras is enabled. This includes the driver support for the AR0521 sensor and any necessary MIPI CSI-2 or I2C multiplexer drivers.
-
Power Management: Ensure that both cameras are receiving adequate power and that any power management features do not inadvertently disable one of the cameras. This can sometimes occur if the system believes a resource is not in use.
-
Software Versions: Verify that you are using the latest versions of TorizonCore and the meta-ar0521 layer. Updates might contain fixes or improvements for handling multiple cameras.
-
Debugging: Utilize the dmesg
log to identify any errors or warnings that occur during the initialization of the cameras. Look for messages related to MIPI CSI-2, I2C communication, or the AR0521 driver specifically. The fact that only one sensor subdevice gets registered suggests there might be an issue with how the second camera is being initialized or detected.
If
Please, also check if these links can help you solve your problem:
Troubleshooting | Toradex Developer Center.
I have gone through the suggestions provided by ToradexAI and they don’t solve the problem.
There is no information on the AR0521 camera module datasheets regarding changing the I2C address.
The control signals jumpers are set correctly and there are no conflicts with other peripherals active on the board.
Thanks,
KK
The camera driver configures and controls the camera through the I2C interface. If you connect two cameras with the same I2C address to the same I2C bus, it will cause a conflict, leading to both cameras becoming non-functional. If it’s not possible to change the I2C address on one of the cameras, they should be connected to separate I2C buses.
Hi @alex.tx ,
Kindly take a moment to peruse the attached DTS overlays.
The two image sensors have the same I2C address, but are connected to different I2C buses.
Thanks,
KK
Could you please provide details about the camera connection through the mezzanine connector, including the mentioned GPIO setup? A schematic would be preferable.