Custom MIPI CSI camera driver missing

Hi,

I made a custom MIPI camera driver for Jetson TX2i, the driver was loading and I used to get the following output:

vte-developer@vtedeveloper-desktop:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB
		Size: Discrete 3264x2464
			Interval: Discrete 0.048s (21.000 fps)

However, today, when I checked, I don’t get any output

vte-developer@vtedeveloper-desktop:~$ v4l2-ctl --list-formats-ext
Failed to open /dev/video0: No such file or directory
vte-developer@vtedeveloper-desktop:~$ v4l2-ctl --list-devices
Failed to open /dev/video0: No such file or directory
vte-developer@vtedeveloper-desktop:~$ 

Further, dmesg also dose not show the driver getting loaded:

vte-developer@vtedeveloper-desktop:~$ dmesg | grep ov5693
vte-developer@vtedeveloper-desktop:~$ 

I have used sudo apt-get upgrade recently while installing opencv and other things to access a USB camera, did that cause it?

How can i force to load my custom driver at the time of boot?

Looks like the upgrade command override the device tree to disable your sensor. You may need to restore the driver and device tree again.

Thanks

Hi @ShaneCCC ,

How do i do that? Do i have to flash again?

Ia there any other way?

I don’t think so.
Suppose the default system image don’t have your sensor driver configure.
Do what your do to enable the camera at first.

Hi @ShaneCCC,

I am sorry, I don’t follow. What should I do? How do I enable this driver?

Note: I have written a custom driver based on ov5693 and the driver gets loaded whenever Jetson boots.

How about the device tree?

How do I update it again? Do you mean to say that it has changed now? I just disassembled the dtb file to check and I can see my modified device tree there:

tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		num_csi_lanes = <0x2>;
		max_lane_speed = <0x16e360>;
		min_bits_per_pixel = <0xa>;
		vi_peak_byte_per_pixel = <0x2>;
		vi_bw_margin_pct = <0x19>;
		max_pixel_rate = <0x27100>;
		isp_peak_byte_per_pixel = <0x5>;
		isp_bw_margin_pct = <0x19>;

		modules {

			module0 {
				status = "okay";
				badge = "e3326_front_TIDRVR";
				position = "rear";
				orientation = [31 00];

				drivernode0 {
					status = "okay";
					pcl_id = "v4l2_sensor";
					devname = "ov5693 2-0036";
					proc-device-tree = "/proc/device-tree/i2c@3180000/ov5693_c@36";
				};

				drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/e3326_lens_ov5693@P5V27C/";
				};
			};
		};
	};

I used sudo dtc -I dtb -O dts -o temp.dts kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb as Jetson boots from kernel dtb.

Did you confirm the system apply your device tree correctly?
Dump the device tree to confirm it.

sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree