Issues with streaming from imx219 on production Jetson Nano SOM

Hello,

I have a custom carrier board for the Jetson Nano SOM, which has a single camera port and we’re having trouble getting the imx219 to stream videos to it. The camera works fine on the developer kit.

When I used the standard Jetson Nano production SOM image, I noticed that the there were two instances of the imx219 device (i.e. there was /dev/video0 and /dev/video1) even though only one was connected. When I looked at the kernel log, I saw the following:

[ 1.233780] imx219 7-0010: tegracam sensor driver:imx219_v2.0.6
[ 1.258704] imx219 8-0010: tegracam sensor driver:imx219_v2.0.6
[ 11.253425] vi 54080000.vi: subdev imx219 7-0010 bound
[ 11.254143] vi 54080000.vi: subdev imx219 8-0010 bound

First question: Why are there two cameras loaded?

I noticed that the plugin manager loads the fragment which has two imx219 modules (since the id requirement passes):

[ 0.382683] node /plugin-manager/fragement@10 match with board >=3448-0002-300

On the Developer Kit, I see that the second instance fails to communicate over i2c and it simply instantiates one instance of the camera.

I tried to work around this by simply entering an incorrect i2c address for the second instance of the imx219 camera in the device tree. While that worked (i.e. I only see a single instance of the camera present), I still can’t get any data to stream from the imx219 on our board.

When I run the following command:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=120

All I get are a bunch of the following responses:
video4linux video0: frame start syncpt timeout|0
video4linux video0: frame start syncpt timeout|0
video4linux video0: frame start syncpt timeout|0

Based on some googling around and searching on the forums, this seems to indicate that the frames have errors.

Second question: Can someone point to the correct location where I can debug further as to why errors are occurring and/or why there is a timeout?

We’ve collected captures of the i2c transactions between when it’s working and when it’s not, and I’ve attached them here. There are definitely things that are different, but I’m not sure if the difference explains why it’s not working. Can anyone advise?

To summarize:

  1. Why are there two cameras loaded on the production SOM with our carrier board? Is it just an error in the device tree?
  2. Can someone point to the correct location where I can debug further as to why errors are occurring and/or why there is a timeout when I try to run the above v4l2-ctl command?
  3. Can someone determine/explain if the differences in the i2c traffic confirm why we have a working vs non-working scenario?

bad_imx219_i2c.txt (5.3 KB) good_imx219_i2c.txt (7.8 KB)
Thanks!

The default image dtb define two sensors but if only connect one sensor while the sensor probe should be failed to register video node for the disconnected one.

  1. You may need to check if any i2c communication problem for the sensor.
  2. Have probe the mipi signal to confirm the output signal.

Hi,

Thanks for your reply. The i2c transactions look to be almost identical between the two cases (working and non-working). Is there a place within the driver/linux subsystem that would be a good place for me to see if there are errors in the MIPI frames?

Enable the dev_dbg() in the csi2_fops.c to get the error status, and check the TRM to get the detail information.