iMX8MP with two ov9281: inclk frequency mismatch

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

iMX8MP with two ov9281: inclk frequency mismatch

跳至解决方案
483 次查看
JackLEE_
Contributor I

Hello Community,

I am trying to connect two OV9281 camera on a custom board with i.MX8MP. I am using Linux kernel version 6.1.22-2.0.0 and have updated the driver (drivers/media/i2c/ov9282.c) for ov9281 reference to kernel version lf-6.6.y .

 

The device tree that I am using is added below:

 

/dts-v1/;

#include "imx8mp.dtsi"

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

	ov9281_0: ov9281_mipi@60 {
		compatible = "ovti,ov9281";
		reg = <0x60>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_cmosx>;
		clocks = <&clk IMX8MP_CLK_CLKOUT1>;
		clock-names = "xclk";
		assigned-clocks = <&clk IMX8MP_CLK_CLKOUT1>;
		assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
		assigned-clock-rates = <24000000>;
		csi_id = <0>;
		reset-gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;

        /* Power supplies */
        avdd-supply = <&reg_cmos_avdd>;
        dvdd-supply = <&reg_cmos_dvdd>;
        dovdd-supply = <&reg_cmos_dvdd>;

		status = "okay";

		port {
			ov9281_mipi_0_ep: endpoint {
				remote-endpoint = <&mipi_csi0_ep>;
				data-lanes = <1 2>;
				clock-lanes = <0>; 
				link-frequencies = /bits/ 64 <400000000>;
			};
		};
	};

	ov9281_1: ov9281_mipi@10 {
		compatible = "ovti,ov9281";
		reg = <0x10>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_cmosy>;
		clocks = <&clk IMX8MP_CLK_CLKOUT2>;
		clock-names = "xclk";
		assigned-clocks = <&clk IMX8MP_CLK_CLKOUT2>;
		assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
		assigned-clock-rates = <24000000>;
		csi_id = <1>;
		reset-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
		
        /* Power supplies */
        avdd-supply = <&reg_cmos_avdd>;
        dvdd-supply = <&reg_cmos_dvdd>;
        dovdd-supply = <&reg_cmos_dvdd>;
		status = "okay";

		port {
			ov9281_mipi_1_ep: endpoint {
				remote-endpoint = <&mipi_csi1_ep>;
				data-lanes = <1 2>;
				clock-lanes = <0>;
				link-frequencies = /bits/ 64 <400000000>;
			};
		};
	};
};

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

	port@0 {
		reg = <0>;
		mipi_csi0_ep: endpoint {
			remote-endpoint = <&ov9281_mipi_0_ep>;
			data-lanes = <2>;
			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
			csis-wclk;
		};
	};
};

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

	port@1 {
		reg = <1>;
		mipi_csi1_ep: endpoint {
			remote-endpoint = <&ov9281_mipi_1_ep>;
			data-lanes = <2>;
			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
			csis-wclk;
		};
	};
};

&cameradev {
	status = "okay";
};

&isi_0 {
	status = "okay";

	cap_device {
		status = "okay";
	};

	m2m_device {
		status = "okay";
	};
};

&isi_1 {
	status = "okay";

	cap_device {
		status = "okay";
	};

	m2m_device {
		status = "okay";
	};
};

&isp_0 {
	status = "okay";
};

&isp_1 {
	status = "okay";
};

 

Link to imx8mp-evk.dts 

 

The following logs appear during boot:

 

 

[    1.784109] : mipi_csis_imx8mp_phy_reset, No remote pad found!
[    1.796584] mxc-mipi-csi2-sam 32e40000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 500000000
[    1.806689] mxc-mipi-csi2-sam 32e50000.csi: supply mipi-phy not found, using dummy regulator
[    1.815449] : mipi_csis_imx8mp_phy_reset, No remote pad found!
[    1.821338] mxc-mipi-csi2-sam 32e50000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 266000000

[    2.166387] clk: failed to reparent clkout1 to osc_24m: -22
[    2.172271] ov9282 2-0060: inclk frequency mismatch
[    2.177163] ov9282 2-0060: HW configuration is not supported
[    2.183050] ov9282: probe of 2-0060 failed with error -22
[    2.189072] clk: failed to reparent clkout2 to osc_24m: -22
[    2.194888] ov9282 2-0010: inclk frequency mismatch
[    2.199775] ov9282 2-0010: HW configuration is not supported
[    2.205643] ov9282: probe of 2-0010 failed with error -22

[    6.853451] ov9281: loading out-of-tree module taints kernel.
[    6.859924] clk: failed to reparent clkout1 to osc_24m: -22
[    6.876005] ov9281 2-0060: Failed to get XVCLK
[    6.880608] ov9281: probe of 2-0060 failed with error -22
[    6.886246] clk: failed to reparent clkout2 to osc_24m: -22
[    6.892126] ov9281 2-0010: Failed to get XVCLK
[    6.897437] ov9281: probe of 2-0010 failed with error -22

The error shows the clock is mismatch, what should i do for getting the right configuration. Both ov9281 pin "XVCLK" are connected to IMX8MP  "CLKOUT1" and "CLKOUT2" in our circuit design.

Any advice for this problem would be greatly appreciated.

 

 

标记 (2)
0 项奖励
回复
1 解答
454 次查看
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello

 

You can try to refer to this thread: https://community.nxp.com/t5/i-MX-Processors/Enable-CLKOUT1-in-Imx8mp-eval-board/td-p/1694664

 

There are trying to enable the CLKOUT1.

Your DTS seems to be OK.

 

Best regards,

--... ...--

Salas.

在原帖中查看解决方案

0 项奖励
回复
1 回复
455 次查看
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello

 

You can try to refer to this thread: https://community.nxp.com/t5/i-MX-Processors/Enable-CLKOUT1-in-Imx8mp-eval-board/td-p/1694664

 

There are trying to enable the CLKOUT1.

Your DTS seems to be OK.

 

Best regards,

--... ...--

Salas.

0 项奖励
回复