All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-23 19:02 Alex Gershgorin
  2012-03-23 20:37   ` Fabio Estevam
  0 siblings, 1 reply; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-23 19:02 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: s.hauer, g.liakhovetski, linux-kernel, linux-arm-kernel,
	linux-media, Alex Gershgorin

Hi Fabio,

> Good news...
> After several number of changes, yesterday the camera started to work :-)
> I will prepare some patches and send them.

> >Ok, great! Besides your mx35 clock patches: any other patch is
> >required to getting the camera to work?

Yes, yesterday I sended to Sascha and ARM mailing list another patch
i.MX35-PDK-Add-regulator-support, this also will need be used.

> > Are you getting the camera image with the correct colors?

Now the camera works fine without any problems, except those,
who have already eliminated :-)

Regards,
Alex Gershgorin


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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-23 19:02 [PATCH v1] i.MX35-PDK: Add Camera support Alex Gershgorin
@ 2012-03-23 20:37   ` Fabio Estevam
  0 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-23 20:37 UTC (permalink / raw)
  To: Alex Gershgorin
  Cc: Fabio Estevam, s.hauer, g.liakhovetski, linux-kernel,
	linux-arm-kernel, linux-media, Alex Gershgorin

Hi Alex,

On Fri, Mar 23, 2012 at 4:02 PM, Alex Gershgorin
<alexgershgorin@gmail.com> wrote:
> Yes, yesterday I sended to Sascha and ARM mailing list another patch
> i.MX35-PDK-Add-regulator-support, this also will need be used.

Ok, good. I saw that patch as well.

It would be really nice if you could fix the I2C issues you reported
earlier in software.

Otherwise the camera will only work on your own modified mx35pdk ;-)

Regards,

Fabio Estevam

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-23 20:37   ` Fabio Estevam
  0 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-23 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Alex,

On Fri, Mar 23, 2012 at 4:02 PM, Alex Gershgorin
<alexgershgorin@gmail.com> wrote:
> Yes, yesterday I sended to Sascha and ARM mailing list another patch
> i.MX35-PDK-Add-regulator-support, this also will need be used.

Ok, good. I saw that patch as well.

It would be really nice if you could fix the I2C issues you reported
earlier in software.

Otherwise the camera will only work on your own modified mx35pdk ;-)

Regards,

Fabio Estevam

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-20  8:54             ` Alex Gershgorin
  (?)
@ 2012-03-23  0:47               ` Fabio Estevam
  -1 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-23  0:47 UTC (permalink / raw)
  To: Alex Gershgorin
  Cc: Sascha Hauer, Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	g.liakhovetski, linux-arm-kernel, linux-media

Hi Alex,

On Tue, Mar 20, 2012 at 5:54 AM, Alex Gershgorin <alexg@meprolight.com> wrote:
>
> Hi all,
>
> Good news...
> After several number of changes, yesterday the camera started to work :-)
> I will prepare some patches and send them.

Ok, great! Besides your mx35 clock patches: any other patch is
required to getting the camera to work?

Are you getting the camera image with the correct colors?

Thanks,

Fabio Estevam

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-23  0:47               ` Fabio Estevam
  0 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-23  0:47 UTC (permalink / raw)
  To: Alex Gershgorin
  Cc: Sascha Hauer, Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	g.liakhovetski, linux-arm-kernel, linux-media

Hi Alex,

On Tue, Mar 20, 2012 at 5:54 AM, Alex Gershgorin <alexg@meprolight.com> wrote:
>
> Hi all,
>
> Good news...
> After several number of changes, yesterday the camera started to work :-)
> I will prepare some patches and send them.

Ok, great! Besides your mx35 clock patches: any other patch is
required to getting the camera to work?

Are you getting the camera image with the correct colors?

Thanks,

Fabio Estevam

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-23  0:47               ` Fabio Estevam
  0 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-23  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Alex,

On Tue, Mar 20, 2012 at 5:54 AM, Alex Gershgorin <alexg@meprolight.com> wrote:
>
> Hi all,
>
> Good news...
> After several number of changes, yesterday the camera started to work :-)
> I will prepare some patches and send them.

Ok, great! Besides your mx35 clock patches: any other patch is
required to getting the camera to work?

Are you getting the camera image with the correct colors?

Thanks,

Fabio Estevam

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

* RE: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:45           ` Sascha Hauer
  (?)
@ 2012-03-20  8:54             ` Alex Gershgorin
  -1 siblings, 0 replies; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-20  8:54 UTC (permalink / raw)
  To: Sascha Hauer, Fabio Estevam
  Cc: Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	g.liakhovetski, linux-arm-kernel, linux-media


Hi all,

Good news...
After several number of changes, yesterday the camera started to work :-) 
I will prepare some patches and send them. 

On Mon, Mar 19, 2012 at 07:43:32PM -0300, Fabio Estevam wrote:
> Hi Sascha,
>
> On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> > It's scheduled there. I should have responded with an applied message.
>
> Please apply this one too: http://patchwork.ozlabs.org/patch/144942/
>

Regards,
Alex Gershgorin


--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* RE: [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-20  8:54             ` Alex Gershgorin
  0 siblings, 0 replies; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-20  8:54 UTC (permalink / raw)
  To: Sascha Hauer, Fabio Estevam
  Cc: Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	g.liakhovetski, linux-arm-kernel, linux-media


Hi all,

Good news...
After several number of changes, yesterday the camera started to work :-) 
I will prepare some patches and send them. 

On Mon, Mar 19, 2012 at 07:43:32PM -0300, Fabio Estevam wrote:
> Hi Sascha,
>
> On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> > It's scheduled there. I should have responded with an applied message.
>
> Please apply this one too: http://patchwork.ozlabs.org/patch/144942/
>

Regards,
Alex Gershgorin


