Sorry, you need to enable JavaScript to visit this website.

How to generate Device Tree (dts) file?

3 posts / 0 new
samking's picture
How to generate Device Tree (dts) file?


I'm trying to build Linux to run on Zedboard with an AD-FMCOMMS1-EBZ card.

I'm new to Linux so I'm following the Xilinx wiki:

My colleague has created a simple Hardware and FPGA design that uses some basic features of the FMCOMMS1.

The SDK (libgen) fails when creating the device tree (dts) file as the hardware design (xml file) includes references to devices on the FMCOMMS1 board that are not known to the Xilinx SDK:

I'm getting this error:

According to answer #35443 I'm supposed to add a repository with the custom drivers, but Analog Devices don't support this?

Instead AD provide info on how to modify an existing dts file:

So I assume I need to create a dts file with just the standard Zynq peripherals used by our design, then manually add the custom (AD) drivers afterwards.

I've tried following Eli's instructions to get a 'standard' dts file, but I still get the same error from libgen as my xml file still contains info about custom devices even though the mss file now only contains the standard devices:

I've tried to manually edit the xml file with guesswork to remove bits that may be offending the tcl 'generate' script used by libgen but without any luck, I still keep getting the same error....

Does anybody know how to modify the xml so libgen works? Or is there another way to solve the problem?

Many thanks, Sam.

zedhed's picture
RE: How to generate Device Tree (dts) file?

Hi samking,

Have you considered yet another path besides relying upon the devicetree generator to do the mapping work for you?

Here is another path that I would recommend over the ones shown above. Since this is a AD-FMCOMMS1-EBZ design, I would recommend starting from one of the ADI supplied device tree files, say zynq-zed-adv7511-xcomm.dts and modifiying the contents manually to match the devices withing your colleague's hardware platform. Here is a page with some further information on the ADI supplied example device tree files.

I think the devicetree generator is great for getting started with basic designs but it has some limitations (like the ones you found). Since it sounds like you are moving on to more advanced design techniques, perhaps you would consider giving up the devicetree generator and resorting to hand editing the DTS. Yes, this will involve some investment up front in resolving the differences between the example ADI devicetree and your current hardware platform, but I think in the end it will give you peace of mind in knowing there is a way forward for your design.



samking's picture

Thanks Kevin, we're up and running now.