[iMX8MP] Same I2C control for 2 sensors in dual ISP pipelines

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[iMX8MP] Same I2C control for 2 sensors in dual ISP pipelines

634 次查看
khang_letruong
Senior Contributor III

Dear Community,

We have 2 camera sensors connected to iMX8M Plus as following :

&i2c2 {
	/delete-node/imx296_0@1a;

	imx296_0: imx296_vvcam@1a {
		compatible = "sony,imx296_mipi_vvcam";
		reg = <0x1a>;
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi0_sync>, <&pinctrl_csi_pwn>, <&pinctrl_csi_mclk>;

		clocks = <&vc5 1>;
		clock-names = "mclk";
		clock-frequency = <37125000>;
		assigned-clocks = <&vc5 1>;
//		assigned-clock-parents = <&vc5 vc5_osc25m>;
		assigned-clock-rates = <37125000>;
		mclk = <37125000>;
		mclk_source = <0>;

		mipi_csi;
		csi_id = <0>;

		pwdn-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
		rst-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;

		sync-mode = <0>;
		sync-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;

		// Only necessary for FSM, FSA is self-powered with 5V -> 3.8V
		vddd-supply = <&reg_cam_1v2>;
		vddo-supply = <&reg_cam0_1v8>;
		vdda-supply = <&reg_cam0_3v3>;

		port {
			imx296_mipi_0_ep: endpoint {
				remote-endpoint = <&mipi_csi0_ep>;
				data-lanes = <1>;
				clock-lanes = <0>;
			};
		};
	};
};

&i2c3 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c3>;
	status = "okay";

	/delete-node/imx296_1@36;

	imx296_1: imx296_vvcam@36 {
		compatible = "sony,imx296_mipi_vvcam";
		reg = <0x36>;
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_csi1_pwn>, <&pinctrl_csi1_rst>, <&pinctrl_csi1_sync>;

		clocks = <&vc5 2>;
		clock-names = "mclk";
		clock-frequency = <37125000>;
		assigned-clocks = <&vc5 2>;
//		assigned-clock-parents = <&vc5 vc5_osc25m>;
		assigned-clock-rates = <37125000>;
		mclk = <37125000>;
		mclk_source = <0>;

		mipi_csi;
		csi_id = <1>;

		pwdn-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		rst-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;

		sync-mode = <1>;
		sync-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;

		// Only necessary for FSM, FSA is self-powered with 5V -> 3.8V
		vddd-supply = <&reg_cam_1v2>;
		vddo-supply = <&reg_cam1_1v8>;
		vdda-supply = <&reg_cam1_3v3>;

		port {
			imx296_mipi_1_ep: endpoint {
				remote-endpoint = <&mipi_csi1_ep>;
				data-lanes = <1>;
				clock-lanes = <0>;
			};
		};
	};
};

Each sensor is controlled by each ISP block :

&isp_0 {
	status = "okay";
};

&isp_1 {
	status = "okay";
};

&dewarp {
	status = "okay";
};

&mipi_csi_0 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@0 {
		reg = <0>;
		mipi_csi0_ep: endpoint {
			remote-endpoint = <&imx296_mipi_0_ep>;
			data-lanes = <1>;

			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
		};
	};
};

&mipi_csi_1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@1 {
		reg = <1>;
		mipi_csi1_ep: endpoint {
			remote-endpoint = <&imx296_mipi_1_ep>;
			data-lanes = <1>;

			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
		};
	};
};

In runtime, each ISP updates the registers of the sensor in the same pipeline via I2C bus independently and that is not ideal for our stereo vision application. We expect that both sensors have same registers settings at same moment.

We would like to know if it is possible to control both sensors' registers with the settings of only 1 ISP, saying isp0 for example without modifying the hardware ? The image data still get through both ISPs to provide stereo image.

Thanks in advance and best regards,

K.

 

 

0 项奖励
3 回复数

624 次查看
joanxie
NXP TechSupport
NXP TechSupport

what you want is that one ISP control dual camera in the same time?

0 项奖励

621 次查看
khang_letruong
Senior Contributor III

Dear @joanxie ,

As per requirement of my client, what I expect is controlling 2 sensors (they are identical) same time with same I2C register values. Currently, each ISP block seems to control each sensor independently so I2C registers' values of one sensor might be different compare to other (especially with different input frames).

If this cannot be achieved by software/firmware (and I would like to confirm this with you), our last solution would be modifying the hardware so that both sensors connect to same I2C bus with same I2C address but one of the 2 sensors must be set to skip the I2C ACK to avoid conflict on the bus.

Regards,
K.

 

 

0 项奖励

605 次查看
joanxie
NXP TechSupport
NXP TechSupport

couldn't support this if you don't change any HW

0 项奖励