0
votes

I am working on ZedBoard(having Zync series SoC from Xilinx) and want to create a device tree for the embedded linux which i am planning to boot on this Zedboard. I followed the two links

  1. http://xillybus.com/tutorials/device-tree-zynq-1

  2. http://www.wiki.xilinx.com/Build+Device+Tree+Blob

They both gave me insight of device tree.

Now I have two options:

  1. I got one prebuilt device tree .dts file for the Zedboard. So, can I use this directly without changing anything and only add mine needed drivers in this and it will work?

or

  1. Should i start from scratch and generate mine own device tree .dts file. What i want to ask/confirm that: device tree(.dts) file is not project specific and the content of .dts file will be unique for the particular board(which is in our case is ZedBoard). So i can take one working .dts file(as in option 1) as a basic platform for mine project and add mine device node in this .dts file (if it is not there) and it will work?

Please suggest and correct me.

1
A "well-wriiten" DT should consist of a board-specific .dts file that includes lower level .dtsi files. The bottom-most .dtsi file (i.e. one of the first included files) would be for the SoC itself, with all non-essential and optional peripherals declared but disabled. All board-specific information should be kept out of this SoC-level .dtsi file, and declared in the .dts itself or a high-level .dtsi file. The practicality of this organization is not obvious for a single board, but if you had several board designs using the same SoC, then you might see its benefits.sawdust

1 Answers

0
votes

I agree with the @sawdust's comment. Please find the pictorial representation of the same.

I have shamelessly copied it from the presentation here. Layout of ARMDA boards

To answer your question, you should create your own ".dts" file which includes all the necessary parents (i.e. SOC specific and needed) dtsi files. And compile your ".dts" file using DTC compiler (either from linux/scripts/dtc/dtc in Linux Source tree or by using the package like "device-tree-compiler").

In most cases you can modify the existing device tree file and re-compile it for your purpose. For your case, I think you can have to modify this zynq-zed.dts.