Skip to content

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Jan 29, 2026

Summary

  • Add MPFS250 QSPI support with two access paths: direct MSS QSPI controller and System Controller SPI services.
  • Introduce a QSPI-focused PolarFire config and extend the HAL/external-flash APIs for QSPI read/write/erase and SCB mailbox reads.
  • Tweak RISC-V build flow to select update loader based on disk usage and sign ELF outputs when ELF mode is enabled.
  • Add a PolarFire programming helper script and document QSPI usage under PolarFire targets.

Key Changes

  • New example config: config/examples/polarfire_mpfs250_qspi.config
  • QSPI init + drivers in hal/mpfs250.c (MSS QSPI + SC SPI paths)
  • Build logic updates in arch.mk for update loader selection + ELF signing
  • PolarFire QSPI documentation in docs/Targets.md
  • New tooling script: tools/scripts/mpfs_program.sh

Testing

  • Example output (with DEBUG_QSPI set):
wolfBoot Version: 2.7.0 (Jan 29 2026 13:03:10)
QSPI: Using System Controller SPI services
SC SPI: Read 0x20000 -> 0x80013680, len 512
SC SPI: Read 0x2000000 -> 0x80013680, len 512
Versions: Boot 1, Update 0
Trying Boot partition at 0x20000
Loading header 512 bytes from 0x20000 to 0x8DFFFE00
SC SPI: Read 0x20000 -> 0x8DFFFE00, len 512
Loading image 128664 bytes from 0x20200 to 0x8E000000...
SC SPI: Read 0x20200 -> 0x8E000000, len 128664
done
Boot partition: 0x8DFFFE00 (sz 128664, ver 0x1, type 0x601)
Checking integrity...done
Verifying signature...done
Successfully selected image in part: 0
Firmware Valid
SC SPI: Read 0x1FFFFFC -> 0x80013880, len 4
Loading elf at 0x8E000000
Found valid elf64 (little endian)
Program Headers 1 (size 56)
Load 21304 bytes (offset 0x1000) to 0x8E000000 (p 0x8E000000)
Clear 16392 bytes at 0x8E000000 (p 0x8E000000)
Entry point 0x8E0012B8
Booting at 0x8E0012B8
FDT: Invalid header! -1
QSPI: Using System Controller SPI services
========================
PolarFire SoC MPFS250 wolfBoot demo Application
Copyright 2025 wolfSSL Inc
GPL v3
========================

@dgarske dgarske self-assigned this Jan 29, 2026
@dgarske dgarske force-pushed the polarfire_soc_qspi branch from 2ce97f4 to 7fa33fd Compare January 30, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant