imx93 6.12 version ---ov5640

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

imx93 6.12 version ---ov5640

1,844 次查看
ljm3721
Contributor I

issuse:
新版本的内核6.12,使用ov5640的时候遇到如下报错:

root@imx93evk:~# v4l2-ctl --list-devices
mxc-isi-cap (platform:4ae40000.isi):
/dev/video0
/dev/video1
/dev/media0
 

root@imx93evk:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,format=YUY2 ! videoconvert ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.24.7.imx/sys/v4l2/gstv4l2src.c(956): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.013558875
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
/usr/src/debug/gstreamer1.0/1.24.7.imx/libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...
root@imx93evk:~#

下面是我的设备树:
#include "imx93-11x11-evk.dts"

/ {

    lvds_backlight: lvds_backlight {
        compatible = "pwm-backlight";
        pwms = <&tpm5 0 100000 0>;
        status = "okay";
        //pinctrl-0 = <&pinctrl_pwm_en>;
        enable-gpios = <&pca9535 7 GPIO_ACTIVE_HIGH>;

        brightness-levels = < 0  1  2  3  4  5  6  7  8  9
                     10 11 12 13 14 15 16 17 18 19
                     20 21 22 23 24 25 26 27 28 29
                     30 31 32 33 34 35 36 37 38 39
                     40 41 42 43 44 45 46 47 48 49
                     50 51 52 53 54 55 56 57 58 59
                     60 61 62 63 64 65 66 67 68 69
                     70 71 72 73 74 75 76 77 78 79
                     80 81 82 83 84 85 86 87 88 89
                     90 91 92 93 94 95 96 97 98 99
                    100>;
        default-brightness-level = <80>;
    };

    lvds0_panel {
        compatible = "debix,JW101HD_X00";
        //compatible = "boe,ev121wxm-n10-1850";
        pinctrl-names = "default";
        //pinctrl-0 = <&pinctrl_lvds_en>;
        enable-gpios = <&pca9535 8 GPIO_ACTIVE_HIGH>;
       
        backlight = <&lvds_backlight>;

        port {
            panel_lvds_in: endpoint {
                remote-endpoint = <&lvds_out>;
            };
        };
    };
};

&ldb {
    status = "okay";

    lvds-channel@0 {
        //fsl,data-mapping = "jeida";
        fsl,data-mapping = "spwg";
        fsl,data-width = <24>;
        status = "okay";

        port@1 {
            reg = <1>;

            lvds_out: endpoint {
                remote-endpoint = <&panel_lvds_in>;
            };
        };
    };
};


&tpm5 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_pwm5>;
    status = "okay";
};

&ldb_phy {
    status = "okay";
};


&dphy {
    status = "disabled";
};

&dsi {
    status = "disabled";
};


&lcdif {
    status = "okay";
    assigned-clock-rates = <498000000>, <71142857>, <400000000>, <133333333>;
};


//OV5640 (MIPI) --> DPHY --> MIPI CSI2 --> ISI --> /dev/videoX

// &cameradev {
//  status = "okay";
// };

// &isi_0 {
//  status = "okay";

//  cap_device {
//      status = "okay";
//  };
// };


&lpi2c1 {
    clock-frequency = <100000>;
    ov5640_0: ov5640_mipi@3c {
                compatible = "ovti,ov5640";
                reg = <0x3c>;
                pinctrl-names = "default";
               // pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi0_mclk>;
                //pinctrl-0 = <&pinctrl_csi0_mclk>;
                clocks = <&clk IMX93_CLK_CCM_CKO3>;
                clock-names = "xclk";
                assigned-clocks = <&clk IMX93_CLK_CCM_CKO3>;
                assigned-clock-parents = <&clk IMX93_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <0>;
                powerdown-gpios = <&pca9535 3 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&pca9535_1 15 GPIO_ACTIVE_LOW>;
                //mclk = <24000000>;
                //mclk_source = <0>;
                //mipi_csi;
                status = "okay";
                port {
                        isp_out: endpoint {
                                remote-endpoint = <&mipi_csi_in>;
                                data-lanes = <1 2>;
                                clock-lanes = <0>;
                        };
                    };
                };
};


&dphy_rx {
    status = "okay";
};

&mipi_csi {
    status = "okay";

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

        port@0 {
            reg = <0>;

            mipi_csi_in: endpoint {
                remote-endpoint = <&isp_out>;
                data-lanes = <1 2>;
                // clock-lanes = <0>;
            cfg-clk-range = <28>; /*24MHz = 28*/
            hs-clk-range = <0x16>;  
            bus-type = <4>;
            };
        };

        port@1 {
            reg = <1>;

            mipi_csi_out: endpoint {
                remote-endpoint = <&isi_in>;
            };
        };
    };
};

&isi {
    status = "okay";

    port {
        isi_in: endpoint {
            remote-endpoint = <&mipi_csi_out>;
        };
    };
};


0 项奖励
回复
13 回复数

1,821 次查看
Chavira
NXP TechSupport
NXP TechSupport

