BeagleBoard/GSoC/2023 Proposal/BeagleBone Cape add-on board compatibility layer

From eLinux.org
< BeagleBoard‎ | GSoC
Revision as of 17:03, 30 March 2023 by Limsoonweiutm (talk | contribs) (Enabling overlay compatibility:)
Jump to: navigation, search


Cape Compatibility layer for BeagleBone Black, AI, AI-64, PocketBeagle and BeaglePlay

Student: | LIM SOON WEI
Mentors: Deepak Khatri (lorforlinux)
Proposal: https://elinux.org/BeagleBoard/GSoC/2023_Proposal/BeagleBone_Cape_add-on_board_compatibility_layer

Status

This project is currently just a proposal.

Proposal

Completed all the requirements listed on the ideas page. the code for the cross-compilation task can be found here submitted through the pull request #178.

About you

Github: limsoonweiutm
School: University of Technology Malaysia
Country: Malaysia
Primary language: English, Chinese
Typical work hours: 7PM - 11PM Malaysia Standard Time UTC +8
Previous GSoC participation: This is my first time attending GSoC.
Reason for participation: I am very interested in the learning new things in using Linux OS and device tree is new to me which will be fun learning how to construct device tree and add to the board to supports the cape and clickboards. Therefore, I would like to be involved in updating the cape compatibility layer for BeaglePocket Cape, which are Tech Lape Cape and GamePup Cape. In addition, for the clickboards compatibility parts will be updated on BeaglePlay with Interface category such as PWM, CAN, I2C, etc.

About your project

Project name: Cape Compatibility layer for BeagleBone Black, AI, AI-64, PocketBeagle and BeaglePlay

Description

This project include enabling the overlay compatibility and support for the board BeagleBone Black, AI, AI-64 under kernel v5.10 and implement device tree overlays for PocketBeagle's capes which are Tech Lape Cape and GamePup Cape while for BeaglePlay, the clickboards compatibility parts will be updated with Interface category such as PWM, CAN, I2C, etc and other Categories such as Wireless Connectivity, Sensors, etc.

Enabling overlay compatibility:

BeagleBone boards utilize U-Boot as their Tertiary Program Loader (TPL) to load the Linux kernel, Flattened Device Tree (FDT), and Initial Ram File System (initramfs) into DRAM. U-Boot is responsible for managing boot time MUX_MODE for the GPIOs, symlinks for peripherals, and other hardware-specific configurations by loading particular FDT. By updating the FDT for the hardware we want to support, we can regulate the configuration(s). Boot-time device tree overlays can enable device compatibility, such as Cape compatibility, which can be found in most capes from the bb.org-overlays repository. Achieving cape compatibility will require creating device tree overlays and loading them at boot time. To load the necessary driver for the hardware at boot time, the uEnv.txt file must be edited. Required overlays can be exported at boot time, and the hardware will be compatible immediately upon board boot. Most capes utilize EEPROM to store CAPE-related hardware information, and individual pin configuration details can be extracted from the EEPROM, making it simpler to manage.

Previous Work

Deepak Khatri has developed a method to enable P8 and P9 connectors on the BeagleBone AI (am572x) with the same pin assignments as the BeagleBone Black (am335x). This involves three steps: creating a symlink in the device tree of the AI that corresponds to other BeagleBones, using this symlink in udev rules to create the symbolic link, and configuring the pinmux to adjust the behavior of peripherals depending on the application. A universal device tree overlay is utilized to select the appropriate peripheral from multiple choices in the pinmux, and the user can choose the desired peripheral for each Cape by changing the device tree overlay used.

Problems and Solutions

There are symbolic links that do not appear by default in the AI.
  • GPIO (for gpio-leds and gpio-keys)
  • PWM
  • SPI
  • CAN
Need device tree overlay for BeaglePocket Cape.
No demo code explaining how to use each Cape.

Prerequisite Knowledge

Device Tree and Device Tree Overlay
PRU
Absorption of differences between kernel versions

Timeline

Experience and approach

Contingency

Benefit

Suggestions