aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2020-04-02 00:14:21 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2020-07-14 00:38:59 +0100
commit6962da00287c88c3fa89df8a8623a956735379db (patch)
treefb17ca6290ddc3d47f92760d726465a8776f184f
parentaa277fb358b7ff02b8231d4141c673722c580cf3 (diff)
downloadopenocd-jz4730-6962da00287c88c3fa89df8a8623a956735379db.tar.gz
tcl/interface: add example of linuxgpiod through dln-2
The USB adapter DLN-2 provides 32 GPIO (beside I2C, SPI, ...). Use the first 6 GPIO for a SWD/JTAG bitbanging example through linuxgpiod driver. Change-Id: I229c2078142ec648fc6430b5d123539045dcfbda Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5561 Tested-by: jenkins
-rw-r--r--tcl/interface/dln-2-gpiod.cfg25
1 files changed, 25 insertions, 0 deletions
diff --git a/tcl/interface/dln-2-gpiod.cfg b/tcl/interface/dln-2-gpiod.cfg
new file mode 100644
index 000000000..1859688be
--- /dev/null
+++ b/tcl/interface/dln-2-gpiod.cfg
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Use DLN-2 GPIO through linuxgpiod
+#
+# +-----------+-------------+-------------+
+# | signal | DLN-2 | gpio offset |
+# +-----------+-------------+-------------+
+# | nSRST | J3.1 (PA0) | 0 |
+# | TDO | J3.2 (PA1) | 1 |
+# | TCK/SWCLK | J3.3 (PA2) | 2 |
+# | TMS/SWDIO | J3.4 (PA3) | 3 |
+# | TDI | J3.5 (PA4) | 4 |
+# | nTRST | J3.6 (PA5) | 5 |
+# | GND | J3.12 (GND) | |
+# +-----------+-------------+-------------+
+
+adapter driver linuxgpiod
+
+linuxgpiod_gpiochip 0
+linuxgpiod_jtag_nums 2 3 4 1
+linuxgpiod_trst_num 5
+linuxgpiod_swd_nums 2 3
+linuxgpiod_srst_num 0
+
+reset_config trst_and_srst separate srst_push_pull