Skip to content

Conversation

jhordies
Copy link

@jhordies jhordies commented Sep 1, 2025

This PR adds board support for the Raspberry Pi 500's embedded RP2350 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 (DSPI mode vs standard QSPI)
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: RP2350A (same as Pico 2)
Flash: W25X10CL 1MB (DSPI mode)
USB: Connected to Pi 500 USB hub
Matrix: 8 rows × 18 columns keyboard matrix
System GPIO: GP16 (UART), GP17 (LED), GP19 (power), GP20 (power key), GP25 (Caps LED)
Available GPIO: None (all pins reserved)

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.h (new)

Usage:
-DBOARD=raspberry_pi_pi500

⚠️ 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.

- W25X10CL flash configuration for DSPI mode
- USB standalone operation support
- Complete GPIO pin documentation with keyboard matrix mapping
- Debug UART configuration on GP16
- Hardware-specific boot and power management settings

Tested with TinyUSB MIDI example - successful enumeration and operation.
@lurch
Copy link
Contributor

lurch commented Sep 2, 2025

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 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants