Published on

Understanding the Raspberry Pi Camera v1 design

Authors

The first step in writing a device driver for the OV5647 camera sensor present in the Raspberry Pi Camera v1 is to understand it's design. However due to NDA issues, I could not find any schematics provided for this camera module by the RaspberryPi foundation. As a result, I had to dig deep into the internet to find a few DIY clone RPi camera v1 modules and it's related schematics.

Raspberry Pi Camera v1 Ribbon cable

Using these clone schematics and wiring, this is what I could infer about the RaspberryPi camera v1 module:

  1. Raspberry Pi camera v1 module is connected to an SBC board through MIPI CSI connector.
  2. The connection is made using a 15 wire MIPI CSI interface bus whose pin outs are as follows:
    1. There are 4 ground (GND) lines among these 15 lines
    2. It is driven by a 3.3V input power signal.
    3. Two I2C signal lines (one for clock, one for data) to program and control the OV5647 camera sensor.
    4. One Power enable signal.
    5. One optional LED indicator signal.
    6. Two MIPI clock signals (Positive and negative clock lanes each)
    7. Two MIPI Data lane 0 signals (MIPI Data lane 0 Positive and MIPI Data lane 0 Negative)
    8. Two MIPI Data lane 1 signals (MIPI Data lane 1 Positive and MIPI Data lane 1 Negative)
  3. The camera module is driven by 24MHz crystal oscillator clock for clone modules and 25MHz crystal oscillator in the original RPi v1 camera module.

I also tried to look around for a detailed datasheet for the OV5647 camera sensor from Omnivision, however I got to know that it is only available through the signing of an NDA for it's customers. So this could make developing the OV5647 sensor Linux kernel driver much more difficult. However, there does exist a partial OV5647 camera sensor datasheet in the public domain that I can still use as a starting point for my development efforts.

So with these information in place, it is now time for me to get started with the driver development.