--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-20  8:54             ` Alex Gershgorin
  0 siblings, 0 replies; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-20  8:54 UTC (permalink / raw)
  To: linux-arm-kernel


Hi all,

Good news...
After several number of changes, yesterday the camera started to work :-) 
I will prepare some patches and send them. 

On Mon, Mar 19, 2012 at 07:43:32PM -0300, Fabio Estevam wrote:
> Hi Sascha,
>
> On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> > It's scheduled there. I should have responded with an applied message.
>
> Please apply this one too: http://patchwork.ozlabs.org/patch/144942/
>

Regards,
Alex Gershgorin


--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:37       ` Sascha Hauer
@ 2012-03-19 22:49         ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:49 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Alex Gershgorin, linux-kernel, g.liakhovetski, fabio.estevam,
	linux-media, linux-arm-kernel

Em 19-03-2012 19:37, Sascha Hauer escreveu:
> On Mon, Mar 19, 2012 at 07:17:27PM -0300, Mauro Carvalho Chehab wrote:
>> Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
>>> Em 13-03-2012 12:05, Alex Gershgorin escreveu:
>>>> In i.MX35-PDK, OV2640  camera is populated on the
>>>> personality board. This camera is registered as a subdevice via soc-camera interface.
>>>>
>>>> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
>>>
>>> Patch doesn't apply over v3.3:
>>
>> Sorry, the previous version of this patch didn't apply. This compiles OK.
>>
>> Sorry for the mess.
>>
>> Anyway, it should be applied via arm subtree.
> 
> It's scheduled there. I should have responded with an applied message.

Ok, thanks! 

Regards,
Mauro

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:49         ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:49 UTC (permalink / raw)
  To: linux-arm-kernel

Em 19-03-2012 19:37, Sascha Hauer escreveu:
> On Mon, Mar 19, 2012 at 07:17:27PM -0300, Mauro Carvalho Chehab wrote:
>> Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
>>> Em 13-03-2012 12:05, Alex Gershgorin escreveu:
>>>> In i.MX35-PDK, OV2640  camera is populated on the
>>>> personality board. This camera is registered as a subdevice via soc-camera interface.
>>>>
>>>> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
>>>
>>> Patch doesn't apply over v3.3:
>>
>> Sorry, the previous version of this patch didn't apply. This compiles OK.
>>
>> Sorry for the mess.
>>
>> Anyway, it should be applied via arm subtree.
> 
> It's scheduled there. I should have responded with an applied message.

Ok, thanks! 

Regards,
Mauro

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:43         ` Fabio Estevam
@ 2012-03-19 22:45           ` Sascha Hauer
  -1 siblings, 0 replies; 23+ messages in thread
From: Sascha Hauer @ 2012-03-19 22:45 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	Alex Gershgorin, g.liakhovetski, linux-arm-kernel, linux-media

On Mon, Mar 19, 2012 at 07:43:32PM -0300, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > It's scheduled there. I should have responded with an applied message.
> 
> Please apply this one too: http://patchwork.ozlabs.org/patch/144942/
> 

Will do.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:45           ` Sascha Hauer
  0 siblings, 0 replies; 23+ messages in thread
From: Sascha Hauer @ 2012-03-19 22:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 19, 2012 at 07:43:32PM -0300, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > It's scheduled there. I should have responded with an applied message.
> 
> Please apply this one too: http://patchwork.ozlabs.org/patch/144942/
> 

Will do.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:37       ` Sascha Hauer
@ 2012-03-19 22:43         ` Fabio Estevam
  -1 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-19 22:43 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Mauro Carvalho Chehab, fabio.estevam, linux-kernel,
	Alex Gershgorin, g.liakhovetski, linux-arm-kernel, linux-media

Hi Sascha,

On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> It's scheduled there. I should have responded with an applied message.

Please apply this one too: http://patchwork.ozlabs.org/patch/144942/

Otherwise camera device cannot register.

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:43         ` Fabio Estevam
  0 siblings, 0 replies; 23+ messages in thread
From: Fabio Estevam @ 2012-03-19 22:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sascha,

On Mon, Mar 19, 2012 at 7:37 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> It's scheduled there. I should have responded with an applied message.

Please apply this one too: http://patchwork.ozlabs.org/patch/144942/

Otherwise camera device cannot register.

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:17     ` Mauro Carvalho Chehab
@ 2012-03-19 22:37       ` Sascha Hauer
  -1 siblings, 0 replies; 23+ messages in thread
From: Sascha Hauer @ 2012-03-19 22:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Alex Gershgorin, linux-kernel, g.liakhovetski, fabio.estevam,
	linux-media, linux-arm-kernel

On Mon, Mar 19, 2012 at 07:17:27PM -0300, Mauro Carvalho Chehab wrote:
> Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
> > Em 13-03-2012 12:05, Alex Gershgorin escreveu:
> >> In i.MX35-PDK, OV2640  camera is populated on the
> >> personality board. This camera is registered as a subdevice via soc-camera interface.
> >>
> >> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > 
> > Patch doesn't apply over v3.3:
> 
> Sorry, the previous version of this patch didn't apply. This compiles OK.
> 
> Sorry for the mess.
> 
> Anyway, it should be applied via arm subtree.

It's scheduled there. I should have responded with an applied message.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:37       ` Sascha Hauer
  0 siblings, 0 replies; 23+ messages in thread
From: Sascha Hauer @ 2012-03-19 22:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 19, 2012 at 07:17:27PM -0300, Mauro Carvalho Chehab wrote:
> Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
> > Em 13-03-2012 12:05, Alex Gershgorin escreveu:
> >> In i.MX35-PDK, OV2640  camera is populated on the
> >> personality board. This camera is registered as a subdevice via soc-camera interface.
> >>
> >> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > 
> > Patch doesn't apply over v3.3:
> 
> Sorry, the previous version of this patch didn't apply. This compiles OK.
> 
> Sorry for the mess.
> 
> Anyway, it should be applied via arm subtree.

It's scheduled there. I should have responded with an applied message.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-19 22:03   ` Mauro Carvalho Chehab
@ 2012-03-19 22:17     ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:17 UTC (permalink / raw)
  To: Alex Gershgorin
  Cc: Sascha Hauer, linux-kernel, g.liakhovetski, fabio.estevam,
	linux-media, linux-arm-kernel

Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
> Em 13-03-2012 12:05, Alex Gershgorin escreveu:
>> In i.MX35-PDK, OV2640  camera is populated on the
>> personality board. This camera is registered as a subdevice via soc-camera interface.
>>
>> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> 
> Patch doesn't apply over v3.3:

