[PATCH v8 1/2] Add driver for Aptina Micron mt9p031 sensor.

Fix BUG with output_control register and frequency calculation problems.

- Output control register was being smashed, thus causing pixclk to have
a high slew rate.

- We cannot assume that we will always have a 20MHz input freq,
so a table has been added so that the user can specify input freq
and desired freq.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>

Use new platform data ext_freq and target_freq.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>

Hi, Laurent.
How is it going?

Is there any chance these changes to be included for next release?
We are afraid that changes in the framework may turn the patches useless.

Thank you.

Hi Javier,

Ok, thank you Laurent.

I feel more comfortable now you have it applied to your tree.

Regards.

Hi,
they are currently sitting in Laurent's tree. According to him, there
are a couple of things that must be fixed before submitting them to
mainline.

But I don't know anything else. Maybe Laurent himself could clarify
what is the status right now.

Clayton, Javier,

Javier's sensor driver patches cherry picked from OpenEmbedded [1] [2]
applies almost cleanly to Linus's mainline tree (except for some merge
conflicts in Kconfig), and compiles fine. I'm guessing it should work
fine, but I will test this tomorrow morning.

The only concern is this might be an older version of Javier's driver.

Thanks
Joel

[1] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/camera/0001-Add-driver-for-Aptina-Micron-mt9p031-sensor.patch?h=org.openembedded.dev
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/camera/0003-Add-support-for-mt9p031-LI-5M03-module-in-Beagleboar.patch?h=org.openembedded.dev

Joel, Javie,

I have the patches (from http://git.linuxtv.org/pinchartl/media.git)
working and I am able to capture images using Laurent's media-ctl
applicationa and a OpenCV app I wrote. I am unable to change the
exposure time via OpenCV. I believe OpenCV is trying to change the
ISP CCDC modules exposure time instead of the camera module's. I
believe there is a crucial step that I am missing but I can't figure
it out. Any help would be greatly appreciated.

Thanks,
Clayton

Hi there,

I have written a V4L2 application to perform color conversion on captured framed from LI5M03 (MT9P031) running on BB-xM platform. It seems working fine according to the initial tests. However, the captured frame rate is low - 7 fps for 640x480.

Work Environment:
Kernel: 3.7.10-x13 → git://github.com/RobertCNelson/stable-kernel.git
Ubuntu: 12.10 (with minimal lxde desktop) → http://rcn-ee.net/deb/rootfs/quantal/ubuntu-12.10-console-armhf-2013-06-14.tar.xz
Webcam: LI5M03 (mt9p031) enabled in uEnv.txt by adding the following line: camera=li5m03

mt9p031.c currently in the image as follows:
/*
* Driver for MT9P031 CMOS Image Sensor from Aptina

Hi again,

Here is a summary of my findings so far:

  • Achieved to get 14 fps when the pix clock is set to 96 MHz which was 48MHz default.
  • Experiment on the number of frames captured in different format resolutions as follows:
    = 1280x960 >> 18 fps
    = 960x720 >> 27 fps
    = 640x480 >> 14 fps (??) [still investigating the possible reasons]
  • You can increase fps if you do cropping - changing output window height, width - at the driver level.

Regards,
Ozkan.