IMX219 streaming works on CSI port-0 but fails on port-1 (VI timeout) in JetPack 5.1.4 on Jetson Orin NX (2-lane)

Hi NVIDIA team,

I am working on integrating the IMX219 camera sensor on the Jetson Orin NX platform using JetPack 5.1.4.

Working scenario

  • Camera streaming works successfully on CSI port-0

  • Using 2-lane configuration

  • Sensor probe and streaming are successful

  • Frames are captured correctly

Problem scenario

  • When using the same sensor with CSI port-1, streaming fails

  • Sensor probe is successful

  • However, capture fails with VI timeout errors

Error logs

[   70.917291] bwmgr API not supported
[   73.659119] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[   73.668378] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[   73.688905] (NULL device *): vi_capture_control_message: NULL VI channel received
[   73.697474] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[   76.218958] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[   76.228140] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[   76.248528] (NULL device *): vi_capture_control_message: NULL VI channel received

Hardware details

  • Platform: Jetson Orin NX

  • Sensor: IMX219

  • Lane configuration: 2 lanes

  • Working port: CSI port-0

  • Failing port: CSI port-1

Device Tree files

I am attaching the following DTSI files:

  • tegra234-camera-rbpcv2-imx219.dtsi

  • tegra234-p3768-camera-rbpcv2-imx219.dtsi

These include my CSI port-1 configuration.

tegra234-camera-rbpcv2-imx219.zip (3.7 KB)

tegra234-p3768-camera-rbpcv2-imx219.zip (1.0 KB)

Request for support

Could you please help review and advise:

  1. Whether CSI port-1 requires additional configuration on Orin NX

  2. Whether port-index, tegra_sinterface, or num_lanes need specific values for port-1

  3. How to debug VI timeout errors on CSI port-1

  4. Whether lane polarity or CSI brick mapping needs adjustment

  5. Any recommended debug steps or logs

Please let me know if additional logs such as full dmesg, media-ctl -p, or trace logs are required.

Thanks

For IMX219 you can just enable it by jetson-io instead of modify the dts manually.

Thanks

Hi @ShaneCCC ,

Thanks for your suggestion.

I am using a custom camera board with the same IMX219 configuration (2-lane) on the Jetson Orin NX.

Will enabling IMX219 using Jetson-IO work for a custom camera board as well, or is manual device tree modification required for custom hardware?

Thanks.

You can try it.

BTW, what’s the trace log for the failed one.

Hi @ShaneCCC ,

I am using a custom camera board with the Jetson Orin NX.

As suggested, I executed:

sudo /opt/nvidia/jetson-io/jetson-io.py

and enabled the dual camera option for my custom dts. This generated a new DTB:

/boot/kernel_tegra234-p3767-0000-p3768-0000-a0-user-custom.dtb

I then converted it to DTS:

dtc -I dtb -O dts -o ~/base.dts /boot/kernel_tegra234-p3767-0000-p3768-0000-a0-user-custom.dtb

However, my custom camera DTSI changes are not present in the generated DTS.

I only see the default nodes like:

i2c_0 = "/cam_i2cmux/i2c@0";
imx219_cam0 = "/cam_i2cmux/i2c@0/rbpcv2_imx219_a@10";
imx219_cam1 = "/cam_i2cmux/i2c@1/rbpcv2_imx219_c@10";
...
tegra-camera-platform/modules/module0
tegra-camera-platform/modules/module1

My custom camera DTSI is included in:

hardware/nvidia/platform/t23x/cvb/tegra234-p3768-0000-a0.dtsi

But those custom nodes are not appearing in the Jetson-IO generated DTB.

Could you please help clarify:

How can I ensure my custom DTSI is included in the final DTB generated by Jetson-IO?

You don’t need include your customized dts.

Just run the jetson-io save and reboot then the imx219 overlay will be enable.

Thanks

Hi @ShaneCCC ,

Thanks for your reply.

I followed the Jetson-IO steps, saved the configuration, and rebooted. The overlay was enabled and the new DTB was generated successfully.

However, after this step, my custom camera driver is not loading, because my custom DTS compatible string and format configuration are not present in the generated DTB.

My custom camera, I am using:

  • A custom compatible string

  • Custom driver binding

  • Grey (monochrome) format support

  • Custom DTSI changes

After running Jetson-IO, the generated DTB only contains the default IMX219 overlay nodes, and my custom compatible and format changes are not included.

My question is:

How can I include my custom compatible string and grey format DTS changes when using Jetson-IO?

Suppose the default system should include the nv_imx219.ko that match the compatible strings.

What below command shows.

sudo dmesg | grep -i imx219

sudo dmesg | grep -i imx219

[ 12.378693] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.389298] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
[ 12.417862] imx219 9-0010: board setup failed
[ 12.422419] imx219: probe of 9-0010 failed with error -121
[ 12.434766] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[ 12.446430] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
[ 12.465060] imx219 10-0010: board setup failed
[ 12.470321] imx219: probe of 10-0010 failed with error -121

Looks like the HW design is different to apply it.