Sorry, the previous version of this patch didn't apply. This compiles OK.

Sorry for the mess.

Anyway, it should be applied via arm subtree.

Regards,
Mauro

> 
> patching file arch/arm/mach-imx/mach-mx35_3ds.c
> Hunk #3 FAILED at 149.
> Hunk #4 succeeded at 126 with fuzz 1 (offset -55 lines).
> Hunk #5 FAILED at 323.
> Hunk #6 succeeded at 277 (offset -57 lines).
> Hunk #7 succeeded at 293 (offset -57 lines).
> 2 out of 7 hunks FAILED -- saving rejects to file arch/arm/mach-imx/mach-mx35_3ds.c.rej
>  arch/arm/mach-imx/mach-mx35_3ds.c |   87 ++++++++++++++++++++++++++++++++++++++
> 
> 
>> ---
>>  arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
>>  1 files changed, 96 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
>> index 0af6c9c..a7dd8e6 100644
>> --- a/arch/arm/mach-imx/mach-mx35_3ds.c
>> +++ b/arch/arm/mach-imx/mach-mx35_3ds.c
>> @@ -4,6 +4,11 @@
>>   *
>>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>>   *
>> + * Copyright (C) 2011 Meprolight, Ltd.
>> + * Alex Gershgorin <alexg@meprolight.com>
>> + *
>> + * Modified from i.MX31 3-Stack Development System
>> + *
>>   * This program is free software; you can redistribute it and/or modify
>>   * it under the terms of the GNU General Public License as published by
>>   * the Free Software Foundation; either version 2 of the License, or
>> @@ -34,6 +39,7 @@
>>  #include <asm/mach/arch.h>
>>  #include <asm/mach/time.h>
>>  #include <asm/mach/map.h>
>> +#include <asm/memblock.h>
>>  
>>  #include <mach/hardware.h>
>>  #include <mach/common.h>
>> @@ -41,6 +47,8 @@
>>  #include <mach/irqs.h>
>>  #include <mach/3ds_debugboard.h>
>>  
>> +#include <media/soc_camera.h>
>> +
>>  #include "devices-imx35.h"
>>  
>>  #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
>> @@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
>>  	/* I2C1 */
>>  	MX35_PAD_I2C1_CLK__I2C1_SCL,
>>  	MX35_PAD_I2C1_DAT__I2C1_SDA,
>> +	/* CSI */
>> +	MX35_PAD_TX1__IPU_CSI_D_6,
>> +	MX35_PAD_TX0__IPU_CSI_D_7,
>> +	MX35_PAD_CSI_D8__IPU_CSI_D_8,
>> +	MX35_PAD_CSI_D9__IPU_CSI_D_9,
>> +	MX35_PAD_CSI_D10__IPU_CSI_D_10,
>> +	MX35_PAD_CSI_D11__IPU_CSI_D_11,
>> +	MX35_PAD_CSI_D12__IPU_CSI_D_12,
>> +	MX35_PAD_CSI_D13__IPU_CSI_D_13,
>> +	MX35_PAD_CSI_D14__IPU_CSI_D_14,
>> +	MX35_PAD_CSI_D15__IPU_CSI_D_15,
>> +	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
>> +	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
>> +	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
>> +	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
>> +};
>> +
>> +/*
>> + * Camera support
>> +*/
>> +static phys_addr_t mx3_camera_base __initdata;
>> +#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
>> +
>> +static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
>> +	.flags = MX3_CAMERA_DATAWIDTH_8,
>> +	.mclk_10khz = 2000,
>> +};
>> +
>> +static int __init imx35_3ds_init_camera(void)
>> +{
>> +	int dma, ret = -ENOMEM;
>> +	struct platform_device *pdev =
>> +		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
>> +
>> +	if (IS_ERR(pdev))
>> +		return PTR_ERR(pdev);
>> +
>> +	if (!mx3_camera_base)
>> +		goto err;
>> +
>> +	dma = dma_declare_coherent_memory(&pdev->dev,
>> +					mx3_camera_base, mx3_camera_base,
>> +					MX35_3DS_CAMERA_BUF_SIZE,
>> +					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
>> +
>> +	if (!(dma & DMA_MEMORY_MAP))
>> +		goto err;
>> +
>> +	ret = platform_device_add(pdev);
>> +	if (ret)
>> +err:
>> +		platform_device_put(pdev);
>> +
>> +	return ret;
>> +}
>> +
>> +static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
>> +	.irq_base = MXC_IPU_IRQ_START,
>> +};
>> +
>> +static struct i2c_board_info mx35_3ds_i2c_camera = {
>> +	I2C_BOARD_INFO("ov2640", 0x30),
>> +};
>> +
>> +static struct soc_camera_link iclink_ov2640 = {
>> +	.bus_id		= 0,
>> +	.board_info	= &mx35_3ds_i2c_camera,
>> +	.i2c_adapter_id	= 0,
>> +	.power		= NULL,
>> +};
>> +
>> +static struct platform_device mx35_3ds_ov2640 = {
>> +	.name	= "soc-camera-pdrv",
>> +	.id	= 0,
>> +	.dev	= {
>> +		.platform_data = &iclink_ov2640,
>> +	},
>>  };
>>  
>>  static int mx35_3ds_otg_init(struct platform_device *pdev)
>> @@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
>>  		pr_warn("Init of the debugboard failed, all "
>>  				"devices on the debugboard are unusable.\n");
>>  	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
>> +	imx35_add_ipu_core(&mx35_3ds_ipu_data);
>> +	platform_device_register(&mx35_3ds_ov2640);
>> +	imx35_3ds_init_camera();
>>  }
>>  
>>  static void __init mx35pdk_timer_init(void)
>> @@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
>>  	.init	= mx35pdk_timer_init,
>>  };
>>  
>> +static void __init mx35_3ds_reserve(void)
>> +{
>> +	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
>> +	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
>> +					 MX35_3DS_CAMERA_BUF_SIZE);
>> +}
>> +
>>  MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>>  	/* Maintainer: Freescale Semiconductor, Inc */
>>  	.atag_offset = 0x100,
>> @@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>>  	.handle_irq = imx35_handle_irq,
>>  	.timer = &mx35pdk_timer,
>>  	.init_machine = mx35_3ds_init,
>> +	.reserve = mx35_3ds_reserve,
>>  	.restart	= mxc_restart,
>>  MACHINE_END
> 
> --
> 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] 23+ messages in thread

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:17     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:17 UTC (permalink / raw)
  To: linux-arm-kernel

