Jetson mipi-csi input format

Hi, I’m working on a hdmi2csi chip lt6911uxe, and our board used it connected to Jetson nano’s mipi-csi lane to get the video.
However, in our early use, there is no problem using video source like 720p\1080p\4k, and recently when tried video source like 480p\576p, we can not get the right video from /dev/video0;
We’re asking the lt6911uxe in the same time, and we wonder if there is limitation in Jetson’s mipi-csi input port? for example., as we known in forums, it can not support YUV420 format.

The correct result is ,the input source is 1080p

and when input 576p or 480p, it shows like this

Hi @854053437

It is likely you need to add this new mode to the device-tree and driver. Do you have access to the sources for the driver?

Regards,
Allan Navarro

Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Hi, allan
it only open the video information register for our driver to access.
our device tree is like this,

	i2c@7000c400 {
		clock-frequency = <400000>;  //400k

		lt6911uxe: lt6911@2b {
			status = "okay";
			compatible = "uih,lt6911uxe";
			reg = <0x2b>;			
			devnode = "video0";

			reset-gpio = <&gpio TEGRA_GPIO(I, 2) GPIO_ACTIVE_LOW>;

			plugin-det-gpio = <&gpio TEGRA_GPIO(T, 0) 1>;

			interrupt-parent = <&gpio>;
			interrupts = <TEGRA_GPIO(I, 1) IRQ_TYPE_LEVEL_LOW>;

			port@0 {
				reg = <0>;
				status = "okay";
				hdmi2csi_lt6911_out0: endpoint {
					status = "okay";
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&hdmi2csi_csi_in0>;
				};
			};
		};
         };
host1x {
		vi {
			num-channels = <1>;
			status = "okay";
			
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				
				port@0 {
					status = "okay";
					reg = <0>;
					hdmi2csi_vi_in0: endpoint {
						status = "okay";
						port-index =<0>;
						bus-width = <4>;
						remote-endpoint = <&hdmi2csi_csi_out0>;
					};
				};
			};
		};

		nvcsi {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			
			channel@0 {
				status = "okay";
				discontinuous_clk = "no";
				reg = <0>;	

				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					
					port@0 {
						status = "okay";
						reg = <0>;
						hdmi2csi_csi_in0: endpoint@0 {
							status = "okay";
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&hdmi2csi_lt6911_out0>;
						};
					};
					
					port@1 {
						status = "okay";
						reg = <1>;
						hdmi2csi_csi_out0: endpoint@1 {
							status = "okay";
							remote-endpoint = <&hdmi2csi_vi_in0>;
						};
					};
				};
			};
		};
	};

	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 = <750000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		modules {
			module0 {
				badge = "hdmi2csi_rear_6911";
				position = "rear";
				status = "okay";
				orientation = "1";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					devname = "lt6911uxe 2-002b";
					status = "okay";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@7000c400/lt6911@2b";
				};
			};
		};
	};

I wonder how to add new mode to support other format. And why 720p\1080p\4k is okay but other can not work well
Thanks

Hi

Sometimes there are multiple device-tree files that add information about a device. There should be a place where the modes are defined, like in https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3275/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/camera_sensor_prog.48.1.html#wwpID0E0NBB0HA

You’ll see something like:

...
 mode0 {
        mclk_khz = "37125";
        num_lanes = "4";
...

Regards,
Allan Navarro

Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Thanks, I’ll try
But I still have a question that why I did not add anything like the link show in dtb, it can support 720/1080/4k as well?

And I test 1024x768 video source, it works fine as the same as 720/1080/4k

Hi, allan
I found the same question in this page

Hi,

By looking at the issue it gave me another test we could do first, what resolutions do you see reported with

v4l2-ctl -d /dev/videoX --list-formats-ext

It would also seem that the suggestion from nvidia was to modify the active_w which is something that appears on the “modeX” sections of the device tree that I mentioned you before.

Another option would be to look into the driver source code and see how are the different resolutions handled.

Regards,
Allan Navarro

Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

This is not helpful, because our driver did not have VIDIOC_ENUM_FMT. This chip is for hdmi2csi so it can support any resolutions beyond 4k60.
And I tried v4l2-ctl to capture the source, I can get the right picture from the video0.

I think it’s about our application to get the frame from video0 point, I’ll let our colleague to check it
Thanks

Hi, allan
our application solved this problem by change the video flow buffer to 64 byte aligned and we can get the right video from /dev/video0.
Thank you for help!

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