Hi I have a driver for using a camera with sensor ar0231 and max 9295 serializer and 9296 Deserializer.
I received the sensor files from Leopard Imaging as a starter and worked to develop the driver on R35.4.1. Im using it with a maxim EVK setup and connect to the xavier NX via the 15 pin camera cable.
I am attaching the driver files below.
tegra194-camera-ar0231-a00.dtsi.txt (7.3 KB)
tegra194-p3668-p3509-camera-ar0231-a00.dtsi.txt (2.9 KB)
The driver gets successfully built.
v4l2-compliance.txt (3.4 KB)
The following is the output of running sudo meda-ctl -p -dev/media0
media-ctl-output.txt (1.1 KB)
The following is the output of v4l2-compliance
v4l2-compliance.txt (3.4 KB)
The camera and deser gets successfully detected at boot:-
[ 4.373288] ar0231 9-0010: probing v4l2 sensor.
[ 4.373942] ar0231 9-0010: tegracam sensor driver:ar0231_v2.0.6
[ 4.374195] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0231 9-0010 bound
[ 4.377600] ar0231 9-0010: Detected AR0231 sensor
[ 4.379643] max9295 9-0062: max9295_probe: success
[ 4.381495] max9296 9-0048: max9296_probe: success
[ 4.381683] i2c i2c-2: Added multiplexed i2c bus 9
Now when I run the v4l-ctl to save raw or the gstreamer pipeline, I am getting errors.
The following is the kernel error log
when running v4l2-ctl --set-fmt-video=width=1928,height=1208,pixelformat=BA12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=3 -d /dev/video0 --verbose
v4l2-raw-kernel-log.txt (2.3 KB)
This is the error when using the gstreamer pipeline :-gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)1928,height=(int)1208, framerate=30/1’ ! nvvidconv flip-method=0 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e
gst-error.txt (2.6 KB)
And its corresponding kernel log and debug log:-
nvargus-daemon-log.txt (3.1 KB)
dmesg_log.txt (3.7 KB)
debug_trace.txt (8.7 KB)
I have also tried sudo enableCamInfiniteTimeout=1 nvargus-daemon and it gives the same results.
Kindly help me fix these issues and get the camera working.
The trace log show didn’t receive any validate data from the sensor.
I would suggest consult with vendor to get support.
Thanks
Hi ,
I contacted the vendor, they had shared the working driver for Xavier AGX and i have tested it.
I am modifying the given code to make it work on a xavier NX.
The same setup works for imx219 camera with a serializer deserializer.
But i am not able to make this ar0231 work.
Kindly help me out to debug and fix this issue.
Please review all the port-index/bus-width.
Hi Shane,
From the dtsi file i shared. I have enabled only one camera on i2cbus 0 with camera port index=0 and bus width=2 in all places. Is that wrong?
Please guide me.
Do you make sure the the camera connect to CSI0(CSI-A)?
Yes i did.
You can check the dmesg log and csi log. It is connected to CSI0 - A. There is only 2 camera ports on the xavier nx board. I have connected it to camera0 conector.
I can’t give further due to there’s no any clue from the trace log if you have confirm the connection is correct.
Maybe probe the probe the signal to confirm.
Hi,
I am able to kind of probe the signal via the Deserializer software that camera data are indeed being sent.
Is there any kind of modification to dtsi or any other ways to debug this in a log to get some information on what is going wrong?
Due to you have check the log to confirm the port-index/bus-width that tell the dtsi should be fine for the camera.
Yes it is fine for the camera. i have tried the same setup for a rpi cam and it worked.
Hi @vaishnav.raju,
You may start checking if there’s data detected on the serializer, we have worked with these serdes chips so I suggest you to check this registers first during streaming:
i2ctransfer -f -y $BUS w2$SER_ADDR 0x01 0x02 r1 # Video Pipe X
i2ctransfer -f -y $BUS w2$SER_ADDR 0x01 0x0a r1 # Video Pipe Y
i2ctransfer -f -y $BUS w2$SER_ADDR 0x01 0x12 r1 # Video Pipe Z
i2ctransfer -f -y $BUS w2$SER_ADDR 0x01 0x1a r1 # Video Pipe U
Regards,
Enrique Ramirez
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com
Hi @enrique.ramirez ,
I tried your commands. The attached screenshot is the output
Can you check this for me?.Is there any more debugging steps?
Hi,
Your values look strange, and it seems I missed an @
, please make sure you set the BUS and SER_ADDR correctly, here is an example:
BUS=2
SER_ADDR=0x40
i2ctransfer -f -y $BUS w2@$SER_ADDR 0x01 0x02 r1 # Video Pipe X
i2ctransfer -f -y $BUS w2@$SER_ADDR 0x01 0x0a r1 # Video Pipe Y
i2ctransfer -f -y $BUS w2@$SER_ADDR 0x01 0x12 r1 # Video Pipe Z
i2ctransfer -f -y $BUS w2@$SER_ADDR 0x01 0x1a r1 # Video Pipe U
Hi @enrique.ramirez
I corrected that @ and ran the commands.That was the output i got.
I did it again for your reference and attached it below.
Hi @enrique.ramirez ,
Sorry in the earlier try i use the deserializer address 0x48 instead of the serializer address 0x62.
Please check the below outputs for the serializer
From your log, it seems like the serializer is not receiving data on any of its video pipes. If the Bit 7 of those registers is in HIGH state, means that the pixel-clock is detected. But in your case you are getting 0x0a, so it’s not detecting pixel-clock on any of the 4 video pipes, you should get 0x8a at least on one pipe.
Did you make sure to enable the streaming, when you run the commands?
Hi @enrique.ramirez ,
Thank for the info.
Yes i have made sure that streaming is enabled when i run the command. you can see my file below. It has the DESER settings and the camera settings
ar0231.txt (39.3 KB)
In your file, looks like serdes configuration lines are commented. Maybe you are not configuring the serdes, that would explain why pixel-clock is not detected on the serializer. Or maybe the configuration applying to the serdes is not correct according to your sensor. In this case you’ll need to review the serdes datasheets to apply the right configuration.
RidgeRun has experience on sensor and serdes drivers, if you are interested.
Regards,
-Enrique
Hi @enrique.ramirez
I am configuring the serdes via the ar0231.c driver. you can check the last section in the file i sent you , i am writing the registers at the time the camera pipeline is being run. this approach is a bit different than regular serdes setup in nvidia gmsl drivers. I can also configure the serdes via the EVK software of the serdes chip manufacturer. So i have confidence that the serdes configuration is being done right.