Jump to content
  • 0

Linux Device Tree


deppenkaiser

Question

Hello,

is it true, that a device tree file like <finally-used-device-tree>.dts is always generic and will always generated thru a <source-for-device-tree-file>.dtsi file?

I found some basic files in "/my-petalinux-project/components/plnx_workspace/" e.g. "zynq-7000.dtsi" and a generic "system-top.dts" file.

Must i edit those files (e.g. zynq-7000.dtsi)?

Is there an other relevant Location?

 

Thank you...

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

hello deppenkaiser,

not sure what you are asking for... dtsi files are ALWAYS INCLUDED by a dts file. you can modify either one. You don't need to use dtsi files if you don't like to but you CAN decide to make your dts file generic and make your changes in dtsi's only.

 

So, no they are not always generic unless you decide to do so. check your dts to see what files it depends on but generally dts and dtsi is all you need.

 

You should also make use of generic drivers so you don't have a gazillion drivers for a gazillion devices. in this case you refer to all properties of such driver and only need to add the differences like device addresses.

Link to comment
Share on other sites

Hello @theUltimateSource,

i learned, that i must manipulate the so called device tree. If i ask the "Internet", what a device tree is, then i got the answer, that it is a text file where i must write into what type of

device i Need.

You told me the same, i can edit it if i like. If i searching my petalinux Project Folder, then i do not find the right place where the "dts" file is located. I found a lot of "*.dts" fiiles, but i do not know which is the right one.

in the Folder "/home/me/projects/myproject/components/plnx_workspace/device-tree-generation" i found a file called "system-top.dts" which also was referenced in some Internet sources.

If i read this file i saw the following Text:

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: 
 * Today is: Mon Feb 26 05:40:23 2018
*/

I think, that it is not a good idea to edit such a file, i found the same in other "dts" files. You see, that this is the reason why i ask my question like i did. My poor System understanding

says: "Hey deppenkaiser, you can only edit the dtsi files" so i thougt they could be similar to a source for "dts" files!?

Yes, i wish to use "generic-drivers", that is all i want to do, but i dont know how, because it is not so easy for me because of my small System understanding; i never used linux before.

My (may wrong) knowlege/Goals are as follows:

- I can edit only "*.dtsi" files.

- I like to use generic device Support.

- I will made a very simple "hello world"-like design.

- I will only use GPIO i my first step.

- I like to use the same Technology (device type) for all my future designs (Memory mapped)

 

The last part of my question was: Where do i find the right dtsi-file to enter the device specification?

For your info: I ask a similar question in an other thread. The answer i got was good, but not complete (i may be wrong about that).  There are a lot of questions i have,

 

Thank you...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...