MA35D1 调试OV5640摄像头,拍照显示全绿

cwlin0 |浏览80次
收藏|2024/01/19 10:21

调试OV5640摄像头,当前驱动加载正常,但是使用 gst(640x480 分辨率)拍照显示全绿。设备树要如何配置。


gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=3 ! jpegenc ! filesink location=/home/root/test.jpg


满意回答

2024/02/23 10:55

按照以下提供的设备树可以使用:

&ccap0 {

        status = "okay";

  port {

    /* Parallel bus endpoint */

#if 1

    ccap0_1: endpoint {

      remote-endpoint = <&ov5640_0>;

      bus-width = <8>;

      hsync-active = <0>; /* Active low */

      vsync-active = <0>; /* Active low */

      pclk-sample = <1>; /* Rising */

    };

#else

    ccap0_1: endpoint {

      remote-endpoint = <&hm1055_0>;

      hsync-active = <0>; /* Active low */

      vsync-active = <0>; /* Active low */

      pclk-sample = <1>; /* Rising */

    };

#endif

  };

};

 

&i2c_gpio0 {

  status = "okay";

#if 1

  ov5640@3c {

    compatible = "ovti,ov5640";

    reg = <0x3C>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ccap0>;

    clocks = <&clk CCAP0_GATE>;

    clock-names = "xclk";

    reset-gpios = <&gpiom 1 GPIO_ACTIVE_LOW>; /* PM1 */

    powerdown-gpios = <&gpiok 8 GPIO_ACTIVE_HIGH>; /* PK8 */

    port {

      ov5640_0: endpoint {

        remote-endpoint = <&ccap0_1>;

   hsync-active = <0>; /* Active low */

           vsync-active = <0>; /* Active low */

                   pclk-sample = <1>; /* Rising */

 

      };

    };

  };

#else

  hm1055@24 {

    compatible = "himax,hm1055";

    reg = <0x24>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ccap0>;

    clocks = <&clk CCAP0_GATE>;

    clock-names = "xclk";

    reset-gpios = <&gpiom 1 GPIO_ACTIVE_LOW>; /* PM1 */

    powerdown-gpios = <&gpiok 8 GPIO_ACTIVE_HIGH>; /* PK8 */

    port {

      hm1055_0: endpoint {

        remote-endpoint = <&ccap0_1>;

      };

    };

  };


nuvoton2022

其他回答(0)
0人关注该问题
+1
 加载中...