Camera do not work on NANO

There is mipi, but no image on nano.

kernel error log:
[ 99.051936] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 0
[ 99.091931] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 1
[ 99.131924] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 2
[ 99.171921] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 3
[ 99.211919] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 4
[ 99.251918] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 5
[ 99.291919] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 6
[ 99.331918] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 7
[ 99.371916] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 8
[ 99.411913] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 9
[ 99.451914] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 10
[ 99.491912] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 11
[ 99.531911] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 12
[ 99.571911] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 13
[ 99.611909] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 14
[ 99.651906] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 15
[ 99.691904] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 16
[ 99.731904] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 17

echo file csi2_fops.c +p > /sys/kernel/debug/dynamic_debug/control

kernel log:
[ 117.045101] vi 54080000.vi: Calibrate csi port 0
[ 117.045218] nvp6188,nvp6188_s_stream,enable=0
[ 117.045235] nvp6188,nvp6188_power_on++
[ 117.067825] nvp6188,nvp6188_power_on–
[ 117.067881] nvp6188,nvp6188_g_input_status
[ 117.087888] vi 54080000.vi: cil_settingtime was autocalculated
[ 117.087895] vi 54080000.vi: csi clock settle time: 13, cil settle time: 10
[ 117.087908] nvp6188,nvp6188_s_stream,enable=1
[ 117.090801] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 0
[ 117.130878] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 1
[ 117.170872] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 2
[ 117.210868] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 3
[ 117.250869] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 4
[ 117.290866] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 5
[ 117.330864] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 6
[ 117.370820] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 7

Hi shaorui,

Which camera model are you using and which driver are you using?
Can you measure if there is any data coming from the MIPI lanes and that they fulfill MIPI spec?

Best regards,
Roberto Gutierrez,
Embedded Software Engineer

Looks like didn’t enable the debug print in csi2_fops.c

Looks like didn’t enable the debug print in csi2_fops.c. → enable the it on nano?

chip: nvp6188 driver:Tegra drvier
data coming from the MIPI lanes

host1x {
	vi {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				status = "okay";
				reg = <0>;
				adas_vi_in0: endpoint {
					status = "okay";
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&adas_csi_out0>;
				};
			};
			port@1 {
				status = "okay";
				reg = <1>;
				adas_vi_in1: endpoint {
					status = "okay";
					port-index = <4>;
					bus-width = <4>;
					remote-endpoint = <&adas_csi_out1>;
				};
			};
		};
	};
	nvcsi {
		status = "okay";
		num-channels = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel@0 {
			status = "okay";
			reg = <0>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					status = "okay";
					reg = <0>;
					adas_csi_in0: endpoint@0 {
						status = "okay";
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&adas_nvp6188_out0>;
					};
				};
				port@1 {
					status = "okay";
					reg = <1>;
					adas_csi_out0: endpoint@1 {
						status = "okay";
						remote-endpoint = <&adas_vi_in0>;
					};
				};
			};
		};

		channel@1 {
			status = "okay";
			reg = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					status = "okay";
					reg = <0>;
					adas_csi_in1: endpoint@2 {
						status = "okay";
						port-index = <4>;
						bus-width = <4>;
						remote-endpoint = <&adas_nvp6188_out1>;
					};
				};
				port@1 {
					status = "okay";
					reg = <1>;
					adas_csi_out1: endpoint@3 {
						status = "okay";
						remote-endpoint = <&adas_vi_in1>;
					};
				};
			};
		};

	};

	i2c@546c0000 {
		nvp6188_a@30 {
		compatible = "nvidia,nvp6188";
		reg = <0x30>;
		status = "okay";

		clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
		clock-names = "clk_out_3";
		clock-frequency = <24000000>;
		mclk = "clk_out_3";

		reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;   //also for VCM_2V8 en
		vana-supply = <&en_vdd_cam_hv_2v8>;
		vif-supply = <&en_vdd_cam>;
		vdig-supply = <&en_vdd_cam_1v2>;

		/* V4L2 device node location */
		devnode = "video0";

		/* Physical dimensions of sensor */
		physical_w = "6.534";
		physical_h = "5.724";

		sensor_model = "nvp6188";
		//set_mode_delay_ms = 
		//use_sensor_mode_id = "true";
		avdd-reg = "vana";
		iovdd-reg = "vif";
		dvdd-reg = "vdig";
		vertical-flip = "true";	
		/**
		*/
		mode0 {
			mclk_khz = "24000";
			num_lanes = "2";
			tegra_sinterface = "serial_a";
			phy_mode = "DPHY";
			discontinuous_clk = "yes";
			dpcm_enable = "false";
			cil_settletime = "0";

		//	active_w = "1920";
		//	active_h = "1080";
			active_w = "3840";
			active_h = "2160";
			pixel_t = "yuv_uyvy16";
			readout_orientation = "90";
		//	line_length = "1936";
			line_length = "3840";
			inherent_gain = "1";
			mclk_multiplier = "60.75";
			//pix_clk_hz = "1458000000";
			pix_clk_hz = "72000000";

			min_gain_val = "1.0";
			max_gain_val = "16";
			min_hdr_ratio = "1";
			max_hdr_ratio = "64";
			min_framerate = "2.787078";
			max_framerate = "60";
			min_exp_time = "40";
			max_exp_time = "20291";
		};
		ports {
			#address-cells = <1>;
			#size-cells = <0>;

				port@0 {
					reg = <0>;
					adas_nvp6188_out0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&adas_csi_in0>;
					};
				};
		};
	};
	nvp6188_b@31 {
		compatible = "nvidia,nvp6188b";
		reg = <0x31>;
		status = "okay";

		clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
		clock-names = "clk_out_3";
		clock-frequency = <24000000>;
		mclk = "clk_out_3";

		reset-gpios = <&gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;
		vana-supply = <&en_vdd_cam_hv_2v8>;
		vif-supply = <&en_vdd_cam>;
		vdig-supply = <&en_vdd_cam_1v2>;

		/* V4L2 device node location */
		devnode = "video1";

		/* Physical dimensions of sensor */
		physical_w = "6.534";
		physical_h = "5.724";

		sensor_model = "nvp6188";
		//set_mode_delay_ms =
		//use_sensor_mode_id = "true";
		avdd-reg = "vana";
		iovdd-reg = "vif";
		dvdd-reg = "vdig";
		vertical-flip = "true";	

		mode0 {
			mclk_khz = "24000";
			num_lanes = "2";
			tegra_sinterface = "serial_b";
			phy_mode = "DPHY";
			discontinuous_clk = "yes";
			dpcm_enable = "false";
			cil_settletime = "0";

			//active_w = "1920";
			//active_h = "1080";
			active_w = "3840";
			active_h = "2160";
			pixel_t = "yuv_uyvy16";
			readout_orientation = "90";
		//	line_length = "1936";
			line_length = "3840";
			inherent_gain = "1";
			mclk_multiplier = "60.75";
			pix_clk_hz = "72000000";

			min_gain_val = "1.0";
			max_gain_val = "16";
			min_hdr_ratio = "1";
			max_hdr_ratio = "64";
			min_framerate = "2.787078";
			max_framerate = "60";
			min_exp_time = "40";
			max_exp_time = "20291";
		};
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
				port@0 {
					reg = <0>;
					adas_nvp6188_out1: endpoint {
						port-index = <4>;
						bus-width = <4>;
						remote-endpoint = <&adas_csi_in1>;
					};
				};
			};
		};
	};

};

