Video Image Sensor ov2710 via CSI at Jetson TK1

Hi,

I’m try to integrate video image sensor ov2710 via CSI at Jetson TK1.
I successfully connect to ov2710 via I2C but when I try get image from ov2710 I receive error:

[12819.303289] vi vi.1: CSI_B/CSI_C syncpt timeout, syncpt = 3, err = -11
[12819.311521] TEGRA_CSI_DEBUG_COUNTER_0 0x00000000
[12819.316741] TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
[12819.321664] TEGRA_CSI_CSI_CILA_STATUS 0x00000000
[12819.326399] TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
[12819.331323] TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
[12819.341988] TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
[12819.350091] TEGRA_CSI_CSI_CIL_E_STATUS 0x00000110
[12819.355098] TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
[12819.360870] TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
[12819.366541] TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
[12819.372913] TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000

Please give me technical support what is TEGRA_CSI_CSI_CIL_E_STATUS 0x00000110 error means and how I can fix it ?

Hello OneT, can you describe the steps you tried to set up the camera? Did you attempt to follow the Multimedia Guide to bring up the camera?

Hello ctichenor,

I done all steps according to V4L2 User Guide for Jetson TK1 manual to integrate my ov2710_v4l2 sensor driver (as template I take AR0261 sensor driver) and successfully communicate with ov2710 sensor via I2C.

I used Multimedia Guide to bring up the camera. Also I used vlc, yavta and cheese. But I receive black screen and errors in debug console that I describe previously.

Problem maybe in I2C register tables. For my ov2710_v4l2 sensor driver I take I2C register tables from linux-grinch-21.3.4/drivers/media/platform/tegra/ov2710.c file. I think I must to do some changes in this tables to configure ov2710 sensor to work via CSI.

Can you describe me what I2C register tables I should use for my ov2710_v4l2 sensor driver to work with Jetson TK1 via CSI ?

Hi OneT

  1. Both the 1920x1080 and 1280x720 REG setting should be working.
  2. Does your sensor connect to serial E? The error from show the incorrect line state sequence on clock lane.
  3. You may need to probe the mipi signal to make sure the timing is correct as mipi spec.

Hi ShaneCCC

Thank you for response.

Yes, my sensor connected to serial port E.

Hi ShaneCCC

As I understand according to Documentation/devicetree/bindings/media/video-interfaces.txt document I should add description for my ov2710 video image sensor to device tree

Please give me information which *.dtsi file I should updated and what settings I should use.

Please download the document from below link and reference to the “Sensor Driver Programming Guide” chapter
http://developer.nvidia.com/embedded/dlc/l4t-documentation-24-2

Hi ShaneCCC

According to documentation http://developer.nvidia.com/embedded/dlc/l4t-documentation-24-2 I implement and successfully parse device tree configuration file from my driver

tk1_camera_single.dtsi

/ {
    vi {
	ports {
	#address-cells = <1>;
	#size-cells = <0>;
        port@0 {
            reg = <0>;
            ov2710_vi_in0: endpoint {
                bus-width = <2>;
                remote-endpoint = <&ov2710_vi_out0>;
            };
        };
    };
};

i2c@7000c500{
			status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			ov2710_c@36 {
				compatible = "nvidia,ov2710";
				/* I2C device address */
				reg = <0x36>;
				mclk = "mclk2";

                                devnode = "video0";

				/* Physical dimensions of sensor */
				physical_w = "3.674";
				physical_h = "2.738";

				/* Sensor Model */
				sensor_model ="ov2710";

				/* Define any required hw resources needed by driver */
				/* ie. clocks, io pins, power sources */
				avdd-reg = "vana";
				iovdd-reg = "vif";

				/* Defines number of frames to be dropped by driver internally after applying */
				/* sensor crop settings. Some sensors send corrupt frames after applying */
				/* crop co-ordinates */
				post_crop_frame_drop = "0";

				
				mode0 { // OV2710_MODE_1920X1080
					mclk_khz = "24000";
					num_lanes = "1";
					tegra_sinterface = "serial_c";

					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1920";
					active_h = "1080";
					pixel_t = "bayer_bggr";
					readout_orientation = "180";
					line_length = "2688";
					inherent_gain = "1";
					mclk_multiplier = "17.0";
					pix_clk_hz = "160000000";

					min_gain_val = "1.0";
					max_gain_val = "16";
					min_hdr_ratio = "1";
					max_hdr_ratio = "64";
					min_framerate = "1.816577";
					max_framerate = "30";
					min_exp_time = "34";
					max_exp_time = "550385";
					embedded_metadata_height = "0";
				};

				mode1 { //OV2710_MODE_1280X720
					mclk_khz = "24000";
					num_lanes = "2";
					tegra_sinterface = "serial_c";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1280";
					active_h = "720";
					pixel_t = "bayer_bggr";
					readout_orientation = "180";
					line_length = "1752";
					inherent_gain = "1";
					mclk_multiplier = "17.0";
					pix_clk_hz = "160000000";

					min_gain_val = "1.0";
					max_gain_val = "16";
					min_hdr_ratio = "1";
					max_hdr_ratio = "64";
					min_framerate = "2.787078";
					max_framerate = "120";
					min_exp_time = "22";
					max_exp_time = "358733";
					embedded_metadata_height = "0";
				};
ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						ov2710_vi_out0: endpoint {
							csi-port = <2>;
							bus-width = <2>;
							remote-endpoint = <&ov2710_vi_in0>;
						};
					};
				};
			};

		};
  };

