Jetson Orin Nano Camera Integration Issues with CAM0 and CAM1 Ports
Issue Overview
Users are experiencing difficulties integrating cameras with the Jetson Orin Nano developer kit, particularly when using both CAM0 and CAM1 ports simultaneously. The main problems include:
- Cameras (e.g., Arducam AR0234, OV9281) working on CAM1 but not on CAM0
- Inconsistent behavior after installing camera-specific drivers or kernels
- Inability to use multiple cameras across both ports simultaneously
- Issues with camera detection and streaming, especially when using v4l2
- Difficulties in setting up external trigger synchronization between cameras on different ports
These issues are affecting users’ ability to develop prototypes and finalize board designs based on the Jetson Orin Nano.
Possible Causes
-
Incorrect CSI lane configuration: The Jetson Orin Nano has specific requirements for CSI lane polarity and configuration that may not be properly set.
-
Driver conflicts: Installing camera-specific drivers may conflict with the default Nvidia drivers, causing incompatibilities.
-
Kernel modifications: Custom kernels created by camera vendors may not be fully compatible with all camera models or ports.
-
Device tree misconfiguration: Errors in the device tree, such as incorrect interface assignments or lane polarity settings, can cause camera detection and streaming issues.
-
Clock rate limitations: Insufficient clock rates for VI/CSI/ISP components may lead to streaming failures.
-
Software framework incompatibilities: Some cameras may work with certain frameworks (e.g., gStreamer) but not others (e.g., v4l2).
-
Hardware-specific quirks: The Jetson Orin Nano may have unique hardware characteristics that require special handling for camera integration.
Troubleshooting Steps, Solutions & Fixes
-
Verify basic camera functionality:
- Test each camera individually on both CAM0 and CAM1 ports.
- Use known working cameras (e.g., Raspberry Pi Camera v2, IMX219) to isolate hardware issues.
-
Check and correct device tree configuration:
- Disassemble the device tree binary (dtb) file:
dtc -I dtb -O dts -o temp.txt tegra234-Arducam-xxx.dtb
- Verify the correct
tegra_sinterface
assignment for each camera:- CAM0 should use "serial_a"
- CAM1 should use "serial_c"
- Ensure proper lane polarity settings:
lane_polarity = [36 00] // for CAM0 lane_polarity = [30 00] // for CAM1
- Disassemble the device tree binary (dtb) file:
-
Adjust CSI lane polarity:
- Refer to the Jetson Orin NX Series and Orin Nano Series Design Guide for correct lane polarity settings.
- Modify the
lane_polarity
property in the device tree to swap polarity on specific lanes if needed.
-
Boost clock rates:
- Run the following commands to maximize VI/CSI/ISP clock rates:
sudo su echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate
- Note: These changes reset after reboot, so they need to be applied each time.
- Run the following commands to maximize VI/CSI/ISP clock rates:
-
Try gStreamer instead of v4l2:
- Use the following gStreamer pipeline as a starting point:
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink
- Adjust the
sensor-id
parameter to select different camera nodes.
- Use the following gStreamer pipeline as a starting point:
-
Investigate driver compatibility:
- If using Arducam or other third-party cameras, consult with the vendor about Jetson Orin Nano compatibility.
- Consider using Nvidia’s reference drivers if available for your camera model.
-
Check for firmware updates:
- Ensure both the Jetson Orin Nano and the cameras have the latest firmware installed.
-
Examine kernel logs:
- Use
dmesg
to check for camera-related errors:sudo dmesg | grep arducam
- Look for messages indicating successful camera registration or any errors during initialization.
- Use
-
Test with different camera configurations:
- Try various combinations of cameras on CAM0 and CAM1 to identify any port-specific issues.
-
Consider hardware-level debugging:
- Use an oscilloscope to verify proper signal levels and timing on the MIPI CSI lanes.
- Check for any physical damage or loose connections on the camera modules or CSI connectors.
If these steps do not resolve the issue, it may be necessary to work directly with Nvidia support or the camera manufacturer to develop a custom solution for the Jetson Orin Nano platform.