Post Go back to editing

Petalinux, meta-adi-xilinx and device tree modifications of ADI nodes

Category: Software

Can someone please tell me the proper method to modify ADI generated device tree nodes within PetaLinux?

I am trying to build a BSP with support for the AD9986 (which uses the same driver as the 9081). I am using zynqmp-zcu102-rev10-ad9081-m8-l4 for KERNEL_DTB and I can see the nodes populated for a 9081. I have tried to put my modifications in system-user.dtsi to remove/modify the generated nodes, however it seems meta-adi-xilinx gets generated after my layer changes. So the end result is I don't see any changes.

The layer readme (Link) talks about adding new (I assume non ADI nodes), but isn't clear on how to modify existing ones.

I was able to make some changes by editing meta-adi-xilinx/recipies-bsp/device-tree/device-tree.bbappend but I would rather not have to edit that layer.

Is there a better way to do this?

  • Hi,

    The layer readme (Link) talks about adding new (I assume non ADI nodes), but isn't clear on how to modify existing ones.

    There's a clear section about this in extending-the-devicetree. So yes, your first approach is the correct one and it should work otherwise there might be some bug. Make sure you are properly modifying the nodes. Can you share the modifications you are trying to do so I can take a look?

    - Nuno Sá

  • HI Nuno,

    Thanks for responding. I figured out my issue. I had two issues.

    1. I was not updating system-user.dtsi properly.

    2. There are times when running petalinux-build does not rebuild image.ub, so even though I made a change in the device tree that change wasn't reflected in my image.

    I haven't figured out a deterministic way to guarantee the device tree is the latest in image.ub, but modifying ADI device tree nodes does work.

    Thank you.