Multiple CSI cameras on one Jetson TX1 Dev board

Hi,

I would like to connect up to 6 CSI-2 cameras (of the same kind!) to the Jetson TX1 Development Carrier Board. In all the Jetson TX1 manuals it is mentioned that for the control connection the CAM_I2C (CAM_I2C_SCL and CAM_I2C_SDA) is used. This would mean that all 6 cameras would be connected to this single I2C. However in the CSI-2 specification I found that a CSI-2 camera may only have one of two addresses (see chapter “6.2 CCI Slave Addresses”). This would mean that I can only connect two of such cameras to one I2C bus. On the “Camera Expansion Connector” (J22) on the Jetson TX1 Development Carrier Board there seem to be a total of three I2C busses (CAM_I2C, I2C_PM and I2C_GP0). Does that mean I have to connect two cameras two each of theses I2C busses (each bus having one camera with the one I2C slave address and one with the other I2C slave address) or is there any other/better way?

Thanx for you help,
Marcus

However in the CSI-2 specification I found that a CSI-2 camera may only have one of two addresses (see chapter “6.2 CCI Slave Addresses”).
It just defines the slave address format for camera modules with different output format support; which bit in the slave address should be zero (011011Xb or 011110Xb).

Hi mpfeffer,

CCI slave address is not I2C address. Each camera module can set its own I2C address to several different value, which you can find in its datasheet. If I2C address of 6 cameras has conflict anyway, then you can choose the second I2C bus to avoid conflict.

However in the CSI-2 specification I found that a CSI-2 camera may only have
one of two addresses (see chapter “6.2 CCI Slave Addresses”).
It just defines the slave address format for camera modules with different output
format support; which bit in the slave address should be zero (011011Xb or 011110Xb).

I know about the slave address format. The cameras that I want to connect not only support raw Bayer output, so the slave address format 011110Xb applies. This leads to the two possible slave addresses (0111100b and 0111101b) that I mentioned in my previous post. Is that correct so far?

CCI slave address is not I2C address. Each camera module can set its own I2C address
to several different value, which you can find in its datasheet. If I2C address of 6
cameras has conflict anyway, then you can choose the second I2C bus to avoid conflict.

Is far as I understood it CCI slave address (do not confuse it this with the sub address!) is exactly the I2C slave address of the camera. If my understanding is wrong then where is the difference? If we have a device that can only support two different I2C addresses (as mentioned above) then we would even need 3 I2C busses to be able to connect 6 cameras. Which pins of the camera connector Camera Expanson Connector (J22 on the Jetson TX1 Development Carrier Board) am I supposed to use? Does that mean I have to use the pins for CAM_I2C, I2C_PM and I2C_GP0 (each for 2 cameras making up a total of my 6 cameras)?

Thank you again,
Marcus

Most cameras that I’ve played with have two I2C addresses, with one of those adjustable via an I2C register on the device. Our system has four cameras (so far), and I power them up one at a time, since they are all on the same I2C bus. While they are powered on, I send them I2C commands to change the appropriate register on the camera to change its I2C address. That way each camera can be controlled independently while all four are running.

The main trick is powering the devices in sequence. You will probably need to use GPIO pins and check the camera manual for how to turn them on and off (e.g., via their shutdown pin). Once powered, you should be able to send I2C commands (your driver likely does that already to configure the camera).

And yes, CCI slave address is related to the MIPI CSI-2 bus, not the I2C bus. If you look at your schematics, you should see separate pins for I2C and CSI. You shouldn’t have to change those if your cameras are all attached to different CSI lanes (mumble, mumble, hand-waving).

Thank you for your help so far. Let’s assume the camera only supports two I2C addresses (no matter if you set them by powering the cameras up sequentially or in any other way) then you can only connect two of such cameras to one bus, right? Which pins (on Camera Expanson Connector J22 on the Jetson TX1 Development Carrier Board) would I have to connect the six cameras for I2C/CCI communication?

Thanx,
Marcus

Included in J22 connector are three I2C channels, CAM_I2C PM_I2C and I2C_GPO. So if your camera supports two I2C address, that could provide 6 cameras without leaving J22 connector if you patched PM_I2C in the kernel. If you require additional I2C lines, you may use an I2C from outside the devkit camera expansion connector (for example I2C_GP1 from the expansion header), or leverage connections broken out in ecosystem carriers, or add an I2C bridge or expander to the system.

Have you seen these TX1 Camera Kits available from Leopard Imaging? Their customized adapter board for the TX1 Devkit allows multiple of their CSI cameras to be attached. I’ve heard they should have the drivers and I2C working, although I think their board supports 3 4-lane cameras, not 6 2-lane.

Ok, thank you. That helped a lot. What needs to be patched in kernel in order to be able to use PM_I2C and why do we only have to patch PM_I2C and not I2C_GP0?

I2C_GP0 is intended for “general” use, while PM_I2C seems to be reserved for power management - where in the code, I’m not sure. Since it deviates from the reference implementation, patching PM_I2C would be unsupported, but since you were asking about more I2C lines, I thought I’d mention it.

Thanks for the clarification and have a nice weekend. :-)

Auvidea already has a board that allows you to connect 6 cameras, the J20. RidgeRun provides support for the carrier board.

How much does it cost for the driver? I did not see J20 on Auvidea web store.

For pricing information for the carrier board you have to contact them directly, I see an email address here: http://www.auvidea.eu/index.php/company/contact. I know RidgeRun is getting one in a couple of days to work with the IMX219, the board already has the hw to do the i2c translation.

For pricing information on the driver please send the request here: http://www.ridgerun.com/contact

You can find some instructions for the J20 here:

https://devtalk.nvidia.com/default/topic/975962/support-for-raspberry-pi-v2-imx219-and-v1-ov5647-cameras-using-isp-multi-camera

This might also be helpful. The cameras use 3.4MP sensors with great low light sensitivity. Do have a look:

https://www.e-consystems.com/blog/camera/?p=1709