first steps to implement a new camera sensor driver in BB-xM...

Hi there,

I am tasked to implement a driver module in BB-xM to support one of the camera sensor that my company is using in their products. As of today I have achieved to get MT9P031 (LI5M03) camera working fine and in the next step we’re planning to replace that camera with ours. I have already started to investigate the following files: mt9p031.c/h, bard-omap3beagle.c, Kconfig, v4l2-chip-ident.h.

I have some questions related and it will be greatly appreciated if you can help me.

-I’m planning to take mt9v011.c as a baseline in the implementation of new driver, does it sound reasonable to you?

-What is the reason of mt9p031 specifically initialized in board-omap3beagle.c? Other camera sensors seem not implemented in that file.

-Any points/considerations/rules that I have to be careful while developing a new driver?

Thanks in advance.

Regards,
Ozkan.

Hi again,

I’d like to share my experience so far here since I’m new in BeagleBoard-xM and trying to attach an analog camera which has ADC board already to the board.

As of today I have a driver source file written to define sub_dev operations to handle I2C communication between BB-xM and the camera sensor board. mt9p031.c/h is taken as baseline to implement my own driver in this purpose. Now I’m trying to discover the video data interface and investigating source codes in /kernel/drivers/media/platform/omap3isp. My aim is to debug the video interface when the sensor is attached to the board. I’m not sure if omap3isp is the right module for that?

Also, as far as I can see the reason of having mt9p031 specifically initialized in board-omap3beagle is to set LI5M03 a default camera sensor in BB-xM.

Any comments, guidance or critics are welcome.

Regards,
Ozkan.

Here is some of my learning in the last few days.
-Most likely an interface board is required if you would like to connect your camera to BB via the camera interface.

-Then you may need to implement your own driver which works/communicates fine with the new board.
-The new board needs to be initialized while start-up in kernel/arch/arm/… platform specific file.
-The new driver needs to be added into Kconfig.
-Keyword is “I2C_BOARD_INFO(“name”, I2C_ADDR)” to set I2C address specific to the new board.
-Don’t forget that the probe function will be called when the device is detected at I2C ADDR.

Any additions/corrections are welcome.

Regards,
Ozkan.

There is a camera module already available for the -xM. Schematics should also be available.

Gerald

http://blog.galemin.com/2011/04/li-5m03-camera-on-beagleboard-xm/

Gerald

An important note if you are going to use your own camera adapter card instead of LI5M03, BB-xM camera port (P10) is expecting “frame_valid” and “line_valid” signals in VSync and HSync pins. So, you may need to make some design changes at outputs of ADC chip that used in your board in order to satisfy the requirement of BB-xM.

Regards,
Ozkan.

If you are using ADC adapter which has interlaced output only then you need to make required changes in the kernel/bootloader to set FID pin in P10 socket in BB-xM. Even I have done this changes, it seems the current drivers (CCDC/V4L2) doesn’t support the interlaced video input. I mean I couldn’t find any driver code who uses FID (Field Indicator - EVen/Odd) signal. Is anyone in the position to confirm this finding?

Regards,
Ozkan.