Not able to load static driver for ov5647?

Hello,
I’m trying to interface ov5647 with jetson nano, In order to first get detected in jetson nano we should have dts file, so for that I took reference of imx219 and created dts files, then I removed imx219 and imx477 and I also created a driver which will load when its compatible string matches with dts compatible string, and prints kernel message, so after compiling and testing I did not see any messages in dmesg or ov5647 driver being used.I doubt with my dts file so I decompiled my dtb file to check it once can you guys please check it once what are things are missing.

/dts-v1/;

/memreserve/	0x0000000080000000 0x0000000000020000;
/ {
	compatible = "nvidia,p3449-0000-b00+p3448-0000-b00", "nvidia,jetson-nano", "nvidia,tegra210";
	interrupt-parent = <0x1>;
	#address-cells = <0x2>;
	#size-cells = <0x2>;
	nvidia,dtbbuildtime = "Oct 10 2022", "15:33:13";
	nvidia,boardids = "3448";
	nvidia,proc-boardid = "3448";
	nvidia,pmu-boardid = "3448";
	nvidia,fastboot-usb-pid = <0xb442>;
	model = "NVIDIA Jetson Nano Developer Kit";
           .
           .
           .
           .
           .
           .
           .
           .           

			rbpcv2_ov5647_a@36 {
				compatible = "nvidia,ov5647";
				status = "okay";
				reg = <0x36>;
				devnode = "video0";
				physical_w = "3.680";
				physical_h = "2.760";
				sensor_model = "ov5647";
				use_sensor_mode_id = "true";
				reset-gpios = <0x5b 0x97 0x0>;
				linux,phandle = <0xb9>;
				phandle = <0xb9>;

				mode0 {
					mclk_khz = "25000";
					num_lanes = [32 00];
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = [30 00];
					active_w = "2592";
					active_h = "1944";
					dynamic_pixel_bit_depth = "10";
					csi_pixel_bit_depth = "10";
					mode_type = "bayer";
					pixel_phase = "bggr";
					readout_orientation = "90";
					line_length = "2844";
					inherent_gain = [31 00];
					mclk_multiplier = "3.4999";
					pix_clk_hz = "87499996";
					gain_factor = [31 00];
					framerate_factor = "999999";
					exposure_factor = "1000000";
					min_gain_val = "16";
					max_gain_val = "128";
					step_gain_val = [31 00];
					default_gain = "16";
					min_hdr_ratio = [31 00];
					max_hdr_ratio = [31 00];
					min_framerate = "15000000";
					max_framerate = "15000000";
					step_framerate = [31 00];
					default_framerate = "15000000";
					min_exp_time = "65";
					max_exp_time = "60000";
					step_exp_time = [31 00];
					default_exp_time = "10000";
					embedded_metadata_height = [30 00];
				};

				mode1 {
					mclk_khz = "25000";
					num_lanes = [32 00];
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = [30 00];
					active_w = "1920";
					active_h = "1080";
					dynamic_pixel_bit_depth = "10";
					csi_pixel_bit_depth = "10";
					mode_type = "bayer";
					pixel_phase = "bggr";
					readout_orientation = "90";
					line_length = "2416";
					inherent_gain = [31 00];
					mclk_multiplier = "3.6669";
					pix_clk_hz = "81666663";
					gain_factor = [31 00];
					framerate_factor = "1000000";
					exposure_factor = "1000000";
					min_gain_val = "16";
					max_gain_val = "128";
					step_gain_val = [31 00];
					default_gain = "16";
					min_hdr_ratio = [31 00];
					max_hdr_ratio = [31 00];
					min_framerate = "30000000";
					max_framerate = "30000000";
					step_framerate = [31 00];
					default_framerate = "30000000";
					min_exp_time = "60";
					max_exp_time = "30000";
					step_exp_time = [31 00];
					default_exp_time = "10000";
					embedded_metadata_height = [30 00];
				};

				mode2 {
					mclk_khz = "25000";
					num_lanes = [32 00];
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = [30 00];
					active_w = "1280";
					active_h = "960";
					dynamic_pixel_bit_depth = "10";
					csi_pixel_bit_depth = "10";
					mode_type = "bayer";
					pixel_phase = "bggr";
					readout_orientation = "90";
					line_length = "1896";
					inherent_gain = [31 00];
					mclk_multiplier = "3.66669";
					pix_clk_hz = "81666663";
					gain_factor = [31 00];
					framerate_factor = "1000000";
					exposure_factor = "1000000";
					min_gain_val = "16";
					max_gain_val = "128";
					step_gain_val = [31 00];
					default_gain = "16";
					min_hdr_ratio = [31 00];
					max_hdr_ratio = [31 00];
					min_framerate = "45000000";
					max_framerate = "45000000";
					step_framerate = [31 00];
					default_framerate = "45000000";
					min_exp_time = "43";
					max_exp_time = "20000";
					step_exp_time = [31 00];
					default_exp_time = "10000";
					embedded_metadata_height = [30 00];
				};

				mode3 {
					mclk_khz = "25000";
					num_lanes = [32 00];
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "yes";
					dpcm_enable = "false";
					cil_settletime = [30 00];
					active_w = "1280";
					active_h = "720";
					dynamic_pixel_bit_depth = "10";
					csi_pixel_bit_depth = "10";
					mode_type = "bayer";
					pixel_phase = "bggr";
					readout_orientation = "90";
					line_length = "1792";
					inherent_gain = [31 00];
					mclk_multiplier = "3.66669";
					pix_clk_hz = "81666663";
					gain_factor = [31 00];
					framerate_factor = "1000000";
					exposure_factor = "1000000";
					min_gain_val = "16";
					max_gain_val = "128";
					step_gain_val = [31 00];
					default_gain = "16";
					min_hdr_ratio = [31 00];
					max_hdr_ratio = [31 00];
					min_framerate = "60000000";
					max_framerate = "60000000";
					step_framerate = [31 00];
					default_framerate = "60000000";
					min_exp_time = "43";
					max_exp_time = "10000";
					step_exp_time = [31 00];
					default_exp_time = "10000";
					embedded_metadata_height = [30 00];
				};

				ports {
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					port@0 {
						reg = <0x0>;

						endpoint {
							port-index = <0x0>;
							bus-width = <0x2>;
							remote-endpoint = <0x77>;
							linux,phandle = <0x78>;
							phandle = <0x78>;
						};
					};
				};
			};
		};

		nvcsi {
			num-channels = <0x1>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			linux,phandle = <0xbd>;
			phandle = <0xbd>;

			channel@0 {
				reg = <0x0>;
				linux,phandle = <0xbe>;
				phandle = <0xbe>;

				ports {
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					port@0 {
						reg = <0x0>;
						linux,phandle = <0xbf>;
						phandle = <0xbf>;

						endpoint@0 {
							port-index = <0x0>;
							bus-width = <0x2>;
							remote-endpoint = <0x78>;
							linux,phandle = <0x77>;
							phandle = <0x77>;
						};
					};

					port@1 {
						reg = <0x1>;
						linux,phandle = <0xc0>;
						phandle = <0xc0>;

						endpoint@1 {
							remote-endpoint = <0x79>;
							linux,phandle = <0x5f>;
							phandle = <0x5f>;
						};
					};
				};
			};
		};
	};

           .
           .
           .
           .
           .
           .
           .
           .              

	plugin-manager {

           .
           .
           .
           .
           .
           .
           .
           .       

		fragement@9 {
			ids = "<3448-0000-300", "<3448-0002-300";

			override@0 {
				target = <0x5d>;

				_overlay_ {
					status = "disabled";
				};
			};

			override@1 {
				target = <0xb8>;

				_overlay_ {
					keep-power-in-suspend;
					non-removable;
				};
			};

			override@2 {
				target = <0xb9>;

				_overlay_ {
					status = "okay";
				};
			};

			override@3 {
				target = <0xba>;

				_overlay_ {
					status = "okay";
					badge = "porg_front_RBPCV2";
					position = "front";
					orientation = [31 00];
				};
			};

			override@4 {
				target = <0xbb>;

				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_sensor";
					devname = "ov5647 6-0036";
					proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/rbpcv2_ov5647_a@36";
				};
			};

			override@5 {
				target = <0xbc>;

				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_ov5647@RBPCV2/";
				};
			};

			override@9 {
				target = <0xbd>;

				_overlay_ {
					status = "okay";
					num-channels = <0x1>;
				};
			};

			override@10 {
				target = <0xbe>;

				_overlay_ {
					status = "okay";
				};
			};

			override@11 {
				target = <0xbf>;

				_overlay_ {
					status = "okay";
				};
			};

			override@12 {
				target = <0x77>;

				_overlay_ {
					status = "okay";
					port-index = <0x0>;
					bus-width = <0x2>;
					remote-endpoint = <0x78>;
				};
			};

			override@13 {
				target = <0xc0>;

				_overlay_ {
					status = "okay";
				};
			};

			override@14 {
				target = <0x5f>;

				_overlay_ {
					status = "okay";
					remote-endpoint = <0x79>;
				};
			};

			override@15 {
				target = <0xc1>;

				_overlay_ {
					status = "okay";
					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 = <0x3a980>;
					isp_peak_byte_per_pixel = <0x5>;
					isp_bw_margin_pct = <0x19>;
				};
			};
		};

           .
           .
           .
           .
           .
           .
           .
           .       

	};


	};

	gps_wake {
		compatible = "gps-wake";
		gps-enable-gpio = <0xc6 0x8 0x0>;
		gps-wakeup-gpio = <0x5b 0x26 0x0>;
		status = "disabled";
		linux,phandle = <0x11b>;
		phandle = <0x11b>;
	};

	gpu-dvfs-rework {
		status = "okay";
	};

	pwm_regulators {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		pwm-regulator@0 {
			status = "okay";
			reg = <0x0>;
			compatible = "pwm-regulator";
			pwms = <0xce 0x0 0x9c4>;
			regulator-name = "vdd-cpu";
			regulator-min-microvolt = <0xacda0>;
			regulator-max-microvolt = <0x143188>;
			regulator-always-on;
			regulator-boot-on;
			voltage-table = <0xacda0 0x0 0xb18a0 0x1 0xb63a0 0x2 0xbaea0 0x3 0xbf9a0 0x4 0xc44a0 0x5 0xc8fa0 0x6 0xcdaa0 0x7 0xd25a0 0x8 0xd70a0 0x9 0xdbba0 0xa 0xe06a0 0xb 0xe51a0 0xc 0xe9ca0 0xd 0xee7a0 0xe 0xf32a0 0xf 0xf7da0 0x10 0xfc8a0 0x11 0x1013a0 0x12 0x105ea0 0x13 0x10a9a0 0x14 0x10f4a0 0x15 0x113fa0 0x16 0x118aa0 0x17 0x11d5a0 0x18 0x1220a0 0x19 0x126ba0 0x1a 0x12b6a0 0x1b 0x1301a0 0x1c 0x134ca0 0x1d 0x1397a0 0x1e 0x13e2a0 0x1f 0x142da0 0x20>;
			linux,phandle = <0x9f>;
			phandle = <0x9f>;
		};

		pwm-regulator@1 {
			status = "okay";
			reg = <0x1>;
			compatible = "pwm-regulator";
			pwms = <0xa7 0x1 0x1f40>;
			regulator-name = "vdd-gpu";
			regulator-min-microvolt = <0xacda0>;
			regulator-max-microvolt = <0x143188>;
			regulator-init-microvolt = <0xf4240>;
			regulator-n-voltages = <0x3e>;
			regulator-enable-ramp-delay = <0x7d0>;
			enable-gpio = <0x23 0x6 0x0>;
			regulator-settling-time-us = <0xa0>;
		};
	};

	dfll-max77621@70110000 {

		dfll-max77621-integration {
			i2c-fs-rate = <0xf4240>;
			pmic-i2c-address = <0x36>;
			pmic-i2c-voltage-register = <0x1>;
			sel-conversion-slope = <0x1>;
			linux,phandle = <0x11c>;
			phandle = <0x11c>;
		};

		dfll-max77621-board-params {
			sample-rate = <0x30d4>;
			fixed-output-forcing;
			cf = <0xa>;
			ci = <0x0>;
			cg = <0x2>;
			droop-cut-value = <0xf>;
			droop-restore-ramp = <0x0>;
			scale-out-ramp = <0x0>;
			linux,phandle = <0x11d>;
			phandle = <0x11d>;
		};
	};

	dfll-cdev-cap {
		compatible = "nvidia,tegra-dfll-cdev-action";
		act-dev = <0x2b>;
		cdev-type = "DFLL-cap";
		#cooling-cells = <0x2>;
		linux,phandle = <0x18>;
		phandle = <0x18>;
	};

	dfll-cdev-floor {
		compatible = "nvidia,tegra-dfll-cdev-action";
		act-dev = <0x2b>;
		cdev-type = "DFLL-floor";
		#cooling-cells = <0x2>;
		linux,phandle = <0x10>;
		phandle = <0x10>;
	};

	dvfs {
		compatible = "nvidia,tegra210-dvfs";
		vdd-cpu-supply = <0x9f>;
		nvidia,gpu-max-freq-khz = <0xe1000>;
	};

	r8168 {
		isolate-gpio = <0x5b 0xbb 0x0>;
	};

	tegra_udrm {
		compatible = "nvidia,tegra-udrm";
		linux,phandle = <0x11e>;
		phandle = <0x11e>;
	};

	soft_watchdog {
		compatible = "softdog-platform";
		dt-override-status-odm-data = <0x30000 0x0>;
		status = "okay";
		linux,phandle = <0xb7>;
		phandle = <0xb7>;
	};

	leds {
		compatible = "gpio-leds";
		status = "disabled";
		linux,phandle = <0xc4>;
		phandle = <0xc4>;

		pwr {
			gpios = <0x5b 0x41 0x0>;
			default-state = "on";
			linux,default-trigger = "system-throttle";
		};
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x0 0x80000000 0x0 0x80000000>;
	};

	cpu_edp {
		status = "okay";
		nvidia,edp_limit = <0x61a8>;
	};

	gpu_edp {
		status = "okay";
		nvidia,edp_limit = <0x4e20>;
	};

	hot-surface-alert {
		compatible = "userspace-therm-alert";
		cdev-type = "hot-surface-alert";
		status = "okay";
		#cooling-cells = <0x2>;
		linux,phandle = <0x1f>;
		phandle = <0x1f>;
	};

	lens_ov5647@RBPCV2 {
		min_focus_distance = "0.0";
		hyper_focal = "0.0";
		focal_length = "3.04";
		f_number = "2.0";
		aperture = "0.0";
	};

	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 = <0x3a980>;
		isp_peak_byte_per_pixel = <0x5>;
		isp_bw_margin_pct = <0x19>;
		status = "okay";
		linux,phandle = <0xc1>;
		phandle = <0xc1>;

		modules {

			module0 {
				badge = "porg_front_RBPCV2";
				position = "front";
				orientation = [31 00];
				linux,phandle = <0xba>;
				phandle = <0xba>;

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov5647 6-0036";
					proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/rbpcv2_ov5647_a@36";
					linux,phandle = <0xbb>;
					phandle = <0xbb>;
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_ov5647@RBPCV2/";
					linux,phandle = <0xbc>;
					phandle = <0xbc>;
				};
			};
		};
	};

	__symbols__ {
                           .
           .
           .
           .
           .
           .
           .
           .       
		host1x = "/host1x";
		vi_base = "/host1x/vi";
		vi_port0 = "/host1x/vi/ports/port@0";
		rbpcv2_ov5647_vi_in0 = "/host1x/vi/ports/port@0/endpoint";
		head0 = "/host1x/dc@54200000";
		head1 = "/host1x/dc@54240000";
		dsi = "/host1x/dsi";
		sor0 = "/host1x/sor";
		sor0_hdmi_display = "/host1x/sor/hdmi-display";
		sor0_dp_display = "/host1x/sor/dp-display";
		sor1 = "/host1x/sor1";
		sor1_hdmi_display = "/host1x/sor1/hdmi-display";
		sor1_dp_display = "/host1x/sor1/dp-display";
		dpaux0 = "/host1x/dpaux";
		dpaux1 = "/host1x/dpaux1";
		i2c7 = "/host1x/i2c@546c0000";
		ina3221x = "/host1x/i2c@546c0000/ina3221x@40";
		ov5647_single_cam0 = "/host1x/i2c@546c0000/rbpcv2_ov5647_a@36";
		rbpcv2_ov5647_out0 = "/host1x/i2c@546c0000/rbpcv2_ov5647_a@36/ports/port@0/endpoint";
		csi_base = "/host1x/nvcsi";
		csi_chan0 = "/host1x/nvcsi/channel@0";
		csi_chan0_port0 = "/host1x/nvcsi/channel@0/ports/port@0";
		rbpcv2_ov5647_csi_in0 = "/host1x/nvcsi/channel@0/ports/port@0/endpoint@0";
		csi_chan0_port1 = "/host1x/nvcsi/channel@0/ports/port@1";
		rbpcv2_ov5647_csi_out0 = "/host1x/nvcsi/channel@0/ports/port@1/endpoint@1";
		tegra_pmc = "/pmc@7000e400";
           .
           .
           .
           .
           .
           .
           .
           .       
           .
           .
           .
           .
           .
           .
           .
           .       
		tcp = "/tegra-camera-platform";
		cam_module0 = "/tegra-camera-platform/modules/module0";
		cam_module0_drivernode0 = "/tegra-camera-platform/modules/module0/drivernode0";
		cam_module0_drivernode1 = "/tegra-camera-platform/modules/module0/drivernode1";
	};
};

Full file:
kernel_tegra210-p3448-0000-p3449-0000-b00.dts (303.8 KB)

Hi,
Please check whether you can see correct information in executing v4l2-ctl --list-formats-ext? And do you use latest Jetpack 4.6.2?

Also check the kernel message if ov5647 been probed.

dmesg | grep -i ov5674

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