Add Raspberry Pi 500's RP2040 board support Fixes #2640
This PR adds board support for the Raspberry Pi 500's embedded RP2040 microcontroller, enabling custom firmware development while maintaining compatibility with the original keyboard functionality.
Changes:
Add raspberry_pi_pi500.h board definition Configure W25X10CL flash support Document complete GPIO pin mapping for 8×18 keyboard matrix Define system function pins (power control, LEDs, debug UART) Enable USB operation independent of main Pi power state
Hardware Specifications:
Chip: RP2040 (same as Pico) Flash: W25Q16JVUXIQ 2MB (DSPI mode) USB: Connected to Pi 500 USB hub Matrix: 8 rows × 18 columns keyboard matrix System GPIO: GP16 (UART), GP19 (power), GP20 (power key), GP25 (Caps LED)
Testing: ✅ Successful firmware compilation with ✅ USB device enumeration and communication ✅ System function compatibility (power, LEDs) ✅ Compatible with original keyboard firmware restoration
Use Cases: This enables Pi 500 users to develop custom USB applications like MIDI controllers, HID devices, and keyboard firmware modifications while preserving hardware compatibility. Note that unlike standard Pico boards, no GPIO pins are available for general use.
Files Changed: src/boards/include/boards/raspberry_pi_pi500_rp2040.h (new)
Usage: -DBOARD=raspberry_pi_pi500_rp2040
⚠️ CRITICAL WARNING: Custom firmware must implement power button handling (GP19 control) or the Pi 500 power button will stop working, potentially making the device unbootable. Always include power management code from the original QMK firmware.
As I attempted to hint at in the linked issue, the Raspberry Pi 500 keyboard uses RP2040, not RP2350.
Also, IMHO it would be better if this header file just declared everything explicitly, rather than doing
#include "boards/pico2.h"
And the filename should perhaps clarify that this is only the keyboard part of the Pi 500, not the entire thing :laughing:
As I attempted to hint at in the linked issue, the Raspberry Pi 500 keyboard uses RP2040, not RP2350.
Also, IMHO it would be better if this header file just declared everything explicitly, rather than doing
#include "boards/pico2.h"And the filename should perhaps clarify that this is only the keyboard part of the Pi 500, not the entire thing 😆
Sorry I didn't get the hint. You are correct, and updated the code accordingly.
@jhordies Do you have any interest in continuing to push this forwards?
Thanks! I'll take a look at this next week.
Thanks! I'll take a look at this next week.
Thanks, I tried to make a minimal version integrating your comments
If you wanted to keep "System GPIO: GP16 (UART)" in this header-file (i.e. PICO_DEFAULT_UART_TX_PIN and PICO_DEFAULT_UART) I wouldn't mind :wink:
Sorry for the delay and closing the PR by mistake. I tried to reflect your comments in the code.
Thanks for making all the requested tweaks @jhordies :+1: I'm now happy that this is technically correct, but it's up to @peterharperuk and @kilograham to decide if we'll actually be merging this.
Thanks @lurch
Raspberry is launching the 500+ Their press release seem to indicate they anticipate customer to want to use the micro controller for something else than originally intended. https://www.raspberrypi.com/news/the-ultimate-all-in-one-pc-raspberry-pi-500-plus-on-sale-now-at-200/ The most obvious physical difference between Raspberry Pi 500+ and 500 is the keyboard. Each key rests on a Gateron KS-33 Blue switch with a custom RAL 7001 Silver Grey stem, giving a satisfying sound and feel when pressed. Individually addressable RGB LEDs provide programmable backlighting, and with an RP2040 running QMK as the controller, a Doom port to the keyboard itself is surely just a matter of time.
Their press release seem to indicate they anticipate customer to want to use the micro controller for something else than originally intended.
That's joking about displaying Doom on the keyboard's RGB LEDs, just like the Flappy Bird game, and a reference to the fact that RP2040 is powerful enough to play Doom :wink: