Post Go back to editing

ADI meta-xilinx layer + Xilinx VCU BSP device tree issue

Category: Software
Product Number: AD9361
Software Version: 2021.2

I am trying to create a linux image for a hardware design combining both Xilinx VCU TRD and fmcomms reference design from ADI on zcu106.

I have followed steps in the readme in the meta-adi git repo to create a linux image using the meta-adi and it tested fine for the reference hardware design. The pins were assigned to match zcu106.

My steps were,

  1. Add user layers.
  2. Run petalinux-build and let the build fail.
  3. Create pl-delete-nodes<>.dtsi and dts file using the zcu102-fmcomms2-3 dts file from adi git repo. Modified the zynqmp-zcu102-rev10-ad9361-fmcomms2-3.dts by adding the line "#include "zynqmp-zcu106-revA.dts" and commenting #include "zynqmp-zcu102-rev1.0.dts".
  4. Place them both in device-tree/files folder and update the device-tree.bbappend
  5. Run petalinux-build

The VCU TRD uses the usual petalinux device tree generation procedure and uses system-user.dtsi to do the modifications.

I confirmed the operation of the individual sections, fmcomms3 section in the PL with the aforementioned meta-adi linux image, xilinx vcu section in the PL with xilinx vcu bsp project. They both operated to my expectations.

Then I followed almost the same steps to create a linux image using meta-adi layers on top of xilinx vcu bsp.

  1. Add user layers.
  2. Copied the pl-delete-nodes and the device tree from the previous project to device-tree/files.
  3. The addresses were not affected since I had already modified them to match the combined hardware design.
  4. Modified the device-tree.bbappend.
  5. However I had to remove all the nodes in pl.dtsi using the pl-delete-nodes for the device tree to compile correctly. The system-user.dtsi could not detect the nodes in pl.dtsi

Finally I got the system up and running. However the VCU pipeline is not operating at all. /dev/media0 node is missing and in the Xilinx forums it mentions that the issue is in the device tree.

How does the meta-adi layer handle the device tree? Why bother creating pl-delete-nodes if the pl.dtsi is ignored altogether? Have I done correctly in regarding creating a linux image using meta-adi layers for a custom platform despite I tested it ok for reference hardware design modified to zcu106?

I only need the support to control the fmcomms, it would be nice if I can use the ADI-DMAs and receive data through Ethernet, but not essential. I assume I only would require libiio support? is it too much of a hassle as mentioned in https://ez.analog.com/linux-software-drivers/f/q-a/558008/failure-in-adding-adrv9009-dtsi-file to manually add the libraries and drivers without using meta-adi?

Top Replies

    •  Analog Employees 
    Apr 4, 2024 +1 verified

    Hi,

    How does the meta-adi layer handle the device tree? Why bother creating pl-delete-nodes if the pl.dtsi is ignored altogether?

    We try to keep xilinx stuff untouched as much as we can.…

Parents
  • Hi,

    How does the meta-adi layer handle the device tree? Why bother creating pl-delete-nodes if the pl.dtsi is ignored altogether?

    We try to keep xilinx stuff untouched as much as we can. pl.dtsi is not ignored, we just delete the nodes we know we're defining in the devicetree we pull from ADI linux tree (or somewhere else). If the VCU pipeline is not working, that likely means that yes, you're missing some devicetree stuff.

    However I had to remove all the nodes in pl.dtsi using the pl-delete-nodes for the device tree to compile correctly. The system-user.dtsi could not detect the nodes in pl.dtsi

    Not sure what you mean by this. Maybe you had some other issue.

    Create pl-delete-nodes<>.dtsi and dts file using the zcu102-fmcomms2-3 dts file from adi git repo. Modified the zynqmp-zcu102-rev10-ad9361-fmcomms2-3.dts by adding the line "#include "zynqmp-zcu106-revA.dts" and commenting #include "zynqmp-zcu102-rev1.0.dts".

    The pl-delete-nodes should be created from the pl.dtsi file. That's what you've done right? You should delete all the nodes that are already defined in the base devicetree you're going to use and that are specific to ADI cores. Because for those, the auto generated nodes created by petalinux are just "garbage". So what you should do is to put together a devicetree you know it works. Then use that devicetree in petalinux together with pl-delete-nodes to delete all the unwanted stuff in pl.dtsi.

    I assume I only would require libiio support? is it too much of a hassle as mentioned in https://ez.analog.com/linux-software-drivers/f/q-a/558008/failure-in-adding-adrv9009-dtsi-file to manually add the libraries and drivers without using meta-adi?

    Well, you definitely need the drivers and proper devicetree for them. As of libiio, it should be fairly easy to have it in your build as it's already part of meta-openembedded. You'll just have an old release. But you can append (as done in meta-adi) the libiio recipe to bring in a new version.

    I should also mention that 2021.2 is fairly old and not actively supported anymore. So, if you can, it would be wise to move to the latest release.

    - Nuno Sá

  • Thanks very much for your reply. Sorry for the late reply, I have been trying a few things after reading yours.

    I managed to get ad9361 drivers and libiio installed after using the ADI-kernel with petalinux.

    I added the device tree nodes from the device tree for zcu102 + fmcomms2 to the vcu trd's device tree.

    Enabled ad9361, axi dmac drivers from the kernel settings.

    Libiio was added from meta-openembedded oe-layer, as a custom app, following the guides from petalinux.

    I suspect the issue was caused by the settings meta-adi layer adds, there is the possibility of a device tree issue as well, but I could not find any difference for the device tree nodes for VCU and pipelines.

Reply
  • Thanks very much for your reply. Sorry for the late reply, I have been trying a few things after reading yours.

    I managed to get ad9361 drivers and libiio installed after using the ADI-kernel with petalinux.

    I added the device tree nodes from the device tree for zcu102 + fmcomms2 to the vcu trd's device tree.

    Enabled ad9361, axi dmac drivers from the kernel settings.

    Libiio was added from meta-openembedded oe-layer, as a custom app, following the guides from petalinux.

    I suspect the issue was caused by the settings meta-adi layer adds, there is the possibility of a device tree issue as well, but I could not find any difference for the device tree nodes for VCU and pipelines.

Children
No Data