CSI-0 with MIPI 4 lane is not working properly

Hello all,

We have developed a customer carrier board that is very similar to the Jetson Orin Nano devkit, with a custom image created using the Yocto tool. We are using IMX252 camera sensor and Vision Component driver.

We have followed the Jetson Nano product design guide for 4 lanes cames.

We can see both cameras at /dev/video* and get the basic info on each camera, but we cannot capture any frame with CSI0.

According to that, we have modified the device tree following:

/*
 * Copyright (c) 2024, Vision Components GmbH.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <dt-bindings/media/camera.h>
#include <dt-bindings/pinctrl/pinctrl-tegra.h>

// ------------------------------------------------------------------------------------------------
//  Driver Configuration for NVIDIA Jetson Orin Nano 
// ------------------------------------------------------------------------------------------------
#define VC_MIPI_CAM_0       1   // 1: Enabled, 0: Disabled  (serial_a => CSI Port 0 => VI Stream 0)
#define VC_MIPI_CAM_1       1   // 1: Enabled, 0: Disabled  (serial_c => CSI Port 2 => VI Stream 2)
// ------------------------------------------------------------------------------------------------
//  Supported number of lanes
// -----+------------------------------------------------------------------------------------------
//  1   | OV7251, IMX296, IMX297
//  2   | OV9281, IMX264, IMX265
//  2,4 | IMX178, IMX183, IMX226, IMX250, IMX252, IMX273, IMX290, IMX327, IMX335, IMX392, 
//      | IMX412, IMX415, IMX462, IMX565, IMX566, IMX567, IMX568, IMX900
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_LANES       4   // 1, 2, 4 Lanes
// ------------------------------------------------------------------------------------------------
//  Embedded Metadata Height
// -----+------------------------------------------------------------------------------------------
//  0   | IMX178, IMX183, IMX226, IMX250, IMX252, IMX264, IMX265, IMX273, IMX392, OV7251, OV9281
//  1   | IMX290, IMX327, IMX335, IMX415, IMX462, IMX900
//  2   | IMX296, IMX297, IMX412
//  4   | IMX565, IMX566, IMX567, IMX568
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_METADATA_H  "0" // "0", "1", "2", "4" Lines of meta data
// ------------------------------------------------------------------------------------------------
//   Sensor Manufacturer
// -----+------------------------------------------------------------------------------------------
//   1  | Sony Sensor (IMX)
//   2  | Omni Vision Sensor (OV)
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_MANUFACTURER 1
// ------------------------------------------------------------------------------------------------
//  GStreamer Support
// ------------------------------------------------------------------------------------------------
//  If you want to use GStreamer with nvarguscamerasrc you have to adjust this settings in the 
//  device tree below. The sections which have to be modified are marked by a comment. 
//  To find the correct parameter values please follow the instruction in the main README.md of 
//  this repository https://github.com/VC-MIPI-modules/vc_mipi_nvidia#gstreamer-support
// ------------------------------------------------------------------------------------------------

#if VC_MIPI_LANES == 1
    #define BUS_WIDTH 1
    #define NUM_LANES "1" 
    #define NUM_CSI_LANES 2
    #define PIX_CLK_HZ "150000000"
#endif
#if VC_MIPI_LANES == 2
    #define BUS_WIDTH 2
    #define NUM_LANES "2" 
    #define NUM_CSI_LANES 4
    #define PIX_CLK_HZ "300000000"
#endif
#if VC_MIPI_LANES == 4
    #define BUS_WIDTH 4
    #define NUM_LANES "4" 
    #define NUM_CSI_LANES 8
    #define PIX_CLK_HZ "600000000"
#endif

#if VC_MIPI_CAM_0 == 1 && VC_MIPI_CAM_1 == 1
    #define VC_MIPI_CAMERAS 2
#else
    #define VC_MIPI_CAMERAS 1
#endif

/ {
        tegra-capture-vi  {
                num-channels = <VC_MIPI_CAMERAS>;
                ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_CAM_0 == 1
                        vc_vi_port0: port@0 {
                                reg = <0>;
                                vc_vi_in0: endpoint {
                                        port-index = <0>;
                                        bus-width = <BUS_WIDTH>;
                                        remote-endpoint = <&vc_csi_out0>;
                                };
                        };
#endif
#if VC_MIPI_CAM_1 == 1
                        vc_vi_port1: port@1 {
                                reg = <1>;
                                vc_vi_in1: endpoint {
                                        port-index = <2>;
                                        bus-width = <BUS_WIDTH>;
                                        remote-endpoint = <&vc_csi_out1>;
                                };
                        };
#endif
                }; // ports
        };

        host1x@13e00000 {
                nvcsi@15a00000 {
                        num-channels = <VC_MIPI_CAMERAS>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_CAM_0 == 1
                        vc_csi_chan0: channel@0 {
                                reg = <0>;
                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                                vc_csi_chan0_port0: port@0 {
                                                reg = <0>;
                                                vc_csi_in0: endpoint@0 {
                                                        port-index = <0>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_mipi_out0>;
                                                };
                                        };
                                        vc_csi_chan0_port1: port@1 {
                                                reg = <1>;
                                                vc_csi_out0: endpoint@1 {
                                                        remote-endpoint = <&vc_vi_in0>;
                                                };
                                        };
                                };
                        };
#endif

#if VC_MIPI_CAM_1 == 1
                        vc_csi_chan1: channel@1 {
                                reg = <1>;
                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        vc_csi_chan1_port0: port@0 {
                                                reg = <0>;
                                                vc_csi_in1: endpoint@2 {
                                                        port-index = <2>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_mipi_out1>;
                                                };
                                        };
                                        vc_csi_chan1_port1: port@1 {
                                                reg = <1>;
                                                vc_csi_out1: endpoint@3 {
                                                        remote-endpoint = <&vc_vi_in1>;
                                                };
                                        };
                                };
                        };
#endif
                };
        };

        cam_i2cmux {
#if VC_MIPI_CAM_0 == 1
                i2c@0 {
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi_cam0: vc_mipi@1a {
                                reg                     = <0x1a>;
#else
                        vc_mipi_cam0: vc_mipi@60 {
                                reg                     = <0x60>;
#endif
                                compatible              = "nvidia,vc_mipi";
                                devnode                 = "video0";
                                use_sensor_mode_id      = "false";
                                sensor_model            = "vc_mipi";

                                num_lanes               = NUM_LANES;
                                trigger_mode            = "0";
                                io_mode                 = "0";

                                // ----------------------------------------------------
                                // If you want to use GStreamer with nvarguscamerasrc
                                // you have to adjust this settings
                                physical_w              = "1.000";
                                physical_h              = "1.000";
                                // ----------------------------------------------------

                                // This node is needed by the Tegra framework.
                                // You don't have to change any settings if just want 
                                // to use the V4L API.
                                mode0 {
                                        num_lanes                = NUM_LANES;
                                        tegra_sinterface         = "serial_a";
                                        embedded_metadata_height = VC_MIPI_METADATA_H;
                                        readout_orientation      = "0";
                                        lane_polarity            = "6";

                                        // ----------------------------------------------------
                                        // If you want to use GStreamer with nvarguscamerasrc
                                        // you have to adjust this settings. 
                                        active_l                 = "0";
                                        active_t                 = "0";
                                        active_w                 = "0";
                                        active_h                 = "0";
                                        mode_type                = "bayer";
                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "10";

                                        min_gain_val             = "0";         // mdB
                                        max_gain_val             = "48000";     // mdB
                                        step_gain_val            = "100";       // mdB
                                        default_gain             = "0";         // mdB

                                        min_exp_time             = "1";         // us
                                        max_exp_time             = "1000000";   // us
                                        step_exp_time            = "1";         // us
                                        default_exp_time         = "10000";     // us

                                        // For applications like argus_camera, there should 
                                        // be a minimal frame rate greater than zero!
                                        min_framerate            = "100";       // mHz
                                        max_framerate            = "60000";     // mHz
                                        step_framerate           = "100";       // mHz
                                        default_framerate        = "60000";     // mHz
                                        // ----------------------------------------------------

                                        gain_factor              = "1000";
                                        exposure_factor          = "1000000";
                                        framerate_factor         = "1000";
                                        inherent_gain            = "1";
                                        min_hdr_ratio            = "1";
                                        max_hdr_ratio            = "1";

                                        line_length              = "0";
                                        phy_mode                 = "DPHY";
                                        discontinuous_clk        = "no";
                                        mclk_khz                 = "24000";
                                        pix_clk_hz               = PIX_CLK_HZ;
                                        mclk_multiplier          = "0.0";       // deprecated
                                        cil_settletime           = "0";
                                        dpcm_enable              = "false";
                                };

                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        port@0 {
                                                reg = <0>;
                                                vc_mipi_out0: endpoint {
                                                        port-index = <0>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_csi_in0>;
                                                };
                                        };
                                };
                        };
                };
#endif // VC_MIPI_CAM_0

#if VC_MIPI_CAM_1 == 1
                i2c@1 {
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi_cam1: vc_mipi@1a {
                                reg                     = <0x1a>;
#else
                        vc_mipi_cam1: vc_mipi@60 {
                                reg                     = <0x60>;
#endif
                                compatible              = "nvidia,vc_mipi";
                                devnode                 = "video1";
                                use_sensor_mode_id      = "false";
                                sensor_model            = "vc_mipi";

                                num_lanes               = NUM_LANES;
                                trigger_mode            = "0";
                                io_mode                 = "0";

                                // ----------------------------------------------------
                                // If you want to use GStreamer with nvarguscamerasrc
                                // you have to adjust this settings
                                physical_w              = "1.000";
                                physical_h              = "1.000";
                                // ----------------------------------------------------

                                // This node is needed by the Tegra framework.
                                // You don't have to change any settings if just want 
                                // to use the V4L API.
                                mode0 {
                                        num_lanes                = NUM_LANES;
                                        tegra_sinterface         = "serial_c";
                                        embedded_metadata_height = VC_MIPI_METADATA_H;
                                        readout_orientation      = "0";
                                        lane_polarity            = "0";

                                        // ----------------------------------------------------
                                        // If you want to use GStreamer with nvarguscamerasrc
                                        // you have to adjust this settings. 
                                        active_l                 = "0";
                                        active_t                 = "0";
                                        active_w                 = "0";
                                        active_h                 = "0";
                                        mode_type                = "bayer";
                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "10";

                                        min_gain_val             = "0";         // mdB
                                        max_gain_val             = "48000";     // mdB
                                        step_gain_val            = "100";       // mdB
                                        default_gain             = "0";         // mdB

                                        min_exp_time             = "1";         // us
                                        max_exp_time             = "1000000";   // us
                                        step_exp_time            = "1";         // us
                                        default_exp_time         = "10000";     // us

                                        // For applications like argus_camera, there should 
                                        // be a minimal frame rate greater than zero!
                                        min_framerate            = "100";       // mHz
                                        max_framerate            = "60000";     // mHz
                                        step_framerate           = "100";       // mHz
                                        default_framerate        = "60000";     // mHz
                                        // ----------------------------------------------------

                                        gain_factor              = "1000";
                                        exposure_factor          = "1000000";
                                        framerate_factor         = "1000";
                                        inherent_gain            = "1";
                                        min_hdr_ratio            = "1";
                                        max_hdr_ratio            = "1";

                                        line_length              = "0";
                                        phy_mode                 = "DPHY";
                                        discontinuous_clk        = "no";
                                        mclk_khz                 = "24000";

                                        pix_clk_hz               = PIX_CLK_HZ;
                                        mclk_multiplier          = "0.0";       // deprecated
                                        cil_settletime           = "0";
                                        dpcm_enable              = "false";
                                };

                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        port@0 {
                                                reg = <0>;
                                                vc_mipi_out1: endpoint {
                                                        port-index = <2>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_csi_in1>;
                                                };
                                        };
                                };
                        };
                };
#endif // VC_MIPI_CAM_1
        };

        lens@vc_mipi {
                min_focus_distance  = "0.0";
                hyper_focal         = "0.0";
                focal_length        = "6.0";
                f_number            = "2.0";
                aperture            = "0.0";
        };
};

/ {
        tcp: tegra-camera-platform {
                compatible = "nvidia, tegra-camera-platform";

                num_csi_lanes = <NUM_CSI_LANES>;
                max_lane_speed = <1500000>;
                min_bits_per_pixel = <10>;
                vi_peak_byte_per_pixel = <2>;
                vi_bw_margin_pct = <25>;
                max_pixel_rate = <240000>;
                isp_peak_byte_per_pixel = <5>;
                isp_bw_margin_pct = <25>;

                modules {
#if VC_MIPI_CAM_0 == 1
                        cam_module0: module0 {
                                badge = "jakku_front_vc_mipi";
                                position = "front";
                                orientation = "1";
                                cam_module0_drivernode0: drivernode0 {
                                        pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
                                        devname = "vc_mipi 9-001a";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/vc_mipi@1a";
#else
                                        devname = "vc_mipi 9-0060";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/vc_mipi@60";
#endif
                                };
                                cam_module0_drivernode1: drivernode1 {
                                        pcl_id = "v4l2_lens";
                                        proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
                                };
                        };
#endif // VC_MIPI_CAM_0

#if VC_MIPI_CAM_1 == 1
                        cam_module1: module1 {
                                badge = "jakku_rear_vc_mipi";
                                position = "rear";
                                orientation = "1";
                                cam_module1_drivernode0: drivernode0 {
                                pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
                                devname = "vc_mipi 10-001a";
                                proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/vc_mipi@1a";
#else
                                devname = "vc_mipi 10-0060";
                                proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/vc_mipi@60";
#endif	
                                };
                                cam_module1_drivernode1: drivernode1 {
                                        pcl_id = "v4l2_lens";
                                        proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
                                };
                        };
#endif // VC_MIPI_CAM_1
                };
        };
};

#define CAM0_PWDN	TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(AC, 0)
#define CAM_I2C_MUX 	TEGRA234_AON_GPIO(CC, 3)

/ {
        cam_i2cmux {
                status = "okay";
                compatible = "i2c-mux-gpio";
                #address-cells = <1>;
                #size-cells = <0>;
                mux-gpios = <&tegra_aon_gpio CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
                i2c-parent = <&cam_i2c>;
#if VC_MIPI_CAM_0 == 1
                i2c@0 {
                        status = "okay";
                        reg = <0>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi@1a {
#else
                        vc_mipi@60 {
#endif
                                reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
                        };
                };
#endif
#if VC_MIPI_CAM_1 == 1
                i2c@1 {
                        status = "okay";
                        reg = <1>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi@1a {
#else
                        vc_mipi@60 {
#endif
                                reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
                        };
                };
#endif
	};

        gpio@2200000 {
                camera-control-output-low {
                        gpio-hog;
                        output-low;
                        gpios = <CAM0_PWDN 0 CAM1_PWDN 0>;
                        label = "cam0-pwdn","cam1-pwdn";
                };
        };
};

hello wolfcoder90,

I’ve went through your device tree very quickly,
did you meant you’re able to fetch the stream, but it fail with 4-lane configuration only?

may I know what’s the error logs.
besides, please refer to Sensor Pixel Clock, you must be set pixel clock correctly to avoid potential issues.

Hello JerryChang, thanks for reply

I mean I can see both camera in device node and and also get formats info for both camera, I can fetch the stream from CAM1 and could not get any fetch from CAM0, though the board the 4 lanes in for both camera and I also modified the device tree accordingly.

root@jetson:~# ls /dev/video*
/dev/video0  /dev/video1
root@jetson:~# v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Discrete 2048x1536
                        Interval: Discrete infs (0.000 fps)
root@jetson:~# v4l2-ctl -d /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Discrete 2048x1536
                        Interval: Discrete infs (0.000 fps)
root@jetson:~# v4l2-ctl -d /dev/video1 --stream-mmap --stream-count=100
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 84.57 fps
<<<<<<<<<<<<<<
root@jetson:~# v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=100

Sensor pixel clock is set already

#if VC_MIPI_LANES == 4
    #define BUS_WIDTH 4
    #define NUM_LANES "4" 
    #define NUM_CSI_LANES 8
    #define PIX_CLK_HZ "600000000"

hello wolfcoder90,

according to VI tracing logs, there’s no validate frame packets on the CSI channel.
please review the schematic since it’s a customer carrier board,
BTW, could you please double check the polarity swap, it’s Orin Nano module to have CSI0 D1 and CSI1 D0 P/N swizzled. do you have another polarity swap on the carrier board?

Polarities are same on SOM, did not change in design to avoid double polarity.

Hello @JerryChang

This is what I found from kernel log

root@surface-os:~# dmesg | tail
[ 2081.059459] bwmgr API not supported
[ 2086.402239] bwmgr API not supported
[ 2086.402442] bwmgr req failed for 8
[ 2086.402458] misc tegra_camera_ctrl: tegra_camera_isomgr_request: ICC failed to reserve 146484s
[ 2086.402463] misc tegra_camera_ctrl: tegra_camera_update_isobw: failed to reserve 146484 KBps r
[ 2086.403555] vc_mipi 10-001a: vc_core_set_format(): Set format 0x300f (RG10)
[ 2086.403565] vc_mipi 10-001a: vc_core_try_format(): Try format 0x300f (RG10, format: 0x2b)
[ 2086.404794] vc_mipi 10-001a: vc_sen_set_exposure(): Set sensor exposure: 10000 us
[ 2086.405573] vc_mipi 10-001a: vc_sen_start_stream(): Start streaming
[ 2086.620784] vc_mipi 10-001a: vc_sen_stop_stream(): Stop streaming

Though we did not change the polarity but I have tried with lane_polarity = "0"; for CAM0, didN#t work.

Later #define PIX_CLK_HZ "1000000000" instead of #define PIX_CLK_HZ "600000000". Also did not work.

It seems CAM11 is working but CAM0 is failing but I could not find any mismatch

dmesg | grep -i csi
[  720.862886] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 1 vc- 0
[  725.983504] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  725.983518] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 1 vc- 0
[  731.103099] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  731.103107] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 1 vc- 0
[  736.223098] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  736.223107] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 1 vc- 0
[  741.343031] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1

hello wolfcoder90,

may I confirm the Jetpack release version you’re working with?
please check release tag, $ cat /etc/nv_tegra_release for confirmation.

I am working now on 35.4. I could not move to newest version as the camera driver vision component does not support 36.3 yet.

root@surface-os:~# cat /etc/nv_tegra_release
cat: /etc/nv_tegra_release: No such file or directory
root@surface-os:~# uname -a
Linux surface-os 5.10.120-l4t-r35.4.ga+g76678311c10b #1 SMP PREEMPT Fri Aug 4 11:16:53 UTC 2023 aarch64 GNU/Linux
root@surface-os:~# uname -r
5.10.120-l4t-r35.4.ga+g76678311c10b

hello wolfcoder90,

I doubt why you don’t have that release tag, are you working with native Jetpack public release image?
for instance,

nvidia@tegra-ubuntu:~$ cat /etc/nv_tegra_release 
# R35 (release), REVISION: 6.0, GCID: 37391689, BOARD: t186ref, EABI: aarch64, DATE: Wed Aug 28 09:12:27 UTC 2024

No. Not Native Jatpack. I am using Yocto tools and meta-tegra layer to build the image.

OE4T/meta-tegra: BSP layer for NVIDIA Jetson platforms, based on L4T

Today, I have tried ./quickstart.sh method folowwing VC-MIPI-modules/vc_mipi_nvidia: Vision Components MIPI CSI-2 driver for NVIDIA Jetson Nano, Xavier NX, AGX Xavier, TX2 and Orin Nano, Orin NX with necessary changes for example 4 lanes, for CAM0: port-index = <0x00>, tegra_sinterface = “serial_a” and for CAM1: port-index = <0x02>, tegra_sinterface = “serial_c”

v4l-ctls was missing so I manually installed it yet, got this error

jetson@nvidia:~$ v4l2-ctl -d /dev/video1 --stream-mmap --stream-count=100
[   65.760426] WARNING: CPU: 0 PID: 2059 at /home/master/vc_mipi/vc_mipi_nvidia/build/Xavier_35.4.1/Linux_for_Tegra/source/public0
[   65.782553] ---[ end trace fc8412552347a3c0 ]---
[   65.787505] tegra194-vi5 13e40000.host1x:vi1@14c00000: failed to register control callback
[   65.796029] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[   65.803532] WARNING: CPU: 0 PID: 2059 at /home/master/vc_mipi/vc_mipi_nvidia/build/Xavier_35.4.1/Linux_for_Tegra/source/public8
[   65.824643] ---[ end trace fc8412552347a3c1 ]---
[   65.829432] tegra194-vi5 13e40000.host1x:vi1@14c00000: IVC control submit failed
[   65.837044] tegra194-vi5 13e40000.host1x:vi1@14c00000: csi_stream_release: failed to disable nvcsi tpg on stream 2 virtual cha0
                VIDIOC_STREAMON returned -1 (No such device)

Now this happed for both of camera. Following: L4t 35.4.1

hello wolfcoder90,

I would like to double check your port bindings,
could you please disassembler the dtb file into text file, and please share the results for reference,
for instance, $ dtc -I dtb -O dts -o temp.txt tegra234-xxx.dtb

Here is the device tree. In my system, the file name is a little different kernel_tegra234-p3767-0004-p3768-0000-a0.dtb

temp.txt (418.1 KB)

hello wolfcoder90,

according to below… it looks you’ve using CSI-B and CSI-C
however, CSI-B cannot support with 4-lane configuration due to clock limitation.
for instance,

	tegra-capture-vi {
		ports {
			port@0 {
				endpoint {
					port-index = <0x01>;
					bus-width = <0x04>;
	cam_i2cmux {
		i2c@0 {
			vc_mipi@1a {
				reg = <0x1a>;
				compatible = "nvidia,vc_mipi";

				mode0 {
					num_lanes = [34 00];
					tegra_sinterface = "serial_b";

					port@0 {
						endpoint {
							port-index = <0x01>;
							bus-width = <0x04>;

please review your board design,
if you’re using CSI-A actually, please revise the port-index and tegra_sinterface to CSI-A.
for instance, port-index = <0>; and tegra_sinterface = "serial_a";

Hi @JerryChang,
I have re-flashed it again. It is quite weird because I changed the driver device tree before the image was built. There are a total of three port indexes for CAM0 and the other three for CAM1. This modification took place; only the last two changed, and the other four did not. So I dumped it from the system and modified, converted, and reapplied (rebooted the boot) it. It is still the same. And some times after this modification, I can not see any of the cameras.

I have attached the data file again.
kernel_tegra234-p3767-0004-p3768-0000-a0.txt (418.1 KB)

hello wolfcoder90,

did you meant the device tree changes did not applied?
please try using device tree overlay, you may see-also Release Notes (r35.6.0) for [4.2. Device Registration].

Hi @JerryChang,

It seems it is only a software issue, not a hardware issue. I got an Auvidea JNX42 board with 4 lanes in both camera ports and flashed the image. Later, I took NVME SSD from Advidea to my custom board, and now the camera is working. So, there must be some changes needed in BSP or in the device tree. I will look into thier BSP package as well device tree for more details.

hello wolfcoder90,

just an FYI,
it must have device tree update for camera device registration.