But When I try to insert a tegra_camera.ko module into the Linux Kernel I receive error

[  102.505104] [ov2710]: chip_version[0]: 0x27
[  102.509639] [ov2710]: chip_version[1]: 0x10
[  102.514016] [ov2710]: chip version 0x2710
[  103.794534] i2c i2c-2: Failed to register i2c client ov2710 at 0x36 (-16)

Please give me a technical support how I can fix this problem

It’s possible the i2c slave address conflict, you can just try to modify the 0x36 to some others to confirm the address conflict or some other problem cause probe failed.

Is it necessary to add any information about my sensor driver into the arch/arm/mach-tegra/board-ardbeg-sensors.c configuration file if I want to use dt?

Sorry not aware you are developped the camera driver on the TK1, the document is for the TX1.
Please back to the origin soc camera to measure the MIPI signal to make sure the timing is match the spec.
Or try to change the initial table to try.

Hi ShaneCCC

We resolved some problem with adapter that connected Jetson TK1 board and ov2710 video image sensor.
Now when I try to connect to ov2710 video image sensor using the command

../yavta/yavta /dev/video0 -l
Device /dev/video0 opened: vi ().
No control found.
Video format: BA81 (31384142) 1920x1080
yavta /dev/video0 -c1

I received errors

vi vi.0: initialized
platform vi.1: Driver vi requests probe deferral
soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
soc-camera-pdrv soc-camera-pdrv.8: Probing soc-camera-pdrv.8
[ov2710]: chip_version[0]: 0x27
[ov2710]: chip_version[1]: 0x10
[ov2710]: chip version 0x2710
vi vi.0: Not supporting mbus format code 0x3014
vi vi.0: Supporting mbus format code 0x300f using Bayer 8 BGBG.. GRGR..
vi vi.0: Supporting mbus format code 0x300f using Bayer 8 GBGB.. RGRG..
vi vi.0: Supporting mbus format code 0x300f using Bayer 10 BGBG.. GRGR..
vi vi.0: Supporting mbus format code 0x300f using Bayer 10 RGRG.. GBGB..
vi vi.1: initialized
vi vi.0: Not supporting mbus format code 0x3014
vi vi.1: Tegra camera driver loaded.
vi vi.0: Tegra camera driver loaded.
vi vi.0: MIPI calibration timeout!
vi vi.0: CSI_B/CSI_C syncpt timeout, syncpt = 1, err = -11
TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
TEGRA_CSI_CSI_CILA_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_E_STATUS 0x00000010
TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
vi vi.0: CSI_B/CSI_C syncpt timeout, syncpt = 2, err = -11
TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
TEGRA_CSI_CSI_CILA_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_E_STATUS 0x00000010
TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
vi vi.0: CSI_B/CSI_C syncpt timeout, syncpt = 3, err = -11
TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
TEGRA_CSI_CSI_CILA_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
TEGRA_CSI_CSI_CIL_E_STATUS 0x00000010

Please give me a technical support how I can fix this problem

You need to probe the mipi timing to make sure it’s follow the spec.