Em 19-03-2012 19:03, Mauro Carvalho Chehab escreveu:
> Em 13-03-2012 12:05, Alex Gershgorin escreveu:
>> In i.MX35-PDK, OV2640  camera is populated on the
>> personality board. This camera is registered as a subdevice via soc-camera interface.
>>
>> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> 
> Patch doesn't apply over v3.3:

Sorry, the previous version of this patch didn't apply. This compiles OK.

Sorry for the mess.

Anyway, it should be applied via arm subtree.

Regards,
Mauro

> 
> patching file arch/arm/mach-imx/mach-mx35_3ds.c
> Hunk #3 FAILED at 149.
> Hunk #4 succeeded at 126 with fuzz 1 (offset -55 lines).
> Hunk #5 FAILED at 323.
> Hunk #6 succeeded at 277 (offset -57 lines).
> Hunk #7 succeeded at 293 (offset -57 lines).
> 2 out of 7 hunks FAILED -- saving rejects to file arch/arm/mach-imx/mach-mx35_3ds.c.rej
>  arch/arm/mach-imx/mach-mx35_3ds.c |   87 ++++++++++++++++++++++++++++++++++++++
> 
> 
>> ---
>>  arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
>>  1 files changed, 96 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
>> index 0af6c9c..a7dd8e6 100644
>> --- a/arch/arm/mach-imx/mach-mx35_3ds.c
>> +++ b/arch/arm/mach-imx/mach-mx35_3ds.c
>> @@ -4,6 +4,11 @@
>>   *
>>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>>   *
>> + * Copyright (C) 2011 Meprolight, Ltd.
>> + * Alex Gershgorin <alexg@meprolight.com>
>> + *
>> + * Modified from i.MX31 3-Stack Development System
>> + *
>>   * This program is free software; you can redistribute it and/or modify
>>   * it under the terms of the GNU General Public License as published by
>>   * the Free Software Foundation; either version 2 of the License, or
>> @@ -34,6 +39,7 @@
>>  #include <asm/mach/arch.h>
>>  #include <asm/mach/time.h>
>>  #include <asm/mach/map.h>
>> +#include <asm/memblock.h>
>>  
>>  #include <mach/hardware.h>
>>  #include <mach/common.h>
>> @@ -41,6 +47,8 @@
>>  #include <mach/irqs.h>
>>  #include <mach/3ds_debugboard.h>
>>  
>> +#include <media/soc_camera.h>
>> +
>>  #include "devices-imx35.h"
>>  
>>  #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
>> @@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
>>  	/* I2C1 */
>>  	MX35_PAD_I2C1_CLK__I2C1_SCL,
>>  	MX35_PAD_I2C1_DAT__I2C1_SDA,
>> +	/* CSI */
>> +	MX35_PAD_TX1__IPU_CSI_D_6,
>> +	MX35_PAD_TX0__IPU_CSI_D_7,
>> +	MX35_PAD_CSI_D8__IPU_CSI_D_8,
>> +	MX35_PAD_CSI_D9__IPU_CSI_D_9,
>> +	MX35_PAD_CSI_D10__IPU_CSI_D_10,
>> +	MX35_PAD_CSI_D11__IPU_CSI_D_11,
>> +	MX35_PAD_CSI_D12__IPU_CSI_D_12,
>> +	MX35_PAD_CSI_D13__IPU_CSI_D_13,
>> +	MX35_PAD_CSI_D14__IPU_CSI_D_14,
>> +	MX35_PAD_CSI_D15__IPU_CSI_D_15,
>> +	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
>> +	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
>> +	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
>> +	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
>> +};
>> +
>> +/*
>> + * Camera support
>> +*/
>> +static phys_addr_t mx3_camera_base __initdata;
>> +#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
>> +
>> +static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
>> +	.flags = MX3_CAMERA_DATAWIDTH_8,
>> +	.mclk_10khz = 2000,
>> +};
>> +
>> +static int __init imx35_3ds_init_camera(void)
>> +{
>> +	int dma, ret = -ENOMEM;
>> +	struct platform_device *pdev =
>> +		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
>> +
>> +	if (IS_ERR(pdev))
>> +		return PTR_ERR(pdev);
>> +
>> +	if (!mx3_camera_base)
>> +		goto err;
>> +
>> +	dma = dma_declare_coherent_memory(&pdev->dev,
>> +					mx3_camera_base, mx3_camera_base,
>> +					MX35_3DS_CAMERA_BUF_SIZE,
>> +					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
>> +
>> +	if (!(dma & DMA_MEMORY_MAP))
>> +		goto err;
>> +
>> +	ret = platform_device_add(pdev);
>> +	if (ret)
>> +err:
>> +		platform_device_put(pdev);
>> +
>> +	return ret;
>> +}
>> +
>> +static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
>> +	.irq_base = MXC_IPU_IRQ_START,
>> +};
>> +
>> +static struct i2c_board_info mx35_3ds_i2c_camera = {
>> +	I2C_BOARD_INFO("ov2640", 0x30),
>> +};
>> +
>> +static struct soc_camera_link iclink_ov2640 = {
>> +	.bus_id		= 0,
>> +	.board_info	= &mx35_3ds_i2c_camera,
>> +	.i2c_adapter_id	= 0,
>> +	.power		= NULL,
>> +};
>> +
>> +static struct platform_device mx35_3ds_ov2640 = {
>> +	.name	= "soc-camera-pdrv",
>> +	.id	= 0,
>> +	.dev	= {
>> +		.platform_data = &iclink_ov2640,
>> +	},
>>  };
>>  
>>  static int mx35_3ds_otg_init(struct platform_device *pdev)
>> @@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
>>  		pr_warn("Init of the debugboard failed, all "
>>  				"devices on the debugboard are unusable.\n");
>>  	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
>> +	imx35_add_ipu_core(&mx35_3ds_ipu_data);
>> +	platform_device_register(&mx35_3ds_ov2640);
>> +	imx35_3ds_init_camera();
>>  }
>>  
>>  static void __init mx35pdk_timer_init(void)
>> @@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
>>  	.init	= mx35pdk_timer_init,
>>  };
>>  
>> +static void __init mx35_3ds_reserve(void)
>> +{
>> +	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
>> +	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
>> +					 MX35_3DS_CAMERA_BUF_SIZE);
>> +}
>> +
>>  MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>>  	/* Maintainer: Freescale Semiconductor, Inc */
>>  	.atag_offset = 0x100,
>> @@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>>  	.handle_irq = imx35_handle_irq,
>>  	.timer = &mx35pdk_timer,
>>  	.init_machine = mx35_3ds_init,
>> +	.reserve = mx35_3ds_reserve,
>>  	.restart	= mxc_restart,
>>  MACHINE_END
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v1] i.MX35-PDK: Add Camera support
  2012-03-13 15:05 ` Alex Gershgorin
@ 2012-03-19 22:03   ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:03 UTC (permalink / raw)
  To: Alex Gershgorin
  Cc: Sascha Hauer, linux-kernel, g.liakhovetski, fabio.estevam,
	linux-media, linux-arm-kernel

Em 13-03-2012 12:05, Alex Gershgorin escreveu:
> In i.MX35-PDK, OV2640  camera is populated on the
> personality board. This camera is registered as a subdevice via soc-camera interface.
> 
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>

Patch doesn't apply over v3.3:

patching file arch/arm/mach-imx/mach-mx35_3ds.c
Hunk #3 FAILED at 149.
Hunk #4 succeeded at 126 with fuzz 1 (offset -55 lines).
Hunk #5 FAILED at 323.
Hunk #6 succeeded at 277 (offset -57 lines).
Hunk #7 succeeded at 293 (offset -57 lines).
2 out of 7 hunks FAILED -- saving rejects to file arch/arm/mach-imx/mach-mx35_3ds.c.rej
 arch/arm/mach-imx/mach-mx35_3ds.c |   87 ++++++++++++++++++++++++++++++++++++++


> ---
>  arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
>  1 files changed, 96 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
> index 0af6c9c..a7dd8e6 100644
> --- a/arch/arm/mach-imx/mach-mx35_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx35_3ds.c
> @@ -4,6 +4,11 @@
>   *
>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>   *
> + * Copyright (C) 2011 Meprolight, Ltd.
> + * Alex Gershgorin <alexg@meprolight.com>
> + *
> + * Modified from i.MX31 3-Stack Development System
> + *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License as published by
>   * the Free Software Foundation; either version 2 of the License, or
> @@ -34,6 +39,7 @@
>  #include <asm/mach/arch.h>
>  #include <asm/mach/time.h>
>  #include <asm/mach/map.h>
> +#include <asm/memblock.h>
>  
>  #include <mach/hardware.h>
>  #include <mach/common.h>
> @@ -41,6 +47,8 @@
>  #include <mach/irqs.h>
>  #include <mach/3ds_debugboard.h>
>  
> +#include <media/soc_camera.h>
> +
>  #include "devices-imx35.h"
>  
>  #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
> @@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
>  	/* I2C1 */
>  	MX35_PAD_I2C1_CLK__I2C1_SCL,
>  	MX35_PAD_I2C1_DAT__I2C1_SDA,
> +	/* CSI */
> +	MX35_PAD_TX1__IPU_CSI_D_6,
> +	MX35_PAD_TX0__IPU_CSI_D_7,
> +	MX35_PAD_CSI_D8__IPU_CSI_D_8,
> +	MX35_PAD_CSI_D9__IPU_CSI_D_9,
> +	MX35_PAD_CSI_D10__IPU_CSI_D_10,
> +	MX35_PAD_CSI_D11__IPU_CSI_D_11,
> +	MX35_PAD_CSI_D12__IPU_CSI_D_12,
> +	MX35_PAD_CSI_D13__IPU_CSI_D_13,
> +	MX35_PAD_CSI_D14__IPU_CSI_D_14,
> +	MX35_PAD_CSI_D15__IPU_CSI_D_15,
> +	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
> +	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
> +	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
> +	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
> +};
> +
> +/*
> + * Camera support
> +*/
> +static phys_addr_t mx3_camera_base __initdata;
> +#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
> +
> +static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
> +	.flags = MX3_CAMERA_DATAWIDTH_8,
> +	.mclk_10khz = 2000,
> +};
> +
> +static int __init imx35_3ds_init_camera(void)
> +{
> +	int dma, ret = -ENOMEM;
> +	struct platform_device *pdev =
> +		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
> +
> +	if (IS_ERR(pdev))
> +		return PTR_ERR(pdev);
> +
> +	if (!mx3_camera_base)
> +		goto err;
> +
> +	dma = dma_declare_coherent_memory(&pdev->dev,
> +					mx3_camera_base, mx3_camera_base,
> +					MX35_3DS_CAMERA_BUF_SIZE,
> +					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
> +
> +	if (!(dma & DMA_MEMORY_MAP))
> +		goto err;
> +
> +	ret = platform_device_add(pdev);
> +	if (ret)
> +err:
> +		platform_device_put(pdev);
> +
> +	return ret;
> +}
> +
> +static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
> +	.irq_base = MXC_IPU_IRQ_START,
> +};
> +
> +static struct i2c_board_info mx35_3ds_i2c_camera = {
> +	I2C_BOARD_INFO("ov2640", 0x30),
> +};
> +
> +static struct soc_camera_link iclink_ov2640 = {
> +	.bus_id		= 0,
> +	.board_info	= &mx35_3ds_i2c_camera,
> +	.i2c_adapter_id	= 0,
> +	.power		= NULL,
> +};
> +
> +static struct platform_device mx35_3ds_ov2640 = {
> +	.name	= "soc-camera-pdrv",
> +	.id	= 0,
> +	.dev	= {
> +		.platform_data = &iclink_ov2640,
> +	},
>  };
>  
>  static int mx35_3ds_otg_init(struct platform_device *pdev)
> @@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
>  		pr_warn("Init of the debugboard failed, all "
>  				"devices on the debugboard are unusable.\n");
>  	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
> +	imx35_add_ipu_core(&mx35_3ds_ipu_data);
> +	platform_device_register(&mx35_3ds_ov2640);
> +	imx35_3ds_init_camera();
>  }
>  
>  static void __init mx35pdk_timer_init(void)
> @@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
>  	.init	= mx35pdk_timer_init,
>  };
>  
> +static void __init mx35_3ds_reserve(void)
> +{
> +	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
> +	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
> +					 MX35_3DS_CAMERA_BUF_SIZE);
> +}
> +
>  MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>  	/* Maintainer: Freescale Semiconductor, Inc */
>  	.atag_offset = 0x100,
> @@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &mx35pdk_timer,
>  	.init_machine = mx35_3ds_init,
> +	.reserve = mx35_3ds_reserve,
>  	.restart	= mxc_restart,
>  MACHINE_END


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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-19 22:03   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 23+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-19 22:03 UTC (permalink / raw)
  To: linux-arm-kernel

Em 13-03-2012 12:05, Alex Gershgorin escreveu:
> In i.MX35-PDK, OV2640  camera is populated on the
> personality board. This camera is registered as a subdevice via soc-camera interface.
> 
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>

Patch doesn't apply over v3.3:

patching file arch/arm/mach-imx/mach-mx35_3ds.c
Hunk #3 FAILED at 149.
Hunk #4 succeeded at 126 with fuzz 1 (offset -55 lines).
Hunk #5 FAILED at 323.
Hunk #6 succeeded at 277 (offset -57 lines).
Hunk #7 succeeded at 293 (offset -57 lines).
2 out of 7 hunks FAILED -- saving rejects to file arch/arm/mach-imx/mach-mx35_3ds.c.rej
 arch/arm/mach-imx/mach-mx35_3ds.c |   87 ++++++++++++++++++++++++++++++++++++++


> ---
>  arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
>  1 files changed, 96 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
> index 0af6c9c..a7dd8e6 100644
> --- a/arch/arm/mach-imx/mach-mx35_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx35_3ds.c
> @@ -4,6 +4,11 @@
>   *
>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>   *
> + * Copyright (C) 2011 Meprolight, Ltd.
> + * Alex Gershgorin <alexg@meprolight.com>
> + *
> + * Modified from i.MX31 3-Stack Development System
> + *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License as published by
>   * the Free Software Foundation; either version 2 of the License, or
> @@ -34,6 +39,7 @@
>  #include <asm/mach/arch.h>
>  #include <asm/mach/time.h>
>  #include <asm/mach/map.h>
> +#include <asm/memblock.h>
>  
>  #include <mach/hardware.h>
>  #include <mach/common.h>
> @@ -41,6 +47,8 @@
>  #include <mach/irqs.h>
>  #include <mach/3ds_debugboard.h>
>  
> +#include <media/soc_camera.h>
> +
>  #include "devices-imx35.h"
>  
>  #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
> @@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
>  	/* I2C1 */
>  	MX35_PAD_I2C1_CLK__I2C1_SCL,
>  	MX35_PAD_I2C1_DAT__I2C1_SDA,
> +	/* CSI */
> +	MX35_PAD_TX1__IPU_CSI_D_6,
> +	MX35_PAD_TX0__IPU_CSI_D_7,
> +	MX35_PAD_CSI_D8__IPU_CSI_D_8,
> +	MX35_PAD_CSI_D9__IPU_CSI_D_9,
> +	MX35_PAD_CSI_D10__IPU_CSI_D_10,
> +	MX35_PAD_CSI_D11__IPU_CSI_D_11,
> +	MX35_PAD_CSI_D12__IPU_CSI_D_12,
> +	MX35_PAD_CSI_D13__IPU_CSI_D_13,
> +	MX35_PAD_CSI_D14__IPU_CSI_D_14,
> +	MX35_PAD_CSI_D15__IPU_CSI_D_15,
> +	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
> +	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
> +	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
> +	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
> +};
> +
> +/*
> + * Camera support
> +*/
> +static phys_addr_t mx3_camera_base __initdata;
> +#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
> +
> +static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
> +	.flags = MX3_CAMERA_DATAWIDTH_8,
> +	.mclk_10khz = 2000,
> +};
> +
> +static int __init imx35_3ds_init_camera(void)
> +{
> +	int dma, ret = -ENOMEM;
> +	struct platform_device *pdev =
> +		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
> +
> +	if (IS_ERR(pdev))
> +		return PTR_ERR(pdev);
> +
> +	if (!mx3_camera_base)
> +		goto err;
> +
> +	dma = dma_declare_coherent_memory(&pdev->dev,
> +					mx3_camera_base, mx3_camera_base,
> +					MX35_3DS_CAMERA_BUF_SIZE,
> +					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
> +
> +	if (!(dma & DMA_MEMORY_MAP))
> +		goto err;
> +
> +	ret = platform_device_add(pdev);
> +	if (ret)
> +err:
> +		platform_device_put(pdev);
> +
> +	return ret;
> +}
> +
> +static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
> +	.irq_base = MXC_IPU_IRQ_START,
> +};
> +
> +static struct i2c_board_info mx35_3ds_i2c_camera = {
> +	I2C_BOARD_INFO("ov2640", 0x30),
> +};
> +
> +static struct soc_camera_link iclink_ov2640 = {
> +	.bus_id		= 0,
> +	.board_info	= &mx35_3ds_i2c_camera,
> +	.i2c_adapter_id	= 0,
> +	.power		= NULL,
> +};
> +
> +static struct platform_device mx35_3ds_ov2640 = {
> +	.name	= "soc-camera-pdrv",
> +	.id	= 0,
> +	.dev	= {
> +		.platform_data = &iclink_ov2640,
> +	},
>  };
>  
>  static int mx35_3ds_otg_init(struct platform_device *pdev)
> @@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
>  		pr_warn("Init of the debugboard failed, all "
>  				"devices on the debugboard are unusable.\n");
>  	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
> +	imx35_add_ipu_core(&mx35_3ds_ipu_data);
> +	platform_device_register(&mx35_3ds_ov2640);
> +	imx35_3ds_init_camera();
>  }
>  
>  static void __init mx35pdk_timer_init(void)
> @@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
>  	.init	= mx35pdk_timer_init,
>  };
>  
> +static void __init mx35_3ds_reserve(void)
> +{
> +	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
> +	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
> +					 MX35_3DS_CAMERA_BUF_SIZE);
> +}
> +
>  MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>  	/* Maintainer: Freescale Semiconductor, Inc */
>  	.atag_offset = 0x100,
> @@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &mx35pdk_timer,
>  	.init_machine = mx35_3ds_init,
> +	.reserve = mx35_3ds_reserve,
>  	.restart	= mxc_restart,
>  MACHINE_END

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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-13 15:05 ` Alex Gershgorin
  0 siblings, 0 replies; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-13 15:05 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, g.liakhovetski, fabio.estevam, linux-media,
	linux-arm-kernel, Alex Gershgorin

