Firefly开源社区

打印 上一主题 下一主题

[Linux] AIO-3588MQ视频AOS04A10摄像头模组,视频输出异常!

36

积分

0

威望

0

贡献

技术小白

积分
36

AIO-3588MQ视频AOS04A10摄像头模组,视频输出异常!

发表于 2023-8-29 11:24:11      浏览:1211 | 回复:9        打印      只看该作者   [复制链接] 楼主
问题描述及复现步骤:
在调试OS04A10摄像头驱动的时,有视频流输出,但出现 这种情况。是什么原因呢?怎么解决?
设备树是这样配置:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/

/ {
    cam_ircut0: cam_ircut {
        status = "okay";
        compatible = "rockchip,ircut";
        ircut-open-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
        ircut-close-gpios  = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
        rockchip,camera-module-index = <0>;
        rockchip,camera-module-facing = "back";
    };
    vcc_mipidphy0: vcc-mipidcphy0-regulator {
        status = "okay";
        compatible = "regulator-fixed";
        gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&mipidphy0_pwr>;
        regulator-name = "vcc_mipidphy0";
        enable-active-high;
    };

};

&csi2_dphy0 {
    status = "okay";

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

            mipidphy0_in_ucam0: endpoint@1 {
                reg = <1>;
                remote-endpoint = <&os04a10_out0>;
                data-lanes = <1 2>;
            };
        };
        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            csidphy0_out: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&mipi2_csi2_input>;
            };
        };
    };
};

&csi2_dphy0_hw {
    status = "okay";
};

&i2c3 {
    status = "okay";
    os04a10: os04a10@36 {
        compatible = "ovti,os04a10";
        status = "okay";
        reg = <0x36>;
        clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
        clock-names = "xvclk";
        power-domains = <&power RK3588_PD_VI>;
        pinctrl-names = "rockchip,camera_default",
                "rockchip,camera_sleep";
        pinctrl-0 = <&mipim0_camera3_clk>;
        reset-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
        pwdn-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
         avdd-supply = <&vcc_mipidphy0>;

        // dovdd-supply = <&vcc_dovdd>;
        // dvdd-supply = <&vcc_dvdd>;

        rockchip,camera-module-sync-mode = "slave";
        rockchip,camera-module-index = <0>;
        rockchip,camera-module-facing = "front";
        rockchip,camera-module-name = "CMK-OT1607-FV1";
        rockchip,camera-module-lens-name = "M12-40IRC-4MP-F16";
        rockchip,camera-hdr-mode = <0>;


        //os04a10hk_CMK-OT1607-FV1_M12-40IRC-4MP-F16

        lens-focus = <&cam_ircut0>;
        port {
            os04a10_out0: endpoint {
                remote-endpoint = <&mipidphy0_in_ucam0>;
                data-lanes = <1 2>;
            };
        };
    };


};

&mipi2_csi2 {
    status = "okay";

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

        port@0 {
            reg = <0>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi2_csi2_input: endpoint@1 {
                reg = <1>;
                remote-endpoint = <&csidphy0_out>;
            };
        };

        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi2_csi2_output: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&cif_mipi2_in0>;
            };
        };
    };
};

&pinctrl {
    cam {
        mipidphy0_pwr: mipidphy0-pwr {
            rockchip,pins =
                /* camera power en */
                <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
};

&rkcif {
    status = "okay";
};

&rkcif_mipi_lvds2 {
    status = "okay";

    port {
        cif_mipi2_in0: endpoint {
            remote-endpoint = <&mipi2_csi2_output>;
        };
    };
};

&rkcif_mipi_lvds2_sditf {
    status = "disabled";

    port {
        mipi_lvds2_sditf: endpoint {
            remote-endpoint = <&isp0_vir0>;
        };
    };
};

&rkcif_mmu {
    status = "okay";
};

&rkisp0 {
    status = "disabled";
};

&isp0_mmu {
    status = "disabled";
};

&rkisp0_vir0 {
    status = "disabled";

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

        isp0_vir0: endpoint@0 {
            reg = <0>;
            remote-endpoint = <&mipi_lvds2_sditf>;
        };
    };
};



log.txt

100.67 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

1万

积分

14

威望

13

贡献

管理员

Rank: 9Rank: 9Rank: 9

积分
11138

优秀版主

发表于 2023-8-30 16:07:54        只看该作者  沙发
这是格式问题,你抓哪个节点,以什么格式来抓呢?
回复

使用道具 举报

1万

积分

14

威望

13

贡献

管理员

Rank: 9Rank: 9Rank: 9

积分
11138

优秀版主

发表于 2023-8-30 16:09:58        只看该作者  板凳
我们的 800 万摄像头是外置 ISP 摄像头,你的摄像头是没有 ISP 的,需要用3588 内部的 ISP。

sensor 传过来的是 bayer raw 格式不是 YUV 格式,这个要先搞清楚才能调试
回复

使用道具 举报

36

积分

0

威望

0

贡献

技术小白

积分
36
发表于 2023-8-30 16:25:10        只看该作者  地板
用的是这个命令抓的 :
gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=10 ! video/x-raw,format=NV12,width=1920,height=1080 ! mppjpegenc ! multifilesink location=/userdata/test%05d.jpg
回复

使用道具 举报

36

积分

0

威望

0

贡献

技术小白

积分
36
发表于 2023-8-30 16:28:18        只看该作者  5#
我看这个芯片的架构是有ISP的
回复

使用道具 举报

36

积分

0

威望

0

贡献

技术小白

积分
36
发表于 2023-8-30 16:36:07        只看该作者  6#
用IMX464 摄像头模组 在 buildroot 里能出现 /dev/video-camera0  这个ISP节点,但在Ubuntu(官网下载的文件系统) 里面没有,用OS04A10摄像头模组在两个系统里都不能出现 ISP设备节点

image.jpg (124.37 KB, 下载次数: )

image.jpg
回复

使用道具 举报

36

积分

0

威望

0

贡献

技术小白

积分
36
发表于 2023-8-31 09:56:34        只看该作者  7#
有时候会出现这个错误
回复

使用道具 举报

36

积分

0

威望

0

贡献

技术小白

积分
36
发表于 2023-8-31 10:00:33        只看该作者  8#
iqfile 文件有两个os04a10的json文件,我该填哪个?

image.png (98.6 KB, 下载次数: )

image.png
回复

使用道具 举报

1万

积分

14

威望

13

贡献

管理员

Rank: 9Rank: 9Rank: 9

积分
11138

优秀版主

发表于 2023-8-31 11:38:45        只看该作者  9#
上面 已经提醒过了,sensor 出来的数据不是 nv12 YUV 格式 ,是 bayer raw 格式
回复

使用道具 举报

1万

积分

14

威望

13

贡献

管理员

Rank: 9Rank: 9Rank: 9

积分
11138

优秀版主

发表于 2023-8-31 11:41:28        只看该作者  10#
设备树没有开 ISP 当然没有 ISP 节点了,你可以参考一下其他  dts 或者  RK ISP 文档  ,改一下  Sensor 链路。我们的摄像头是外置 ISP 出来的数据就是  YUV 而不是 bayer raw 数据,不同场景 ,不能做参考

image.png (6.72 KB, 下载次数: )

image.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表