[flashrom] Adding some functionality to the FTDI driver

Salvador Eduardo Tropea salvador at inti.gob.ar
Tue Apr 5 18:50:02 CEST 2016


Hi!

flashrom is a very nice tool. I'm using it to configure Lattice iCE40 
FPGAs. These FPGAs uses an SPI configuration memory (M25P10-A in my case).
To communicate with the flash I'm using an FTDI 2232H cable (my own 
version, supports 0.9 to 5 V signals).
The software provided by Lattice works. But I had problems with the 
command line version of the tool (the GUI is fine).
So I searched for solutions and found flashrom.
I was able to flash the chip and start the FPGA without problems. 
Flashrom is really fast and very easy to use.
Now I want to avoid some annoying details, and I thought about adding a 
couple of new options to flashrom.

My problem is that I need to control a system reset line. I can't access 
the SPI flash if the FPGA isn't in reset state (is directly connected to 
the SPI flash).
It means that I must assert the reset line, do all the flashrom stuff 
and then deassert reset. This is quite easy to implement. In fact I 
could add a new "cable" to the ftdi.c file. But this won't solve similar 
problems. So I was thinking about adding options to the FTDI driver to 
control the initial and final state of the FTDI I/O lines. This is a 
little bit more complex, but will add support for a lot of situations.

So my questions are:
1) Is this kind of addition desired.
2) Which way is preferred? simple/limited, complex/versatile.

Regards, SET

-- 
Ing. Salvador Eduardo Tropea          http://utic.inti.gob.ar/
INTI - Micro y Nanoelectrónica (CMNB) http://www.inti.gob.ar/
Unidad Técnica Sistemas Inteligentes  Av. General Paz 5445
Tel: (+54 11) 4724 6300 ext. 6919     San Martín - B1650KNA
FAX: (+54 11) 4754 5194               Buenos Aires * Argentina








More information about the flashrom mailing list