Device Tree Support for Click Boards™ & PocketBeagle®

Easy to follow instructions to build, test and add device tree overlays to BeagleBoard. org® community repository for click boards™.

Categories: Beginner

This project will demonstrate how to contribute to
Beagleboard.org
® PocketBeagle®
support for MikroElektronika mikroBUS™interface standardized click boards™
by building, testing and adding device tree overlays to the
BeagleBoard.org® official overlay repository
.

For the story of the motivation for this project,
see Neeraj’s blog post
.

BeagleBoard.org®
is a 501c3 Foundation focused on education.
PocketBeagle®
is a completely open source, highly affordable super tiny single board computer featuring the
OSD335x-SM
SiP. The OSD335x-SM SiP is a System-in-Package from
Octavo Systems
that integrates the Texas Instruments Sitara™ ARM® Cortex®-A8
AM335x
processor, DDR3 memory,
TPS65217C
PMIC,
TL5209
LDO, all the needed passives, and
4KB of EEPROM
into a single BGA package.

BeagleBoard.org® PocketBeagle® Headers

The following figure shows the pin-out of the 2 headers of PocketBeagle®.

BeagleBoard.org® PocketBeagle® header functionality

The default function of each pin is highlighted in dashed line. Click boards™ from MikroElektronika have a standardized MikroBUS™ pin-out (shown below).

Mikro bus interface

BeagleBoard.org® PocketBeagle® (pictured below) headers conform to the MikroBUS™ standard and allows for two click boards™ to be interfaced with PocketBeagle® at a time(shown in the following figure). Although no guarantees are made with respect to compatibility, most click boards™ work with PocketBeagle® with a little bit of effort.

BeagleBoard.org® PocketBeagle® with headers installed

BeagleBoard.org® PocketBeagle®  headers

Two click boards™ from MikroElektronika installed on BeagleBoard.org® PocketBeagle®

Device Tree Overlays

A device tree is a tree data structure that describes thehardware configuration of the system to the Linux operating system. During boot, the Linux kernel will use the information in the device tree to recognize, load appropriate drivers and manage the hardware devices in the system. Here is a good tutorial on understanding, compiling and building new device trees:
https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/linux-device-tree/.

A major limitation facing device trees us the static nature of it, you cannot change the device tree structure without changing some very important files that are extremely important to device boot. The solution came in the form of Device Tree Overlays. These are dynamically inserted fragments of device trees to update hardware configuration of the system. Here is a great resource on understanding and building device tree overlays:
https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/linux-device-tree-overlay/

How to write an overlay for a click board™

Step 1: Compose overlay

  • Make sure to test the overlay

Step 2: Fork bb-overlays repository

Fork the repository by clicking on the fork button

Step 3: Add the compiled device tree overlay file

Initial commit

Step 4: Pull request

Generating a pull request

Step 5: Done with DTO submission

Pull request complete

Be ready to answer questions from the maintainer and make changes

Step 6:

Add an entry for the click board™ in the relevant click section along with the information for the click boards™ on BeagleBoard.org® PocketBeagle® wiki page
https://github.com/beagleboard/pocketbeagle/wiki/Click-boards%E2%84%A2
and submit changes.

BeagleBoard.org® PocketBeagle® click board™ wiki page

Conclusion

There are 100s of click boards™ available. Adding to the device tree overlay support for a click board™ you are using might be of great value to the open source community and a great way to give back.

Check out the example
Hackster.io
project using the MikroElektronika OLED click board and the technique above
https://www.hackster.io/beaglefriends-octavosystems/expand-pocketbeagle-easily-with-mikro-click-boards-oled-c-de7a7c

Most MikroElektronika click boards™ work with PocketBeagle® with a little bit of effort

Comments are not currently available for this post.