caspa camera support

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

caspa camera support

Postby v01d » Fri Mar 29, 2013 12:14 pm

Hi,
I would like to ask if anyone knows how to get the caspa camera working on the Overo. I see that actually the mt9v032 module is now available, but when loading it I don't get any video device. Is it supposed to work out of the box or is patching needed?

Thank you,
Matt
v01d
 
Posts: 8
Joined: Mon Jul 19, 2010 4:22 pm

Re: caspa camera support

Postby Brainsource » Mon Apr 01, 2013 1:03 pm

Hello Matt!

I am about to go through the same caspa exercise within a few days/weeks. Which means I am behind you anyway.

I suspect what is missing is programming the ISP (ISP = Image Sensor Processor...I think). Which means some pieces of the puzzle are missing. I expect to be forced to modify the kernel config and rebuild the kernel.

I will post any findings/tips here when I get there. On the other hand, if you make any progress yourself a posting here would be most appreciated.

erik
Brainsource
 
Posts: 3
Joined: Thu Mar 07, 2013 6:26 pm

Re: caspa camera support

Postby v01d » Tue Apr 02, 2013 2:46 pm

Well I've starting dwelling into this and i'm a bit stuck.
It seems that there's a major portion of the required code (the mt9v032 module and the omap3isp), but the board-over.c file, which initializes the Overo's devices does not initialize the camera. So, I've found the appropriate patch and modified it a bit to correspond to linux 3.7. The problem is it does not compile since it seems it is designed for a previous version of omap3isp. The problem is that some omap3isp structure differs and therefore compilation fails. I wouldn't know how to adapt the code since it seems I would need to configure things like HSYNC/VSYNC polarity and "data polarity" fields.

The patch I have is:

$this->bbcode_second_pass_code('', '--- linux-3.7/arch/arm/mach-omap2/board-overo.c.orig 2012-12-10 21:30:57.000000000 -0600
+++ linux-3.7/arch/arm/mach-omap2/board-overo.c 2013-04-02 08:05:10.000000000 -0500
@@ -69,6 +69,68 @@
#define OVERO_SMSC911X2_CS 4
#define OVERO_SMSC911X2_GPIO 65

+#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
+
+#include <media/mt9v032.h>
+#include "devices.h"
+#include "../../../drivers/media/platform/omap3isp/isp.h"
+
+#define MT9V032_I2C_ADDR 0x5C
+#define MT9V032_I2C_BUS_NUM 3
+
+static void mt9v032_set_clock(struct v4l2_subdev *subdev, unsigned int rate)
+{
+ struct isp_device *isp = v4l2_dev_to_isp_device(subdev->v4l2_dev);
+
+ isp->platform_cb.set_xclk(isp, rate, ISP_XCLK_A);
+}
+
+static struct mt9v032_platform_data mt9v032_platform_data = {
+ .clk_pol = 0,
+ .set_clock = mt9v032_set_clock,
+};
+
+static struct i2c_board_info mt9v032_i2c_device = {
+ I2C_BOARD_INFO("mt9v032", MT9V032_I2C_ADDR),
+ .platform_data = &mt9v032_platform_data,
+};
+
+static struct isp_subdev_i2c_board_info mt9v032_subdevs[] = {
+ {
+ .board_info = &mt9v032_i2c_device,
+ .i2c_adapter_id = MT9V032_I2C_BUS_NUM,
+ },
+ { NULL, 0, },
+};
+
+static struct isp_v4l2_subdevs_group overo_camera_subdevs[] = {
+ {
+ .subdevs = mt9v032_subdevs,
+ .interface = ISP_INTERFACE_PARALLEL,
+ .bus = {
+ .parallel = {
+ .data_lane_shift = 0,
+ .clk_pol = 0,
+ .bridge = ISPCTRL_PAR_BRIDGE_DISABLE,
+ }
+ },
+ },
+ { NULL, 0, },
+};
+
+static struct isp_platform_data overo_isp_platform_data = {
+ .subdevs = overo_camera_subdevs,
+};
+
+static int __init overo_camera_init(void)
+{
+ return omap3_init_camera(&overo_isp_platform_data);
+}
+
+#else
+static inline void overo_camera_init(void) { return; }
+#endif
+
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)

@@ -505,6 +567,7 @@
overo_init_led();
overo_init_keys();
omap_twl4030_audio_init("overo");
+ overo_camera_init();

/* Ensure SDRC pins are mux'd for self-refresh */
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
')

It fails on line:
$this->bbcode_second_pass_code('', '+ .bridge = ISPCTRL_PAR_BRIDGE_DISABLE,')

This "bridge" field does not exist but it should not be a problem since it seems current omap3isp takes care of such functionality internally. However, current structure implements new fields which need to be set for it to compile.
v01d
 
Posts: 8
Joined: Mon Jul 19, 2010 4:22 pm


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 33 guests