In i.MX35-PDK, OV2640  camera is populated on the
personality board. This camera is registered as a subdevice via soc-camera interface.

Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
 arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 0af6c9c..a7dd8e6 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -4,6 +4,11 @@
  *
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  *
+ * Copyright (C) 2011 Meprolight, Ltd.
+ * Alex Gershgorin <alexg@meprolight.com>
+ *
+ * Modified from i.MX31 3-Stack Development System
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -34,6 +39,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
+#include <asm/memblock.h>
 
 #include <mach/hardware.h>
 #include <mach/common.h>
@@ -41,6 +47,8 @@
 #include <mach/irqs.h>
 #include <mach/3ds_debugboard.h>
 
+#include <media/soc_camera.h>
+
 #include "devices-imx35.h"
 
 #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
@@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
 	/* I2C1 */
 	MX35_PAD_I2C1_CLK__I2C1_SCL,
 	MX35_PAD_I2C1_DAT__I2C1_SDA,
+	/* CSI */
+	MX35_PAD_TX1__IPU_CSI_D_6,
+	MX35_PAD_TX0__IPU_CSI_D_7,
+	MX35_PAD_CSI_D8__IPU_CSI_D_8,
+	MX35_PAD_CSI_D9__IPU_CSI_D_9,
+	MX35_PAD_CSI_D10__IPU_CSI_D_10,
+	MX35_PAD_CSI_D11__IPU_CSI_D_11,
+	MX35_PAD_CSI_D12__IPU_CSI_D_12,
+	MX35_PAD_CSI_D13__IPU_CSI_D_13,
+	MX35_PAD_CSI_D14__IPU_CSI_D_14,
+	MX35_PAD_CSI_D15__IPU_CSI_D_15,
+	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
+	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
+	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
+	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
+};
+
+/*
+ * Camera support
+*/
+static phys_addr_t mx3_camera_base __initdata;
+#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
+
+static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
+	.flags = MX3_CAMERA_DATAWIDTH_8,
+	.mclk_10khz = 2000,
+};
+
+static int __init imx35_3ds_init_camera(void)
+{
+	int dma, ret = -ENOMEM;
+	struct platform_device *pdev =
+		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
+
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	if (!mx3_camera_base)
+		goto err;
+
+	dma = dma_declare_coherent_memory(&pdev->dev,
+					mx3_camera_base, mx3_camera_base,
+					MX35_3DS_CAMERA_BUF_SIZE,
+					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
+
+	if (!(dma & DMA_MEMORY_MAP))
+		goto err;
+
+	ret = platform_device_add(pdev);
+	if (ret)
+err:
+		platform_device_put(pdev);
+
+	return ret;
+}
+
+static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
+	.irq_base = MXC_IPU_IRQ_START,
+};
+
+static struct i2c_board_info mx35_3ds_i2c_camera = {
+	I2C_BOARD_INFO("ov2640", 0x30),
+};
+
+static struct soc_camera_link iclink_ov2640 = {
+	.bus_id		= 0,
+	.board_info	= &mx35_3ds_i2c_camera,
+	.i2c_adapter_id	= 0,
+	.power		= NULL,
+};
+
+static struct platform_device mx35_3ds_ov2640 = {
+	.name	= "soc-camera-pdrv",
+	.id	= 0,
+	.dev	= {
+		.platform_data = &iclink_ov2640,
+	},
 };
 
 static int mx35_3ds_otg_init(struct platform_device *pdev)
