0

我想在 Avnet Maaxboard 上运行 Sony IMX219 相机。

我正在使用 Yocto,带有 linux-imx 内核 5.10.35。

制造商表示:“开箱即用的 yocto 和 debian 图像仅支持基于 OV5640 摄像头的解决方案。任何额外的图像传感器支持都需要添加。”

然后我开始开发自己的设备树结构(DTS)来处理这台相机。我使用 ov5640 dts 作为起点。

这是我的 DTS 文件:

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/imx8mq-clock.h>
#include <dt-bindings/gpio/gpio.h>

/{
    compatible = "avnet,maaxboard", "fsl,imx8mq";

    fragment@0 {
        target = <&i2c1>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells = <0>;
            imx219_mipi@10 {
                compatible = "sony,imx219";
                reg = <0x10>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi1>;
                clocks = <&clk IMX8MQ_CLK_CLKO2>;
                clock-names = "csi_mclk";
                csi_id = <0>;
                pwn-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
                rst-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
                status = "okay";

                mclk = <24000000>;
                mclk_source = <0>;

                port {
                    imx219_mipi1_ep: endpoint {
                        clock-lanes = <0>;
                        data-lanes = <1 2 3 4>;
                        remote-endpoint = <&mipi1_sensor_ep>;
                    };
                };
            };
        };
    };

    fragment@1 {
        target = <&csi1_bridge>;
        __overlay__ {
            status = "okay";
        };
    };

    fragment@2 {
        target = <&mipi_csi_1>;
        __overlay__ {
            status = "okay";
            rxhs-settle = <0x07>;
            port {
                mipi1_sensor_ep: endpoint@0 {
                    remote-endpoint = <&imx219_mipi1_ep>;
                    clock-lanes = <0>;
                    data-lanes = <1 2 3 4>;
                    bus-type = <4>;
                };
            };
        };
    };
};

我成功启动并加载了我的 dts 文件,lsmod 命令告诉我驱动程序已加载,并出现 /dev/video0。

但它不起作用;当我使用 ffmpeg 拍照时,我得到了这个错误:

ffmpeg 错误

有谁知道如何使这项工作?

最好的问候托马斯

4

0 回答 0