Questions on setting up camera I2C

Hi, firstly i’d like to say i’m quite impressed by the helpfulness of the responses here. Thank you to all the staff. Now onto the main topic:

I have a max9286 serdes setup on the cam i2c bus of the jetson nano with a custom carrier board (attached to pin 213 and 215), with a plan to use x4 csi lanes for 4 automotive cameras. Right now, i’m working on just establishing the i2c communication between the max9286 and the jetson and I have a few questions:

  1. Is there any reference which maps which i2c software bus goes to which pins on the jetson nano? I found it to be bus 6 by trial and error but it would be nice if there was a reference which showed all the software buses and their respective pins.

  2. Even with nothing attached to the i2c bus of the jetson nano, “sudo i2cdetect -r -y 6” is returning a “UU” on device address 0x40. Is there a device that is internally mapped to 0x40 or something? This is relevant because by default the serializer address is 0x40 and that seems to clash with something that already exists there.

  3. Once I have setup the camera’s over i2c, how do I setup the mipi csi-2 communication? Is there any terminal command (maybe with libargus or nvscamera) that I can use to validate my setup? Or do I have to register the IC through the device tree and rebuild the kernel first?

Thank you.

  1. the pin 213 and 215 it’s cam_i2c, you can check the pinmux excel file to get it’s I2C3 for HW name and decrease 1 to map to software bus. AKA i2c2 = “/i2c@3180000”

  2. Follow the sensor programing guide to developer your camera driver.

Hi Shane,
and thanks for the help.
I’ve read through the sensor programming guide, a few things are still unclear to me (sorry if this is a basic question):

  1. In order to add a camera module, do I need to add a new dtsi file at Linux_for_Tegra/sources/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/?
  2. then add a camera driver (according to the nvidia docs, it’s based in /kernel/nvidia/drivers/media/i2c/imx185.c), however how is that linked to the dtsi file? Do I simply create a new max9286.c file? How do I build the new file in that case.

Thank you, any additional references I can read would be great too, i’m not that experienced in dts and camera sensor driver development.

  1. Yes, you can new a dtsi file and include it.
  2. Also you can new a driver and add it to the kernel configure to build it.

1 Like