nuttx/Documentation/platforms/arm
Marco Casaroli 8770fbea0f rp23xx: Add external QSPI PSRAM (APS6404) support for the Pimoroni Pico Plus 2.
Adds a driver for the external QSPI PSRAM hanging off QMI chip select 1,
such as the 8 MiB APS6404 fitted on the Pimoroni Pico Plus 2.

rp23xx_psramconfig() assigns the CS1 pin, reads the device ID over the QMI
direct interface to confirm an APS6404-family part (KGD 0x5D), resets it
into quad mode and programs the QMI M1 timing/read/write formats so the
region at 0x11000000 becomes directly addressable and writable.  Because
driving the QMI in direct mode stalls execute-in-place from the flash, the
detection and (re)configuration code runs from RAM (.time_critical) with
interrupts disabled; the command bytes are selected with immediates rather
than a .rodata table for the same reason.  The register values follow the
Raspberry Pi Pico SDK setup_psram().

The detection routine only keeps the QMI DIRECT_CSR synchronization that is
strictly necessary.  Each candidate busy-wait was removed one at a time and
re-verified on hardware: the post-enable "cooldown" waits, the READ_ID
TXEMPTY wait (redundant with the BUSY wait after it), and a fixed nop delay
proved unnecessary and are omitted.  The three BUSY waits that remain -- after
the quad-mode nudge, after each READ_ID byte, and after each reset/quad-enable
command -- are required and carry a comment explaining that the frame must
finish shifting before the chip select is deasserted, and what breaks
otherwise (garbage ID reads, or the shared QMI bus wedging).

rp23xx_psram_restore() re-applies the M1 configuration and is meant to be
called from the flash write path, which goes through the bootrom and
reconfigures the shared QMI for chip select 0.

rp23xx_heaps.c is wired into the build and now uses the detected size, so
the PSRAM is exposed to the memory manager (added to the main heap, used as
a separate heap, or as the user heap) and is skipped cleanly when no PSRAM
is present.

Enabled by default on the pimoroni-pico-2-plus:nsh configuration, where it
adds the 8 MiB to the main heap.  A documentation page for the Pimoroni Pico
Plus 2 is added alongside the other rp23xx boards, covering its serial
console, LED, the external PSRAM and how it is exposed to the heap, the
supported capabilities and the available configurations, with a photo of the
board.

