MIPI image streaming hangs

Hello,

I’m trying to grab images from a mipi camera on some AGX Xavier devkit. The camera produce grayscale images and is developed in house. Unfortunately the streaming gets stuck and doesn’t stream images.

I use v4l2 to debug the situation with the command:

v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat='Y12 ' --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=raw12.raw

The same command works fine on a Jetson Nano board with our mipi kernel driver but on the Xavier the command hangs with the following log in verbose mode:

VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 614400 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 614400 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 614400 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 614400 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 614400 ts: 0.000000 (error, ts-monotonic, ts-src-eof)

I’m not a MIPI/driver expert but any help is greatly appreciated!

Reference to below to get the trace log to check if any clue.

https://elinux.org/Jetson/l4t/Camera_BringUp

Thanks I will try to get more log.

Here’s the dmesg log from the v4l2-ctl command:

[  269.359762] ati640_poweron entry
[  269.359772] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[  269.464629] ati640_write_reg16(addr=0x2003, val=0x1)
[  269.528496] ati640_set_mode(): sensor_mode_id=0, mode_prop_idx=0, mode=0
[  269.636665] ati640_write_reg16(addr=0x2001, val=0x1)
[  269.744596] ati640_write_reg16(addr=0x308, val=0x0)
[  269.744607] ati640_start_streaming
[  269.852722] ati640_read_reg16(addr=0x0, val=0x3(0x3))
[  269.852733] ati640 system_status register = 0x3
[  269.852776] ati640 init complete (1)
[  269.852786] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[  269.960618] ati640_write_reg16(addr=0x2003, val=0x1)
[  269.960626] Enabled streaming(err=0x0)... reading registers
[  272.096456] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  272.096781] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  272.098090] (NULL device *): vi_capture_control_message: NULL VI channel received
[  272.098305] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  272.098567] (NULL device *): vi_capture_control_message: NULL VI channel received
[  272.098748] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  272.099269] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  274.624445] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  274.624724] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  274.626206] (NULL device *): vi_capture_control_message: NULL VI channel received
[  274.626439] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  274.626674] (NULL device *): vi_capture_control_message: NULL VI channel received
[  274.626848] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  274.627368] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

And the first lines of the tracelogs

# tracer: nop
#
# entries-in-buffer/entries-written: 150078/150078   #P:4
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        v4l2-ctl-5060    [000] ....  1176.819588: tegra_channel_open: vi-output, ati640 2-0013
        v4l2-ctl-5060    [000] ....  1176.822428: tegra_channel_set_power: ati640 2-0013 : 0x1
        v4l2-ctl-5060    [000] ....  1176.822448: camera_common_s_power: status : 0x1
        v4l2-ctl-5060    [000] ....  1176.935579: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-5060    [000] ....  1176.935585: csi_s_power: enable : 0x1
        v4l2-ctl-5060    [000] ....  1176.941712: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c5
        v4l2-ctl-5060    [000] ....  1176.979169: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-5060    [000] ....  1177.002526: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-5060    [000] ....  1177.002530: csi_s_stream: enable : 0x1
        v4l2-ctl-5060    [000] ....  1177.002965: tegra_channel_set_stream: ati640 2-0013 : 0x1
    kworker/0:14-218     [000] ....  1177.020420: rtcpu_string: tstamp:37398504782 id:0x04010000 str:"VM0 activating."
    kworker/0:14-218     [000] ....  1177.020424: rtcpu_vinotify_event: tstamp:37399249669 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1196764856128 data:0xcd9ce50010000000
    kworker/0:14-218     [000] ....  1177.020430: rtcpu_vinotify_event: tstamp:37399249860 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1196764861568 data:0x0000000031000001
    kworker/0:14-218     [000] ....  1177.020431: rtcpu_vinotify_event: tstamp:37399250050 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1196764936928 data:0xcd9ce20010000000
    kworker/0:14-218     [000] ....  1177.020432: rtcpu_vinotify_event: tstamp:37399250213 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1196764942432 data:0x0000000031000002
    kworker/0:14-218     [000] ....  1177.020434: rtcpu_nvcsi_intr: tstamp:37399645909 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020435: rtcpu_nvcsi_intr: tstamp:37399646858 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020436: rtcpu_nvcsi_intr: tstamp:37399647829 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020436: rtcpu_nvcsi_intr: tstamp:37399648752 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020437: rtcpu_nvcsi_intr: tstamp:37399649699 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020438: rtcpu_nvcsi_intr: tstamp:37399650643 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020466: rtcpu_nvcsi_intr: tstamp:37399651587 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020467: rtcpu_nvcsi_intr: tstamp:37399652529 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020467: rtcpu_nvcsi_intr: tstamp:37399653477 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020468: rtcpu_nvcsi_intr: tstamp:37399654419 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020469: rtcpu_nvcsi_intr: tstamp:37399655364 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020470: rtcpu_nvcsi_intr: tstamp:37399656308 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020470: rtcpu_nvcsi_intr: tstamp:37399657251 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020471: rtcpu_nvcsi_intr: tstamp:37399658197 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020472: rtcpu_nvcsi_intr: tstamp:37399659144 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020473: rtcpu_nvcsi_intr: tstamp:37399660085 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020473: rtcpu_nvcsi_intr: tstamp:37399661032 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020474: rtcpu_nvcsi_intr: tstamp:37399661977 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020475: rtcpu_nvcsi_intr: tstamp:37399662920 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020495: rtcpu_nvcsi_intr: tstamp:37399663865 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
    kworker/0:14-218     [000] ....  1177.020496: rtcpu_nvcsi_intr: tstamp:37399664810 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004

