Device tree FAQ discussion

Continuing the discussion from Device tree FAQ:

I’m trying to improve the FAQ section of the forums. Any thoughts on resources to help people understand device tree usage on Beagle?

Also, we are starting a blog series on device tree usage. See Improving usage of device trees – BeagleBoard.org Blog.

2 Likes

Looking forward to learning about the improvements!

The above link results in the following for me:

Grrr… I thought these were live. I thought the permission limitation was only regarding posting. Hey @fwbarber, can you help me fix?

OK, check now. I think I fixed it.

2 Likes

Hello @cbrake ,

Seth here. I also found that the DT info. from beagleboard.org and their BeagleBoard-DeviceTrees link in the above link has tons of info.

I have learned how to associate many items w/in the am335x/am5729 to DT and actually see how things are done instead of just theory on DT.

Seth

P.S. For instance, https://github.com/beagleboard/BeagleBoard-DeviceTrees/blob/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi#L8 , shows some include of another file. This file is the actual file one would work on, presumably. I will also list this file, https://github.com/beagleboard/BeagleBoard-DeviceTrees/blob/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi#L6 , which has this elusive file that I have not found yet. Anyway, for am5729 on the BBAI, these are good resources to review and learn from my perspective.

I’m currently working on using the BBB in a project, and it would be convenient to use a newer u-boot/kernel for various reasons. Is the overlay mechanism usable in recent u-boot/kernels?

Will the overlay mechanism stay in u-boot, or will it be moving to the kernel? I see a kernel link referenced in the blog post, but if I understand correctly, the BBB overlay mechanism has historically been entirely in u-boot.

So mainline u-boot has overlay support and ‘expansion’ support now.

Someday, the kernel land might support something like overlays, but someday is not useful for us, thus u-boot is the best way today.

Edit, bootlin’s post is now public: Using Device Tree Overlays, example on BeagleBone boards

Regards,

2 Likes

Hello @RobertCNelson ,

Thank you for bringing this up. I cannot wait to sink my teeth into this article. I saw the Cape…

Seth

P.S. Seriously, thank you for posting the link.

It is also posted on the BeagleBoard.org blog Using Device Tree Overlays, example on BeagleBone Cape add-on boards – BeagleBoard.org Blog

2 Likes

I can’t wait to get into this article in-depth. I appreciate you bringing this up.

I think what would be really useful is a dedicated devicetree editor that can pull all the various included devicetrees into something that is easy to navigate and look at.

something that will allow you to write overlays and see how it effects the final devicetree.

currently finding anything in a devicetree requires opening the dts file that is passed to the kernel and trawling through all of the various include segments to find what is going on.

2 Likes

I still consider myself a newbie at device trees since I’ve yet to actually modify and rebuild one. I understand the concept of them since there are plenty of websites out there that explain the intent behind dtbs and overlays. But when it comes down to the details as they relate to a specific platform, that’s where things are not nearly as clear to me. So here are the things I’d like a FAQ to cover as well as organizational details that I think could improve the experience.

-A review of the various file types (dtb, dts, dtsi, dtso, etc)

-A mild primer explaining the pieces and parts using screenshot and examples from the various BB platforms (BBB/AI/AI64). This would be useful to explain the organization of where the files are.

-Documentation of each filesystem tarball supplied on the site that details what dtb and overlays are in play and which files to edit (and possibly which to NOT edit & why)

-Explanation of the “make” process necessary when making & deploying changes to the device tree including the making of dts->dtb, as well as what to do with dtsi files (e.g. gotten from examples or from Sysconfig). So details like where a new dtsi should be placed in the filesystem, what file should be edited with the include referencing the new file. Any existing includes that should be commented out, and finally what folder to perform the make process from…and of course the various make target options available if “make” isn’t sufficient in some cases.

-On the BBAI64 I have, there’s a number of various device tree files that, based on their naming, seem like they are not for this device. The tarballs for each of the platforms should be cleared of files that aren’t compatible with that platform. That goes for all files, not just device-tree files. If they are left-over remnants from previous build-targets, then a better “clean” procedure is needed to ensure that when building tarballs for, lets say, BBAI64, the built artifact doesn’t contain files that were left over from a previous build for a BBB.

Now if there is already documentation that covers some/most/all of this already, there needs to be a single place where it all exists OR at the very least where it is all referenced and broken down into the various platforms (BBB, BBAI, BBAI64).