Tested on Pimoroni Pico Plus 2 hardware: detection reports the 8 MiB
APS6404, the region is read/write across its whole range (ramtest word,
half-word and byte passes, marching/pattern/address-in-address), and the
heap reports the extra 8 MiB.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-07-25 13:49:05 -03:00
..
a1x
am67 docs/boards: Add documentation for t3-gem-o1 board. 2026-05-28 14:16:03 +02:00
am335x Documentation/beaglebone-black: Remove readme txt file. 2025-05-21 10:02:45 +02:00
at32
bcm2708
c5471
cxd56xx Documentation/spresense: rewrite board page with images and configs 2026-07-02 09:02:54 -03:00
dm320
efm32
eoss3
fvp-v8r-aarch32
gd32f4
goldfish docs: Fix duplicate toctree references causing build warnings 2026-06-03 15:02:22 +08:00
ht32f491x3 arm/ht32f491x3: rework PWM lower-half like nrf53 2026-04-02 12:11:13 +02:00
imx1
imx6 style: fix typos 2025-04-30 13:45:46 +08:00
imx9 docs/platforms/arm/imx9: add imx93-qsb documentation. 2026-02-28 10:30:06 +08:00
imxrt Docs/platforms/imxrt: Update chip support table. 2026-05-20 17:34:30 +08:00
kinetis !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
kl Documentation/teensy-lc: port README.txt to rst 2026-03-31 22:15:12 -04:00
lc823450 style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
lpc17xx style: fix typos 2025-04-30 13:45:46 +08:00
lpc31xx Documentation: fix spelling 2025-05-15 11:33:41 +08:00
lpc40xx
lpc43xx !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
lpc54xx style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
lpc214x
lpc2378 Documentation/olimex-lpc2378: port README.txt to rst 2026-03-31 22:15:12 -04:00
max326xx style: fix typos 2025-04-30 13:45:46 +08:00
moxart Documentation: PBKDF2 login docs, board Kconfig, and CI password 2026-07-21 20:19:14 +08:00
mps
mx8mp Documentation/verdin-mx8mp: port README.txt to rst 2026-03-31 22:15:12 -04:00
nrf52 arch/nrf52|nrf53: add qencoder support 2026-04-12 19:41:52 -04:00
nrf53 Documentation: update references to nrfjprog 2026-06-15 23:02:28 +08:00
nrf91 Documentation: update references to nrfjprog 2026-06-15 23:02:28 +08:00
nuc1xx style: fix typos 2025-04-30 13:45:46 +08:00
phy62xx
qemu arch/armv7-r: userspace PMU access 2026-02-02 16:20:39 +01:00
ra4m1 Documentation: Add GPT information to RA4M1 documentation 2025-11-17 09:01:31 -03:00
rp23xx rp23xx: Add external QSPI PSRAM (APS6404) support for the Pimoroni Pico Plus 2. 2026-07-25 13:49:05 -03:00
rp2040 docs/boards/seeed-xiao-rp2040: Fix undocumented configurations 2026-07-01 16:39:06 +02:00
rtl8720f arch/arm/ameba: add CMake build support for RTL8721Dx and RTL8720F 2026-07-17 08:30:47 -03:00
rtl8721dx arch/arm/rtl8721dx: add shared Ameba GPIO driver. 2026-07-21 08:34:05 +02:00
s32k1xx Documentation: fix spelling 2025-05-15 11:33:41 +08:00
s32k3xx
sam34 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
sama5 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
samd2l2 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
samd5e5 style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
samv7 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
stm32c0 boards/nucleo-c071rb: add adcscope example 2026-03-24 18:24:40 +01:00
stm32f0 docs/arm/stm32: Tag all STM32 chip families with their chips. 2025-05-06 19:19:56 +02:00
stm32f1 !arch/stm32: move stm32l1 and finalize the directory split 2026-06-24 14:54:44 -03:00
stm32f2 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
stm32f3 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
stm32f4 boards/stm32f4discovery: add sensorscope config 2026-07-25 14:45:40 +02:00
stm32f7 Documentation/stm32f746g-disco: document Dropbear SSH server setup 2026-07-20 17:48:50 +08:00
stm32g0 documentation/platforms/arm: Add Nucleo G0B1 board. 2025-05-07 02:03:19 +08:00
stm32g4 docs/arm/stm32: Tag all STM32 chip families with their chips. 2025-05-06 19:19:56 +02:00
stm32h5 !arch/stm32h5: use common STM32 Kconfig symbols 2026-06-14 11:35:31 -03:00
stm32h7 boards/linum-stm32h753bi: add curl config and document the curl command 2026-07-21 14:36:23 +08:00
stm32l0 docs/arm/stm32: Tag all STM32 chip families with their chips. 2025-05-06 19:19:56 +02:00
stm32l1 !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
stm32l4 !arch/stm32: move stm32l1 and finalize the directory split 2026-06-24 14:54:44 -03:00
stm32l5 !arch/stm32l5: use common STM32 Kconfig symbols 2026-06-14 11:35:31 -03:00
stm32n6 Documentation/arm: Document Nucleo-N657X0-Q LED support. 2026-05-23 20:23:35 +08:00
stm32u5 !arch/stm32u5: use common STM32 Kconfig symbols 2026-06-14 11:35:31 -03:00
stm32wb docs/arm/stm32: Tag all STM32 chip families with their chips. 2025-05-06 19:19:56 +02:00
stm32wl5 docs/arm/stm32: Tag all STM32 chip families with their chips. 2025-05-06 19:19:56 +02:00
str71x
tiva docs/risc-v: Remove mention of NSH_ARCHINIT 2026-05-10 07:59:10 +08:00
tms570
xmc4 style: fix typos 2025-04-30 13:45:46 +08:00
index.rst docs: Fix duplicate toctree references causing build warnings 2026-06-03 15:02:22 +08:00