-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Raspberry Pi 500's RP2040 board support Fixes #2640 #2641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jhordies
wants to merge
7
commits into
raspberrypi:develop
Choose a base branch
from
jhordies:add-pi500-board-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d567e0d
Add Raspberry Pi 500 board support
jhordiesluminus 1d3de12
Correct Pi 500 board support: RP2040 chip, proper naming
jhordiesluminus 8c2dcc0
PICO_RP2040_B0_SUPPORTED can be changed to 0, since all Pi 500s are u…
jhordiesluminus aed2dfd
Update Raspberry Pi 500 board support for minimal original intent.
jhordiesluminus 2d2164b
Fix flash size.
jhordiesluminus fe8763c
Adding UART TX GP16
jhordiesluminus 11e0ee6
Add Caps led as default led
jhordiesluminus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright (c) 2024 Raspberry Pi (Trading) Ltd. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#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 | ||
|
||
// --- FLASH --- | ||
// 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, (2 * 1024 * 1024)) | ||
#ifndef PICO_FLASH_SIZE_BYTES | ||
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) | ||
#endif | ||
|
||
|
||
#ifndef PICO_RP2040_B0_SUPPORTED | ||
#define PICO_RP2040_B0_SUPPORTED 0 | ||
#endif | ||
|
||
// 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) | ||
#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 | ||
|
||
// --- 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) | ||
#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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.