cancel
Showing results for 
Search instead for 
Did you mean: 

Setting MIPI single-lane operation of the STEVAL-66GYMA

OGONJU
Associate II

Hi,

 

I'm using the image sensor evaluation kit with STEVAL-66GYMAI, STEVAL-EVK-U0I and the PC software of STSW-IMG501 to capture video stream. I would like to change the setting of MIPI lane from default dual-lane to single-lane operation. But, I failed to change it, so please tell me how I can complete to change the setting.

 

I tried to change the MIPI lane setting by changing the register value of OIF_CTRL at 0x030c. I changed the register value via the PC software from 0x0082 to 0x0081 in accordance with the VD66GY manual. The ROI size, the frame rate and the MIPI data rate were set at 288x288, 12 FPS and 1500 Mbps, which seemed to be enough for single-lane operation. The frame rate was adjusted by changing LINE_LENGTH register. However, I couldn't get the video stream. The excution rate displayed on the top left of the PC software window was 0.5 in streaming, and any picutures were not shown on the PC software. 

 

I could see the video stream with the default dual-lane operation. Are there any other settings that I have to consider to complete the MIPI lane setting? I'd appreciate if I could receive your advice.

 

7 REPLIES 7
CyrilTechPro
ST Employee

Hello OGonju

 

can you retry without change de MIPI data rate the CX3 can support 1.5Gbps is limited to 1Gbps. with your configuration you should be ok. can you check if you have the last version of the SW GUI it can be helpful on previous version i have seen instability on MIPI data rate variation 

 

 

Bye 

 

Hello,

 

Thank you for your prompt reply. I retried with the bitrate of 1 Gbps and lower as your instruction. But still the video streaming was not achieved. The software version is 1.1.2 that seems to be the latest version. The screenshots of the image sensor status, the excution rate, and the register value of 0x030c are attached. The data rate on the sensor status was still 2 x 1000 Mbps even after I changed the register value of 0x030c for the single-lane operation.

 

I'll be happy if you give me further advice to resolve this issue.

 

Sincerely,  

 

Status.pngExecution rate.pngRegisterValue_0x030c.png

 

 

CyrilTechPro
ST Employee

Hello, 

 

After rechecking yes is impossible the EVK don't take into account the new data lane number i have request a change for new version scheduled in May. 

 

 

Regard

 

Hello,

 

Thank you for your rechecking the product specification. I recognized that the EVK main board can accept only the default data lane number. So, do you mean that I can change setting of the number of MIPI data lane by mounting the S board on Raspberry Pi and accessing the register value directly? I will appreciate your comment if I misunderstand your comment. 

 

Best regards

OGONJU
Associate II

Hello,

 

Relating to my previous post, I have been trying to added the STEVAL-66GYMA to RPI5 according to the manual. Then, I successfully got video streaming through rpicam-hello command.

To change the MIPI data lane number, I edited device tree source files. I changed the data-lane to <1> from <1 2> at fragment@3 and fragment@4 in vd16gz_vd56g3_vd66gy-overlay.dtsi as below. After compiling it, I confrmed the video streaming was avairable.

Then, I want to ask whether my procedure is enough for changing the MIPI data lane number. Do I have to change any other settings? Also, I would like to know how I can check that the MIPI data lane number was changed.

I tried to get the register value of the image sensor by using i2cget command from RPI5 terminal, but I couldn't get the value. 

Any comments for this issue will be appreciated. 

 

Best Regards,

 

// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/plugin/;

/{
	compatible = "brcm,bcm2835";

	fragment@0 {
		target = <&i2c0if>;
		__overlay__ {
			status = "okay";
		};
	};

	clk_frag: fragment@1 {
		target = <&cam1_clk>;
		__overlay__ {
			status = "okay";
			clock-frequency = <12000000>;
		};
	};

	fragment@2 {
		target = <&i2c0mux>;
		__overlay__ {
			status = "okay";
		};
	};

	i2c_frag: fragment@3 {
		target = <&i2c_csi_dsi>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			cam_node: cam@10 {
				reg = <0x10>;
				status = "disabled";

				clocks = <&cam1_clk>;
				clock-names = "xclk";

				vana-supply = <&cam1_reg>;	/* 2.8v */
				vddio-supply = <&cam_dummy_reg>;	/* 1.8v */
				vcore-supply = <&cam_dummy_reg>;	/* 1.2v */

				rotation = <0>;
				orientation = <2>;

				port {
					cam_endpoint: endpoint {
						clock-lanes = <0>;
						data-lanes = <1>;
						clock-noncontinuous;
						link-frequencies =
							/bits/ 64 <402000000>;
					};
				};
			};
		};
	};

	csi_frag: fragment@4 {
		target = <&csi1>;
		csi: __overlay__ {
			status = "okay";

			port {
				csi_ep: endpoint {
					remote-endpoint = <&cam_endpoint>;
					clock-lanes = <0>;
					data-lanes = <1>;
					clock-noncontinuous;
				};
			};
		};
	};

	fragment@5 {
		target = <&csi1>;
		__dormant__ {
			compatible = "brcm,bcm2835-unicam-legacy";
		};
	};

	__overrides__ {
		rotation = <&cam_node>,"rotation:0";
		orientation = <&cam_node>,"orientation:0";
		media-controller = <0>,"!5";
		cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
		       <&csi_frag>, "target:0=",<&csi0>,
		       <&clk_frag>, "target:0=",<&cam0_clk>,
		       <&cam_node>, "clocks:0=",<&cam0_clk>,
		       <&cam_node>, "vana-supply:0=",<&cam0_reg>;
	};
};

&cam_node {
	status = "okay";
};

&cam_endpoint {
	remote-endpoint = <&csi_ep>;
};

 

CyrilTechPro
ST Employee

Hello,

Yes, is the first point, please change also bit rate to link-frequencies = /bits/ 64 <750000000>

To verify you can use the command I2Ctransfert and add flag -f 

 

 

Regards 

 

 

 

Hello,

 

Thank you for your reply. As you pointed out, I also changed the link-frequencies. Then, I tried to get video streaming, but I failed. (I thought I could get the video steaming as I mentioned in the previous post. But actually, the lane number was still 2 due to my mistake.)  I checked dmesg of RPI5, and I confirmed a message of "vd56g3 10-0010: Failed to start streaming" after a message of "rp1-cfe 1f00110000.csi: Using a link rate of 1500 Mbps". This meant that the lane number was properly set at 1, but image sensor couldn't start streaming for some reason. 

 

I wonder if the S-board STEVAL-66GYMA support 1-data lane operation. The image sensor vd66gy support 1-lane operation, and so I thought STEVAL-66GYMA would also support it.

 

I appreciate it if I could receive your comments.

 

Regards