HI @ljm3721!
Thank you for contacting NXP Support!

According to iMX Linux Release Notes, i.MX 93 and i.MX 91 do not support OV5640 camera sensor. They support MT9M114 with 320x240@25, 640x480@25, 800x480@25, 1280x720@25.

 

Best Regards!

Chavira

0 项奖励
回复

1,800 次查看
ljm3721
Contributor I

Hi, @Chavira 

感谢你的及时回复;
我在6.1.3版本中修改设备树之后是可以是使用OV5640的,根据你的反馈,在6.12版本中是不能使用该模块吗?
期待你的回复,谢谢

0 项奖励
回复

1,789 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @ljm3721!

 

Since the first BSP compatible with the iMX93 (6.1.1) the Note is the same.

 

Chavira_0-1745340206139.png

 

0 项奖励
回复

1,754 次查看
ljm3721
Contributor I

Hi @Chavira 

I use the MIPI Camera CSI interface,So,i think it support in imx93,and i can use ov5640 in 6.1.3 version.But due to the dts havd changed in 6.12 version,I cant use it now.
My device tree is attached above,Can u check it?
Looking forward to your reply.Thanks.

ljm3721_0-1745365539715.png

 

0 项奖励
回复

1,732 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @ljm3721!

 

Sorry for my mistake!

 

Can you share your device tree file?

0 项奖励
回复

1,721 次查看
ljm3721
Contributor I

Hi @Chavira 
I'll share the full device tree with you when I get to work.
Above I have given all the device trees about the camera,Can u check it?
In addition, the following is my boot log. 

0 项奖励
回复

1,728 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @ljm3721!

 

You can see an example here

0 项奖励
回复

1,717 次查看
ljm3721
Contributor I

Hi @Chavira 

Her is my set :

&lpi2c1 {
    clock-frequency = <100000>;
    ov5640_0ov5640_mipi@3c {
                compatible = "ovti,ov5640";
                reg = <0x3c>;
                pinctrl-names = "default";
               // pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi0_mclk>;
                //pinctrl-0 = <&pinctrl_csi0_mclk>;
                clocks = <&clk IMX93_CLK_CCM_CKO3>;
                clock-names = "xclk";
                assigned-clocks = <&clk IMX93_CLK_CCM_CKO3>;
                assigned-clock-parents = <&clk IMX93_CLK_24M>;
                assigned-clock-rates = <24000000>;
                csi_id = <0>;
                powerdown-gpios = <&pca9535 3 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&pca9535_1 15 GPIO_ACTIVE_LOW>;
                //mclk = <24000000>;
                //mclk_source = <0>;
                //mipi_csi;
                status = "okay";
                port {
                        isp_outendpoint {
                                remote-endpoint = <&mipi_csi_in>;
                                data-lanes = <1 2>;
                                clock-lanes = <0>;
                        };
                    };
                };
};



&dphy_rx {
    status = "okay";
};

 

&mipi_csi {
    status = "okay";

 

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

 

        port@0 {
            reg = <0>;

 

            mipi_csi_inendpoint {
                remote-endpoint = <&isp_out>;
                data-lanes = <1 2>;
                // clock-lanes = <0>;
            cfg-clk-range = <28>; /*24MHz = 28*/
            hs-clk-range = <0x16>;  
            bus-type = <4>;
            };
        };

 

        port@1 {
            reg = <1>;

 

            mipi_csi_outendpoint {
                remote-endpoint = <&isi_in>;
            };
        };
    };
};

 

&isi {
    status = "okay";

 

    port {
        isi_inendpoint {
            remote-endpoint = <&mipi_csi_out>;
        };
    };
};


Can u check it?

0 项奖励
回复

1,714 次查看
Chavira
NXP TechSupport
NXP TechSupport

HI @ljm3721!

 

Please share your device tree file.

 

Can you share the log file outputs of the next commands:

 

#Get the topology of the capture subsystem
$ media-ctl -p

#List the video devices
$ v4l2-ctl --list-devices

#List the supported pixel formats:
$ v4l2-ctl -d0 --list-formats

#List the supported image resolutions
$ v4l2-ctl -d0 --list-framesizes YUYV

 

 I don´t see any error in the first log file maybe you are not using the correct format or size in the gstreamer command

0 项奖励
回复

1,635 次查看
ljm3721
Contributor I

hi @Chavira 
here are devices tree and log

0 项奖励
回复

1,613 次查看
ljm3721
Contributor I

hi @Chavira 

Do u have any update?

 

0 项奖励
回复

1,709 次查看
ljm3721
Contributor I

will share u device tree tomorrow.

Do u have device tree about ov5640 in kernel 6.12 version?

Addition i had run some  command in the log file,please check it.@Chavira 

 

0 项奖励
回复

1,548 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @ljm3721!

 

Are you using the debix board?

 

You can get based in the next device tree:

 

https://github.com/debix-tech/linux/blob/ModelC_linux-6.1.36_2.1.0/arch/arm64/boot/dts/freescale/imx...

0 项奖励
回复