Help getting started with modifying the Device Tree

117 views
Skip to first unread message

Daniel Block

unread,
Apr 6, 2020, 10:19:06 AM4/6/20
to BeagleBoard
Can anyone give me some good web links and/or documents that would get me started working with and modifying the Device Tree for both the BeagleBone AI and BeagleBoard X15?  (Or probably for BeagleBone Black would also help a bunch)  I have been monitoring these Beagleboard Google groups for a while now and I believe I have some idea of what needs to be done but if there is a "how to" out there it would save me time.  From what I have gathered, it sounds like the modified device tree can be modified and recompiled on the BeagleBoard X15 (or AI) itself not requiring a separate cross compiling computer.  (If I need to, I can setup a cross compiling system).  I come at these TI processors looking at the DSP cores first when it comes to I/O and peripherals and then Linux comes second.  I am switching from the OMAPL138 processor to these AM5729 processors.  Because I come at these processors from the DSP end I find it much easier to perform I/O and peripheral setup from Linux using dev/mem like this discussion https://groups.google.com/forum/#!category-topic/beagleboard/beaglebone-ai/uKoSJUQaXH4  During this time of COVID-19 shutdown I thought I could figure out how to doing things the correct Linux way and device trees is the first step.    

Robert Nelson

unread,
Apr 6, 2020, 10:34:04 AM4/6/20
to Beagle Board
On Mon, Apr 6, 2020 at 9:19 AM Daniel Block <dbloc...@gmail.com> wrote:
>
> Can anyone give me some good web links and/or documents that would get me started working with and modifying the Device Tree for both the BeagleBone AI and BeagleBoard X15? (Or probably for BeagleBone Black would also help a bunch) I have been monitoring these Beagleboard Google groups for a while now and I believe I have some idea of what needs to be done but if there is a "how to" out there it would save me time. From what I have gathered, it sounds like the modified device tree can be modified and recompiled on the BeagleBoard X15 (or AI) itself not requiring a separate cross compiling computer. (If I need to, I can setup a cross compiling system). I come at these TI processors looking at the DSP cores first when it comes to I/O and peripherals and then Linux comes second. I am switching from the OMAPL138 processor to these AM5729 processors. Because I come at these processors from the DSP end I find it much easier to perform I/O and peripheral setup from Linux using dev/mem like this discussion https://groups.google.com/forum/#!category-topic/beagleboard/beaglebone-ai/uKoSJUQaXH4 During this time of COVID-19 shutdown I thought I could figure out how to doing things the correct Linux way and device trees is the first step.


Hi Daniel,

So we've split all our Device Tree's into a separate repo, this allows
you to independently update and build the device tree's independent of
the kernel.

https://github.com/beagleboard/BeagleBoard-DeviceTrees

For the BBAI/BBX15 branches to look at are: v4.14.x-ti/v4.19.x-ti

https://github.com/beagleboard/BeagleBoard-DeviceTrees/tree/v4.14.x-ti

https://github.com/beagleboard/BeagleBoard-DeviceTrees/tree/v4.19.x-ti

To build and install the device tree's just run:

make
sudo make install


Specific branches of this repo is also shipped on your device under:

/opt/source/

but depends on the date of image creation..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Daniel Block

unread,
Apr 7, 2020, 10:52:23 AM4/7/20
to BeagleBoard
Thanks Robert I will look at this repository.  
Dan

Daniel Block

unread,
Apr 8, 2020, 10:45:40 AM4/8/20
to BeagleBoard
Just want to confirm the correct way to proceed.  What I did was login to my BB-X15 in a terminal.  I changed directory to
/opt/source/dtb-4.14-ti/ and then I typed  
make
and it performed the build.
I did not do a, sudo make install, because I did not make any changes to the .dts files
So now that I know how to do that, what is my next step when I want to make changes?  Do I find the .dts file that has the I/O pins I need to change or add and then in a text editor make my changes and then build?  Or is it recommended that I clone the repository over top of the files in the /opt/source/dtb-4.14-ti/ folder and then make modifications to those files in a text editor and build, doing this all on the BB-X15?    
Also which dts files are used by the BB-X15 and BBAI?  The obvious ones are the AM57xx-bealge-x15- files but are any of the dra7 and OMAP5 files used for the BBX15?  Finally if I find an I/O pin that is not set in any of the .dts files how do I determine the best file to modify to add that pin?  

Thanks  


On Monday, April 6, 2020 at 9:19:06 AM UTC-5, Daniel Block wrote:
Reply all
Reply to author
Forward
0 new messages