You are here: Digi Embedded Yocto > System development > Linux v3.14 Board Support Package > Devices and interfaces > Camera > CSI (parallel)

CSI (parallel)

The image processing unit (IPU) has two identical camera serial interfaces. A camera serial interface, or CSI, consists of synchronizer, interface logic, data packing unit, and sensor interface control. The CSI is controlled via the peripheral bus registers.

The ConnectCore 6 SBC CSI camera port is connected to I2C3.

Kernel configuration

You can manage the CSI driver support and Video4Linux (V4L2) capture driver through the kernel configuration options:

These options are enabled as built-in on the default ConnectCore 6 SBC kernel configuration file.

The default ConnectCore 6 SBC kernel configuration file enables support for Omnivision OV5642 CSI camera sensor through the kernel configuration option:

Platform driver mapping

The drivers for CSI capture are located at:

File Description
drivers/media/platform/mxc/capture/ipu_csi_enc.c CSI driver source file
drivers/media/platform/mxc/capture/mxc_v4l2_capture.c Video4Linux (V4L2) capture driver
drivers/media/platform/mxc/capture/ov5642.c Omnivision OV5642 CSI camera sensor driver

Device tree bindings and customization

The V4L2 framework device tree binding is documented at Documentation/devicetree/bindings/video/fsl,v4l2-capture.txt.

The CSI camera interface is a subset of the IPU and only requires an appropriate IOMUX of the IPU lines involved in camera capture.

The device tree must contain entries for:

Example: primary camera (CSI0)

IOMUX configuration

ConnectCore 6 SBC device tree
ipu1 {
        pinctrl_ipu1_1: ipu1grp-1 { /* parallel camera */
            fsl,pins = <
                MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000
                MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000
                MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000
                MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000
                MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000
                MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000
                MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000
                MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000
                MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x0000a0b0
                MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000
                MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000
                MX6QDL_PAD_EIM_WAIT__GPIO5_IO00            0x80000000
                MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20    0x80000000
            >;
};

CSI V4L2 capture device

The video input to the CSI is configurable and may come from any IPU present in the i.MX6 CPU and from either of the two CSI interfaces within each IPU: CSI0 or CSI1.

ConnectCore 6 SBC device tree
v4l2_cap_1 {
        compatible = "fsl,imx6q-v4l2-capture";
        ipu_id = <0>;
        csi_id = <0>;
        mclk_source = <0>;
        status = "okay";
};

Camera sensor

The ConnectCore 6 SBC device tree defines the CSI OmniVision OV5642 camera.

ConnectCore 6 SBC device tree
&i2c3 {
        clock-frequency = <100000>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c3>;
        status = "okay";
        /* Primary parallel camera */
        ov5642_1: ov5642_1@5c {
                compatible = "ovti,ov564x";
                reg = <0x5c>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_ipu1_1>;
                clocks = <&clks 201>;
                clock-names = "csi_mclk";
                pwn-gpios = <&gpio5 0 1>;
                csi_id = <0>;
                ipu_id = <0>;
                mclk = <24000000>;
                mclk_source = <0>;
                digi,defer-probe;
        };
};

See Image Processing Unit (IPU).

 

© 2017 Digi International Inc. All rights reserved.
CSI (parallel) updated on 24 April 2017 11:48:25 PM