riscv-openocd/contrib/loaders/flash
Robert Jordens 867bdb2e92 jtagspi: new protocol that includes transfer length
This commit contains a rewrite of the jtagspi protocol and covers both
changes in the jtagspi.c openocd driver and the bscan_spi
(xilinx_bscan_spi) proxy bitstreams. The changes are as follows:

1. Always perform IR scan to ensure proper clearing of BYPASSed DRs.
2. Insert alignment cycles for all BYPASSed TAPs:

  The previous logic was erroneous. The delay in clock cyles from a bit
  written to the jtag interface to a bit read by the jtag interface is:

  * The number of BYPASSed TAPs before this (jtagspi) tap
  * The length of the jtagspi data register (1)
  * The number of BYPASSed TAPs before this one.

  I.e. it is just the number of enabled TAPs. This also gets rid of the
  configuration parameter DR_LENGTH.

3. Use marker bit to start spi transfer

  If there are TAPs ahead of this one on the JTAG chain, and we are in
  DR-SHIFT, there will be old bits toggled through first before the first
  valid bit destined for the flash.
  This delays the begin of the JTAGSPI transaction until the first high bit.

4. New jtagspi protocol

  A JTAGSPI transfer now consists of:

  * an arbitrary number of 0 bits (from BYPASS registers in front of the
    JTAG2SPI DR)
  * a marker bit (1) indicating the start of the JTAG2SPI transaction
  * 32 bits (big endian) describing the length of the SPI transaction
  * a number of SPI clock cycles (corresponding to 3.) with CS_N asserted
  * an arbitrary number of cycles (to shift MISO/TDO data through
    subsequent BYPASS registers)

5. xilinx_bscan_spi: clean up, add ultrascale

This is tested on the following configurations:

* KC705: XC7K325T
* Sayma AMC: XCKU040
* Sayma AMC + RTM): XCKU040 + XC7A15T, a board with integrated FTDI JTAG
  adapter, SCANSTA JTAG router, a Xilinx Ultrascale XCKU040 and a Xilinx
  Artix 7 15T. https://github.com/m-labs/sinara/wiki/Sayma
* Custom board with Lattice FPGA + XC7A35T
* CUstom board with 3x XCKU115-2FLVA1517E

Change-Id: I7361e9fb284ebb916302941735eebef3612aa103
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/4236
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2018-01-13 19:36:42 +00:00
..
at91sam7x Move ocl (at91sam7x flash loader) sources to contrib 2014-03-29 07:55:34 +00:00
fm4 contrib/loaders: Enforce Little Endian ARM machine code 2016-08-14 11:45:15 +01:00
fpga jtagspi: new protocol that includes transfer length 2018-01-13 19:36:42 +00:00
kinetis flash Kinetis: longword programming changed to flash_async_algorithm 2016-11-04 21:26:46 +00:00
kinetis_ke contrib/loaders: Enforce Little Endian ARM machine code 2016-08-14 11:45:15 +01:00
xmc1xxx contrib/loaders: Enforce Little Endian ARM machine code 2016-08-14 11:45:15 +01:00
armv4_5_cfi_intel_8.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_intel_16.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_intel_32.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_span_8.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_span_16.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_span_16_dq7.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cfi_span_32.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv7m_cfi_span_16.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv7m_cfi_span_16_dq7.s Support for SST 39VF3201C NOR flash 2013-07-01 08:39:36 +00:00
armv7m_io.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
cortex-m0.S Fix spelling of ARM Cortex 2016-05-20 21:38:03 +01:00
efm32.S flash: efm32: add support for EFR-familty (e.g. bluegecko) 2017-10-03 11:22:18 +01:00
k1921vk01t.S niietcm4: support for NIIET's Cortex-M4 microcontrollers 2015-11-26 12:17:25 +00:00
lpcspifi_erase.S update files to correct FSF address 2013-06-05 19:52:42 +00:00
lpcspifi_init.S update files to correct FSF address 2013-06-05 19:52:42 +00:00
lpcspifi_write.S flash/nor/lpcspifi.c: fix bug that prevented clean reset after flash write 2014-11-24 22:14:38 +00:00
mdr32fx.S mdr32fx: support for Milandr's MDR32Fx internal flash memory 2013-08-07 21:02:51 +00:00
mrvlqspi_write.S flash/nor: add mrvlqspi flash controller driver 2014-09-22 19:37:09 +00:00
pic32mx.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
sim3x.s sim3x: new flash driver for Silabs SiM3 microcontroller family 2015-02-11 22:05:22 +00:00
stellaris.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
stm32f1x.S update files to correct FSF address 2013-06-05 19:52:42 +00:00
stm32f2x.S stm32f2x: Add memory barrier needed for STM32F7 flashing. 2015-10-30 17:52:50 +00:00
stm32h7x.S flash: Add new stm32h7x driver support 2017-12-06 21:29:10 +00:00
stm32l4x.S stm32l4x.c: Correct waiting for data. 2016-05-04 22:55:22 +01:00
stm32lx.S Fix flash writing on stm32l0 2017-04-24 07:03:59 +01:00
str7x.s update files to correct FSF address 2013-06-05 19:52:42 +00:00
str9x.s update files to correct FSF address 2013-06-05 19:52:42 +00:00