Beagleboard/GSoC/Cape compatibility layer for BeagleBone Black and BeagleBone AI.

=Cape compatibility layer for BeagleBone Black and BeagleBone AI.= Student: PADMALAYA RAWAL Mentors: DEEPAK KHATRI Wiki: http://elinux.org/BeagleBoard/GSoC/ProposalTemplate

=Status= This project is currently just a proposal.

=Proposal= Please complete the requirements listed on the ideas page and fill out this template.

About you
Github: ELECTROBOFFIN School: Maharishi Markandeshwar (Deemed to be) University, Mulana, Ambala Country: India Primary language: English & Hindi Typical work hours: 9AM-5PM ITC Previous GSoC participation: None

About your project
Project name: Cape compatibility layer for BeagleBone Black and BeagleBone AI

Description
Enabling overlay compatibility U-boot(or Universal bootloader, an open source, primary bootloader used in embedded devices to boot the device’s operating system kernel is used by various computer architectures ARM, X86, RISC-V, etc. Beaglebone boards also use U-boot as their Tertiary Program Loader (TPL). The control of peripherals, symlinks, GPIOs boot time and other hardware specific device configurations is done by U-boot. Configurations can be controlled by updating the Flattened Device Tree( or FDT, a data structure that describes a machine hardware configuration such as base addresses, size of RAM, busses, pin multiplexing, etc. and it is derived from open firmware) for the hardware we wanted to support. Cape compatibility can be enabled using the boot time device tree overlays.Device tree overlay repo provides the overlays for most of the capes. The development of device tree overlay and loading it at the time of boot is the major task. Almost each and every cape has the EEPROM on them which is used to store the information related to the hardware of the cape and we can get the details of the pin configurations from the EEPROM.

As the device tree overlays of all the capes is available at device tree overlay repo so the code for the device tree overlays will be added to the same to make the cape compatible. Device tree overlays are the crucial part of the whole project; the same references will be used in the drivers for peripherals assigned to the same pin between both the boards BBB and BBAI.

Why is the Device Tree necessary?

With the influx of ARM systems in the past few years, there were a lot of confusions and conflicts in the linux kernel surrounding the ARM components, prompting linux Torvalds to push back. That push back eventually led to any new ARM boards essentially needing to use the FDT instead of the ARM file. Below is the device tree overlay for the UART1 device. It tells the kernel everything it needs to know in order to properly enable UART1 on pin P9_24 and P9_26.

In this node, we assign the value of "bone/uart/1" to the symlink property which we can call from userspace. Device tree creates an index of all the symlinks we define, In the device tree directory like for the SPI device for which we already have symlinks assigned in the current device tree.

Timeline
Provide a development timeline with a milestone each of the 11 weeks and any pre-work.

Experience and approach
I have a good understanding of C, C++, and python. I have more than 2 years of hands on experience with 3d printers and its softwares( octoprint, Cura, prusaslicr, etc.) & hardware. I have done multiple internships viz., 1. Research and Development Intern at Smartcircuits innovation Pvt. Ltd. 2. PCB designer intern at Smartcircuits innovation Pvt. Ltd. 3. Jr. Embedded engineer at Zeropoint robotics Pvt. Ltd. 4. Hardware design engineer at Upsidedown labs.

Webinars and Seminars: 1. I was the guest speaker at the Webinar conducted by Upsidedown labs 2. I organized a webinar for Zeropoint robotics. 3. I have also organized a Seminar and workshop on the occasion of ARDUINO WEEK 2022 to motivate the student to work in hardware domain. I also the participated and won prizes in various Events: 1. Won 1st in a national Hackathon in which I created a medical related tool.(MORE INFO)

Contingency
I believe that if I get stuck on my project and my mentor isn’t around, I will use the resources that are available to me. Some of those information portals are listed below. 1. Derek Molly's beagle bone guide provides all the information needed for getting up and running with my beagle. 2. Content on e-ALE.org is very useful for information that ranges from tutorials and walkthroughs to the level of very advanced stuff. 3. BeagleBone cookbook from Mark A. Yoder & Jason Kridner is the best source for test projects during the prototyping period. 4. The technical reference manuals provided by TI on am3358 and am5729 are the best source for getting the insights on the SoC used in Black and Ai. 5. Bad to the Bone Crafting Electronics Systems with Beaglebone and BeagleBone Black by Steven Barrett, Jason Kridner

Benefit
If successfully completed, the BeagleBoard.org community will be able to enjoy the compatibility of cape with both BBB and BBAI.Replicape support will also be added to the cape compatibilty layer. Last but not least the timelapse feature directly from the BBB and BBAI board.

Misc
Please complete the requirements listed on the ideas page. Provide link to pull request.

Suggestions
Is there anything else we should have asked you?