All of lore.kernel.org
 help / color / mirror / Atom feed
* OV5640 with 12MHz xclk
@ 2018-04-16  1:39 Samuel Bobrowicz
  2018-04-16 12:26 ` Hans Verkuil
  2018-04-16 13:04 ` Philipp Zabel
  0 siblings, 2 replies; 5+ messages in thread
From: Samuel Bobrowicz @ 2018-04-16  1:39 UTC (permalink / raw)
  To: linux-media

Can anyone verify if the OV5640 driver works with input clocks other
than the typical 24MHz? The driver suggests anything from 6MHz-24MHz
is acceptable, but I am running into issues while bringing up a module
that uses a 12MHz oscillator. I'd expect that different xclk's would
necessitate different register settings for the various resolutions
(PLL settings, PCLK width, etc.), however the driver does not seem to
modify nearly enough based on the frequency of xclk.

Sam

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

* Re: OV5640 with 12MHz xclk
  2018-04-16  1:39 OV5640 with 12MHz xclk Samuel Bobrowicz
@ 2018-04-16 12:26 ` Hans Verkuil
  2018-04-16 18:44   ` Steve Longerbeam
  2018-04-16 13:04 ` Philipp Zabel
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2018-04-16 12:26 UTC (permalink / raw)
  To: Samuel Bobrowicz, linux-media, Steve Longerbeam

On 04/16/2018 03:39 AM, Samuel Bobrowicz wrote:
> Can anyone verify if the OV5640 driver works with input clocks other
> than the typical 24MHz? The driver suggests anything from 6MHz-24MHz
> is acceptable, but I am running into issues while bringing up a module
> that uses a 12MHz oscillator. I'd expect that different xclk's would
> necessitate different register settings for the various resolutions
> (PLL settings, PCLK width, etc.), however the driver does not seem to
> modify nearly enough based on the frequency of xclk.
> 
> Sam
> 

I'm pretty sure it has never been tested with 12 MHz. The i.MX SabreLite
seems to use 22 MHz, and I can't tell from the code what the SabreSD uses
(probably 22 or 24 MHz). Steve will probably know.

Regards,

	Hans

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

* Re: OV5640 with 12MHz xclk
  2018-04-16  1:39 OV5640 with 12MHz xclk Samuel Bobrowicz
  2018-04-16 12:26 ` Hans Verkuil
@ 2018-04-16 13:04 ` Philipp Zabel
  1 sibling, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2018-04-16 13:04 UTC (permalink / raw)
  To: Samuel Bobrowicz, linux-media; +Cc: Maxime Ripard

On Sun, 2018-04-15 at 18:39 -0700, Samuel Bobrowicz wrote:
> Can anyone verify if the OV5640 driver works with input clocks other
> than the typical 24MHz? The driver suggests anything from 6MHz-24MHz
> is acceptable, but I am running into issues while bringing up a module
> that uses a 12MHz oscillator. I'd expect that different xclk's would
> necessitate different register settings for the various resolutions
> (PLL settings, PCLK width, etc.), however the driver does not seem to
> modify nearly enough based on the frequency of xclk.
> 
> Sam
> 

Have you seen Maxime's recent "media: ov5640: Misc cleanup and
improvements" series, especially patch 08/12 ("media: ov5640: Adjust the
clock based on the expected rate")? That seems to be something you'd
need.

regards
Philipp

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

* Re: OV5640 with 12MHz xclk
  2018-04-16 12:26 ` Hans Verkuil
@ 2018-04-16 18:44   ` Steve Longerbeam
  2018-04-16 23:03     ` Samuel Bobrowicz
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Longerbeam @ 2018-04-16 18:44 UTC (permalink / raw)
  To: Hans Verkuil, Samuel Bobrowicz, linux-media

Hi Sam,

On 04/16/2018 05:26 AM, Hans Verkuil wrote:
> On 04/16/2018 03:39 AM, Samuel Bobrowicz wrote:
>> Can anyone verify if the OV5640 driver works with input clocks other
>> than the typical 24MHz? The driver suggests anything from 6MHz-24MHz
>> is acceptable, but I am running into issues while bringing up a module
>> that uses a 12MHz oscillator. I'd expect that different xclk's would
>> necessitate different register settings for the various resolutions
>> (PLL settings, PCLK width, etc.), however the driver does not seem to
>> modify nearly enough based on the frequency of xclk.
>>
>> Sam
>>
> I'm pretty sure it has never been tested with 12 MHz. The i.MX SabreLite
> seems to use 22 MHz, and I can't tell from the code what the SabreSD uses
> (probably 22 or 24 MHz). Steve will probably know.

On i.MX6, the sabrelite uses the PWM3 clock at 22MHz for the OV5640 xclk.
The SabreSD uses the i.MX6 CKO clock, which is default sourced from the
24 MHz oscillator.

I wouldn't be surprised that there are issues with a 12MHz xclk in the
ov5640 driver. There's probably some assumptions made about the
xclk range in the hardcoded values in those huge register tables. Sorry
I don't have the time to look into it more.

Steve

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

* Re: OV5640 with 12MHz xclk
  2018-04-16 18:44   ` Steve Longerbeam
@ 2018-04-16 23:03     ` Samuel Bobrowicz
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Bobrowicz @ 2018-04-16 23:03 UTC (permalink / raw)
  To: Steve Longerbeam; +Cc: Hans Verkuil, linux-media

Thanks all, that's what I was expecting. It clears some things up.

I'm going to check out Maxime's recent patches and see if those do the
trick, otherwise I'll get cracking on some patches myself.

Sam
-----------------------
Sam Bobrowicz
Elite Embedded Consulting LLC
elite-embedded.com


On Mon, Apr 16, 2018 at 11:44 AM, Steve Longerbeam
<slongerbeam@gmail.com> wrote:
> Hi Sam,
>
> On 04/16/2018 05:26 AM, Hans Verkuil wrote:
>>
>> On 04/16/2018 03:39 AM, Samuel Bobrowicz wrote:
>>>
>>> Can anyone verify if the OV5640 driver works with input clocks other
>>> than the typical 24MHz? The driver suggests anything from 6MHz-24MHz
>>> is acceptable, but I am running into issues while bringing up a module
>>> that uses a 12MHz oscillator. I'd expect that different xclk's would
>>> necessitate different register settings for the various resolutions
>>> (PLL settings, PCLK width, etc.), however the driver does not seem to
>>> modify nearly enough based on the frequency of xclk.
>>>
>>> Sam
>>>
>> I'm pretty sure it has never been tested with 12 MHz. The i.MX SabreLite
>> seems to use 22 MHz, and I can't tell from the code what the SabreSD uses
>> (probably 22 or 24 MHz). Steve will probably know.
>
>
> On i.MX6, the sabrelite uses the PWM3 clock at 22MHz for the OV5640 xclk.
> The SabreSD uses the i.MX6 CKO clock, which is default sourced from the
> 24 MHz oscillator.
>
> I wouldn't be surprised that there are issues with a 12MHz xclk in the
> ov5640 driver. There's probably some assumptions made about the
> xclk range in the hardcoded values in those huge register tables. Sorry
> I don't have the time to look into it more.
>
> Steve
>

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

end of thread, other threads:[~2018-04-16 23:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16  1:39 OV5640 with 12MHz xclk Samuel Bobrowicz
2018-04-16 12:26 ` Hans Verkuil
2018-04-16 18:44   ` Steve Longerbeam
2018-04-16 23:03     ` Samuel Bobrowicz
2018-04-16 13:04 ` Philipp Zabel

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.