]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
flash/nor: add DesignWare SPI controller driver
authorSergey Matsievskiy <matsievskiysv@gmail.com>
Wed, 18 Sep 2024 17:12:48 +0000 (20:12 +0300)
committerTomas Vanek <vanekt@fbl.cz>
Fri, 31 Jan 2025 03:25:53 +0000 (03:25 +0000)
commiteb6f2745b7d9924d0dddeab91c1743867c4e812c
tree0601c5b4ed488cf823081b3a87942f288d5d493d
parentce38758e3df929d5b27947ab7b987cc319a628aa
flash/nor: add DesignWare SPI controller driver

Driver for DesignWare SPI controller, found on many SoCs (see compatible
list in Linux device tree bindings
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml). This
implementation only supports MIPS as it was the only one available for the
tests, however, adding support for other architectures should require only
few adjustments. Driver relies on flash/nor/spi.h to find Flash chip info.
Driver internal functions support 24bit addressing mode, but due to
limitations of flash/nor/spi.h, it is not used. The reported writing speed
is about 60kb/s.
Lint, sanitizer and valgrind reported warnings were not related to the
driver.

Change-Id: Id3df5626ab88055f034f74f274823051dedefeb1
Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8400
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
14 files changed:
contrib/loaders/flash/dw-spi/Makefile [new file with mode: 0644]
contrib/loaders/flash/dw-spi/dw-spi.c [new file with mode: 0644]
contrib/loaders/flash/dw-spi/dw-spi.h [new file with mode: 0644]
contrib/loaders/flash/dw-spi/mipsel-linux-gnu-check_fill.inc [new file with mode: 0644]
contrib/loaders/flash/dw-spi/mipsel-linux-gnu-erase.inc [new file with mode: 0644]
contrib/loaders/flash/dw-spi/mipsel-linux-gnu-program.inc [new file with mode: 0644]
contrib/loaders/flash/dw-spi/mipsel-linux-gnu-read.inc [new file with mode: 0644]
contrib/loaders/flash/dw-spi/mipsel-linux-gnu-transaction.inc [new file with mode: 0644]
doc/openocd.texi
src/flash/nor/Makefile.am
src/flash/nor/driver.h
src/flash/nor/drivers.c
src/flash/nor/dw-spi-helper.h [new file with mode: 0644]
src/flash/nor/dw-spi.c [new file with mode: 0644]