Re: OMAP 3530 camera ISP forks and new media framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastian,

On Thursday 14 October 2010 15:10:46 Bastian Hecht wrote:
> 2010/10/12 Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>:

[snip]

> > The OMAP3 ISP driver requires platform data that contain, among other
> > information, the list of I2C subdevices. Have a look at arch/arm/mach-
> > omap2/board-rx51-camera.c.
> 
> OK, I am closing in :)
> 
> I registered the OMAP_ISP device in my board-module. The driver kicks in
> [  205.686248] omap3isp omap3isp: Revision 2.0 found
> 
> and I can see the device in /sys/devices/platform/omap3isp.
> I loaded your slightly modified mt9t001 module under the name mt9p031
> and I can find it under
> /sys/bus/i2c/drivers/mt9p031
> /sys/module/laurentcam/drivers/i2c:mt9p031

The module should be loaded automatically. Make sure you modify the 
mt9t001_id[] array to replace "mt9t001" with "mt9p031".

> But this subdevice-driver doesn't get active (I added alot printk in
> the sensor module code, but no probing, nothing happens except the
> registration). I have not connected anything to the camera isp
> physically, but I think it should find out when probing?

Yes. The sensor driver probe function will try to access the sensor and will 
fail. This will in turn make the OMAP3 ISP driver fail, but you should at 
least get error messages.

> I also see no /dev/videox device from the isp. Can you guide me to
> next step? Your help makes it so much easier and I really appreciate
> it :)
> 
> Here my board code:
> 
> static struct mt9t001_platform_data bastix_mt9p031_platform_data = {
>         .clk_pol        = 0,
> };
> 
> 
> static struct i2c_board_info bastix_camera_i2c_devices[] = {
>         {
>                 I2C_BOARD_INFO(MT9P031_NAME, MT9P031_I2C_ADDR), /*
> name is "mt9p031" and i2caddr is fantasy number */

You need to provide a correct I2C address.

>                 .platform_data = &bastix_mt9p031_platform_data,
>         },
> };
> 
> static struct v4l2_subdev_i2c_board_info bastix_camera_mt9p031[] = {
>         {
>                 .board_info = &bastix_camera_i2c_devices[0],
>                 .i2c_adapter_id = BASTIX_CAM_I2C_BUS_NUM, /* busnum is 2 */
>                 .module_name = "mt9p031",

This field has disappeared recently. Please upgrade to the latest OMAP3 ISP 
driver version.

>         },
>         { NULL, 0, NULL, },
> };
> 
> static struct isp_v4l2_subdevs_group bastix_camera_subdevs[] = {
>         {
>                 .subdevs = bastix_camera_mt9p031,
>                 .interface = ISP_INTERFACE_CCP2B_PHY1,
>                 .bus = { .ccp2 = {
>                         .strobe_clk_pol         = 0,
>                         .crc                    = 1,
>                         .ccp2_mode              = 1,
>                         .phy_layer              = 1,
>                         .vpclk_div              = 1,
>                 } },

The mt9p031 is a parallel sensor, not a serial sensor. Use the following code 
(and replace the data_lane_shift and clk_pol variable depending on your 
hardware).

                .interface = ISP_INTERFACE_PARALLEL,
                .bus = { .parallel = {
                        .data_lane_shift        = 1,
                        .clk_pol                = 1,
                        .bridge                 = ISPCTRL_PAR_BRIDGE_DISABLE,
                } },

>         },
>         { NULL, 0, },
> };
> 
> static struct isp_platform_data bastix_isp_platform_data = {
>         .subdevs = bastix_camera_subdevs,
> };
> 
> module_init() {
> ...
> omap3isp_device.dev.platform_data = &bastix_isp_platform_data;
> return platform_device_register(&omap3isp_device);
> }

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux