MT9T113 image sensor driver v2.6.29-davinci1_leopard_vga.patch : patch file. git_fbdev_lpbk.tgz : a demo to save image to a file. uImage_git : kernel image binary file. raw_viewer.exe : Raw image viewer This patch applies to open source Davinci linux git tree (http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary) tag v2.6.29-davinci1. It contains mt9t113 sensor driver, as well as the davinci VPFE video capture driver from Murali Karicheri (http://linux.omap.com/pipermail/davinci-linux-open-source/2009-March/011756.html). The mt9t113 sensor driver is implemented as an int device, not sub device. The davinci VPFE video capture driver has a newer patch in June, 2009 (http://linux.omap.com/pipermail/davinci-linux-open-source/2009-June/013885.html). Since the mt9v113 datasheet is not open to public, its register names and contents in the driver are not implictly listed. Instead, registers are accessed using direct address. This could be confusing, but we couldn't do much before Aptina releases such information. The mt9v113 sensor driver supports VGA output only. The sensor data lines are connected to CCD13 to CCD6, and it outputs YCbCr data. To capture YCbCr data correctly, The CCDC is configured to take RAW Bayer format, and it shifts the data 6 bits to the right, then pack it to 8 bits mode. Therefore, data captured in SDRAM is YCbCr format, and it can be fed to IPIPE for further processing, or sent to display driver. In this kernel version, network is not working reliably on the Leopard Board. One way to test the driver is to run file system on an SD CARD. The kernel and the demo are built with CodeSourcery 2008Q1 compiler. The saved file can be opened by some YCbCr image viewers. Leopard Imaging provides a free raw_viewer.exe. It requires Microsoft .net framework. How to get kernel source code, patch it and build it: git clone git_local_dir git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git git reset --hard v2.6.29-davinci1 patch -p1 < v2.6.29-davinci1_leopard_vga.patch make davinci_dm355_defconfig make menuconfig enable (system type -> TI DaVinci Implementations -> DM355 Leopard board ) enable (Device Drivers -> MMC/SD/SDIO card support) enable (Device Drivers -> MMC/SD/SDIO card support -> TI DAVINCI Multimedia Card Interface support ) enable (Device Drivers -> Multimedia devices -> Video capture adapters -> VPFE Video Capture Driver & DM355 CCDC HW module) disable (Device Drivers -> Multimedia devices -> Video capture adapters -> Autoselect pertinent encoders/decoders and other helper chips) enable (Device Drivers -> Multimedia devices -> Video capture adapters -> Encoders/decoders and other helper chips -> Aptina MT9V113 VGA CMOS IMAGE SENSOR) make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage To view the image, use raw_viewer.exe to open the file with these settings: Input: byte; Bit Mode: 8-bit; Bayer Mode: CrYCbY; Col Size: 640; Row Size: 480 Leopard Imaging 08/08/2009