Tegra_camera module can not load

Dear all,

We based on TX1 reference and designed our own custom board, almost is same. A little difference is we try to mount 2 camera on CSI bus but I think its no problem.
I tried to flash latest Jetpack for Jetson TX1, everything work well. I see /dev/video0 character but I can not do anything with it. So I think it is not connected to real camera.
I downloaded the kernel source (24.1), using menuconfig to add more modules, compiled success. Then, flash my own kenel, and modules to device. Try to start camera driver like this :
sudo rmmod nvhost-vi
sudo modprobe ov5693_v4l2
sudo modprobe tegra_camera
After modprobe tegra_camera module, I got this error:
[ 401.280824] ov5693 6-0036: camera_common_regulator_get vif ERR: fffffffffffffdfb
[ 401.289992] ov5693 6-0036: camera_common_regulator_get vif ERR: fffffffffffffdfb
I tried to look around for similar but look like no one.
Please give me some advices.

Thanks

If your design almost the same with reference board at list one sensor connect to cis-b should be working. You could use the release image to debug this one.
You can use v4l2-ctrl utility to check the /dev/video is connect to ov5693 or not. You should see the information like below. May need install v4l-utils to get v4l2-ctl.

ubuntu@tegra-ubuntu:~$ v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output-2
Bus info : platform:vi:2
Driver version: 3.10.96
Capabilities : 0x84000001
Video Capture
Streaming
Device Capabilities
Device Caps : 0x04000001
Video Capture
Streaming
Format Video Capture:
Width/Height : 2592/1944
Pixel Format : ‘RG10’
Field : None
Bytes per Line: 5184
Size Image : 10077696
Colorspace : SRGB

Hi @ShaneCCC,

Thank for your answer. After 1 day investigating, I got a bit clear. My design have a bit difference with reference board. My board have 2 camera with 4 lanes CSI (A+B and C+D), I understand that I need rebuild my own module for each camera. So I tried to rebuild imx135_v4l2 module instead of ov5693_v4l2 module to make sure no relation with ov5693. Then, I tried to modprobe like this :

sudo rmmod nvhost-vi
sudo modprobe imx135_v4l2
sudo modprobe tegra_camera

This issue still be here: [ 401.280824] ov5693 6-0036: camera_common_regulator_get vif ERR: fffffffffffffdfb

Seem like tegra_camera module always connect to ov5693 modules. I will update once got something new.

Thanks

Hi
So your design have two imx135? Our camera reference board have board ID from the eeprom that be used to load the correct sensor modules. And the TX1 jetson-cv didn’t have imx135 board design you have to add it yourself.

How to skip auto detect and enable specific camera board.
In Jetson CV base dtsi file tegra210-jetson-cv-base-p2597-2180-a00.dts, modify the following line to include your specific camera dtsi file
#include “tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi”
Disable camera plugin manager by commenting out the following line in tegra210-jetson-cv-plugin-manager.dtsi file
#include “tegra210-jetson-cv-camera-plugin-manager.dtsi”

If I only want to change the configuration (CSI port, CSI lane configuration, I2C Address …), can you point me where can I find.

Thanks

Both of them are in the dtsi file like tegra210-camera-e3326-a00.dtsi as below.

i2c slave addres --> reg = <0x36>
CSI lanes config --> num_lanes = “2”
CSI port config --> tegra_sinterface = “serial_c”;

i2c@546c0000 {
			status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			ov5693_c@36 {
				compatible = "nvidia,ov5693";
				/* I2C device address */
				reg = <0x36>;


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

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

				/* 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";

				/**
				* A modeX node is required to support v4l2 driver
				* implementation with NVIDIA camera software stack
				*
				* mclk_khz = "";
				* Standard MIPI driving clock, typically 24MHz
				*
				* num_lanes = "";
				* Number of lane channels sensor is programmed to output
				*
				* tegra_sinterface = "";
				* The base tegra serial interface lanes are connected to
				*
				* discontinuous_clk = "";
				* The sensor is programmed to use a discontinuous clock on MIPI lanes
				*
				* dpcm_enable = "true";
				* The sensor is programmed to use a DPCM modes
				*
				* cil_settletime = "";
				* MIPI lane settle time value.
				* A "0" value attempts to autocalibrate based on mclk_multiplier
				*
				*
				*
				*
				* active_w = "";
				* Pixel active region width
				*
				* active_h = "";
				* Pixel active region height
				*
				* pixel_t = "";
				* The sensor readout pixel pattern
				* For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
				*          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
				*          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
				*
				* readout_orientation = "0";
				* Based on camera module orientation.
				* Only change readout_orientation if you specifically
				* Program a different readout order for this mode
				*
				* line_length = "";
				* Pixel line length (width) for sensor mode.
				* This is used to calibrate features in our camera stack.
				*
				* mclk_multiplier = "";
				* Multiplier to MCLK to help time hardware capture sequence
				* TODO: Assign to PLL_Multiplier as well until fixed in core
				*
				* pix_clk_hz = "";
				* Sensor pixel clock used for calculations like exposure and framerate
				*
				*
				*
				*
				* inherent_gain = "";
				* Gain obtained inherently from mode (ie. pixel binning)
				*
				* min_gain_val = ""; (floor to 6 decimal places)
				* max_gain_val = ""; (floor to 6 decimal places)
				* Gain limits for mode
				*
				* min_exp_time = ""; (ceil to integer)
				* max_exp_time = ""; (ceil to integer)
				* Exposure Time limits for mode (us)
				*
				*
				* min_hdr_ratio = "";
				* max_hdr_ratio = "";
				* HDR Ratio limits for mode
				*
				* min_framerate = "";
				* max_framerate = "";
				* Framerate limits for mode (fps)
				*
				* embedded_metadata_height = "";
				* Sensor embedded metadata height in units of rows.
				* If sensor does not support embedded metadata value should be 0.
				*/
				mode0 { // OV5693_MODE_2592X1944
					mclk_khz = "24000";
					num_lanes = "2";
					tegra_sinterface = "serial_c";

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

					active_w = "2592";
					active_h = "1944";
					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 { //OV5693_MODE_2592X1458
					mclk_khz = "24000";
					num_lanes = "2";
					tegra_sinterface = "serial_c";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "2592";
					active_h = "1458";
					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";
				};

				mode2 { //OV5693_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>;
						e3326_ov5693_out0: endpoint {
							csi-port = <2>;
							bus-width = <2>;
							remote-endpoint = <&e3326_vi_in0>;
						};
					};
				};
			};

		};
	};

ShaneCCC

I have a similar problem in that I’m developing a new camera driver. I’m basing it off the ov5693 as that seems best supported.

I’ve noticed that if I don’t plugin the e3326 camera board the ov5693 driver doesn’t even attempt to load. Is this because the plugin manager can’t find anything?

Is there a way to force the ov5693 driver to load?

Hi clutch
Yes, you can disable the plugin manager to include the ov5693’s DTS file only to enable it. You can reference to the sensor programing guide for detail information.

thanks for the reference. that is what I needed.