tcl/interface: add linuxgpiod cfg for Aspeed AST2600
[fw/openocd] / tcl / interface / ast2600-gpiod.cfg
diff --git a/tcl/interface/ast2600-gpiod.cfg b/tcl/interface/ast2600-gpiod.cfg
new file mode 100644 (file)
index 0000000..5cad02f
--- /dev/null
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Use AST2600 GPIO through linuxgpiod
+#
+# +-----------+-------------+-------------+
+# | signal    | GPIO name   | gpio offset |
+# +-----------+-------------+-------------+
+# | TCK/SWCLK | GPIOI2      | 66          |
+# | TMS/SWDIO | GPIOI3      | 67          |
+# | TDI       | GPIOI1      | 65          |
+# | TDO       | GPIOI4      | 68          |
+# | nTRST     | GPIOI0      | 64          |
+# +-----------+-------------+-------------+
+
+adapter driver linuxgpiod
+
+adapter gpio trst 64 -chip 0
+adapter gpio tdi 65 -chip 0
+adapter gpio tck 66 -chip 0
+adapter gpio swclk 66 -chip 0
+adapter gpio tms 67 -chip 0
+adapter gpio swdio 67 -chip 0
+adapter gpio tdo 68 -chip 0
+
+reset_config trst_only separate trst_push_pull