Google Summer of Code | Adding I2C, PWM and Mailbox Support to the Raspberry Pi 4B BSP (#81)

Shaunak Datar (@skdatar) gitlab at rtems.org
Wed Jan 29 06:30:21 UTC 2025



Shaunak Datar created an issue: https://gitlab.rtems.org/rtems/programs/gsoc/-/issues/81



## Background
<!--
Please provide as much information as possible such as error messages or attaching logs
-->
The Raspberry Pi 4B BSP is currently missing support for I2C, PWM, DMA and Mailbox functionalities, which are need for achieving parity with the ARM-based BSP for the Raspberry Pi 3 and to complete work on the sdhci driver which is pending from last year. This project aims to get the Raspberry Pi 4b BSP to be at par with the ARM based Raspberry Pi 3 BSP and add support needed to implement the sdhci driver.

## Approach
1. **I2C Support**: The I2C interface is implemented for the ARM BSP but work on adding support for it in the aarch64 Raspberry Pi 4b BSP is not done yet. For this BSP testing the polling implementation and writing the interrupt driven I2C is pending. Refer the merge request with the polling implementation: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/363. You will have to write the RTEMS API to interface I2C devices on a Raspberry Pi 4b.

2. **PWM Support**: RTEMS supports PWM with other BSPs like the arm/beagle bsp. Implement the PWM functionality for the BSP refering to the beagle support https://gitlab.rtems.org/rtems/rtos/rtems/-/tree/main/bsps/arm/beagle/pwm?ref_type=heads. And reading the chapter 8 of the BCM2711 datasheet(https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf).

3. **DMA Support**: The completion of SDHCI driver requires BSP to support DMA, FDT, and mailbox. Last year the FDT support was merged. DMA support is pending. To implement DMA support, refer to Chapter 4 in the BCM2711 datasheet which describes the DMA controllers offered by BCM2711. The implementation needs to support 16 DMA channels (4 DMA Lite, 4 DMA4, and 8 standard channels), Control Block based operations, and Legacy Master addressing for peripherals. This work will enable efficient data transfers and complete the SDHCI driver implementation.

4. **Mailbox Support**: Last year's project on the Raspberry Pi 4b BSP mentioned that the sdhci driver is pending and it requires fdt, dma and mailbox support to complete. FDT has already been implemented and hence we will work on adding the mailbox support to the Raspberry Pi 4b BSP. Port the existing mailbox support for Raspberry Pi 3. Update register definitions and implement read and write functionality for the Raspberry Pi 4b BSP. You can refer to the chapter 13 in the BCM2711 datasheet.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/programs/gsoc/-/issues/81
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250129/313d1e21/attachment-0001.htm>


More information about the bugs mailing list