Not sure what i2cdetect is, but here are some common things people forget 
about:
- have you set the proper I2C bus (TWI) in the fex file? There are several 
I2C buses on A20. You set the proper one by using *csi_twi_id* in your fex 
file,
- have you set the proper address of the sensor on the I2C bus in the fex 
file - this is done by setting *csi_twi_addr* in your fex file (for OV5640 
it's 0x78),
- is everything ok with HW - pull-ups on I2C working properly?

Things to look out for:
Allwinner drivers are crap and that's an huge understatement. The one for 
OV5640 is barely functional and full of issues and bugs. Same goes for 
sun4i_csi0. Things are a bit better for Android builds, but so far I 
haven't managed to find a git source of Andorid kernel which has a proper 
CSI driver (I don't mean any Android kernel, but the one featured in 
Allwinner's SDK). The closest that comes to it is this:

https://github.com/qubir/PhoenixA20_linux_sourcecode/tree/master/drivers/media/video/sunxi_csi

It features a polished CSI driver, mostly adopted to OV5640. OV5640 driver 
is also quite good, although still lacking some important modes. Have a 
look, I think most of the stupid issues with CSI are resolved, but some 
still remain (16bit capture mode is not completed for instance, but 
original driver doesn't even have any references to it, so it's better 
either way).

However, I2C was always working (at least from 3.4.75 of the linux-sunxi 
official kernel, which I forked), so I think your problem lies either in 
overlooking something, or driver issue.

On Friday, May 9, 2014 12:43:16 PM UTC+2, Vincent B. wrote:
>
> Hi, 
>
> I'm trying to make the OV7670 Camera sensor work on an Olimex A20 board. 
> For some reason, i2c with the camera is not working. 
>
> I'm using a stock sunxi 3.4 kernel, I have activated csi0 support in the 
> fex file, loaded sun4i_csi0. This driver complain that it can't 
> basically recognize the camera (i2c communication is failing). 
>
> When doing an i2cdetect, I can indeed detect a device at the i2c address 
> it is supposed to be (0x21), that indicates that the Camera is indeed 
> powered. The camera sends data in its parallel port, so it is definitely 
> working. 
>
> So the problem seems to reside in the i2c driver for sunxi. 
>
> Have anyone had an experience (hopefully successful) with the OV7670 on 
> the A20 with the sunxi 3.4 kernel ? 
>
> Cheers, 
>
> Vincent 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to