@@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
 		pr_warn("Init of the debugboard failed, all "
 				"devices on the debugboard are unusable.\n");
 	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
+	imx35_add_ipu_core(&mx35_3ds_ipu_data);
+	platform_device_register(&mx35_3ds_ov2640);
+	imx35_3ds_init_camera();
 }
 
 static void __init mx35pdk_timer_init(void)
@@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
 	.init	= mx35pdk_timer_init,
 };
 
+static void __init mx35_3ds_reserve(void)
+{
+	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
+	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
+					 MX35_3DS_CAMERA_BUF_SIZE);
+}
+
 MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	/* Maintainer: Freescale Semiconductor, Inc */
 	.atag_offset = 0x100,
@@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	.handle_irq = imx35_handle_irq,
 	.timer = &mx35pdk_timer,
 	.init_machine = mx35_3ds_init,
+	.reserve = mx35_3ds_reserve,
 	.restart	= mxc_restart,
 MACHINE_END
-- 
1.7.0.4


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

* [PATCH v1] i.MX35-PDK: Add Camera support
@ 2012-03-13 15:05 ` Alex Gershgorin
  0 siblings, 0 replies; 23+ messages in thread
From: Alex Gershgorin @ 2012-03-13 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

In i.MX35-PDK, OV2640  camera is populated on the
personality board. This camera is registered as a subdevice via soc-camera interface.

Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
 arch/arm/mach-imx/mach-mx35_3ds.c |   96 +++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 0af6c9c..a7dd8e6 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -4,6 +4,11 @@
  *
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  *
+ * Copyright (C) 2011 Meprolight, Ltd.
+ * Alex Gershgorin <alexg@meprolight.com>
+ *
+ * Modified from i.MX31 3-Stack Development System
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -34,6 +39,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
+#include <asm/memblock.h>
 
 #include <mach/hardware.h>
 #include <mach/common.h>
@@ -41,6 +47,8 @@
 #include <mach/irqs.h>
 #include <mach/3ds_debugboard.h>
 
+#include <media/soc_camera.h>
+
 #include "devices-imx35.h"
 
 #define EXPIO_PARENT_INT	gpio_to_irq(IMX_GPIO_NR(1, 1))
@@ -120,6 +128,83 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
 	/* I2C1 */
 	MX35_PAD_I2C1_CLK__I2C1_SCL,
 	MX35_PAD_I2C1_DAT__I2C1_SDA,
+	/* CSI */
+	MX35_PAD_TX1__IPU_CSI_D_6,
+	MX35_PAD_TX0__IPU_CSI_D_7,
+	MX35_PAD_CSI_D8__IPU_CSI_D_8,
+	MX35_PAD_CSI_D9__IPU_CSI_D_9,
+	MX35_PAD_CSI_D10__IPU_CSI_D_10,
+	MX35_PAD_CSI_D11__IPU_CSI_D_11,
+	MX35_PAD_CSI_D12__IPU_CSI_D_12,
+	MX35_PAD_CSI_D13__IPU_CSI_D_13,
+	MX35_PAD_CSI_D14__IPU_CSI_D_14,
+	MX35_PAD_CSI_D15__IPU_CSI_D_15,
+	MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC,
+	MX35_PAD_CSI_MCLK__IPU_CSI_MCLK,
+	MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK,
+	MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC,
+};
+
+/*
+ * Camera support
+*/
+static phys_addr_t mx3_camera_base __initdata;
+#define MX35_3DS_CAMERA_BUF_SIZE SZ_8M
+
+static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = {
+	.flags = MX3_CAMERA_DATAWIDTH_8,
+	.mclk_10khz = 2000,
+};
+
+static int __init imx35_3ds_init_camera(void)
+{
+	int dma, ret = -ENOMEM;
+	struct platform_device *pdev =
+		imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata);
+
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	if (!mx3_camera_base)
+		goto err;
+
+	dma = dma_declare_coherent_memory(&pdev->dev,
+					mx3_camera_base, mx3_camera_base,
+					MX35_3DS_CAMERA_BUF_SIZE,
+					DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
+
+	if (!(dma & DMA_MEMORY_MAP))
+		goto err;
+
+	ret = platform_device_add(pdev);
+	if (ret)
+err:
+		platform_device_put(pdev);
+
+	return ret;
+}
+
+static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
+	.irq_base = MXC_IPU_IRQ_START,
+};
+
+static struct i2c_board_info mx35_3ds_i2c_camera = {
+	I2C_BOARD_INFO("ov2640", 0x30),
+};
+
+static struct soc_camera_link iclink_ov2640 = {
+	.bus_id		= 0,
+	.board_info	= &mx35_3ds_i2c_camera,
+	.i2c_adapter_id	= 0,
+	.power		= NULL,
+};
+
+static struct platform_device mx35_3ds_ov2640 = {
+	.name	= "soc-camera-pdrv",
+	.id	= 0,
+	.dev	= {
+		.platform_data = &iclink_ov2640,
+	},
 };
 
 static int mx35_3ds_otg_init(struct platform_device *pdev)
@@ -204,6 +289,9 @@ static void __init mx35_3ds_init(void)
 		pr_warn("Init of the debugboard failed, all "
 				"devices on the debugboard are unusable.\n");
 	imx35_add_imx_i2c0(&mx35_3ds_i2c0_data);
+	imx35_add_ipu_core(&mx35_3ds_ipu_data);
+	platform_device_register(&mx35_3ds_ov2640);
+	imx35_3ds_init_camera();
 }
 
 static void __init mx35pdk_timer_init(void)
@@ -215,6 +303,13 @@ struct sys_timer mx35pdk_timer = {
 	.init	= mx35pdk_timer_init,
 };
 
+static void __init mx35_3ds_reserve(void)
+{
+	/* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
+	mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE,
+					 MX35_3DS_CAMERA_BUF_SIZE);
+}
+
 MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	/* Maintainer: Freescale Semiconductor, Inc */
 	.atag_offset = 0x100,
@@ -224,5 +319,6 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	.handle_irq = imx35_handle_irq,
 	.timer = &mx35pdk_timer,
 	.init_machine = mx35_3ds_init,
+	.reserve = mx35_3ds_reserve,
 	.restart	= mxc_restart,
 MACHINE_END
-- 
1.7.0.4

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

end of thread, other threads:[~2012-03-23 20:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 19:02 [PATCH v1] i.MX35-PDK: Add Camera support Alex Gershgorin
2012-03-23 20:37 ` Fabio Estevam
2012-03-23 20:37   ` Fabio Estevam
  -- strict thread matches above, loose matches on Subject: below --
2012-03-13 15:05 Alex Gershgorin
2012-03-13 15:05 ` Alex Gershgorin
2012-03-19 22:03 ` Mauro Carvalho Chehab
2012-03-19 22:03   ` Mauro Carvalho Chehab
2012-03-19 22:17   ` Mauro Carvalho Chehab
2012-03-19 22:17     ` Mauro Carvalho Chehab
2012-03-19 22:37     ` Sascha Hauer
2012-03-19 22:37       ` Sascha Hauer
2012-03-19 22:43       ` Fabio Estevam
2012-03-19 22:43         ` Fabio Estevam
2012-03-19 22:45         ` Sascha Hauer
2012-03-19 22:45           ` Sascha Hauer
2012-03-20  8:54           ` Alex Gershgorin
2012-03-20  8:54             ` Alex Gershgorin
2012-03-20  8:54             ` Alex Gershgorin
2012-03-23  0:47             ` Fabio Estevam
2012-03-23  0:47               ` Fabio Estevam
2012-03-23  0:47               ` Fabio Estevam
2012-03-19 22:49       ` Mauro Carvalho Chehab
2012-03-19 22:49         ` Mauro Carvalho Chehab

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.