[flashrom] Can ft2232_spi mode give access to GPIO bits?
Phillip Vallejo
pvallejo at pacificbiosciences.com
Mon Feb 9 18:32:29 CET 2015
Thanks! This is a custom design that uses GPIO for other functions in conjunction with flashing a rom. I think I have a working model to go forward.
Thanks again,
-Phil
-----Original Message-----
From: Antony Pavlov [mailto:antonynpavlov at gmail.com]
Sent: Sunday, February 08, 2015 4:39 AM
To: flashrom at flashrom.org
Cc: Stefan Tauner; Phillip Vallejo
Subject: Re: [flashrom] Can ft2232_spi mode give access to GPIO bits?
On Sun, 8 Feb 2015 10:22:40 +0100
Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at> wrote:
> On Thu, 29 Jan 2015 00:41:21 +0000
> Phillip Vallejo <pvallejo at pacificbiosciences.com> wrote:
>
> > In using the FT2232H chip in MPSSE with SPI there are many GPIO bits on other pins. I have 2 questions about flashrom with ft2232_spi mode:
> >
> > 1. Is there access through flashrom to those GPIO bits? (if so, where is the description?)
> >
> > 2. If not, If I use a different program before flashrom to set GPIO bits, will flashrom reset GPIO bits to a particular state?
>
> Hi,
>
> the ft2232_spi.c driver sets some non-SPI GPIO pins for some
> programmer models that require it. That's what the cs_bits and pindir
> variables are for. Check out the comments at the declaration and
> around accesses of those variables. I guess your programmer needs
> something similar too? Can you please explain why? There is no way to
> apply these settings from the command line (so far), and I am not sure
> if that would be a good idea either...
>
Please see how openocd handles this task. Here is tcl description for Flyswatter2 jtag dongle (https://gitorious.org/jtag-tools/openocd/source/9064fa9081d14eab30f7886dfa5655ba0537d017:tcl/interface/ftdi/flyswatter2.cfg):
interface ftdi
ftdi_device_desc "Flyswatter2"
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0538 0x057b
ftdi_layout_signal nTRST -data 0x0010
ftdi_layout_signal nSRST -data 0x0020 -noe 0x0100
E.g. the 'ftdi_layout_init 0x0538 0x057b' directive sets necessary output and directions init values for both high and low ft2232's ports (at the moment flashrom's ft2232_spi works only with low ft2232 port values).
I suppose it's possible to add similar options to flashrom's ft2232_spi.
--
Best regards,
Antony Pavlov
More information about the flashrom
mailing list