- Published on
Understanding the Raspberry Pi Camera v1 design
- Authors
- Name
- Amarnath B R
- @digitallyamar
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.
Using these clone schematics and wiring, this is what I could infer about the RaspberryPi camera v1 module:
- Raspberry Pi camera v1 module is connected to an SBC board through MIPI CSI connector.
- The connection is made using a 15 wire MIPI CSI interface bus whose pin outs are as follows:
- There are 4 ground (GND) lines among these 15 lines
- It is driven by a 3.3V input power signal.
- Two I2C signal lines (one for clock, one for data) to program and control the OV5647 camera sensor.
- One Power enable signal.
- One optional LED indicator signal.
- Two MIPI clock signals (Positive and negative clock lanes each)
- Two MIPI Data lane 0 signals (MIPI Data lane 0 Positive and MIPI Data lane 0 Negative)
- Two MIPI Data lane 1 signals (MIPI Data lane 1 Positive and MIPI Data lane 1 Negative)
- 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.