Extend TX2i device tree to support additional i2c io expander

Hi,
I have a TX2i running on the official dev kit carrier board. I wish to install a 9535 series i2c io expander so that I can access it with libgpiod. I’m trying to make minimum changes to the stock flashed system. Is it possible to make a DTO and install it somehow? Or do I need to rebuild the entire DTB (/boot/dtb/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb)? Can I modify the extlinux.conf file to tell uboot to also load *.dtbo files?

I’m not familiar with kernal and boot modifications. I’ve been going around in circles because most of the information is saying to use the custom tools from nvidia like the pinmux excel spreadsheet and the jetson-io.py script. This does not seem to be relevant to the TX2i and the python scripts do not run on my system.

test@test:/opt/nvidia/jetson-io$ sudo ./config-by-pin.py -l Traceback (most recent call last): File "./config-by-pin.py", line 84, in <module> main() File "./config-by-pin.py", line 43, in main raise RuntimeError("Platform not supported, no headers found!") RuntimeError: Platform not supported, no headers found! 

Thanks,
Felix

Add the i2c mux dts and build the main dtb and apply it by extlinux.conf would be fine.

Thanks Shane for your detailed answer. Would the following steps work? (Executed on the target TX2i.)

  1. $dtc /boot/dtb/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb -o dts-source.dts -O dts
  2. Add a section in the dts-source.dts file for my i/o expander.
  3. `$sudo cp /boot/dtb/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb ~/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb
  4. $dtc dts-source.dts -o /boot/dtb/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb -O dtb
  5. reboot system

Do I need to modify the extlinux.conf? If I wanted to use a DTO instead how could I do that?

Confirm witch dtb is using by “dmesg | grep -i kerenl”
Then do the steps 1/2 and compile it to your dtb then modify the extlinux.conf by add FDT to apply the new dtb.

My current extlinux.conf:

test@test:~$ sudo cat /boot/extlinux/extlinux.conf TIMEOUT 30 DEFAULT primary MENU TITLE L4T boot options LABEL primary MENU LABEL primary kernel LINUX /boot/Image INITRD /boot/initrd APPEND ${cbootargs} quiet root=PARTUUID=c14158c9-45d5-465e-9fe6-417746fdddf5 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 

So you are saying I need to add a line to make it like the following?

test@test:~$ sudo cat /boot/extlinux/extlinux.conf TIMEOUT 30 DEFAULT primary MENU TITLE L4T boot options LABEL primary MENU LABEL primary kernel LINUX /boot/Image INITRD /boot/initrd FDT /boot/dtb/kernel_tegra186-quill-p3489-1000-a00-00-ucm1.dtb APPEND ${cbootargs} quiet root=PARTUUID=c14158c9-45d5-465e-9fe6-417746fdddf5 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 

DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts

If using the dtc to decompile then the “DTS File Name:” will keep, can’t adjust if apply successful or not.
You can check /proc/device-tree to confirm for your i2c explander adding.

I’m sorry, I can’t understand that. I am using dtc to decompile. Do I need to change the file name in the start of the dts file before recompiling? e.g. nvidia,dtsfilename = “/dvs/git/dirty/git-master…etc”

Anyway, I tried the recompile dtb approach and it bricked my TX2i. Is there a way to tell UBOOT to load a DTO on top of the stock DTB? That should hopefully be safer from bricking. I have dual a/b boot and rootfs but even that did not work.

You can modify the string that could break the CRC check.

No way to load dtbo for TX2 release.

Where is the CRC stored and generated? Is this a function outside of the dtc? Does this mean that it is not possible to use DTC directly to rebuild device tree?

Understood, Thanks for that.

No, you can build it without modify the DTS file name.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.