The {cpu-family} processor provides a Camera Sensor Interface (CSI) module that captures a MPI-CSI input and saves the pixels into memory.
On the ConnectCore 8M Mini Development Kit:
-
A MIPI CSI-2 connector is available.
The BSP includes support for the Omnivision ov5640 CSI camera model.
Kernel configuration
You can manage the CSI driver support and Video4Linux (V4L2) capture driver through the following kernel configuration options:
-
CSI camera support (
CONFIG_VIDEO_MXC_CSI_CAMERA
) -
MXC MIPI CSI driver (
CONFIG_MXC_MIPI_CSI
) -
OmniVision ov5640 camera support using mipi (
CONFIG_MXC_CAMERA_OV5640_MIPI_V2
)
These options are enabled as built-in on the default ConnectCore 8M Mini kernel configuration file.
Kernel driver
The drivers for CSI capture are located at:
File | Description |
---|---|
i.MX6Sx SoC Camera Host driver |
|
Freescale MIPI-CSI2 receiver driver |
|
OV5640 MIPI Camera Driver |
Device tree bindings and customization
Common bindings for video receiver and transmitter interfaces are described at Documentation/devicetree/bindings/media/video-interfaces.txt
.
The device tree must contain entries for:
-
The V4L2 capture interface
-
The camera sensor
-
The IOMUX
V4L2 capture interface (CSI)
&csi1_bridge {
fsl,mipi-mode;
status = "okay";
port {
csi_ep: endpoint {
remote-endpoint = <&csi_mipi_ep>;
};
};
};
[...]
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
/* Camera 0 MIPI CSI-2 (CSIS0) */
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
remote-endpoint = <&ov5640_mipi_ep>;
data-lanes = <2>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
csi_mipi_ep: endpoint@2 {
remote-endpoint = <&csi_ep>;
};
};
};
Camera sensor (I2C2 slave)
&i2c2 {
[...]
/* MIPI-CSI camera */
ov5640_mipi: ov5640_mipi@3c {
compatible = "ovti,ov5640_mipi";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mipi>;
clocks = <&clk IMX8MM_CLK_CLKO1>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
rst-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
mclk = <24000000>;
mclk_source = <0>;
port {
ov5640_mipi_ep: endpoint {
remote-endpoint = <&mipi_csi0_ep>;
};
};
};
[...]
};
IOMUX configuration
&iomuxc {
[...]
pinctrl_mipi: mipi {
fsl,pins = <
/* MIPI_CSI_RESET_N */
MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x19
>;
};
[...]
};
Digi validates the basic functionality (preview 640x480 and picture taking 2592x1944) using the following cameras:
-
Digilent 410-358
-
Waveshare 13802