Skip to contentSkip to conversation

Issues with ov5640 sensor

DISCUSSION [email protected] 2 participants 3 messages Feb 13, 2019 – Feb 27, 2019 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello Loic,

I am trying to make sensor Omnivision ov5640 work with our Atmel-isc controller, I saw you implemented RAW mode for this sensor in the driver, so I was hoping I can ask you some things:

I cannot make the RAW bayer format work, BA81 / mbus MEDIA_BUS_FMT_SBGGR8_1X8 makes the photo look like a maze of colors...

The sensor works for me in YUYV and RGB565 mode, so I assume the wiring is done correctly for my setup

Anything special I need to do for this format to work ?

The same RAW BAYER configuration works for me on ov7670 for example...

Unrelated: are you familiar with ov7740 ? This sensor looks to have stopped working in latest mediatree : failed to enable streaming. (worked perfectly in last stable for me - 4.14...)

Thanks for your reply,

Eugen

#1 lore raw

Hi Eugen,

Quoted 7 lines · On Wed, 13 Feb 2019 at 09:02, <[email protected]> wrote:

Hello Loic,

I am trying to make sensor Omnivision ov5640 work with our Atmel-isc controller, I saw you implemented RAW mode for this sensor in the driver, so I was hoping I can ask you some things:

Quoted 7 lines

I cannot make the RAW bayer format work, BA81 / mbus MEDIA_BUS_FMT_SBGGR8_1X8 makes the photo look like a maze of colors...

The sensor works for me in YUYV and RGB565 mode, so I assume the wiring is done correctly for my setup

Anything special I need to do for this format to work ?

I definitely need to check with the latest driver version, many changes have been integrated recently, including clock autoconfiguration.
Moreover, AFAIU, you are connected via the parallel interface, I only tested with MIPI/CSI.
I would suggest you adding debug in the ov5640 driver to retrieve calculated pclk, sysclk, etc...
Also the following lines does'nt look correct anymore:

    /*
     * All the formats we support have 16 bits per pixel, seems to require
     * the same rate than YUV, so we can just use 16 bpp all the time.
     */
    rate = mode->vtot * mode->htot * 16;
    rate *= ov5640_framerates[sensor->current_fr];

With RAW8, we have 8 bits per pixel, maybe it would worth for testing purpose to change 16 to 8 and see what happens.

Quoted 6 lines

The same RAW BAYER configuration works for me on ov7670 for example...

Unrelated: are you familiar with ov7740 ? This sensor looks to have stopped working in latest mediatree : failed to enable streaming. (worked perfectly in last stable for me - 4.14...)

No sorry.

Regards,
Loic

#2 lore raw
Quoted 16 lines · Loic Poulain

Hi Eugen,

Quoted 13 lines · On Wed, 13 Feb 2019 at 09:02, <[email protected]> wrote:

Hello Loic,

I am trying to make sensor Omnivision ov5640 work with our Atmel-isc controller, I saw you implemented RAW mode for this sensor in the driver, so I was hoping I can ask you some things:

I cannot make the RAW bayer format work, BA81 / mbus MEDIA_BUS_FMT_SBGGR8_1X8 makes the photo look like a maze of colors...

The sensor works for me in YUYV and RGB565 mode, so I assume the wiring is done correctly for my setup

Quoted 7 lines
Quoted 1 line

Anything special I need to do for this format to work ?

I definitely need to check with the latest driver version, many changes have been integrated recently, including clock autoconfiguration.
Moreover, AFAIU, you are connected via the parallel interface, I only tested with MIPI/CSI.

Hi Loic,

Thanks for your reply,

Yes I am using parallel interface.

One question: have you tried other resolutions than 640x480 ? 640x480 works well for me, 1280x720 gives out image, but it's totally garbled, and higher resolutions don't work at all : there is no vsync detected on the line whatsoever...

Or perhaps anyone else using this sensor (driver) in any configuration ?

Quoted 11 lines

I would suggest you adding debug in the ov5640 driver to retrieve calculated pclk, sysclk, etc...
Also the following lines does'nt look correct anymore:

     /*
      * All the formats we support have 16 bits per pixel, seems to require
      * the same rate than YUV, so we can just use 16 bpp all the time.
      */
     rate = mode->vtot * mode->htot * 16;
     rate *= ov5640_framerates[sensor->current_fr];
Quoted 2 lines

With RAW8, we have 8 bits per pixel, maybe it would worth for testing purpose to change 16 to 8 and see what happens.

I can check it out.

Quoted 14 lines
Quoted 7 lines

The same RAW BAYER configuration works for me on ov7670 for example...

Unrelated: are you familiar with ov7740 ? This sensor looks to have stopped working in latest mediatree : failed to enable streaming. (worked perfectly in last stable for me - 4.14...)

No sorry.

Regards,
Loic