Skip to content

flash: nor: dw-spi: add RiscV support - #28

Merged
aap-sc merged 12 commits into
syntacore:syntacorefrom
matsievskiysv:dw-spi-update
Aug 26, 2026
Merged

flash: nor: dw-spi: add RiscV support#28
aap-sc merged 12 commits into
syntacore:syntacorefrom
matsievskiysv:dw-spi-update

Conversation

@matsievskiysv

Copy link
Copy Markdown

Add RiscV architecture support for dw-spi NOR Flash driver. Functionality was tested on FPGA prototype; MIPS functionality was checked for regression.
Other improvements:

  • Support for small workarea sizes
  • Support HSSI IP variant
  • Allow SPI detection via SFDP header

@aap-sc
aap-sc self-requested a review August 20, 2026 14:31
Comment thread doc/openocd.texi Outdated
@aap-sc

aap-sc commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

@matsievskiysv checkpatch run against your patchset complains around patches 04, 05, 07, and 08. You could run it like this:

./tools/checkpatch.sh origin/syntacore

Could you clean that up, please?

Sergey Matsievskiy added 12 commits August 24, 2026 10:07
Linux driver distinguishes PSSI and HSSI IP variants, which seemingly
differ in configuration register fields layout. Add an option to support
the HSSI layout.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Describe -hssi controller option.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Move optional -spi_mst and -if_owner_offset options from mandatory to
optional argument list.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Refactor driver code for easier support of multiple target
loaders. Shuffle structure fields for better packing.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Move loader buffers out of functions to allow higher level functions
calculating required working area size. This is needed to support small
work-area sizes.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Add missing hexadecimal prefix to error message.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Some SoCs may use onboard SRAM memory for work-area prior to DDR being
trained. Add support for using small work-areas with the driver.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Add RISCV64 loader for the driver. Tested on FPGA with W25Q128JW Flash
chip.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Allow base addresses to be located at the address 0, which is the case
for some SoCs.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Use flash size to determine addressing mode.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Add fallback action to read unknown Flash device info from SFDP header.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Add support for Syntacore SCR5 target.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
@matsievskiysv

Copy link
Copy Markdown
Author

@matsievskiysv checkpatch run against your patchset complains around patches 04, 05, 07, and 08. You could run it like this:

./tools/checkpatch.sh origin/syntacore

Could you clean that up, please?

Updated code. Checkpatch reports no errors now.

@aap-sc
aap-sc merged commit c83bfd5 into syntacore:syntacore Aug 26, 2026
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.

2 participants