打印
[其它]

VS-RK3399 板卡上Debian系统,摄像头OV13850模块处理方式

[复制链接]
2868|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
timy@liao|  楼主 | 2018-1-19 09:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
debian系统目前支持Usb camera是没有问题,走UVC功能接口。那么mipi 接口camera和并口接口的camera,在Debian系统怎么设置呢,其实原理一样,也走uvc接口封装函数.

下面给他大家简单说明:
首先在dts文件定义Mipi camera接口的定义:
camera0: camera-module@60 {
        status = "okay";
        compatible = "ovti,ov13850-v4l2-i2c-subdev";
        reg = < 0x60 >;
        device_type = "v4l2-i2c-subdev";
        clocks = <&cru SCLK_CIF_OUT>;
        clock-names = "clk_cif_out";
        pinctrl-names = "rockchip,camera_default",
            "rockchip,camera_sleep";
        pinctrl-0 = <&cam0_default_pins>;
        pinctrl-1 = <&cam0_sleep_pins>;

        rockchip,pwr-gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>;
        rockchip,camera-module-mclk-name = "clk_cif_out";
        rockchip,camera-module-facing = "back";
        rockchip,camera-module-name = "cmk-cb0695-fv1";
        rockchip,camera-module-len-name = "lg9569a2";
        rockchip,camera-module-fov-h = "133.0";
        rockchip,camera-module-fov-v = "100.1";
        rockchip,camera-module-orientation = <0>;
        rockchip,camera-module-iq-flip = <0>;
        rockchip,camera-module-iq-mirror = <0>;
        rockchip,camera-module-flip = <0>;
        rockchip,camera-module-mirror = <0>;
        rockchip,camera-module-defrect0 = <640 480 0 0 640 480>;
        rockchip,camera-module-defrect1 = <640 480 0 0 640 480>;
        rockchip,camera-module-defrect2 = <640 480 0 0 640 480>;
        rockchip,camera-module-defrect3 = <640 480 0 0 640 480>;
        rockchip,camera-module-flash-support = <0>;
        rockchip,camera-module-mipi-dphy-index = <0>;
    };

cif_isp0: cif_isp@ff910000 {
        compatible = "rockchip,rk3399-cif-isp";
        rockchip,grf = <&grf>;
        reg = <0x0 0xff910000 0x0 0x4000>, <0x0 0xff968000 0x0 0x8000>;
        reg-names = "register", "dsihost-register";
        clocks =
            <&cru ACLK_ISP0_NOC>, <&cru ACLK_ISP0_WRAPPER>,
            <&cru HCLK_ISP0_NOC>, <&cru HCLK_ISP0_WRAPPER>,
            <&cru SCLK_ISP0>, <&cru SCLK_DPHY_RX0_CFG>,
            <&cru SCLK_CIF_OUT>, <&cru SCLK_CIF_OUT>,
            <&cru SCLK_MIPIDPHY_REF>;
        clock-names =
            "aclk_isp0_noc", "aclk_isp0_wrapper",
            "hclk_isp0_noc", "hclk_isp0_wrapper",
            "clk_isp0", "pclk_dphyrx",
            "clk_cif_out", "clk_cif_pll",
            "pclk_dphy_ref";
        interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
        interrupt-names = "cif_isp10_irq";
        power-domains = <&power RK3399_PD_ISP0>;
        rockchip,isp,iommu-enable = <1>;
        iommus = <&isp0_mmu>;
        status = "disabled";
    };
通过上面的配置后,打开驱动,驱动加载成功了。通过应用就可以切换摄像头,图像就可以出来了

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

15

主题

16

帖子

1

粉丝