Hi @ShaneCCC

From the log it seems something fails while opening the stream.
I suspect something may be wrong in our device tree:

#define CAM0_RST_L	TEGRA194_MAIN_GPIO(H, 3)
#define CAM0_PWDN	TEGRA194_MAIN_GPIO(H, 6)

/* camera control gpio definitions */

/ {
	i2c@3180000 {
		ati640_a@13 {
			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			/* mclk-index indicates the index of the */
			/* mclk-name with in the clock-names array */

			clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
					 <&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;
			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			clock-frequency = <24000000>;
			reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
			vana-supply = <&p2822_avdd_cam_2v8>;
			vif-supply = <&p2822_vdd_1v8_cvb>;
		};
	};

	gpio@2200000 {
		camera-control-output-low {
			gpio-hog;
			output-low;
			gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
			label = "cam0-rst", "cam0-pwdn";
			status = "okay";
		};
	};
};

/ {
	host1x {
		vi@15c10000 {
			num-channels = <1>;
			status = "okay";
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				status = "okay";
				port@0 {
					reg = <0>;
					status = "okay";
					ati640_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <1>;
						remote-endpoint = <&ati640_csi_out0>;
						status = "okay";
					};
				};
			};
		};

		nvcsi@15a00000 {
			num-channels = <1>;
			status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			csi_chan0: channel@0 {
				status = "okay";
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					status = "okay";
					csi_chan0_port0: port@0 {
						reg = <0>;
						status = "okay";
						ati640_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <1>;
							remote-endpoint = <&ati640_out0>;
							status = "okay";
						};
					};
					csi_chan0_port1: port@1 {
						reg = <1>;
						status = "okay";
						ati640_csi_out0: endpoint@1 {
							remote-endpoint = <&ati640_vi_in0>;
                            status = "okay";
						};
					};
				};
			};
		};
	};

	i2c@3180000 {
        ati640_single_cam0: ati640_a@13 {
            compatible = "ati640";
            /* I2C device address */
            reg = <0x13>;
            
            /* V4L2 device node location */
            devnode = "video0";

            /* Physical dimensions of sensor */
            physical_w = "7.680";
            physical_h = "5.760";

            sensor_model = "ati640";

            /* enable CID_SENSOR_MODE_ID for sensor modes selection */
            use_sensor_mode_id = "true";

            //Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
            // byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
            mode0 { /* ATI640_MODE_640x480_60FPS_12BIT 12-bit video*/
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "480";
                dynamic_pixel_bit_depth="12";
                csi_pixel_bit_depth = "12";
                mode_type="gray12";
                pixel_t="gray12";
                pixel_phase="cccc";
                readout_orientation = "90";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier= "2.5";
                pix_clk_hz = "55000000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };

            //Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
            // byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
            mode1 { /* ATI640_MODE_640x480_60FPS_RGB888 */
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "480";
                dynamic_pixel_bit_depth="24";
                csi_pixel_bit_depth = "24";
                mode_type="rgb_rgb88824";
                pixel_t="rgb_rgb88824";
                pixel_phase="rggb";
                readout_orientation = "0";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier = "2";
                pix_clk_hz = "27500000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };

            //Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
            // byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
            mode2 { /* ATI640_MODE_640x481_60FPS_12BIT 12-bit video*/
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "481";
                dynamic_pixel_bit_depth="12";
                csi_pixel_bit_depth = "12";
                mode_type="gray12";
                pixel_t="gray12";
                pixel_phase="cccc";
                readout_orientation = "90";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier= "2.5";
                pix_clk_hz = "55000000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };

            //Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
            // byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
            mode3 { /* ATI640_MODE_640x481_60FPS_RGB888 */
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "481";
                dynamic_pixel_bit_depth="24";
                csi_pixel_bit_depth = "24";
                mode_type="rgb_rgb88824";
                pixel_t="rgb_rgb88824";
                pixel_phase="rggb";
                readout_orientation = "0";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier = "2";
                pix_clk_hz = "27500000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };

            //Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
            // byte clk = 55 Mhz, DPHY ref clk = 110 MHz
            mode4 { /* ATI640_MODE_640x480_60FPS_8BIT 8-bit video*/
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "480";
                dynamic_pixel_bit_depth="8";
                csi_pixel_bit_depth = "8";
                mode_type="gray";
                pixel_t="gray";
                pixel_phase="cccc";
                readout_orientation = "90";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier= "2.5";
                pix_clk_hz = "55000000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };

            //Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
            // byte clk = 55 Mhz, DPHY ref clk = 110 MHz
            mode5 { /* ATI640_MODE_640x481_60FPS_8BIT 8-bit video*/
                mclk_khz = "22000";
                num_lanes = "1";
                tegra_sinterface = "serial_a";
                phy_mode = "DPHY";
                discontinuous_clk = "no";
                dpcm_enable = "false";
                cil_settletime = "0";
                active_w = "640";
                active_h = "481";
                dynamic_pixel_bit_depth="8";
                csi_pixel_bit_depth = "8";
                mode_type="gray";
                pixel_t="gray";
                pixel_phase="cccc";
                readout_orientation = "90";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier= "2.5";
                pix_clk_hz = "55000000";
                gain_factor = "16";
                framerate_factor = "1000000";
                exposure_factor = "1000000";
                min_gain_val = "16"; /* 1.00x */
                max_gain_val = "170"; /* 10.66x */
                step_gain_val = "1";
                default_gain = "16"; /* 1.00x */
                min_hdr_ratio = "1";
                max_hdr_ratio = "1";
                min_framerate = "2000000"; /* 2.0 fps */
                max_framerate = "60000000"; /* 60 fps */
                step_framerate = "1";
                default_framerate = "60000000"; /* 60 fps */
                min_exp_time = "13"; /* us */
                max_exp_time = "683709"; /* us */
                step_exp_time = "1";
                default_exp_time = "2495"; /* us */
                embedded_metadata_height = "0";
            };
                
            ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@0 {
                    reg = <0>;
                    ati640_out0: endpoint {
                        port-index = <0>;
                        bus-width = <1>;
                        remote-endpoint = <&ati640_csi_in0>;
                    };
                };
            };
        };
    };
};

/ {

	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		num_csi_lanes = <1>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <8>;
		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>;
        status = "okay";
		
        modules {
			status = "okay";
			cam_module0: module0 {
				status = "okay";
				badge = "ati640_front_123456";
				position = "front";
				orientation = "1";
				cam_module0_drivernode0: drivernode0 {
					status = "okay";
                    pcl_id = "v4l2_sensor";
					devname = "ati640 2-0013";
					proc-device-tree = "/proc/device-tree/i2c@3180000/ati640_a@13";
				};
			};
		};
	};
};

The trace log indicate there’re more than one bit error has detected on data-lane. It could be the sensor output timing cause the problem.

Ok I will investigate the sensor timing. The sensor is working fine on Jetson Nano and TX2 though so not sure to understand why that would change on Xavier AGX.

Also need to confirm the pix_clk_hz. What’s the sensor MIPI clocks?

Here’s an extract from the device tree:


//Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mclk_khz = "22000";
                num_lanes = "1";
                active_w = "640";
                active_h = "480";
                dynamic_pixel_bit_depth="12";
                csi_pixel_bit_depth = "12";
                mode_type="gray12";
                pixel_t="gray12";
                line_length = "640";
                inherent_gain = "1";
                mclk_multiplier= "2.5";
                pix_clk_hz = "55000000";
                default_framerate = "60000000"; /* 60 fps */

From what I understand the clock settings should be the same for differents boards: Nano, TX2, Xavier…
Only ports and adresses could be different. Is that right?

Ok so it seems to be a hardware issue with the jetson board. I can grab with the same camera/same os version on another Xavier AGX board.

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