Saturday, February 15, 2020

DIY IMX219 4 Lane MIPI CSI Breakout Board, Getting MIPI CSI 4 Lane From Raspberry PI Camera

I have published many post in which i have been interfacing various cameras sensors/modules to different processors. This post is also going to the next part the previous posts.

Currently i am trying to interface Raspberry pi camera V2.1 sony IMX219 Camera to Lattice FPGA  then ultimately to USB 3.0 with Cypress FX3 USB 3.0 controller.

As per schematic of Raspberry pi and Raspberry PI Camera module. It is two lane MIPI CSI Camera Board with 1 Clock and 2 MIPI CSI data lane. 

As my aim is to connect Raspberry pi V2.1 camera board to Lattice Machxo3LF FPGA. I searched for datasheet of the camera chip Sony IMX219 and found that IMX219 support 4 and 2 Lane MIPI CSI. Datasheet also mentions 755Mbps/Lane in 4 Lane mode and 912 Mbps/Lane in 2 Lane mode.
To get maximum performance out of the camera 4 Lane interface appears to be correct way.

But original Raspberry camera module is only 2 data lanes. But when i look at the schematic of the camera module it had few  pins empty and that is in two pairs surrounded by ground . It got me thinking that these empty are 3rd and 4th MIPI data lane.
Raspberry PI Camera module's connector
So i quickly made modifications to the camera board mounted a 24 Pin FPC connector and modified IMX219 Linux kernel driver just to write register 0x0114 to enable all 4 lanes of MIPI CSI.

As it turn out yes those 4 pins were actually other two MIPI CSI data lanes.

So i made setup shown in the image blow to interface this to a Lattice MachXO3LF FPGA.

Failed First Attempt to interface IMX219 to Lattice MachXO3
But it turned out the setup on cheap PCB , no impedance control no proper termination and large headers on FPGA and Breakout board had made 200 Mhz to 350 Mhz mipi signal unusable.
Signal quality was too poor with this setup i did many test  and only very low frequency mipi signal was functional. 
So i finally made my own IMX219 Camera module.


Blank IMX219 MIPI 4Lane Camera PCB is Available for purchase 9.99 EUR Free International Shipping. 
Buy Blank PCB

The Board is suppose to directly fit on Lattice MachXO3LF FPGA board. This way connection will be as short as possible, this setup will use Lattice boards's 100R termination register which is really important to have as near as possible to the Receiver FPGA itself.

This is a multiple part project complete description FPGA verilog source and every thing else about how to get this board up and running with Lattice machXO3 FPGA can be found in later post.

Next Part of the project

Source Files

PCB and Schematic Source is available in the Github Repo

No comments:

Post a Comment