Skip to contentSkip to conversation

soc-camera: pixclk polarity question

DISCUSSION Philipp Wiesner 2 participants 2 messages Feb 19, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi,

I'm working with µCs (i.MX27) and cameras (Aptina) at the moment.

Now I encountered a problem introduced by serializing and deserializing (lvds) camera data on its way to the µC.

The serializer expects a specific pixclk polarity which can be configured in hardware. In most cases this is no problem as it is permanently connected to only one sensor chip, but camera sensors with configurable pixclk could negotiate the wrong polarity.

The deserializer generates pixclk from data, its polarity again can be configured in hardware. This leads to pixclk inversion depending on wheter serdes is happening or not, so its not an attribute of the platform (in opposition to what SOCAM_SENSOR_INVERT_PCLK is meant for)

What would be the correct way to address this?

Do we need another platform flag, e.g. SOCAM_PCLK_SAMPLE_RISING_FIXED?
The only solution coming to my mind is checking for the SerDes on boot time and setting flags like SOCAM_PCLK_SAMPLE_RISING_FIXED and SOCAM_SENSOR_INVERT_PCLK if necessary.

Any other ideas?

Thanks,
Philipp

Signature · 2 lines
NEU: Mit GMX DSL über 1000,- ¿ sparen!
http://portal.gmx.net/de/go/dsl02
#1 lore raw
Quoted 17 lines · Philipp Wiesner

Hi,

I'm working with µCs (i.MX27) and cameras (Aptina) at the moment.

Now I encountered a problem introduced by serializing and deserializing (lvds) camera data on its way to the µC.

The serializer expects a specific pixclk polarity which can be configured in hardware. In most cases this is no problem as it is permanently connected to only one sensor chip, but camera sensors with configurable pixclk could negotiate the wrong polarity.

The deserializer generates pixclk from data, its polarity again can be configured in hardware. This leads to pixclk inversion depending on wheter serdes is happening or not, so its not an attribute of the platform (in opposition to what SOCAM_SENSOR_INVERT_PCLK is meant for)

Quoted 6 lines

What would be the correct way to address this?

Do we need another platform flag, e.g. SOCAM_PCLK_SAMPLE_RISING_FIXED? The only solution coming to my mind is checking for the SerDes on boot time and setting flags like SOCAM_PCLK_SAMPLE_RISING_FIXED and SOCAM_SENSOR_INVERT_PCLK if necessary.

Hm, how is any new flag better than the existing one? If it is just a static flag - it doesn't change anything, right? As far as I understand, on one and the same platform the signal polarity can be different, depending on some switch / jumper / hard-soldered pin, right? I think your boot-time verification is good then - just put it in your platform code and set the flag(s) accordingly.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/