Modifying Device Tree for IMX334

I’m trying to get my IMX334 camera to stream on a TX2 using the Leopard Imaging Driver. I’m using my own camera payload and camera interface board on the TX2 developer kit.

I have hooked up my 2 camera payload to the CSI0 bus as listed in the Leopard Imaging MIPI Adapter schematic (attached below), so my MIPI lines should be the same as their first camera. I had some trouble since I didn’t have the PCA9546 on my adapter board, but I’ve since added that as shown in their schematic shown below.

Now, I’m stuck on getting device 0x1a to send an ACK when I run nvgstcapture. I think this may be because my other camera has an address of 0x10 instead of 0x1a. My design has a MIPI switch with both CMOS connected to the same MIPI lines, and different i2c addresses. So I suspect there’s a virtual i2c device conflict.

How can I modify the device tree to change the i2c addresses, and remove the 3rd camera device? I don’t have any .dtsi on the Leopard Imaging provided Image (a link to it is in the attached driver installation guide pdf).

I’ve tried extracting the dtb from /sys/firmware/devicetree/base using device-tree-compiler. But how can I edit this to disable plugin manager? I see that there are some .dtb files in /boot/ but I thought I need to edit the top level .dtsi to remove loading the plugin-manager.dtsi.

Also, in the sensor development guide, all dtsi files are referenced to the t19x platform whereas I think I need to use the t18x kernel source for the TX2. So I’m not sure which files I should even be modifying since the instructions are not compatible.

So in summary, I want to edit the device tree, but can’t find any of the .dtsi on the Leopard Imaging OS Image I flashed.

Thanks in advance for any help!

LI-JTX1-MIPI-ADPT.pdf.txt (826.3 KB) IMX334-MIPI_R32.1_TX2_NV_Tri_20190729_Driver_Guide.pdf.txt (642.3 KB)

Here is my modified device tree as a dtb

tegra186-quill-p3310-1000-c03-00-base.dtb.txt (239.4 KB)

And dts dumped from file system using dtc:
modified.dts.txt (330.7 KB)

hello nikhil8xi4h,

  1. instead of disassembler the dtb file for modification, the better approach should be start from original one for customization. please contact with Leopard Imaging team for IMX334 device tree files.

  2. it’s correct that you should using t18x kernel sources for TX2 devices. please access L4T sources package and check below path for reference.

Where can I find the imx185.c file referenced in the documentation? I don’t see it anywhere on my system.

hello nikhil8xi4h,

it’s also included in the [L4T sources] release package, there’re different folder for kernel source and device tree files.
for example,

IMX185 kernel sources:

IMX185 sensor device tree