diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h index 6a2d063d79..f82f6b6a74 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h @@ -12,3 +12,6 @@ // #define DEFAULT_UART_BUS_RX (&pin_PA11) // #define DEFAULT_UART_BUS_TX (&pin_PA10) + +// Flash chip is GD25Q32 connected over QSPI +#define TOTAL_FLASH_SIZE 4 * 1024 * 1024 diff --git a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h index 26abe8a835..85398d5e96 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h @@ -12,3 +12,6 @@ // #define DEFAULT_UART_BUS_RX (&pin_PA11) // #define DEFAULT_UART_BUS_TX (&pin_PA10) + +// Flash chip is GD25Q32 connected over QSPI +#define TOTAL_FLASH_SIZE 4 * 1024 * 1024 diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h index 4b0a220287..316692dd91 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h +++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h @@ -13,3 +13,6 @@ // #define DEFAULT_UART_BUS_RX (&pin_PA11) // #define DEFAULT_UART_BUS_TX (&pin_PA10) + +// Flash chip is W25Q16JVUXIQ connected over QSPI +#define TOTAL_FLASH_SIZE 2 * 1024 * 1024 diff --git a/ports/raspberrypi/supervisor/internal_flash.c b/ports/raspberrypi/supervisor/internal_flash.c index d333830de9..95c1fdd75e 100644 --- a/ports/raspberrypi/supervisor/internal_flash.c +++ b/ports/raspberrypi/supervisor/internal_flash.c @@ -46,9 +46,6 @@ #define RESERVED_FLASH 1 * 1024 * 1024 -// TODO: Parameterize flash size based on the configured flash. -#define TOTAL_FLASH_SIZE 2 * 1024 * 1024 - // TODO: Split the caching out of supervisor/shared/external_flash so we can use it. #define SECTOR_SIZE 4096 #define NO_CACHE 0xffffffff