Creating Devicetree from Devicetree Generator for Zynq Ultrascale and Zynq 7000

In this brief demo, we will see how to generate the devicetree (dts) from the Xilinx devicetree generator (dtg). We will then compile this using the devicetree compiler. We can also discuss how to generate a patch for devicetree recipe used in Petalinux

Table of Contents

Downloading Devicetree sources from Github:

Here we shall be using the xilinx-v2018.3 branch of the devicetree generator:

Generating the DTS from DTG:

Here, we shall be using the HSI to create the DTS:

For more information on the HSI API, and how to debug users can see the wiki here

If users noticed an issue in a older release. It is worth replicating in the master branch to see if the issue persists.

Compiling the DTS using DTC:

The DTC compiler can be used if the petalinux is sourced. However, users can compiler this manually too (see wiki here to manually compile DTC).

Also, in the devicetree, there is #include files which need to be precompiled, similar to a C application:

Generating DTG patch against a Petalinux version:

If users have noticed an error in the DTG, and want to patch the current version. Then they can create a patch in device-tree-xlnx. For example, here I will create a patch against 2018.3

Adding Patch to Petalinux devicetree recipe:

Copy the patch to project-spec/meta-user/recipes-bsp/device-tree/files and update the device-tree.bbappend as follows: