There has been a lot of talk about fixing CAM0 on the Jetson Orin Nano’s, for example here and here, but I can’t figure out where things stand currently.
Neither camera will work in CAM0, together or separate after running the Arducam camera updates and installing their arducam-nvidia-l4t-kernel-t234-nano-5.10.120-tegra-35.4.1-20230809074912_arm64.deb file in their install process listed here.
Both cameras are detected with ls /dev/video* as video0 and video1 when plugged in together. When I run arducam’s provided script with arducam_displayer.py -d x, I just have to select the proper x for the camera in CAM1, and it wil display fine.
I try CAM0 with the script, and nothing.
I know these are not nVidia issues out of the gate, but we really need help with our prototypes here before moving to board designs based on the Jetson Orin Nano.
I just want to be able to plug the stereo board AND the AR0234 into the 2 MIPI ports and they all work at the same (so we can external sync). What am I missing?
I’m not sure what the configuration is or how to check.
I do have both a Raspberry Pi Camera v2 which I verified worked on the Jetson Orin Nano before I ran the Arducam install using v4l2-ctl and gstreamer-launch-1.0, as well as an IMX219.
I should mention when I try to run the same v4l2-ctl script on the Raspberry Pi Camera v2 now, it also does NOT work on CAM0.
How would I check the lane configs in this scenario to confirm what you need?
there’s options to enable 4-lane config of IMX477 by running Jetson-IO to set the CSI settings. and, it should be 2-lane config if you’re running with IMX219.
just double check… is it an Orin NX develope kit? or… it’s Orin SOM on Xavier NX carrier board?
I’ve tested all of the options in the Jetson-IO , and they work with their respective cameras. That is, the 2-lane IMX219 works with an IMX219 setting.
However, those will make the system unable to pick up the Arducam cameras at /dev/video*.
Likewise, when I run the ./install_full.sh -m arducam script from Arducam which creates it’s own kernel, I can no longer use the IMX219’s.
that’s expected since it’s changing the CSI configure for loading its sensor driver.
we’ve now narrow down the issue to Arducam’s camera only, please contact with vendor to double check the sensor drivers.
you should have device tree for running Arducam’s camera, right?
please disassembler the dtb file into text file for quick checking.
for example, $ dtc -I dtb -O dts -o temp.txt tegra234-Arducam-xxx.dtb
CSI/VI port bindings should be correct since sensor drivers has register to linux kernel.
it’s streaming on failures reported here.
[ 79.385536] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 79.393250] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
it might be incorrect sensor configurations.
please double check lane_polarity settings, it’s CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N on Orin Nano.
please use device tree property, lane_polarity to configure a polarity swap on any lane.
besides,
please also give it a try with below commands to boost all the VI/CSI/ISP clocks.
for example,
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
I ran the commands you sent, rebooted, and it did not work. The values on the cat were:
550400000
729600000
214300000
213300000
I’m trying to understand the lane_polarity fix. I have a i2c@0 and i2c@1 in the am_i2cmux. The lane_polarity in i2c@0 is lane_polarity = [36 00] and i2c@1 is lane_polarity = [30 00] I changed both to lane_polarity = [30 00] or lane_polarity = [36 00], and even reversed them, and it did mess up the CAM1, but didn’t help with CAM0. Is there another value or method I should be using or trying?
I also just tested the stereo cam on CAM1, and only 1 of the stereo cameras is now working, even after going back to my original .dtb backup file. The AR0234 works fine. Might be related to the clock changes.
note, those commands to boost all the clocks will reset once you reboot the system.
please check Jetson Orin NX Series and Orin Nano Series Design Guide for [Figure 10-1. CSI 2-Lane Connection Options] for more details of lane polarity.
you may see-also reference driver for lane_polarity property description.
for instance, $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-camera-rbpcv2-imx219.dtsi
* lane_polarity
* Based on the camera connector pin.
* CSIx_D0 | CSIx_D1 | CSI(X+1)_D0 | CSI(X+1)CSIx_D1
* LSB | BIT1 | BIT2 | MSB
* if there is a polarity swap on any lane, the bit corrsponding
* to the lane should be set
* e.g. polarity swap on CSIx_D0 only -> lane_polarity = "1"; 0001
* e.g. polarity swap on CSIx_D1 and CSI(X+1)_D0 -> lane_polarity = "6"; 0110
Currently, on the Jetson Orin Nano, when using the camera, it requires extreme value inversion, but nVidia has inverted the hardware. The inversion can only be done within the gstreamer framework, and there is currently no way to do it using v4l2. However, the arducam_displayer.py library is based on v4l2.
So, it seems that none of the nVidia camera partners can get two camera MIPI pipelines working on the Jetson Orin Nano using v4l2 currently. How would I approach this using gStreamer?
here’s gst pipeline for your reference, you may modify sensor-id to select different camera nodes.
for instance, $ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink
Running the command as is, with the current CAM1 that works on the Arducam v4l2, can’t find the camera:
gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM),framerate=30/1,format=NV12' ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:00.008934501
Setting pipeline to NULL ...
Freeing pipeline ...
I am attempting to use an external trigger to sync over the two CSI ports the AR0234 and the Stereo OV9281 cameras on the Jetson Orin Nano for our new camera series. I’ve now tried 2 nVidia Camera partners and they both failed to get two cameras working using gStreamer or V4l2 on the Orin Nano. This should be possible from what you’re saying, it’s just different than the other Jetson series devices, which is why none of the partners can get this done.
I have the comparison of the .dtb files before and after the driver installs. How would you get Orin Nano’s working on both CAM0 and CAM1 with preferred partner cameras?