This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MIPI Camera through Ducati using CSI2

I have a custom board implementation that is based on the OMAP4460 using the CSI2 interface to connect to a MIPI camera. The sensor is an OV5650 with a lens compatible to the AD5820 and no flash.  I am using the I2C2 bus which is dedicated to  the sensor/lens interface.  The MIPI interface uses data pair 1 on lane 1, data pair 2 on lane 2 and clock on lane 3.  The Mclk is driven from AUXCLK1.  There are 2 GPIO used to control power in the design.  There is an active high PowerDown signal connected to GPIO 34 (drive low to enable camera) and an active low reset signal connected to the CAM_GLOBALRESET signal (drive high to enable camera).

Our system is based on the 4AI.1.7P1 ducati sources, the 3.0.31 kernel, running on an OMAP446 ES1.1.

I have compiled the ducati sources and generated a new ducati-m3.bin which I think should incorporate the changes  required to the interface to work with my custom implementation.  I am building against the blaze_tablet2 target using the built in script.

The first problem I'm having is that I can't seem to get the ducati driver to enable the auxclk and set the GPIOs accordingly to enable and disable the camera interface.  If I set them manually in the kernel I can at least detect the devices on the i2c bus.

The second issue is that even if the controls are setup in the kernel as above, the ducati appears to crash and isn't able to load the camera.

I've attached the logcat, dmesg, and trace1_last outputs collected with the above clock and gpio set in the kernel.

1157.ducati_dmesg.txt

8420.ducati_logcat.txt

5008.ducati_trace1.txt

Thanks,

Shane

  • If kernel acquires the GPIO,Ducati gpio request fails and that is why it crashes. Initially it is better to disable GPIO request in Ducati and make sure that kernel sets them to a state where I2C read/write is working. Once you get the sensor driver working from Ducati, you can remove GPIO request in kernel and put back in Ducati.

    Same suggestion for AUXCLK.

  • I found that there was an association through the cam_pwrmgr driver that was not being properly handled which was causing part of my issue.  Once this was synchronized correctly with the changes to the cam_resmgr driver things started working as expected.  I now have the ducati properly controlling the resources and the camera is working properly.

    Thanks,

    Shane