Jetson Nano dual camera bug, video1 not capturing data

Hello,

I am using a p3448-b01 nano on a custom carrier board. I completely copied the mipi dual cam schematic from the developer kit schematic. I have attached the relevant schematic files below as well as the commands issued and the dmesg log.

I have made no changes to the b00 dtb file in regards to the cameras. I would assume it was a hardware issue, but I find it unlikely since:
a) both cameras are recognized
b) video0 is able to record to a file
c) both mipi connections are identical

I have tried swapping cameras, it appears that video0 works regardless of which camera is connected. Both cameras are sony IMX219.

Any assistance is greatly appreciated,
Ben

Terminal Window

Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.9.140-tegra aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

269 packages can be updated.
199 updates are security updates.

Last login: Fri Oct 16 18:02:04 2020
nvidia@nn-024:~$ gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! nvvidconv ! omxh264enc ! h264parse ! matroskamux ! filesink location=test0.mkv
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 40 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:08.813899528
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL ...
Freeing pipeline ...
nvidia@nn-024:~$ gst-launch-1.0 -e nvarguscamerasrc sensor-id=1 ! nvvidconv ! omxh264enc ! h264parse ! matroskamux ! filesink location=test1.mkv
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 40 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
^C
nvidia@nn-024:~$ ls -l
total 2192
drwxr-xr-x 2 nvidia nvidia    4096 Jan 28  2018 Desktop
-rw-r--r-- 1 nvidia nvidia    8980 Jan 28  2018 examples.desktop
-rw-rw-r-- 1 nvidia nvidia 2226408 Oct 16 18:02 test0.mkv
-rw-rw-r-- 1 nvidia nvidia       0 Oct 16 18:03 test1.mkv

dmesg output
dmesg.txt (106.6 KB)

debug uart output
debug-msg.txt (22.4 KB)

Schematic files



Looks like i2c have problem to access the sensor.
How about v4l2-ctl command to capture?

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fcamera_sensor_prog.html%23wwpID0E0LF0HA

[ 156.172282] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x10
[ 156.178908] regmap_util_write_table_8:regmap_util_write_table:-121[ 156.235985] imx219 8-0010: Error turning off streaming

Hello,

Using the v4l2 commands resulted in the following:

nvidia@nn-024:~$ v4l2-compliance -d /dev/video0
v4l2-compliance SHA   : not available

Driver Info:
        Driver name   : tegra-video
        Card type     : vi-output, imx219 7-0010
        Bus info      : platform:54080000.vi:0
        Driver version: 4.9.140
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
                test VIDIOC_QUERYCTRL: OK
                test VIDIOC_G/S_CTRL: OK
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 1 Private Controls: 17

        Format ioctls:
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
                fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
                test VIDIOC_G/S_PARM: FAIL
                test VIDIOC_G_FBUF: OK (Not Supported)
                test VIDIOC_G_FMT: OK
                test VIDIOC_TRY_FMT: OK
                test VIDIOC_S_FMT: OK
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK (Not Supported)
                test Composing: OK (Not Supported)
                test Scaling: OK (Not Supported)

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 42, Failed: 1, Warnings: 0
nvidia@nn-024:~$ v4l2-compliance -d /dev/video1
v4l2-compliance SHA   : not available

Driver Info:
        Driver name   : tegra-video
        Card type     : vi-output, imx219 8-0010
        Bus info      : platform:54080000.vi:4
        Driver version: 4.9.140
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format

Compliance test for device /dev/video1 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
                test VIDIOC_QUERYCTRL: OK
                test VIDIOC_G/S_CTRL: OK
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 1 Private Controls: 17

        Format ioctls:
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
                fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
                test VIDIOC_G/S_PARM: FAIL
                test VIDIOC_G_FBUF: OK (Not Supported)
                test VIDIOC_G_FMT: OK
                test VIDIOC_TRY_FMT: OK
                test VIDIOC_S_FMT: OK
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK (Not Supported)
                test Composing: OK (Not Supported)
                test Scaling: OK (Not Supported)

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

However, trying to run the v4l2 capture shows:

nvidia@nn-024:~$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video1
^C
nvidia@nn-024:~$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video0
<<<<<<<<<<<<<<<<<<<<<<< 21.35 fps
<<<<<<<<<<<<<<<<<<<<< 21.28 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<
nvidia@nn-024:~$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video1
^C
nvidia@nn-024:~$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video0
<<<<<<<<<<<<<<<<<<<<<<< 21.35 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<
nvidia@nn-024:~$

When I ran the v4l2 pipeline, I received the following messages in dmesg:

[  398.404791] video4linux video0: tegra_channel_capture_done: MW_ACK_DONE syncpoint time out!0
[  402.540425] video4linux video1: frame start syncpt timeout!0
[  402.748791] video4linux video1: frame start syncpt timeout!0
[  402.956752] video4linux video1: frame start syncpt timeout!0
[  403.164769] video4linux video1: frame start syncpt timeout!0
[  403.373066] video4linux video1: frame start syncpt timeout!0
[  403.580709] video4linux video1: frame start syncpt timeout!0
[  403.788688] video4linux video1: frame start syncpt timeout!0
[  403.996675] video4linux video1: frame start syncpt timeout!0
[  404.204651] video4linux video1: frame start syncpt timeout!0
[  404.412648] video4linux video1: frame start syncpt timeout!0
[  404.620943] video4linux video1: frame start syncpt timeout!0
[  404.828632] video4linux video1: frame start syncpt timeout!0
[  405.036703] video4linux video1: frame start syncpt timeout!0
[  405.244628] video4linux video1: frame start syncpt timeout!0
[  405.452622] video4linux video1: frame start syncpt timeout!0
[  405.660549] video4linux video1: frame start syncpt timeout!0
[  405.868535] video4linux video1: frame start syncpt timeout!0
[  406.076570] video4linux video1: frame start syncpt timeout!0
[  406.284572] video4linux video1: frame start syncpt timeout!0
[  406.492572] video4linux video1: frame start syncpt timeout!0
[  406.700557] video4linux video1: frame start syncpt timeout!0
[  406.908500] video4linux video1: frame start syncpt timeout!0
[  407.120622] video4linux video1: frame start syncpt timeout!0
[  426.807702] video4linux video0: tegra_channel_capture_done: MW_ACK_DONE syncpoint time out!0

I have also attached a scope image of the i2c communication when running the nvidia@nn-024:~$ v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video<n> commands:

video0
The images are for the beginning of the stream and end of the stream

video1
The images are foe the beginning of the stream, there is no end of stream

In addition, I have attached some images from a logic analyzer connected to video0 i2c on channels 0/1, video1 i2c on channels 2/3, and i2c_mux on channel 4.

The following images were captured during boot:

  1. Overview of relevant i2c communication on both lines
  2. Example of i2c on video0
  3. Example of i2c on video1



Based on this, I believe the i2c mux is working as intended (a carbon copy of the b01 dev board)

I think it could be the customized carrier board have something wrong cause the problem.
Is it possible connect the camera to devkit to verify?

Hi benx

it is CSI0 & CSI2 on dev kit not 0 & 1.

Wow thank you!

I can’t believe I missed that during the design. I will be looking into fixing this in the kernel first before making a hardware change. If I do find a resolution to this in the kernel I will post the updated files for others to use. Otherwise I will mark this as the solution.

Ben

Based on the jetson nano design guide, the MIPI CSI1 lines can only be used for 4-lane cameras in conjunction with MIPI CSI0. As such, it is not able to be used.