Skip to content

Commit

Permalink
jtagspi/pld: add support from efinix driver
Browse files Browse the repository at this point in the history
Provide	jtagspi	with information to use jtagspi for
programming spi-flash devices on efinix trion and
titanium devices using a proxy bitstream.

Change-Id: I4a851fcaafe832c35bd7b825d95a3d08e4d57a7b
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/7826
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
  • Loading branch information
danselmi authored and borneoa committed Sep 23, 2023
1 parent 3020270 commit b2a2294
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/pld/efinix.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ static int efinix_get_ipdbg_hub(int user_num, struct pld_device *pld_device, str
return ERROR_OK;
}

static int efinix_get_jtagspi_userircode(struct pld_device *pld_device, unsigned int *ir)
{
*ir = USER1;
return ERROR_OK;
}

PLD_CREATE_COMMAND_HANDLER(efinix_pld_create_command)
{
if (CMD_ARGC != 4 && CMD_ARGC != 6)
Expand Down Expand Up @@ -296,4 +302,5 @@ struct pld_driver efinix_pld = {
.pld_create_command = &efinix_pld_create_command,
.load = &efinix_load,
.get_ipdbg_hub = efinix_get_ipdbg_hub,
.get_jtagspi_userircode = efinix_get_jtagspi_userircode,
};
7 changes: 6 additions & 1 deletion tcl/board/trion_t20_bga256.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ adapter speed 6000

source [find fpga/efinix_trion.cfg]

#openocd -f board/trion_t20_bga256.cfg -c "init" -c "pld load 0 outflow/trion_blinker.bit"
#openocd -f board/trion_t20_bga256.cfg -c "init" -c "pld load trion.pld outflow/trion_blinker.bit"
#ipdbg -start -tap trion.tap -hub 0x8 -port 5555 -tool 0

set JTAGSPI_CHAIN_ID trion.pld
source [find cpld/jtagspi.cfg]

#jtagspi_init trion.pld "trion_jtagspi/outflow/trion_jtagspi.bit" 0xAB
#jtagspi_program trion_blinker/outflow/trion_blinker.bin 0

0 comments on commit b2a2294

Please sign in to comment.