aboutsummaryrefslogtreecommitdiff
path: root/tcl/interface
diff options
context:
space:
mode:
authorSteve Marple <stevemarple@googlemail.com>2022-05-17 21:51:17 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2022-08-15 13:24:36 +0000
commitace028262ba0bda0e921afb11e6eb7d87708d889 (patch)
tree84ce9acb56cc5d0097d755eb8b7b3c3666647309 /tcl/interface
parent82fd4005427b6774a754b791bdf384f3ef45072d (diff)
downloadriscv-openocd-ace028262ba0bda0e921afb11e6eb7d87708d889.zip
riscv-openocd-ace028262ba0bda0e921afb11e6eb7d87708d889.tar.gz
riscv-openocd-ace028262ba0bda0e921afb11e6eb7d87708d889.tar.bz2
drivers/am335xgpio: Migrate to adapter gpio commands
Use the new "adapter gpio" commands to configure the GPIOs used by the am335xgpio driver. The AM335x has 4 GPIO 'chips' (chip number 0-3 inclusive), with each one providing 32 GPIOs (gpio_num 0-31 inclusive). Change-Id: I7c63c0e4763657ea51790c43fc40d32b7c3580bb Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6984 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl/interface')
-rw-r--r--tcl/interface/beaglebone-jtag-native.cfg22
-rw-r--r--tcl/interface/beaglebone-swd-native.cfg18
2 files changed, 26 insertions, 14 deletions
diff --git a/tcl/interface/beaglebone-jtag-native.cfg b/tcl/interface/beaglebone-jtag-native.cfg
index cd32ca4..0240e5d 100644
--- a/tcl/interface/beaglebone-jtag-native.cfg
+++ b/tcl/interface/beaglebone-jtag-native.cfg
@@ -16,13 +16,21 @@ adapter driver am335xgpio
# am335xgpio speed SPEED_COEFF SPEED_OFFSET
am335xgpio speed_coeffs 600000 575
-am335xgpio tdo_num 20
-am335xgpio tdi_num 60
-am335xgpio tms_num 4
-am335xgpio tck_num 2
+# BeagleBone pin P9_41
+adapter gpio tdo 20 -chip 0
-am335xgpio led_num 51
-am335xgpio led_on_state on
+# BeagleBone pin P9_12
+adapter gpio tdi 28 -chip 1
-am335xgpio srst_num 65
+# BeagleBone pin P9_18
+adapter gpio tms 4 -chip 0
+
+# BeagleBone pin P9_22
+adapter gpio tck 2 -chip 0
+
+# BeagleBone pin P9_16
+adapter gpio led 19 -chip 1
+
+# BeagleBone pin P8_18
+adapter gpio srst 1 -chip 2
reset_config srst_only srst_push_pull
diff --git a/tcl/interface/beaglebone-swd-native.cfg b/tcl/interface/beaglebone-swd-native.cfg
index f7bff6e..6c40849 100644
--- a/tcl/interface/beaglebone-swd-native.cfg
+++ b/tcl/interface/beaglebone-swd-native.cfg
@@ -16,14 +16,18 @@ adapter driver am335xgpio
# am335xgpio speed SPEED_COEFF SPEED_OFFSET
am335xgpio speed_coeffs 600000 575
-am335xgpio swclk_num 2
-am335xgpio swdio_num 4
-am335xgpio swdio_dir_num 60
-am335xgpio swdio_dir_output_state on
+# BeagleBone pin P9_22
+adapter gpio swclk 2 -chip 0
+
+# BeagleBone pin P9_18
+adapter gpio swdio 4 -chip 0
+
+# BeagleBone pin P9_12
+adapter gpio swdio_dir 28 -chip 1
# USR0 LED
-am335xgpio led_num 53
-am335xgpio led_on_state on
+adapter gpio led 21 -chip 1
-am335xgpio srst_num 65
+# BeagleBone pin P8_18
+adapter gpio srst 1 -chip 2
reset_config srst_only srst_push_pull