1
0
mirror of https://git.code.sf.net/p/openocd/code synced 2024-11-24 19:56:23 +00:00
openocd/tcl/interface/dln-2-gpiod.cfg
Steve Marple 290eac04b9 drivers/linuxgpiod: Migrate to adapter gpio commands
Use the new "adapter gpio" commands to configure the GPIOs used by the
linuxgpiod driver.

Adds support for drive mode and resistor pull options on all signals.

Change-Id: Ic90cb4f06db82435294228b6793330107a9f3606
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7048
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15 13:24:54 +00:00

31 lines
940 B
INI

# 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 |
# | LED | J3.7 (PA6) | 6 |
# | GND | J3.12 (GND) | |
# +-----------+-------------+-------------+
adapter driver linuxgpiod
adapter gpio srst 0 -chip 0
adapter gpio tdo 1 -chip 0
adapter gpio tck 2 -chip 0
adapter gpio swclk 2 -chip 0
adapter gpio tms 3 -chip 0
adapter gpio swdio 3 -chip 0
adapter gpio tdi 4 -chip 0
adapter gpio trst 5 -chip 0
adapter gpio led 6 -chip 0
reset_config trst_and_srst separate srst_push_pull