nuttx/Documentation/platforms
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
..
arm rp23xx: Add external QSPI PSRAM (APS6404) support for the Pimoroni Pico Plus 2. 2026-07-25 13:49:05 -03:00
arm64 docs/raspberrypi-4b: Document baromonitor configuration 2026-07-20 21:00:46 -03:00
avr arch/avr/src/avrdx/avrdx_delay: add custom up_udelay function 2026-06-12 09:55:11 -04:00
ceva Documentation: add missing platforms to platforms/ and remove introduction/platforms 2023-10-22 19:06:44 +08:00
hc docs/m9s12/demo9s12ne64: Migrate README.txt to RST 2026-02-12 10:43:53 +01:00
mips arch/mips/jz4780: Add USB host and display controller drivers 2026-07-24 12:17:35 +08:00
misco misco/lm32/boards/misoc: Migrate README.txt to RST 2025-05-08 03:04:04 +02:00
or1k docs/or1k: Migrate README.txt to RST format 2026-02-06 08:54:28 -03:00
renesas Documentation: PBKDF2 login docs, board Kconfig, and CI password 2026-07-21 20:19:14 +08:00
risc-v documentation: add Python defconfig to esp32p4-tab5 board 2026-07-22 17:58:01 +08:00
sim arch/sim: Add PTY mode for simulated UART 2026-07-25 15:03:56 +08:00
sparc Documentation: migrate the rest boards 2023-10-26 18:13:34 -03:00
tricore arch/tricore: support tc4evb board. 2026-03-10 10:38:19 +01:00
x86 doc/qemu-i486: Add documentation about qemu-i486:vga_fb 2026-04-30 11:56:49 +08:00
x86_64 Documentation: add notes about TAP configuration for qemu 2025-12-18 11:39:54 -03:00
xtensa boards/stm32h7/linum-stm32h753bi: enable USB FS host, add lvglterm_kbda 2026-07-08 14:08:16 -04:00
z16 Documentation: update broken links 2024-04-10 15:17:53 -03:00
z80 style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
index.rst docs: Fix duplicate toctree references causing build warnings 2026-06-03 15:02:22 +08:00