mt9p031 with kernel 3.12

Hi,

I am trying to compile a newer kernel for my BB-xm with LI5M03. Up to now I was using 3.8 without problems. Now I have compiled 3.12 from RNelson’s arm7-multiplatfrom tree. Kernel loads but there is no camera related lines in dmesg - neither that it is detected nor that it was not. It does not matter whether it was buil-in or as a module. Even more strangely - camera is not seen on i2c bus, e.g. using i2cdetect. Am I missing something? Did anyone succeed with such camera and device tree based kernels?

Best regards,
S.Nizamov

I have measured supply voltages for the older 3.8 kernel and newer 3.12.

So, in 3.8 both VAUX4 and VAUX3 outputs are at 1.8V which is correct. With 3.12 I see zero at VAUX4 (IO voltage - not a surprise that I do not see mt9p031 on i2c bus) and 2.8V at VAUX3 (it is over the limits for the sensor chip - should be 1.8V, but mt9p031 is not blown). Now I want to apply correct voltages for these outputs but literally being lost in device tree / platform data and so on. Does anyone have suggestions what and where should I patch?

Best regards,

I can be wrong. But do not exists support to li-5m03 camera from 3.11.x kernel. The support is ended with 3.9.x kernel.

Yes, it does not work with newer kernels out of box because support was broken.

There is a number of things to deal with, starting with regulators and reset gpio in device tree. It is relatively easy. I have configured voltage supplies correctly, use reset pin correspondingly but sensor still does not show up on i2c bus. There might be two reasons for that - the first is the reset sequence, which requires that digital supply voltages are applied before the analog supply voltage. The problem is that analog supply is derived from usb power supply, that’s why to perform the hard reset correctly I have to switch off usb first and I can not figure how to do it. Another reason might be the absence of pll clock - but i2c part of sensor should not be dependent on it. Description of omap clock sources is not yet in device tree. Yet another reason might be that mt9p031.c is actually broken - I do not understand why the power-up sequence is never called.

Best regards,

The driver is controlled from kernel. The kernel haven`t a driver for mt9p031.

Hi,

thanks for your input but you seem to be wrong - kernel has the driver for mt9p031. Please, look into kernel sources /drivers/media/i2c/…

Best regards,
S.Nizamov

Indeed. The discussions and changes around the mt9p031 in the linux-media mail list don't indicate its support was discontinued.

http://www.mail-archive.com/search?q=mt9p031&l=linux-media%40vger.kernel.org

Regards,

Ivan

The issue is, NO one has patched the device tree files for the xM to
enable this device.. It's on my very long list of things to do at the
moment.. :wink: It'll be easier once overlay support hits mainline..

Regards,