GSoC'21 Raspberry Pi BSP project

Alan Cudmore alan.cudmore at gmail.com
Tue Apr 6 01:42:21 UTC 2021


Hi,
I can try to give you some background, hopefully others will correct
me if I don't get everything right.

You are correct that the BSP just covers the original Pi1 and Pi Zero
(not Pi Zero W) models + the Pi 2. I don't think the I2C and GPIO
interfaces were ported to the Pi2. At some point, I think SMP was
working on the Pi2, but it did not work the last time I tried it.

In addition, the Pi 2 that I have is a BCM2386 (Quad A7) but the
current ones (if you can find one) have a BCM2387 (Quad A53, similar
to the Pi 3). Is the BCM2386 the same as the BCM2387? I did not think
they were.

I looked over the ticket, and much of the 2017 items still apply.. but
maybe this would be the place for the community to help prioritize
what should be done. Here are my thoughts:

1. What Pi Models should we support?

The Pi Zero continues to be a good choice, because it works, the base
model is still available, and is only $5 USD. The Pi Zero W (Bluetooth
and Wifi model) could be supported, but it requires a different
console UART, since the one used by the existing RTEMS BSP is used for
the Bluetooth module. (same applies to the Pi3). The original Pi B/B+,
A+, etc models with the single core BCM2835 should continue to work as
long as the Pi Zero does.

Pi 2: It probably would not take too much to revive this BSP and get
SMP working. But we have the problem of two different SoCs. If you buy
a new Pi 2, it will have a lower clocked BCM2837 like the Pi3 (but
without the extra Bluetooth/Wifi module). It may be hard to locate one
with the older BCM2836 Quad A7. We would have to be careful to specify
what revision of the Pi 2. I would deprecate it in favor of adding Pi
3 support.

Pi 3: This would be a nice model to support. It may not take too much
to get the generic 32 bit ARM build working on it ( like we originally
did with the Pi 2), but like the Pi Zero W, we would have to
reconfigure the RTEMS console to use the secondary UART. AArch64 SMP
support on the Pi 3 would be great in my opinion.

Pi 4: I have not even thought of this one yet. It's a different SoC
(BCM2711, Quad A72). It is the current model, and it looks like the
RPI foundation is targeting industrial use with the Compute Modules.

All models will be in production until at least 2026, the Pi 4 compute
modules until at least 2028.

My vote: keep Pi 0/1 support, add Pi Zero W support by fixing the
console UART. Drop the Pi 2 support, and put the effort into making
the Pi 3 work instead. Pi 2 users, please let me know if I'm wrong
here!

2. What peripherals should we support?
The basics are always a good place to start. Make sure we have
consistent SPI, I2C, GPIO, and support for both UARTs (important for
the Pi Zero W and PI3)
For the SD card, Ethernet, Wifi and Bluetooth, we should probably
follow the Beaglebone and Zynq path by using Libbsd.
The BeagleBone Black has become the more useful low cost RTEMS board
to me because of it's libbsd support for ethernet, USB, and the SD
card.

3. Are graphics important to users? For me, it's not that important, I
would rather have good SPI, I2C, and network support.

I have a couple of use cases that would be covered by this work:
- Pi Zero - this is one of the lowest cost boards available that can
run RTEMS ($5 USD). Although it does not have networking, with good
I2C, GPIO, and SPI support it can support a lot of applications.
- Pi 3 - A low cost SMP system with libbsd networking support would be
a replacement for the BeagleBone Black for my cFS development.

Here is what I think would make a good plan for the Raspberry Pi BSPs:
- Make sure the BSP works on the Pi Zero, fixing SPI, I2C, and GPIO if
necessary.
- Fix the RTEMS console/uart driver for the Pi Zero W, so the same BSP
will work on the Zero with proper configuration
- Deprecate the RPI 2 BSP (unless the community has a case to keep it,
I only have one of these, and it has not been used in years)
- Add RPI 3 32 bit support (needs same console fix as the RPI Zero 0
and most likely different interrupt and I2C, SPI, GPI support)
Bonus work
- Libbsd support for RPI 3, especially the ethernet
- Aarch64 support for RPI 3
Longer term work
RPI 4 and RPI 4 compute module support.

Sorry for the long post, and I hope this helps!
Alan






On Mon, Apr 5, 2021 at 4:00 PM Pranav Dangi <dangipranav at gmail.com> wrote:
>
> I've been going through the RTEMS raspberry pi repository, And i'm having trouble understanding a couple of things there. the Pi1 (and Pi Zero) had the BCM2835 SoC while the pi2 had the BCM2836 SoC, now, in the bsp directory where the raspberry pi header is defined, the header file has register definitions for both BCM2835 (for GPIO, I2C, etc.) and BCM2836 (for the 4 cores).
> However, the corresponding i2c.c or gpio.c files for the bsp only have code for the BCM2835_REG registers and not their BCM2836 i.e. the raspberry pi2 counterparts.
> So, is the support for pi2 same as that of pi1 (selecting the particular bsp doesn't make sense then) or am I missing something?
> Since the Pi3 has the BCM2837 (the architecture of which is identical to BC2836 since both are based on the BCM2709), any information about the above would be helpful for me if I'm adding support for the Pi3 or 4 as my GSoC project.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list