Lichee Pi Zero Camera support


#23

No, not all pins are camera outputs if you consider the OV5647: external clock XCLK is an input, as well as PWDN and RESET.
OV5647 is I2C slave, so its SCL is an input too, that you feed with 3.3V when it is 3.0V max, not good design. An I2C translator should be used in this case, too.


#24

The OV5647 has 3 voltages; core, analog and I/O.

The one used for data lines is the VDD-DO I/O voltage, which is specified as 1.7V~3.0V, typical is 1.8V, see OV5647 datasheet section 8.3 “DC characteristics”:
https://cdn.sparkfun.com/datasheets/Dev/RaspberryPi/ov5647_full.pdf#page=126

So, 3.3V is over the max voltage for I/O, which is 3.0V, it is out of specs, not good design!


#25

XCLK input connected to generator on-camera-board. Not need connect to V3s.
PWDN, RESET, I2C - are “open drain”, pull-up resistors may be connected to +2.8V … +3V.


#26

OK for XLCK, but the oscillator must then be powered from the correct power supply, not 3.3V! This is the case on the RPi camera board, but may not be the case for other camera boards.

PWDN and RESET are standard INPUTS, not open-drain OUTPUTS, so not good.

I2C SDA is I/O and SCL is INPUT, so not open-drain OUTPUT, and even SDA is mostl used as standard INPUT (except during ACK bit), so not good either. It is not good design at all to drive an I2C bus with different voltage supplies, this is why there exist I2C voltage translator chips or why FET transistors are used!


#27
  1. PWDN and RESET sensor inputs, controlled by V3s pins.
    This pseudo-code emulate “open-drain” output (V3s pin + pull-up resistor):

set_port(value)
{
if (value == “0”)
{
port_direction = “output”;
port_value = “0”;
}
else
{
port_direction = “input”;
}
}

If set “0”, pin output voltage = 0V,
if set “1”, pin output voltage = pull-up voltage.

  1. I2C “nodes” controls only “0” logical level (excluding “ultra-fast” mode).
    Logical “1” is by pull-up resistor.

Problems may be with logical levels thresholds. But differenсes of thresholds 2.8 and 3.3 V is small.


#28

I think have more TODO, such as Allwinner sunxi-vfe, mipi-csi driver, must trasnsplant to linux-zero.
Looked at the source of linux-zero, some hardware have not drivers.
So firstly I plan to transplant sunxi-vfe relation code to current linux-zero.


#29

thank you very much!
at this moment, you can use mainline uboot + bsp kernel to driver camera


#30

Is there an update on the CSI camera driver? Which cameras are supported today for the CSI? Do you have instructions for installing the software and driver for CSI? Thank you!