Please the trace log with customized driver on the failed sensor.

Thanks

Thanks for your response.

Could you please guide me on how to collect the trace log with the customized driver on the failed sensor?

sudo 
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0 -d /dev/video*

cat /sys/kernel/debug/tracing/trace

1 Like

Hi @ShaneCCC ,

 cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 32/32   #P:4
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/2:2-195     [002] ....   477.649832: rtcpu_string: tstamp:15689497463 id:0x04010000 str:"VM0 deactivating."
        v4l2-ctl-3577    [003] ....   477.668515: tegra_channel_open: vi-output, Author-custom 9-
        v4l2-ctl-3577    [003] ....   477.669424: tegra_channel_set_power: Author-custom 9-003c : 0x1
        v4l2-ctl-3577    [003] ....   477.669433: camera_common_s_power: status : 0x1
        v4l2-ctl-3577    [003] ....   477.669443: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3577    [003] ....   477.669445: csi_s_power: enable : 0x1
        v4l2-ctl-3577    [000] ....   477.670131: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt 5
        v4l2-ctl-3577    [003] ....   477.676822: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-3577    [003] ....   477.688054: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3577    [003] ....   477.688056: csi_s_stream: enable : 0x1
        v4l2-ctl-3577    [003] ....   477.691987: tegra_channel_set_stream: Author-custom 9-003c : 0x1
     kworker/2:2-195     [002] ....   477.705825: rtcpu_string: tstamp:15691954124 id:0x04010000 str:"VM0 activating."
     kworker/2:2-195     [002] ....   477.705829: rtcpu_vinotify_event: tstamp:15692611903 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:502146935104 data:0x759d580010000000
     kworker/2:2-195     [002] ....   477.705829: rtcpu_vinotify_event: tstamp:15692612042 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:502146941600 data:0x0000000031000001
     kworker/2:2-195     [002] ....   477.705830: rtcpu_vinotify_event: tstamp:15692612196 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:502146987488 data:0x759d550010000000
     kworker/2:2-195     [002] ....   477.705830: rtcpu_vinotify_event: tstamp:15692612328 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:502146994016 data:0x0000000031000002
 vi-output, Auth-3579    [001] .N..   480.467097: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt 5
     kworker/2:2-195     [002] ....   480.513765: rtcpu_vinotify_event: tstamp:15779417807 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:504938249792 data:0x759d580010000000
     kworker/2:2-195     [002] ....   480.513767: rtcpu_vinotify_event: tstamp:15779417943 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:504938292480 data:0x0000000031000001
     kworker/2:2-195     [002] ....   480.513768: rtcpu_vinotify_event: tstamp:15779418099 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:504938310112 data:0x759d550010000000
     kworker/2:2-195     [002] ....   480.513768: rtcpu_vinotify_event: tstamp:15779418231 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:504938370432 data:0x0000000031000002
        v4l2-ctl-3577    [001] ....   482.878942: tegra_channel_close: vi-output, Author-custom 9-
 vi-output, Auth-3579    [003] ....   483.025703: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt 5
        v4l2-ctl-3577    [002] ....   483.035627: tegra_channel_set_stream: enable : 0x0
        v4l2-ctl-3577    [002] ....   483.035630: tegra_channel_set_stream: Author-custom 9-003c : 0x0
        v4l2-ctl-3577    [002] ....   483.035649: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-3577    [002] ....   483.035650: csi_s_stream: enable : 0x0
        v4l2-ctl-3577    [002] ....   483.047124: tegra_channel_set_power: Author-custom 9-003c : 0x0
        v4l2-ctl-3577    [002] ....   483.047138: camera_common_s_power: status : 0x0
        v4l2-ctl-3577    [002] ....   483.047147: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-3577    [002] ....   483.047149: csi_s_power: enable : 0x0
     kworker/2:0-3556    [002] ....   488.577648: rtcpu_string: tstamp:16032740804 id:0x04010000 str:"VM0 deactivating."

Hi cookiecooker249,

Could you share your custom DTS changes? The files in the zip appear to use the default "sony,imx219" compatible string, and I don’t see the custom compatible string or format you mentioned.

For CSI port 1 and a 2-lane configuration, please verify that the configuration includes:

port-index = <2>;
bus-width = <2>;
tegra_sinterface = "serial_c";

These are just a few key parameters to check. It would be helpful to review the complete camera node and its endpoint definitions to confirm they match correctly.

Before we go further, information about the streaming tests would be helpful for debugging.
Which command are you using to test the stream? Are you testing with v4l2-ctl or with GStreamer?

If you want to use Jetson-IO with your custom changes, move your DTS modifications into a device tree overlay file rather than modifying the base DT files directly. Then:

  1. Compile the overlay to generate a .dtbo file.
  2. Copy the .dtbo file to /boot/.
  3. Run jetson-io again and select the new overlay.

This should add your changes to the new DTB after running jetson-io.

Regards,

Kimberly Carvajal
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

1 Like

Looks like NVCSI/VI doesn’t receive any validate from the sensor.

You may need to probe the sensor output signal to confirm.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.