I2C3 when interfacing two CSI cameras


#1

Page 20 of the Hardware Manual: “Note: You will need to add R61 and R62, 0 ohm 0201 resistors, to the board to support the routing of I2C3 interface to the High Speed Expansion Connector.”.

We are building a product where we need to control two CSI cameras. The above requirement is a disaster, because it would mean that every board needs to have precision soldering done to it.

I am hoping that it is also possible to use I2C0 or I2C1 available through the low-speed connector to control the second CSI camera. In principle it should be possible, but the software driver must allow this. Does it?

–Jan Rychter
https://partsbox.io/


#2

Very likely the reason why i2c3 is set disconnected at shipment is because it (i2c3) is used to control the adv7533, which is the DSI-to-HDMI conversion chip.

The camera drivers wouldn’t care what i2c port you are using, as long as you specify it in the driver initialization. Which means that YES, you can use one of the i2c ports from the LS connector to control a camera.

Is there some reason you can’t use i2c2 to control both cameras? According to omnivision SCCB interface specifications, you can put multiple devices on the same control bus: http://www.ovt.com/download_document.php?type=document&DID=63


#3

More; for a 0 ohm resistor in 0603 size, I wouldn’t personally call that as “precision” soldering. More like “blob of solder” soldering. 0 ohm means that you just need to bridge the two sides of it.


#4

Yes, I see the reason for not connecting I2C3 to the high-speed connector, althought I guess I’d rather see it configurable with dipswitches than 0201-size soldering. Anyway, if I can use one of the other I2C interfaces, things are just fine.

As for using I2C2 to control both cameras, I don’t know — I thought if both cameras have the same address then this isn’t possible, but looking at the document you pointed to it might be, if I’m understanding the purpose of the SCCB_E signal correctly.

Thanks a lot for the info!

–Jan Rychter
https://partsbox.io/


#5

Yeah, I’m seeing that now. The ability to select between multiple chips is limited to “3-wire” mode, where the 3rd wire is chip select. You could implement that using a single gpio. High = camera1, low = camera2.


#6

Actually looks a little more complicated than simple chip select. Seems to be used to indicate start and stop of transmission, and to set up the ID address of the slaves, which basically means programming in their i2c addresses.


#7

Having looked into this further, the MPI CSI 2 spec suggests using a dedicated bus for each device (camera). The addresses are fixed by the spec. From what I could understand from the Omnivision specs, the SCCB_E signal is indeed intended to act as an “enable” of sorts, which would allow placing multiple devices on one bus. The same result can be achieved using an I2C mux or an analog switch on the I2C lines. This would however require driver support, and I haven’t yet checked how open the drivers are (is the source available?).

Anyway, it makes much more sense to use one of the I2C buses available on the low-speed connector.

As to soldering, these are 0201 0Ω resistors, and while I don’t have the board in hand yet, photos seem to indicate there are several of those placed together right next to the high-speed connector. I’d say that is “precision soldering”. Anyway, even if precision wasn’t needed, the real problem is that in a product every board needs to go through soldering.


#8

Nobody here can tell you if the driver for the camera sensor YOU have selected, is open source or not. That is especially the case since you haven’t even indicated what sensor you will be using.


#9

When I was thinking of a camera driver, I had in mind the part that relates to the board, not to the CSI-connected camera. The part that needs to configure CSI ports and likely configure the on-board image processor. Sorry for confusing things. Anyway, the I2C issue is clear now and I can learn the rest from looking at the code.

(for the reference, I’ll be using an OV5647-based camera).