From d567e0ddc669f8c9e9dbe552395381503c81a43b Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Sun, 31 Aug 2025 22:36:14 +0200 Subject: [PATCH 1/7] Add Raspberry Pi 500 board support - 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. --- .../include/boards/raspberry_pi_pi500.h | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/boards/include/boards/raspberry_pi_pi500.h diff --git a/src/boards/include/boards/raspberry_pi_pi500.h b/src/boards/include/boards/raspberry_pi_pi500.h new file mode 100644 index 000000000..93bfe49ba --- /dev/null +++ b/src/boards/include/boards/raspberry_pi_pi500.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +#ifndef _BOARDS_RASPBERRY_PI_PI500_H +#define _BOARDS_RASPBERRY_PI_PI500_H + +#include "boards/pico2.h" + +// For board detection +#define RASPBERRY_PI_PI500 + +// --- FLASH CONFIGURATION --- +// Pi 500 uses W25X10CL flash in DSPI mode rather than QSPI +#undef PICO_BOOT_STAGE2_CHOOSE_W25Q080 +#define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1 + +// --- USB CONFIGURATION --- +// Crucial for Pi 500 keyboard function when Pi is off - ignores USB startup check +#define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE 0 +#define PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED 0 + +// --- BOOTLOADER CONFIGURATION --- +// Disable double tap reset timeout for Pi 500 +#define PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED 0 + +// --- KEYBOARD MATRIX CONFIGURATION --- +// Pi 500 keyboard matrix pins (for reference) +// Rows: GP0-GP7 (8 rows) +// Cols: GP27,GP8-GP15,GP18,GP20-GP24,GP26-GP29 (18 cols) +// Matrix scanning: ROW2COL, no diodes (ghost keys possible) + +// --- DEBUG UART --- +// Spare pin for debug UART TX +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 16 +#endif + +// --- PI 500 SPECIFIC PINS --- +// These pins are used by Pi 500 hardware and should be avoided in user applications +// GP0-GP7: Keyboard matrix rows +// GP8-GP15: Keyboard matrix columns (partial) +// GP16: Debug UART TX +// GP18,GP20-GP24: Keyboard matrix columns (partial) +// GP26-GP29: Keyboard matrix columns (partial) + +#endif \ No newline at end of file From 1d3de121a066bff4ec3ba886c9287464ac39aa21 Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Wed, 3 Sep 2025 16:29:12 +0200 Subject: [PATCH 2/7] Correct Pi 500 board support: RP2040 chip, proper naming - Rename to raspberry_pi_pi500_rp2040.h for clarity - Correct chip type from RP2350 to RP2040 - Remove pico2.h inheritance, use self-contained definitions - Add comprehensive GPIO pin mapping documentation - Include critical power management warning - Configure W25X10CL flash support for RP2040 --- .../include/boards/raspberry_pi_pi500.h | 54 -------- .../boards/raspberry_pi_pi500_rp2040.h | 127 ++++++++++++++++++ 2 files changed, 127 insertions(+), 54 deletions(-) delete mode 100644 src/boards/include/boards/raspberry_pi_pi500.h create mode 100644 src/boards/include/boards/raspberry_pi_pi500_rp2040.h diff --git a/src/boards/include/boards/raspberry_pi_pi500.h b/src/boards/include/boards/raspberry_pi_pi500.h deleted file mode 100644 index 93bfe49ba..000000000 --- a/src/boards/include/boards/raspberry_pi_pi500.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2024 Raspberry Pi (Trading) Ltd. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -// ----------------------------------------------------- -// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO -// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES -// ----------------------------------------------------- - -#ifndef _BOARDS_RASPBERRY_PI_PI500_H -#define _BOARDS_RASPBERRY_PI_PI500_H - -#include "boards/pico2.h" - -// For board detection -#define RASPBERRY_PI_PI500 - -// --- FLASH CONFIGURATION --- -// Pi 500 uses W25X10CL flash in DSPI mode rather than QSPI -#undef PICO_BOOT_STAGE2_CHOOSE_W25Q080 -#define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1 - -// --- USB CONFIGURATION --- -// Crucial for Pi 500 keyboard function when Pi is off - ignores USB startup check -#define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE 0 -#define PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED 0 - -// --- BOOTLOADER CONFIGURATION --- -// Disable double tap reset timeout for Pi 500 -#define PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED 0 - -// --- KEYBOARD MATRIX CONFIGURATION --- -// Pi 500 keyboard matrix pins (for reference) -// Rows: GP0-GP7 (8 rows) -// Cols: GP27,GP8-GP15,GP18,GP20-GP24,GP26-GP29 (18 cols) -// Matrix scanning: ROW2COL, no diodes (ghost keys possible) - -// --- DEBUG UART --- -// Spare pin for debug UART TX -#ifndef PICO_DEFAULT_UART_TX_PIN -#define PICO_DEFAULT_UART_TX_PIN 16 -#endif - -// --- PI 500 SPECIFIC PINS --- -// These pins are used by Pi 500 hardware and should be avoided in user applications -// GP0-GP7: Keyboard matrix rows -// GP8-GP15: Keyboard matrix columns (partial) -// GP16: Debug UART TX -// GP18,GP20-GP24: Keyboard matrix columns (partial) -// GP26-GP29: Keyboard matrix columns (partial) - -#endif \ No newline at end of file diff --git a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h new file mode 100644 index 000000000..c5a6cd4fe --- /dev/null +++ b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2024 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +#ifndef _BOARDS_RASPBERRY_PI_PI500_RP2040_H +#define _BOARDS_RASPBERRY_PI_PI500_RP2040_H + +pico_board_cmake_set(PICO_PLATFORM, rp2040) + +// For board detection +#define RASPBERRY_PI_PI500_RP2040 + +// --- UART --- +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 0 +#endif +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 16 // Pi 500 debug UART on GP16 +#endif +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 1 // Standard RX pin +#endif + +// --- LED --- +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 17 // Pi 500 LED on GP17 +#endif + +// --- I2C --- +#ifndef PICO_DEFAULT_I2C +#define PICO_DEFAULT_I2C 0 +#endif +#ifndef PICO_DEFAULT_I2C_SDA_PIN +#define PICO_DEFAULT_I2C_SDA_PIN 4 +#endif +#ifndef PICO_DEFAULT_I2C_SCL_PIN +#define PICO_DEFAULT_I2C_SCL_PIN 5 +#endif + +// --- SPI --- +#ifndef PICO_DEFAULT_SPI +#define PICO_DEFAULT_SPI 0 +#endif +#ifndef PICO_DEFAULT_SPI_SCK_PIN +#define PICO_DEFAULT_SPI_SCK_PIN 18 +#endif +#ifndef PICO_DEFAULT_SPI_TX_PIN +#define PICO_DEFAULT_SPI_TX_PIN 19 +#endif +#ifndef PICO_DEFAULT_SPI_RX_PIN +#define PICO_DEFAULT_SPI_RX_PIN 16 +#endif +#ifndef PICO_DEFAULT_SPI_CSN_PIN +#define PICO_DEFAULT_SPI_CSN_PIN 17 +#endif + +// --- FLASH --- +// Pi 500 uses W25X10CL flash (differs from standard Pico W25Q080) +#define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1 + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 2 +#endif + +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (1 * 1024 * 1024)) // 1MB W25X10CL +#ifndef PICO_FLASH_SIZE_BYTES +#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) +#endif + +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) +#define PICO_SMPS_MODE_PIN 23 + +#ifndef PICO_RP2040_B0_SUPPORTED +#define PICO_RP2040_B0_SUPPORTED 1 +#endif + +// The GPIO Pin used to read VBUS to determine if the device is battery powered. +#ifndef PICO_VBUS_PIN +#define PICO_VBUS_PIN 24 +#endif + +// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC. +#ifndef PICO_VSYS_PIN +#define PICO_VSYS_PIN 29 +#endif + +// --- USB CONFIGURATION --- +// Crucial for Pi 500 keyboard function when Pi is off - ignores USB startup check +#define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE 0 +#define PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED 0 + +// --- BOOTLOADER CONFIGURATION --- +// Disable double tap reset timeout for Pi 500 +#define PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED 0 + +// --- PI 500 KEYBOARD MATRIX CONFIGURATION --- +// Complete GPIO pin mapping for 8×18 keyboard matrix +// Rows (8): GP0, GP1, GP2, GP3, GP4, GP5, GP6, GP7 +// Cols (18): GP27, GP8, GP9, GP10, GP11, GP12, GP13, GP14, GP23, GP24, GP22, GP20, GP29, GP18, GP15, GP21, GP28, GP26 +// Matrix scanning: ROW2COL, no diodes (ghost keys possible with 3+ key combinations) + +// --- PI 500 SYSTEM PINS --- +// These pins are reserved for Pi 500 hardware functions: +// GP0-GP7: Keyboard matrix rows +// GP8-GP15: Keyboard matrix columns (partial) +// GP16: Debug UART TX +// GP17: LED (heartbeat/debug) +// GP18: Keyboard matrix column +// GP19: Power button control (PWR_BTN) - CRITICAL for Pi power management +// GP20: Power key detection column (separate from matrix) +// GP21-GP24: Keyboard matrix columns +// GP25: Caps Lock LED +// GP26-GP29: Keyboard matrix columns + +// --- POWER MANAGEMENT WARNING --- +// Custom firmware MUST implement power button handling via GP19 or the Pi 500 +// power button will stop working, potentially making the device unbootable. +// See QMK pi500.c for reference implementation. + +#endif \ No newline at end of file From 8c2dcc0e6207a32c1d39ff62b86365d906b83731 Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Wed, 3 Sep 2025 17:41:49 +0200 Subject: [PATCH 3/7] PICO_RP2040_B0_SUPPORTED can be changed to 0, since all Pi 500s are using RP2040 B2. --- src/boards/include/boards/pico.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boards/include/boards/pico.h b/src/boards/include/boards/pico.h index 6eb8600b6..bdfd0473d 100644 --- a/src/boards/include/boards/pico.h +++ b/src/boards/include/boards/pico.h @@ -80,7 +80,7 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #define PICO_SMPS_MODE_PIN 23 #ifndef PICO_RP2040_B0_SUPPORTED -#define PICO_RP2040_B0_SUPPORTED 1 +#define PICO_RP2040_B0_SUPPORTED 0 #endif // The GPIO Pin used to read VBUS to determine if the device is battery powered. From aed2dfd16551ebe69963d2a61bd8e4e890539217 Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Fri, 12 Sep 2025 14:25:11 +0200 Subject: [PATCH 4/7] Update Raspberry Pi 500 board support for minimal original intent. - Fix mistake done in pico.h PICO_RP2040_B0_SUPPORTED 0 => 1 - Disable B0 support in pi500_rp2040 - Fix flash size 1M-Bit not 1Mb - Add Matrix pin definition --- src/boards/include/boards/pico.h | 2 +- .../boards/raspberry_pi_pi500_rp2040.h | 146 ++++++------------ 2 files changed, 51 insertions(+), 97 deletions(-) diff --git a/src/boards/include/boards/pico.h b/src/boards/include/boards/pico.h index bdfd0473d..6eb8600b6 100644 --- a/src/boards/include/boards/pico.h +++ b/src/boards/include/boards/pico.h @@ -80,7 +80,7 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #define PICO_SMPS_MODE_PIN 23 #ifndef PICO_RP2040_B0_SUPPORTED -#define PICO_RP2040_B0_SUPPORTED 0 +#define PICO_RP2040_B0_SUPPORTED 1 #endif // The GPIO Pin used to read VBUS to determine if the device is battery powered. diff --git a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h index c5a6cd4fe..d9fd2fac0 100644 --- a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h +++ b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h @@ -4,11 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -// ----------------------------------------------------- -// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO -// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES -// ----------------------------------------------------- - #ifndef _BOARDS_RASPBERRY_PI_PI500_RP2040_H #define _BOARDS_RASPBERRY_PI_PI500_RP2040_H @@ -17,50 +12,6 @@ pico_board_cmake_set(PICO_PLATFORM, rp2040) // For board detection #define RASPBERRY_PI_PI500_RP2040 -// --- UART --- -#ifndef PICO_DEFAULT_UART -#define PICO_DEFAULT_UART 0 -#endif -#ifndef PICO_DEFAULT_UART_TX_PIN -#define PICO_DEFAULT_UART_TX_PIN 16 // Pi 500 debug UART on GP16 -#endif -#ifndef PICO_DEFAULT_UART_RX_PIN -#define PICO_DEFAULT_UART_RX_PIN 1 // Standard RX pin -#endif - -// --- LED --- -#ifndef PICO_DEFAULT_LED_PIN -#define PICO_DEFAULT_LED_PIN 17 // Pi 500 LED on GP17 -#endif - -// --- I2C --- -#ifndef PICO_DEFAULT_I2C -#define PICO_DEFAULT_I2C 0 -#endif -#ifndef PICO_DEFAULT_I2C_SDA_PIN -#define PICO_DEFAULT_I2C_SDA_PIN 4 -#endif -#ifndef PICO_DEFAULT_I2C_SCL_PIN -#define PICO_DEFAULT_I2C_SCL_PIN 5 -#endif - -// --- SPI --- -#ifndef PICO_DEFAULT_SPI -#define PICO_DEFAULT_SPI 0 -#endif -#ifndef PICO_DEFAULT_SPI_SCK_PIN -#define PICO_DEFAULT_SPI_SCK_PIN 18 -#endif -#ifndef PICO_DEFAULT_SPI_TX_PIN -#define PICO_DEFAULT_SPI_TX_PIN 19 -#endif -#ifndef PICO_DEFAULT_SPI_RX_PIN -#define PICO_DEFAULT_SPI_RX_PIN 16 -#endif -#ifndef PICO_DEFAULT_SPI_CSN_PIN -#define PICO_DEFAULT_SPI_CSN_PIN 17 -#endif - // --- FLASH --- // Pi 500 uses W25X10CL flash (differs from standard Pico W25Q080) #define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1 @@ -69,59 +20,62 @@ pico_board_cmake_set(PICO_PLATFORM, rp2040) #define PICO_FLASH_SPI_CLKDIV 2 #endif -pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (1 * 1024 * 1024)) // 1MB W25X10CL +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (128 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES -#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) +#define PICO_FLASH_SIZE_BYTES (128 * 1024) #endif -// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) -#define PICO_SMPS_MODE_PIN 23 - -#ifndef PICO_RP2040_B0_SUPPORTED -#define PICO_RP2040_B0_SUPPORTED 1 -#endif -// The GPIO Pin used to read VBUS to determine if the device is battery powered. -#ifndef PICO_VBUS_PIN -#define PICO_VBUS_PIN 24 -#endif -// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC. -#ifndef PICO_VSYS_PIN -#define PICO_VSYS_PIN 29 +#ifndef PICO_RP2040_B0_SUPPORTED +#define PICO_RP2040_B0_SUPPORTED 0 #endif -// --- USB CONFIGURATION --- -// Crucial for Pi 500 keyboard function when Pi is off - ignores USB startup check -#define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE 0 -#define PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED 0 - -// --- BOOTLOADER CONFIGURATION --- -// Disable double tap reset timeout for Pi 500 -#define PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED 0 - -// --- PI 500 KEYBOARD MATRIX CONFIGURATION --- -// Complete GPIO pin mapping for 8×18 keyboard matrix -// Rows (8): GP0, GP1, GP2, GP3, GP4, GP5, GP6, GP7 -// Cols (18): GP27, GP8, GP9, GP10, GP11, GP12, GP13, GP14, GP23, GP24, GP22, GP20, GP29, GP18, GP15, GP21, GP28, GP26 -// Matrix scanning: ROW2COL, no diodes (ghost keys possible with 3+ key combinations) - -// --- PI 500 SYSTEM PINS --- -// These pins are reserved for Pi 500 hardware functions: -// GP0-GP7: Keyboard matrix rows -// GP8-GP15: Keyboard matrix columns (partial) -// GP16: Debug UART TX -// GP17: LED (heartbeat/debug) -// GP18: Keyboard matrix column -// GP19: Power button control (PWR_BTN) - CRITICAL for Pi power management -// GP20: Power key detection column (separate from matrix) -// GP21-GP24: Keyboard matrix columns -// GP25: Caps Lock LED -// GP26-GP29: Keyboard matrix columns - -// --- POWER MANAGEMENT WARNING --- -// Custom firmware MUST implement power button handling via GP19 or the Pi 500 -// power button will stop working, potentially making the device unbootable. -// See QMK pi500.c for reference implementation. +// --- PI 500 KEYBOARD LEDS --- +// LEDs directly connected to RP2040 (not via FFC) +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 17 // Power/Status LED +#endif + +// Keyboard indicator LEDs +#define PI500_RP2040_CAPS_LOCK_LED_PIN 25 + +// --- PI 500 POWER MANAGEMENT --- +// Power button control (critical for Pi 500 power management) +#define PI500_RP2040_POWER_BUTTON_PIN 19 +// Power key detection (shared with matrix pins but scanned separately) +#define PI500_RP2040_POWER_KEY_COL_PIN 20 // Also matrix col 11 +#define PI500_RP2040_POWER_KEY_ROW_PIN 6 // Also matrix row 6 + +// --- KEYBOARD MATRIX PINS --- +// Matrix row pins (8 pins) +#define PI500_RP2040_MATRIX_ROW_0_PIN 0 +#define PI500_RP2040_MATRIX_ROW_1_PIN 1 +#define PI500_RP2040_MATRIX_ROW_2_PIN 2 +#define PI500_RP2040_MATRIX_ROW_3_PIN 3 +#define PI500_RP2040_MATRIX_ROW_4_PIN 4 +#define PI500_RP2040_MATRIX_ROW_5_PIN 5 +#define PI500_RP2040_MATRIX_ROW_6_PIN 6 +#define PI500_RP2040_MATRIX_ROW_7_PIN 7 + +// Matrix column pins (18 pins) +#define PI500_RP2040_MATRIX_COL_0_PIN 27 +#define PI500_RP2040_MATRIX_COL_1_PIN 8 +#define PI500_RP2040_MATRIX_COL_2_PIN 9 +#define PI500_RP2040_MATRIX_COL_3_PIN 10 +#define PI500_RP2040_MATRIX_COL_4_PIN 11 +#define PI500_RP2040_MATRIX_COL_5_PIN 12 +#define PI500_RP2040_MATRIX_COL_6_PIN 13 +#define PI500_RP2040_MATRIX_COL_7_PIN 14 +#define PI500_RP2040_MATRIX_COL_8_PIN 23 +#define PI500_RP2040_MATRIX_COL_9_PIN 24 +#define PI500_RP2040_MATRIX_COL_10_PIN 22 +#define PI500_RP2040_MATRIX_COL_11_PIN 20 +#define PI500_RP2040_MATRIX_COL_12_PIN 29 +#define PI500_RP2040_MATRIX_COL_13_PIN 18 +#define PI500_RP2040_MATRIX_COL_14_PIN 15 +#define PI500_RP2040_MATRIX_COL_15_PIN 21 +#define PI500_RP2040_MATRIX_COL_16_PIN 28 +#define PI500_RP2040_MATRIX_COL_17_PIN 26 #endif \ No newline at end of file From 2d2164bf4eda418bde9b6fcd81580a540ffcfcda Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Sat, 20 Sep 2025 15:47:59 +0200 Subject: [PATCH 5/7] Fix flash size. Add warning on GP19 Remove GP17 --- .../include/boards/raspberry_pi_pi500_rp2040.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h index d9fd2fac0..cb382a86f 100644 --- a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h +++ b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h @@ -13,40 +13,34 @@ pico_board_cmake_set(PICO_PLATFORM, rp2040) #define RASPBERRY_PI_PI500_RP2040 // --- FLASH --- -// Pi 500 uses W25X10CL flash (differs from standard Pico W25Q080) +// Pi 500 uses the same flash as the original Pi Pico (W25Q16JVUXIQ) but only DSPI pins are connected #define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1 #ifndef PICO_FLASH_SPI_CLKDIV #define PICO_FLASH_SPI_CLKDIV 2 #endif -pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (128 * 1024)) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES -#define PICO_FLASH_SIZE_BYTES (128 * 1024) +#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif - #ifndef PICO_RP2040_B0_SUPPORTED #define PICO_RP2040_B0_SUPPORTED 0 #endif -// --- PI 500 KEYBOARD LEDS --- -// LEDs directly connected to RP2040 (not via FFC) -#ifndef PICO_DEFAULT_LED_PIN -#define PICO_DEFAULT_LED_PIN 17 // Power/Status LED -#endif - // Keyboard indicator LEDs #define PI500_RP2040_CAPS_LOCK_LED_PIN 25 // --- PI 500 POWER MANAGEMENT --- // Power button control (critical for Pi 500 power management) -#define PI500_RP2040_POWER_BUTTON_PIN 19 +#define PI500_RP2040_POWER_BUTTON_PIN 19 //DO NOT SCAN OR YOU WON'T BE ABLE TO TURN THE PI500 ON! // Power key detection (shared with matrix pins but scanned separately) #define PI500_RP2040_POWER_KEY_COL_PIN 20 // Also matrix col 11 #define PI500_RP2040_POWER_KEY_ROW_PIN 6 // Also matrix row 6 + // --- KEYBOARD MATRIX PINS --- // Matrix row pins (8 pins) #define PI500_RP2040_MATRIX_ROW_0_PIN 0 @@ -60,7 +54,7 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (128 * 1024)) // Matrix column pins (18 pins) #define PI500_RP2040_MATRIX_COL_0_PIN 27 -#define PI500_RP2040_MATRIX_COL_1_PIN 8 +#define PI500_RP2040_MATRIX_COL_1_PIN 8 #define PI500_RP2040_MATRIX_COL_2_PIN 9 #define PI500_RP2040_MATRIX_COL_3_PIN 10 #define PI500_RP2040_MATRIX_COL_4_PIN 11 From fe8763c4d9c84df78b0f561aea5320ef79e4b916 Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Sat, 20 Sep 2025 16:02:52 +0200 Subject: [PATCH 6/7] Adding UART TX GP16 --- src/boards/include/boards/raspberry_pi_pi500_rp2040.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h index cb382a86f..a4e0b2af1 100644 --- a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h +++ b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h @@ -40,6 +40,13 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #define PI500_RP2040_POWER_KEY_COL_PIN 20 // Also matrix col 11 #define PI500_RP2040_POWER_KEY_ROW_PIN 6 // Also matrix row 6 +// --- UART --- +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 0 +#endif +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 16 +#endif // --- KEYBOARD MATRIX PINS --- // Matrix row pins (8 pins) From 11e0ee66cc4795bd8293e4b5da2d6c58590ed333 Mon Sep 17 00:00:00 2001 From: Jerome Hordies Date: Mon, 22 Sep 2025 15:55:19 +0200 Subject: [PATCH 7/7] Add Caps led as default led --- src/boards/include/boards/raspberry_pi_pi500_rp2040.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h index a4e0b2af1..62af66fed 100644 --- a/src/boards/include/boards/raspberry_pi_pi500_rp2040.h +++ b/src/boards/include/boards/raspberry_pi_pi500_rp2040.h @@ -30,8 +30,11 @@ pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #define PICO_RP2040_B0_SUPPORTED 0 #endif -// Keyboard indicator LEDs +// Keyboard CAPS Lock indicator LED as default #define PI500_RP2040_CAPS_LOCK_LED_PIN 25 +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN PI500_RP2040_CAPS_LOCK_LED_PIN +#endif // --- PI 500 POWER MANAGEMENT --- // Power button control (critical for Pi 500 power management)