I’ve looked through a number of forum posts about device-tree overlays but I haven’t been able to find exactly what I’m looking for. I’m using a ConnectTech Rogue Carrier Board for the Orin AGX and I’m trying to ADD an overlay for the pinctrl_mcp23s08 driver. The devices that will use the pinctrl_mcp23s08 driver is located on i2c bus 0.
Ideally what I want to do is:
- keep the original .dtb file intact (kernel_tegra234-orin-agx-cti-AGX202.dtb)
- I want to add an overlay .dtbo to the /boot/dtb directory specifically for the pinctrl_mcp23s08 driver that gets added to the orignal .dtb.
- Update /boot/extlinux/extlinux.conf such that it to points to the original .dtb file but also pulls in the new overlay file.
I was able to do a “hack” method to get everything to work. I was able to do the following procedure to get everything working correctly:
- I Decompile kernel_tegra234-orin-agx-cti-AGX202.dtb into a .dts file. (This is the original .dtb file on my system)
- Inside the newly created .dts file, I added the necessary lines of code in the i2c@3160000 section and saved the updated .dts file as kernel_tegra234-orin-agx-cti-AGX202_Updated.dts.
- I then Recompile kernel_tegra234-orin-agx-cti-AGX202_Updated.dts as a .dtb and put this new compilation in /boot/dtb.
- I then changed the “FDT” line in the extlinux.conf file to reference kernel_tegra234-orin-agx-cti-AGX202_Updated.dtb.
- When I reboot the driver is reference correctly and everything works as expect.
This second procedure works but it’s NOT the best method to use when adding new drivers. I can’t quite figure out why my first method is not working correctly. I’m sure I have some error or forgot some step in my procedure. I just don’t know what it is.
To show exactly what I’ve done, I’ve included the following files.
kernel_tegra234-orin-agx-cti-AGX202_Updated.txt. - This is the hacked together device tree file (.dts) that adds the mcp23s08 driver to i2c@3160000{ };. This is the file that works.
orin_mcp23s08_ol2.txt - which is my overlay device tree file(.dts) for the mcp23s08 driver.
extlinux.conf.txt - which is extlinux.conf with the changes to try and include the overlay compilation of orin_mcp23s08_ol2.dts.
EXTLINUX.CONF.TXT
extlinux.conf.txt (1.1 KB)
ORIN_MCP23S08_OL2.TXT
orin_mcp23s08_ol2.txt (1.1 KB)
ORIGINAL DEVICE TREE
kernel_tegra234-orin-agx-cti-AGX202_Updated.txt (417.4 KB)
Thank you.