All of lore.kernel.org
 help / color / mirror / Atom feed
* New SOC Camera hardware
       [not found] <fe2a004a676834efbb488b985de0370b@www.tabletspain.net>
@ 2011-08-24  0:15 ` Gilles
  2011-08-25  2:41   ` Scott Jiang
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles @ 2011-08-24  0:15 UTC (permalink / raw)
  To: linux-media

Folks,

I am currently trying to add V4L2 SOC Camera support for an embedded board (Blackfin 527 EZKIT-V2).
Trying to learn from the few existing examples and was wondering if anyone could shed some light on this:

More specifically, I'm looking at:

arch/sh/boards/mach-ap325rxa/setup.c

arch/arm/mach-mx3/mach-pcm037.c
drivers/media/video/mx3_camera.c

I have the feeling that mx3 appears to be incomplete (or untested?) because of this statement in

static int __devinit mx3_camera_probe(struct platform_device *pdev)
{
  [...]
  soc_host		= &mx3_cam->soc_host;

Where mx3->soc_host appears to never be initialized since it's allocation (followed by a memzero).

Anyway, my question is: the ap325 board setup appears to do the job without a dedicated SOC driver.
Am I reading this correctly or is there a SOC driver for the ap325 I'm not seeing?

This is all so very hard with the total lack of comments in the code as well as the convoluted Kconfig/makefiles.

I'd appreciate any help anyone is willing to offer. Even after reading soc-camera.txt and a few others I still don't know what is *really* necessary.


I've pretty much come to the conclusion that in order to add SOC support for camera on a board I need to:

1) add a I2C_BOARD_INFO entry with the camera I2C address (in the board specific setup based on the appropriate CONFIG_...)

2) add a soc_camera_link for the camera sensor with that I2C info.

[...]

)) Add the device in the board __init. In my case in arch/blackfin/mach-bf527/boards/ezkit.c in __init ezkit_init()

add a call to platform_add_device

I know I'm missiong a lot of pieces to this puzzle. 
I'm seeing other boards allocate DMA regions first and then only add the camera if it succeeded.
Then I'm seeing the ap325 which creates TWO soc_camera_link (I'm assuming one is for the SOC driver which does not exist elsewhere?...)

Can anyone please shed some light on all this or point me to a SOC drivers for dummy document I may have missed???

I'd appreciate any input anyone is willing to lend.

Thanks,
Gilles
.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New SOC Camera hardware
  2011-08-24  0:15 ` New SOC Camera hardware Gilles
@ 2011-08-25  2:41   ` Scott Jiang
  2011-09-26 21:28     ` Gilles
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Jiang @ 2011-08-25  2:41 UTC (permalink / raw)
  To: Gilles; +Cc: linux-media, uclinux-dist-devel

Hi Gilles,

If you want to write a driver for blackfin, you can visit
http://blackfin.uclinux.org/ and find linux kernel repo url.
I have written a blackfin bridge driver, vs6624 sensor driver and
adv7183 decoder driver. You can reference vs6624 driver.
I didn't use soc camera framework because it can't support decoder well.
These patch hasn't uploaded to mainline, I hope it is helpful for you.

Regards,
Scott

2011/8/24 Gilles <gilles@gigadevices.com>:
> Folks,
>
> I am currently trying to add V4L2 SOC Camera support for an embedded board (Blackfin 527 EZKIT-V2).
> Trying to learn from the few existing examples and was wondering if anyone could shed some light on this:
>
> More specifically, I'm looking at:
>
> arch/sh/boards/mach-ap325rxa/setup.c
>
> arch/arm/mach-mx3/mach-pcm037.c
> drivers/media/video/mx3_camera.c
>
> I have the feeling that mx3 appears to be incomplete (or untested?) because of this statement in
>
> static int __devinit mx3_camera_probe(struct platform_device *pdev)
> {
>  [...]
>  soc_host              = &mx3_cam->soc_host;
>
> Where mx3->soc_host appears to never be initialized since it's allocation (followed by a memzero).
>
> Anyway, my question is: the ap325 board setup appears to do the job without a dedicated SOC driver.
> Am I reading this correctly or is there a SOC driver for the ap325 I'm not seeing?
>
> This is all so very hard with the total lack of comments in the code as well as the convoluted Kconfig/makefiles.
>
> I'd appreciate any help anyone is willing to offer. Even after reading soc-camera.txt and a few others I still don't know what is *really* necessary.
>
>
> I've pretty much come to the conclusion that in order to add SOC support for camera on a board I need to:
>
> 1) add a I2C_BOARD_INFO entry with the camera I2C address (in the board specific setup based on the appropriate CONFIG_...)
>
> 2) add a soc_camera_link for the camera sensor with that I2C info.
>
> [...]
>
> )) Add the device in the board __init. In my case in arch/blackfin/mach-bf527/boards/ezkit.c in __init ezkit_init()
>
> add a call to platform_add_device
>
> I know I'm missiong a lot of pieces to this puzzle.
> I'm seeing other boards allocate DMA regions first and then only add the camera if it succeeded.
> Then I'm seeing the ap325 which creates TWO soc_camera_link (I'm assuming one is for the SOC driver which does not exist elsewhere?...)
>
> Can anyone please shed some light on all this or point me to a SOC drivers for dummy document I may have missed???
>
> I'd appreciate any input anyone is willing to lend.
>
> Thanks,
> Gilles
> .
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New SOC Camera hardware
  2011-08-25  2:41   ` Scott Jiang