gpio@6000d000 {
	camera-control-output-low {
		gpio-hog;
		output-low;
		gpios = <
			CAM0_RST_L 0
			CAM1_RST_L 0
			>;
		label = "cam0-rst","cam1-rst";
		status = "okay";
	};
};

adas_lens_nvp6188@C4030 {
	min_focus_distance = "0.0";
	hyper_focal = "0.0";
	focal_length = "6";
	f_number = "1.2";
	aperture = "1.6";
};

tegra-camera-platform {
	compatible = "nvidia, tegra-camera-platform";

	/**
	*/
	num_csi_lanes = <4>;
	max_lane_speed = <1500000>;
	min_bits_per_pixel = <10>;
	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>;

	/**
	 * The general guideline for naming badge_info contains 3 parts, and is as follows,
	 * The first part is the camera_board_id for the module; if the module is in a FFD
	 * platform, then use the platform name for this part.
	 * The second part contains the position of the module, ex. "rear" or "front".
	 * The third part contains the last 6 characters of a part number which is found
	 * in the module's specsheet from the vendor.
	 */
	modules {
		module0 {
			status = "okay";
			badge = "adas_front_C4030";
			position = "front";
			orientation = "1";
			drivernode0 {
				status = "okay";
				/* Declare PCL support driver (classically known as guid)  */
				pcl_id = "v4l2_sensor";
				/* Driver v4l2 device name */
				devname = "nvp6188 30-001a";
				/* Declare the device-tree hierarchy to driver instance */
				proc-device-tree = "/proc/device-tree/i2c@546c0000/nvp6188_a@30";
			};
			drivernode1 {
				status = "okay";
				/* Declare PCL support driver (classically known as guid)  */
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/adas_lens_nvp6188@C4030/";
			};
		};

		module1 {
			status = "okay";
			badge = "adas_rear_C4030";
			position = "rear";
			orientation = "1";
			drivernode0 {
				status = "okay";
				/* Declare PCL support driver (classically known as guid)  */
				pcl_id = "v4l2_sensor";
				/* Driver v4l2 device name */
				devname = "nvp6188 30-001b";
				/* Declare the device-tree hierarchy to driver instance */
				proc-device-tree = "/proc/device-tree/i2c@546c0000/nvp6188_b@31";
			};
			drivernode1 {
				status = "okay";
				/* Declare PCL support driver (classically known as guid)  */
				pcl_id = "v4l2_lens";
				proc-device-tree = "/proc/device-tree/adas_lens_nvp6188@C4030/";
			};
		};

	};
};

Do you check the “/sys/kernel/debug/dynamic_debug/control” to confirm it the csi2_fops.c/vi2_fops.c to print debug message?

Now image on nano

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