tcl/interface: universal config for all Raspberry Pi models
commitbec6c0eb094fb7ca1752688118f41193dc83e026
authorTomas Vanek <vanekt@fbl.cz>
Fri, 14 Oct 2022 09:16:58 +0000 (14 11:16 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 28 Jan 2023 15:55:10 +0000 (28 15:55 +0000)
tree9867b2427c51254833d9e3c5c53148d63099f520
parent2dde7e914b429ffa5bc56faa20fb474ca451412e
tcl/interface: universal config for all Raspberry Pi models

Speed calibration coeffs are computed from cpufreq/scaling_max_freq
and from the device-tree compatibility information.

Raspberry Pi linux offers /dev/gpiomem for non-root access
to the GPIO registers since ~2016.
Do not configure 'bcm2835gpio peripheral_base' as it is necessary
only if /dev/mem is used - it requires running OpenOCD as root
- it's a security risk so it should be avoided.

The configuration of the GPIO connector (40-pin header)
is factored out and ready to use in interface configuration
for other driver (e.g. linux gpiod).

Mark raspberrypi2-native.cfg as deprecated and redirect
it to raspberrypi-native.cfg

Change-Id: Icce856fb660b45374e94174da279feb51f529908
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7264
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
tcl/interface/raspberrypi-gpio-connector.cfg [copied from tcl/interface/raspberrypi-native.cfg with 56% similarity]
tcl/interface/raspberrypi-native.cfg
tcl/interface/raspberrypi2-native.cfg