Technology + People + Process

OV5640 camera

Bring up of OV5640 camera with MIPI interface on i.MX 6q Sabrelite Board

OV5640 camera

About OV5640:

OV5640-based 5MP Camera Module.  This has a MIPI interface and is designed to connect with the MIPI connector (J16) on the BD-SL-i.MX6 SABRE Lite board..

Overview about OV5640:

The OV5640 delivers a complete 5-megapixel camera solution on a single chip, aimed at offering cost efficiencies that serve the high volume autofocus (AF) camera phone market. The OV5640 enables 720p HD video at 60 frames per second (fps) and 1080p HD video at 30 fps with complete user control over formatting and output data transfer. The OV5640 offers a digital video port (DVP) parallel interface and a high-speed dual lane MIPI interface.

Bringing up of OV5640 on BD-SL-i.MX6 SABRE Lite board:

We have cross compiled the linux source code with mipi camera support provided by Freescale Inc  and used that uimage. One more thing to notice is ov5640 Mipi camera and ov5642 parallel cameras occupy the same I2C bus and has the same address. So we cannot use both the cameras at once.

We are able to bring up ov5640 camera with Mipi Interface.

Techinical Detailes of Bring up of OV5640 camera with MIPI interface on i.MX 6q Sabrelite Board:

1) Building Kernel for Mipi camera

Prerequisite: Before building kernel please install following Tools in Host machine.

$ sudo apt-get install libncurses5-dev

$ sudo apt-get install uboot-mkimage

$ sudo apt-get install git

Tool chain installation.

$ export PATH=$PATH:

step1: Download linux kernel source code(linux-imx6-boundary-imx_3.0.35_1.1.1) from Boundary devices website

$ git clone https://github.com/boundarydevices/linux-imx6.git

step2 : Extract it and change the directory to linux kernel source code

$ tar xvzf linux-imx6-boundary-imx_3.0.35_1.1.1.tar.gz 

$ cd linux-imx6-boundary-imx_3.0.35_1.1.1/

2) Cross compiling  kernel for Mipi camera.
Export the tool chain.

$export PATH=${PATH}:/home/aditya/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin

unzip the source code.

then configure the kernel to defaultconfig of imx6

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- imx6_defconfig

then make your configuration by

$make ARCH=arm CROSS_COMPILE=../gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi- menuconfig

3) Building Uimage

install uboot-image if not already installed by

 sudo apt get install uboot-image

make ARCH=arm CROSS_COMPILE=../gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi- uImage

copy uImage from linux-imx6-boundary-imx_3.0.35_1.1.1/arch/arm/boot/uImage  to /media/rootfs/boot/

4) Dependency Modules

After boot up insert following modules from /lib/modules/kernel/drivers/media/video/mxc/capture/

Dependency modules

insmod camera_sensor_clock.ko 

insmod ipu_bg_overlay_sdc.ko 

insmod ipu_fg_overlay_sdc.ko 

insmod ipu_csi_enc.ko 

insmod ipu_prp_enc.ko 

insmod ipu_still.ko 

insmod mxc_v4l2_capture.ko

then insert ov5640_camera_mipi.ko

insmod ov5640_camera_mipi.ko


Request for Quote

Drop us a line and we'll get in touch with you as quick as we can