jtagspi/pld: add support from efinix driver 26/7826/12
authorDaniel Anselmi <danselmi@gmx.ch>
Sat, 17 Dec 2022 12:11:30 +0000 (13:11 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 23 Sep 2023 14:34:57 +0000 (14:34 +0000)
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
src/pld/efinix.c
tcl/board/trion_t20_bga256.cfg

index 8350cb1a2466c6f5465d189d26b94482896851cc..b6e5f9e477ad2829473caab737f929cd2bd04800 100644 (file)
@@ -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)
@@ -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,
 };
index 045d63de335afc2e83e9c4721b2727dcc8de476a..dc76d39104c0f96ca6f89eeae67289270dd30bce 100644 (file)
@@ -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

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)