tcl/board: Add Raspberry Pi 3 board
authorJian-Hong Pan <chienhung.pan@gmail.com>
Sun, 11 Jul 2021 04:04:06 +0000 (12:04 +0800)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 31 Jul 2021 09:09:23 +0000 (10:09 +0100)
OpenOCD cannot connect to BCM2837's JTAG interface on RPi 3 board until
the reset configuration mode is set as trst_only.

According to Table 6-31 GPIO Pins Alternative Function Assignment of
Broadcom's BCM2837 ARM Peripherials datasheet [1] and Raspberry Pi's
GPIO control in config.txt document [2], only Test Reset (TRST) pin (no
System Reset, SRST) is exposed.

[1] https://usermanual.wiki/Datasheet/BCM2837ARMPeripheralsBroadcom.1054296467/view
[2] https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md

Change-Id: I26ff3924039ff7943faf0a5b1ad0427c8dbb88f2
Link: http://openocd.zylin.com/#/c/6364/1
Signed-off-by: Jian-Hong Pan <chienhung.pan@gmail.com>
Reviewed-on: http://openocd.zylin.com/6366
Tested-by: jenkins
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
tcl/board/rpi3.cfg [new file with mode: 0644]

diff --git a/tcl/board/rpi3.cfg b/tcl/board/rpi3.cfg
new file mode 100644 (file)
index 0000000..fd93a9d
--- /dev/null
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# This is the Raspberry Pi 3 board with BCM2837 chip
+# https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2837/README.md
+#
+# Enable JTAG GPIO on Raspberry Pi boards
+# https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md
+
+source [find target/bcm2837.cfg]
+transport select jtag
+
+# Raspberry Pi boards only expose Test Reset (TRST) pin, no System Reset (SRST)
+reset_config trst_only