getting feed from two csi cameras

cancel
Showing results for 
Search instead for 
Did you mean: 

getting feed from two csi cameras

395 Views
srinivasaporam
Contributor II

Hi,

We have got imx6Q reference boards like (sabrelite, Wandboard and Humming board) which is been customized for two csi cameras (Raspi cameras ov5647 image sensor) We have got the driver for ov5647 also.

Now, while customizing we have taken four lanes from processor (imx6q) as shown below:

pastedImage_0.png

and four lanes are distributed among two cameras (two lanes each) as shown below:

pastedImage_1.png

Now, when we are booting by connecting cameras at j27 (only one camera), and try to capture video or image. then it is capturing fine (using ffmpeg).

But if we do so ,by connecting camera in j28 (by disconnecting camera at j27) , it is not capturing.

We doubt whether CSI_D2M, CSI_D2P, CSI_D3M, CSI_D3P) are enable or not. How to enable them?????

is this configuration is ok?????

How to make both cameras to give feed simultaneously...

in dtb for one camera we are using following entries:

v4l2_cap_0 {

        compatible = "fsl,imx6q-v4l2-capture";

        ipu_id = <0>;

        csi_id = <1>;

        mclk_source = <0>;

                mipi_camera = <1>;

                default_input = <1>;

        status = "okay";

    };

v4l2_out {

        compatible = "fsl,mxc_v4l2_output";

        status = "okay";

    };

&i2c1 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c1>;

    status = "okay";

        ov5647_mipi@36 {

        compatible = "ovti,ov5647_mipi";

        reg = <0x36>;

        // Pi camera has its own 25MHz clock.

        clocks = <&clks 0>;

        clock-names = "csi_mclk";

       

                DOVDD-supply = <&reg_3p3v>;

        AVDD-supply = <&reg_3p3v>;

        DVDD-supply = <&reg_3p3v>;

        pwn-gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;

                led-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;

        ipu_id = <0>;

        csi_id = <1>;

              

                mclk = <25000000>;

        mclk_source = <0>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_hog>;

                //extended-buffer;

          

            };

&iomuxc {

   

    imx6qdl-wandboard {

        pinctrl_hog: hoggrp {

            fsl,pins = <

            MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30            0x80000000

                        MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31            0x0f0b0

                        MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19                0x80000000

>;

        };

&mipi_csi {

    ipu_id = <0>;

    csi_id = <1>;

        //csi_id = <1>;

    v_channel = <0>;

    lanes = <2>;

        mipi_dphy_clk = <0x28>;

    status = "okay";

};

with the above dtb entries camera is working fine at j27. But how to make both the camera to give feed simulataneously. which dtb entries need to be changed to make that configuration???? is there any reference design for two camera setup????

0 Kudos
1 Reply

35 Views
art
NXP TechSupport
NXP TechSupport

It is not possible to connect two separate MIPI cameras to a single MIPI CSI2 port. The reason is that the MIPI CSI2 protocol is very complicated and has its own operation logic (i.e. it is not a simple serializer/deserializer circuit). The MIPI CSI2 port treats any hardware, connected to it, as a single device that implements this logic, as defined by the MIPI Alliance Standard for Camera Serial Interface 2 (CSI-2) Version 1.00 document.

Regarding the issue you observe (a camera, connected to the CSI_DxP/M lines with lower numbers, can work, but a camera, connected to the lines with upper numbers, can not), the reason is as follows. During interface initialization, the port performs an automatic handshake to define how much active data lanes a connected device has, starting from the Lane 0 (CSI_D0P/M). So, once it detects a single device on the bus, it completes the handshake and starts operating with a device. So, in your case, only one camera, connected to the data lanes starting from CSI_D0P/M, can work.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos