[Yocto][mickledore-6.1.36][iMX8MP] MIPI-CSI2 CRC Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Yocto][mickledore-6.1.36][iMX8MP] MIPI-CSI2 CRC Error

415 Views
khang_letruong
Senior Contributor III

Dear Forum,

We have a custom design of dual cameras using iMX8M Plus. So far, the first camera pipeline works acceptably: 

Screenshot from 2024-10-08 21-12-52.png

 

But we are having weird image output on the second pipeline as below :

Screenshot from 2024-10-08 21-12-43.pngScreenshot from 2024-10-08 21-13-00.png

Enabling the MIPI-CSI2 debugging of the buggy pipeline gave :

...
[34916.288647] mxc-mipi-csi2.1: status: 00000002
[34916.288671] mxc-mipi-csi2.1: CRC Error: 314454
[34916.288676] mxc-mipi-csi2.1: status: 00000002
[34916.288790] mxc-mipi-csi2.1: CRC Error: 314455
[34916.288795] mxc-mipi-csi2.1: status: 00000002
[34916.288968] mxc-mipi-csi2.1: CRC Error: 314456
[34916.288973] mxc-mipi-csi2.1: status: 00000002
[34916.289294] mxc-mipi-csi2.1: CRC Error: 314457
[34916.289300] mxc-mipi-csi2.1: status: 00000002
[34916.289531] mxc-mipi-csi2.1: CRC Error: 314458
[34916.289536] mxc-mipi-csi2.1: status: 00000002
...

 

The configuration of the 2 camera nodes in the device-tree is the same :

Camera pipeline #1 :

        jxf355_0: jxf355_mipi@40 {
                compatible = "soinc,jxf355";
                reg = <0x40>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>;
                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "csi_mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <0>;
                pwn-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
                rst-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
                mclk = <24000000>;
                mclk_source = <0>;
                mipi_csi;
                status = "okay";

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

 

 

Camera pipeline #2 :

       jxf355_1: jxf355_mipi@42 {
                compatible = "soinc,jxf355";
                reg = <0x42>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi1_pwn>, <&pinctrl_csi1_rst>;
                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "csi_mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <1>;
                pwn-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
                rst-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
                mclk = <24000000>;
                mclk_source = <0>;
                mipi_csi;
                status = "okay";

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

 

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

        status = "okay";

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

                        csis-hs-settle = <5>;
                        csis-clk-settle = <0>;
                        csis-wclk;
                };
        };
};

 

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

        status = "okay";

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

                        csis-hs-settle = <5>;
                        csis-clk-settle = <0>;
                        csis-wclk;
                };
        };
};

 

Both share the same MCLK (GPIO01_IO15) as in the reference EVK.

Do you think that this is a hardware related issue?

Best Regards,

Khang

Labels (1)
0 Kudos
Reply
5 Replies

377 Views
joanxie
NXP TechSupport
NXP TechSupport

do you use dual ISI ? if you disable the first camera, is it ok for second camera? 

0 Kudos
Reply

354 Views
khang_letruong
Senior Contributor III

Hi @joanxie,

do you use dual ISI ?

No, I used dual ISP :

/dts-v1/;

#include "imx8mp-viper.dts"

&iomuxc {
        pinctrl_csi1_pwn: csi1_pwn_grp {
                fsl,pins = <
                        MX8MP_IOMUXC_GPIO1_IO07__GPIO1_IO07             0x19
                >;
        };

        pinctrl_csi1_rst: csi1_rst_grp {
                fsl,pins = <
                        MX8MP_IOMUXC_GPIO1_IO05__GPIO1_IO05             0x19
                >;
        };
};

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

        /delete-node/ov5640_mipi@3c;

        jxf355_0: jxf355_mipi@40 {
                compatible = "soinc,jxf355";
                reg = <0x40>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>;
                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "csi_mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <0>;
                pwn-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
                rst-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
                mclk = <24000000>;
                mclk_source = <0>;
                mipi_csi;
                sync-mode = <1>;
                status = "okay";

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

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

        /delete-node/ov5640_mipi@3c;

        jxf355_1: jxf355_mipi@42 {
                compatible = "soinc,jxf355";
                reg = <0x42>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi1_pwn>, <&pinctrl_csi1_rst>;
                clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                clock-names = "csi_mclk";
                assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
                assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <1>;
                pwn-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
                rst-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
                mclk = <24000000>;
                mclk_source = <0>;
                mipi_csi;
                sync-mode = <2>;
                status = "okay";

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

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

        status = "okay";

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

                        csis-hs-settle = <5>;
                        csis-clk-settle = <0>;
                        csis-wclk;
                };
        };
};

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

        status = "okay";

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

                        csis-hs-settle = <5>;
                        csis-clk-settle = <0>;
                        csis-wclk;
                };
        };
};

&isi_0 {
        status = "disabled";
};

&isi_1 {
        status = "disabled";
};

&isp_0 {
        status = "okay";
};

&isp_1 {
        status = "okay";
};

&dewarp {
        status = "okay";
};

 

if you disable the first camera, is it ok for second camera?

Do you mean to completely/physically remove the first camera and/or to disable the first ISP node in the device-tree for my use-case ?

Best Regards,

Khang

0 Kudos
Reply

337 Views
joanxie
NXP TechSupport
NXP TechSupport

I mean that you disable the first camera in the dts, only test the second camera

0 Kudos
Reply

259 Views
khang_letruong
Senior Contributor III

Hi,

We found an issue on the hardware side.

 

Best Regards,

Khang

0 Kudos
Reply

248 Views
joanxie
NXP TechSupport
NXP TechSupport

ok, I will close this thread since you find the root cause

0 Kudos
Reply