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.
The following figure shows the pin-out of the 2 headers of PocketBeagle®.
The default function of each pin is highlighted in dashed line. Click boards™ from MikroElektronika have a standardized MikroBUS™ pin-out (shown below).
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.
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/
- Follow this blog that explains how to compose a device tree overlay for a click board™ : https://jkridner.wordpress.com/2018/01/17/building-a-device-tree-overlay-for-your-new-pocketcape-design/
- Make sure to test the overlay
Be ready to answer questions from the maintainer and make changes
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.
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