diff options
author | Steve Marple <stevemarple@googlemail.com> | 2022-06-25 23:45:18 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-09-13 22:17:14 +0000 |
commit | 0dd969d83badb6793519ee99dd8ab8579d5f59df (patch) | |
tree | 2ff179188f8fa72735ea80ce2a6d32418e64d156 /tcl/interface | |
parent | e643a494d46c571711ccba361ad20faaf6f6503c (diff) | |
download | riscv-openocd-0dd969d83badb6793519ee99dd8ab8579d5f59df.zip riscv-openocd-0dd969d83badb6793519ee99dd8ab8579d5f59df.tar.gz riscv-openocd-0dd969d83badb6793519ee99dd8ab8579d5f59df.tar.bz2 |
drivers/bcm2835gpio: Migrate to adapter gpio commands
Use the new "adapter gpio" commands to configure the GPIOs used by the
bcm2835gpio driver. The driver supports only 1 chip (gpiochip0).
The reset function now honours the srst_open_drain and trst_open_drain
options.
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Change-Id: I5b6c68b16362000cf5141a83394549d2bf3af108
Reviewed-on: https://review.openocd.org/c/openocd/+/7123
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl/interface')
-rw-r--r-- | tcl/interface/jtag_hat_rpi2.cfg | 18 | ||||
-rw-r--r-- | tcl/interface/raspberrypi-native.cfg | 12 | ||||
-rw-r--r-- | tcl/interface/raspberrypi2-native.cfg | 12 |
3 files changed, 27 insertions, 15 deletions
diff --git a/tcl/interface/jtag_hat_rpi2.cfg b/tcl/interface/jtag_hat_rpi2.cfg index 495ff0f..cd1cbfb 100644 --- a/tcl/interface/jtag_hat_rpi2.cfg +++ b/tcl/interface/jtag_hat_rpi2.cfg @@ -7,31 +7,35 @@ adapter driver bcm2835gpio -bcm2835gpio_peripheral_base 0x3F000000 +bcm2835gpio peripheral_base 0x3F000000 # Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET # These depend on system clock, calibrated for stock 700MHz # bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET -bcm2835gpio_speed_coeffs 146203 36 +bcm2835gpio speed_coeffs 146203 36 # Each of the JTAG lines need a gpio number set: tck tms tdi tdo # Header pin numbers: 23 22 19 21 -bcm2835gpio_jtag_nums 11 25 10 9 +adapter gpio tck -chip 0 11 +adapter gpio tms -chip 0 25 +adapter gpio tdi -chip 0 10 +adapter gpio tdo -chip 0 9 # Each of the SWD lines need a gpio number set: swclk swdio # Header pin numbers: 23 22 -bcm2835gpio_swd_nums 11 25 +adapter gpio swclk -chip 0 11 +adapter gpio swdio -chip 0 25 # Direction pin for SWDIO level shifting buffer -bcm2835gpio_swdio_dir_num 6 +adapter gpio swdio_dir -chip 0 6 # If you define trst or srst, use appropriate reset_config # Header pin numbers: TRST - 26, SRST - 18 -bcm2835gpio_trst_num 7 +adapter gpio trst -chip 0 7 #reset_config trst_only -bcm2835gpio_srst_num 24 +adapter gpio srst -chip 0 24 #reset_config srst_only # or if you have both connected diff --git a/tcl/interface/raspberrypi-native.cfg b/tcl/interface/raspberrypi-native.cfg index 6d5c3bf..02a3563 100644 --- a/tcl/interface/raspberrypi-native.cfg +++ b/tcl/interface/raspberrypi-native.cfg @@ -21,19 +21,23 @@ bcm2835gpio speed_coeffs 113714 28 # Each of the JTAG lines need a gpio number set: tck tms tdi tdo # Header pin numbers: 23 22 19 21 -bcm2835gpio jtag_nums 11 25 10 9 +adapter gpio tck -chip 0 11 +adapter gpio tms -chip 0 25 +adapter gpio tdi -chip 0 10 +adapter gpio tdo -chip 0 9 # Each of the SWD lines need a gpio number set: swclk swdio # Header pin numbers: 23 22 -bcm2835gpio swd_nums 11 25 +adapter gpio swclk -chip 0 11 +adapter gpio swdio -chip 0 25 # If you define trst or srst, use appropriate reset_config # Header pin numbers: TRST - 26, SRST - 18 -# bcm2835gpio trst_num 7 +# adapter gpio trst -chip 0 7 # reset_config trst_only -# bcm2835gpio srst_num 24 +# adapter gpio srst -chip 0 24 # reset_config srst_only srst_push_pull # or if you have both connected, diff --git a/tcl/interface/raspberrypi2-native.cfg b/tcl/interface/raspberrypi2-native.cfg index 547df08..5faabed 100644 --- a/tcl/interface/raspberrypi2-native.cfg +++ b/tcl/interface/raspberrypi2-native.cfg @@ -21,19 +21,23 @@ bcm2835gpio speed_coeffs 146203 36 # Each of the JTAG lines need a gpio number set: tck tms tdi tdo # Header pin numbers: 23 22 19 21 -bcm2835gpio jtag_nums 11 25 10 9 +adapter gpio tck -chip 0 11 +adapter gpio tms -chip 0 25 +adapter gpio tdi -chip 0 10 +adapter gpio tdo -chip 0 9 # Each of the SWD lines need a gpio number set: swclk swdio # Header pin numbers: 23 22 -bcm2835gpio swd_nums 11 25 +adapter gpio swclk -chip 0 11 +adapter gpio swdio -chip 0 25 # If you define trst or srst, use appropriate reset_config # Header pin numbers: TRST - 26, SRST - 18 -# bcm2835gpio trst_num 7 +# adapter gpio trst -chip 0 7 # reset_config trst_only -# bcm2835gpio srst_num 24 +# adapter gpio srst -chip 0 24 # reset_config srst_only srst_push_pull # or if you have both connected, |