tcl: add lattice ECP5 family support
[fw/openocd] / tcl / fpga / lattice_ecp5.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 if { [info exists CHIPNAME] } {
4         set _CHIPNAME $_CHIPNAME
5 } else {
6         set _CHIPNAME ecp5
7 }
8
9 # Lattice ECP5 family
10 # TAP IDs are extracted from BSDL files found on this page:
11 # https://www.latticesemi.com/Products/FPGAandCPLD/ECP5
12 #
13 # 0x01111043 - LAE5UM_25F/LFE5UM_25F
14 # 0x01112043 - LAE5UM_45F/LFE5UM_45F
15 # 0x01113043 - LAE5UM_85F/LFE5UM_85
16 # 0x21111043 - LFE5U_12F
17 # 0x41111043 - LFE5U_25F
18 # 0x41112043 - LFE5U_45F
19 # 0x41113043 - LFE5U_85F
20 # 0x81111043 - LFE5UM5G-25
21 # 0x81112043 - LFE5UM5G-45
22 # 0x81113043 - LFE5UM5G-85
23
24 jtag newtap $_CHIPNAME tap -irlen 8 -irmask 0x83 -ircapture 0x1 \
25         -expected-id 0x01111043 -expected-id 0x01112043 -expected-id 0x01113043 \
26         -expected-id 0x21111043 -expected-id 0x41111043 -expected-id 0x41112043 \
27         -expected-id 0x41113043 -expected-id 0x81111043 -expected-id 0x81112043 \
28         -expected-id 0x81113043