tcl/interface: support for Raspberry Pi 5

Make sure raspberrypi-native.cfg cannot be used on RPi5.

Add raspberrypi5-gpiod.cfg which uses linuxgpiod adapter driver.
Issue a warning if PCIe is in power save mode.

While on it, re-format warnings issued from Tcl to look similar
to LOG_WARNING() output.

Change-Id: If19b0350bd5fff83d9a0c65999e33b161fb6957a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8333
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
This commit is contained in:
Tomas Vanek
2024-06-11 16:40:29 +02:00
parent 67be8188bb
commit ad87fbd1cf
3 changed files with 51 additions and 12 deletions

View File

@@ -37,9 +37,9 @@ proc get_max_cpu_clock { default } {
return $clock
}
echo "WARNING: Host CPU clock unknown."
echo "WARNING: Using the highest possible value $default kHz as a safe default."
echo "WARNING: Expect JTAG/SWD clock significantly slower than requested."
echo "Warn : Host CPU clock unknown."
echo "Warn : Using the highest possible value $default kHz as a safe default."
echo "Warn : Expect JTAG/SWD clock significantly slower than requested."
return $default
}
@@ -56,9 +56,13 @@ if {[string match *bcm2711* $compat]} {
} elseif {[string match *bcm2835* $compat] || [string match *bcm2708* $compat]} {
set clocks_per_timing_loop 6
set speed_offset 32
} elseif {[string match *bcm2712* $compat]} {
echo "Error: Raspberrypi Pi 5 has moved GPIOs to PCIe connected RP1 chip."
echo "Error: Native GPIO handling is not supported, use 'raspberrypi5-gpiod.cfg'"
shutdown
} else {
set speed_offset 32
echo "WARNING: Unknown type of the host SoC. Expect JTAG/SWD clock slower than requested."
echo "Warn : Unknown type of the host SoC. Expect JTAG/SWD clock slower than requested."
}
set clock [get_max_cpu_clock 2000000]