From: openocd-gerrit <ope...@us...> - 2025-06-13 16:25:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via fa83ca0bea5532afa1cb7b994b77cc3b6d77f7db (commit) via e171959edec1275fd417617f69cec7ede529ec14 (commit) from 2da332fa83b1aa55a61a44e6fe4d2089a9bb34b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fa83ca0bea5532afa1cb7b994b77cc3b6d77f7db Author: Electric Worry <me...@el...> Date: Thu May 29 11:31:59 2025 +0100 tcl/board/orange_pi_zero_3: Add Orange Pi Zero 3 board The Orange Pi Zero 3 is an SBC that uses an Allwinner H618 SoC. As such, JTAG support is fully available, however the SoC multiplexes JTAG function with UART1 and microSD. Unfortunately Xunlong has used UART1 for the Wifi-BT chip, leaving JTAG accessible only via the microSD using a microSD breakout board (for example). Change-Id: I0dc078cd2f3176815271917eb5e948cc8ef94525 Signed-off-by: Electric Worry <me...@el...> Reviewed-on: https://review.openocd.org/c/openocd/+/8938 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/tcl/board/orange_pi_zero_3.cfg b/tcl/board/orange_pi_zero_3.cfg new file mode 100644 index 000000000..2af983c65 --- /dev/null +++ b/tcl/board/orange_pi_zero_3.cfg @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# This is the Orange Pi Zero 3 board with Allwinner H618 chip +# http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html +# +# Accessing JTAG signals on Orange Pi Zero 3 board requires connection to pins +# on the microSD card slot. +# 1 - DAT2 - TCK +# 2 - CD/DAT3 - NC +# 3 - CMD - TDO +# 4 - VDD - NC +# 5 - CLK - NC +# 6 - VSS - NC +# 7 - DAT0 - TDI +# 8 - DAT1 - TMS +# +# PF Configure Register 0 at address 0x0300b0b4 must be set 0x07373733 to set +# the JTAG function on these pins (which is what the factory installed image on +# the SPI flash does when the board is powered without a microSD inserted). + +source [find target/allwinner_h618.cfg] + +# To this contributor's knowledge, the board neither exposes TRST nor SRST. +reset_config none commit e171959edec1275fd417617f69cec7ede529ec14 Author: Electric Worry <me...@el...> Date: Thu May 29 10:51:59 2025 +0100 target: add support for Allwinner H618 SoC The Allwinner H618 is an updated H616 but appears functionally equivalent. It is used in small boards such as Orange Pi Zero 3. Change-Id: I299a42be746189f3e8e31070aa26b83ab7d806a4 Signed-off-by: Electric Worry <me...@el...> Reviewed-on: https://review.openocd.org/c/openocd/+/8936 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/tcl/target/allwinner_h618.cfg b/tcl/target/allwinner_h618.cfg new file mode 100644 index 000000000..98d3ace0d --- /dev/null +++ b/tcl/target/allwinner_h618.cfg @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# This is the Allwinner H618 chip. It is an updated version of the Allwinner H616. + +# Information is available on linux-sunxi.org: +# Datasheet: https://linux-sunxi.org/images/b/b9/H616_Datasheet_V1.0_cleaned.pdf +# Manual: https://linux-sunxi.org/images/2/24/H616_User_Manual_V1.0_cleaned.pdf + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME h618 +} + +if { [info exists USE_SMP] } { + set _USE_SMP $USE_SMP +} else { + set _USE_SMP 0 +} + +if { [info exists DAP_TAPID] } { + set _DAP_TAPID $DAP_TAPID +} else { + set _DAP_TAPID 0x5ba00477 +} + +set _cores 4 +jtag newtap $_CHIPNAME cpu -expected-id $_DAP_TAPID -irlen 4 +adapter speed 4000 + +dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu + +# MEM-AP for direct access +target create $_CHIPNAME.ap mem_ap -dap $_CHIPNAME.dap -ap-num 1 + +# these addresses are obtained from the ROM table via 'dap info 1' command +set _DBGBASE {0x81410000 0x81510000 0x81610000 0x81710000} +set _CTIBASE {0x81420000 0x81520000 0x81620000 0x81720000} + +set _smp_command "target smp" + +for { set _core 0 } { $_core < $_cores } { incr _core } { + set _CTINAME $_CHIPNAME.cti$_core + set _TARGETNAME $_CHIPNAME.cpu$_core + + cti create $_CTINAME -dap $_CHIPNAME.dap -ap-num 1 -baseaddr [lindex $_CTIBASE $_core] + target create $_TARGETNAME aarch64 -dap $_CHIPNAME.dap -ap-num 1 -dbgbase [lindex $_DBGBASE $_core] -cti $_CTINAME + + set _smp_command "$_smp_command $_TARGETNAME" +} + +if {$_USE_SMP} { + eval $_smp_command +} + +# default target is cpu0 +targets $_CHIPNAME.cpu0 ----------------------------------------------------------------------- Summary of changes: tcl/board/orange_pi_zero_3.cfg | 24 ++++++++++++++++++++ tcl/target/{bcm2711.cfg => allwinner_h618.cfg} | 31 +++++++++++--------------- 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 tcl/board/orange_pi_zero_3.cfg copy tcl/target/{bcm2711.cfg => allwinner_h618.cfg} (56%) hooks/post-receive -- Main OpenOCD repository |