]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
Add Linux SPI device SWD adapter support
authorRichard Pasek <rpasek@google.com>
Wed, 11 Dec 2024 05:43:57 +0000 (00:43 -0500)
committerTomas Vanek <vanekt@fbl.cz>
Wed, 22 Jan 2025 15:21:10 +0000 (15:21 +0000)
commit83e0293f7ba3604b4ad98b3a8101388e3e52f9fe
treeb4321a1e2a5fc00b76ca7ce51ea5005a72ed58f1
parent26f2df80c3f9ac54fc488ed26f6320904881c0d4
Add Linux SPI device SWD adapter support

To alleviate the need to bitbang SWD, I've written a SWD SPI
implementation. This code is inspired by the work of luppy@appkaki.com
as shown at github.com/lupyuen/openocd-spi but with the desire to be
more generic. This implementation makes use of the more common 4 wire
SPI port using full duplex transfers to be able to capture the SWD ACK
bits when a SWD TX operation is in progress.

TEST:
  Connects successfully with the following combinations:
  Hosts:
    Raspberry Pi 4B
    Unnamed Qualcomm SoC with QUPv3 based SPI port
  Targets:
    Raspberry Pi 2040
    Nordic nRF52840
    NXP RT500

Change-Id: Ic2f38a1806085d527e6f999a3d15aea6f32d1019
Signed-off-by: Richard Pasek <rpasek@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8645
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
configure.ac
doc/openocd.texi
src/jtag/drivers/Makefile.am
src/jtag/drivers/linuxspidev.c [new file with mode: 0644]
src/jtag/interface.h
src/jtag/interfaces.c
tcl/interface/spidev_example.cfg [new file with mode: 0644]