@ 2011-09-26 21:28     ` Gilles
  2011-09-27  3:33       ` Scott Jiang
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles @ 2011-09-26 21:28 UTC (permalink / raw)
  To: Scott Jiang; +Cc: linux-media, uclinux-dist-devel

Scott,

A late echo. I am just now getting into the heart of this project and realize I missed your answer here from back in August. Just grabbed the trunk from the repo and trying to compile it.

I'm not sure I understand why it would work with one sensor driver and not another. I thought the whole point of an adapter driver was to separate the camera sensor functions from the hardware. I guess the reason why I ask is because I currently need to get it to work with the Micron MT9V022 (which has a sensor driver).

Thanks,
Gilles
.



On Aug 24, 2011, at 19:41 , Scott Jiang wrote:

> Hi Gilles,
> 
> If you want to write a driver for blackfin, you can visit
> http://blackfin.uclinux.org/ and find linux kernel repo url.
> I have written a blackfin bridge driver, vs6624 sensor driver and
> adv7183 decoder driver. You can reference vs6624 driver.
> I didn't use soc camera framework because it can't support decoder well.
> These patch hasn't uploaded to mainline, I hope it is helpful for you.
> 
> Regards,
> Scott
> 
> 2011/8/24 Gilles <gilles@gigadevices.com>:
>> Folks,
>> 
>> I am currently trying to add V4L2 SOC Camera support for an embedded board (Blackfin 527 EZKIT-V2).
>> Trying to learn from the few existing examples and was wondering if anyone could shed some light on this:
>> 
>> More specifically, I'm looking at:
>> 
>> arch/sh/boards/mach-ap325rxa/setup.c
>> 
>> arch/arm/mach-mx3/mach-pcm037.c
>> drivers/media/video/mx3_camera.c
>> 
>> I have the feeling that mx3 appears to be incomplete (or untested?) because of this statement in
>> 
>> static int __devinit mx3_camera_probe(struct platform_device *pdev)
>> {
>>  [...]
>>  soc_host              = &mx3_cam->soc_host;
>> 
>> Where mx3->soc_host appears to never be initialized since it's allocation (followed by a memzero).
>> 
>> Anyway, my question is: the ap325 board setup appears to do the job without a dedicated SOC driver.
>> Am I reading this correctly or is there a SOC driver for the ap325 I'm not seeing?
>> 
>> This is all so very hard with the total lack of comments in the code as well as the convoluted Kconfig/makefiles.
>> 
>> I'd appreciate any help anyone is willing to offer. Even after reading soc-camera.txt and a few others I still don't know what is *really* necessary.
>> 
>> 
>> I've pretty much come to the conclusion that in order to add SOC support for camera on a board I need to:
>> 
>> 1) add a I2C_BOARD_INFO entry with the camera I2C address (in the board specific setup based on the appropriate CONFIG_...)
>> 
>> 2) add a soc_camera_link for the camera sensor with that I2C info.
>> 
>> [...]
>> 
>> )) Add the device in the board __init. In my case in arch/blackfin/mach-bf527/boards/ezkit.c in __init ezkit_init()
>> 
>> add a call to platform_add_device
>> 
>> I know I'm missiong a lot of pieces to this puzzle.
>> I'm seeing other boards allocate DMA regions first and then only add the camera if it succeeded.
>> Then I'm seeing the ap325 which creates TWO soc_camera_link (I'm assuming one is for the SOC driver which does not exist elsewhere?...)
>> 
>> Can anyone please shed some light on all this or point me to a SOC drivers for dummy document I may have missed???
>> 
>> I'd appreciate any input anyone is willing to lend.
>> 
>> Thanks,
>> Gilles
>> .
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New SOC Camera hardware
  2011-09-26 21:28     ` Gilles
@ 2011-09-27  3:33       ` Scott Jiang
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Jiang @ 2011-09-27  3:33 UTC (permalink / raw)
  To: Gilles; +Cc: linux-media, uclinux-dist-devel, Guennadi Liakhovetski

2011/9/27 Gilles <gilles@gigadevices.com>:
> Scott,
>
> A late echo. I am just now getting into the heart of this project and realize I missed your answer here from back in August. Just grabbed the trunk from the repo and trying to compile it.
>
> I'm not sure I understand why it would work with one sensor driver and not another. I thought the whole point of an adapter driver was to separate the camera sensor functions from the hardware. I guess the reason why I ask is because I currently need to get it to work with the Micron MT9V022 (which has a sensor driver).
>

If you prefer soc, you can convert my bridge driver to soc framework,
but you need add some patches to soc if you want soc support decoder
well. Guennadi Liakhovetski can give you more advice on this.
If not, my bridge driver already supports sensor driver, vs6624 is an
example. You just need care about the ops sensor driver must
implement.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-27  3:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <fe2a004a676834efbb488b985de0370b@www.tabletspain.net>
2011-08-24  0:15 ` New SOC Camera hardware Gilles
2011-08-25  2:41   ` Scott Jiang
2011-09-26 21:28     ` Gilles
2011-09-27  3:33       ` Scott Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.