[flashrom] [PATCH] Add support for PicoTAP (by GOEPEL) FT2232 SPI programmer
Samir Ibradžić
sibradzic at gmail.com
Fri Oct 14 20:00:45 CEST 2011
Hello,
I would like to submit a patch, that enables support for another FT2232
device, PicoTAP by GOEPEL electronic GmbH.
http://www.goepel.com/en/jtagboundary-scan/hardware/picotap.html
This device is actually a JTAG adapter, but since it uses standard
FT2232 A interface pins, it can be easily used as SPI programmer (tested
it here successfully). PicoTAP supports only 5V output, so one needs to
reduce this to 3.3 in a same manner as DLP Design DLP-USB1232H
(http://flashrom.org/FT2232SPI_Programmer). PicoTAP pin-out is as follows:
PicoTAP | SPI
---------+-------
TCK | SCLK
TMS | CS#
TDI | SO
TDO | SI
/TRST | -
GND | GND
+5V | VCC, HOLD# & WP# after 3.3V regulator
Btw, I managed to run PicoTAP in 10MHz, 15MHz and 30Mhz modes (by
forcing DIVIDE_BY), against SST25VF016B SPI flash, read/write/erase all
worked fine (write seems somewhat slow). For the sake of more testing,
is there any way 20Mhz can be set in FT2232?
I am also thinking about implementing passing frequency divider as an
option, for example:
# flashrom -p ft2232_spi:type=picotap,divider=2
DIVIDE_BY constant would be used as default. I think this parameter
would be useful, but would like to hear more opinions.
Index: ft2232_spi.c
===================================================================
--- ft2232_spi.c (revision 1450)
+++ ft2232_spi.c (working copy)
@@ -43,6 +43,9 @@
#define OLIMEX_ARM_OCD_H_PID 0x002B
#define OLIMEX_ARM_TINY_H_PID 0x002A
+#define GOEPEL_VID 0x096C
+#define PICOTAP_PID 0x1449
+
const struct usbdev_status devs_ft2232spi[] = {
{FTDI_VID, FTDI_FT2232H_PID, OK, "FTDI", "FT2232H"},
{FTDI_VID, FTDI_FT4232H_PID, OK, "FTDI", "FT4232H"},
@@ -53,6 +56,7 @@
{OLIMEX_VID, OLIMEX_ARM_TINY_PID, OK, "Olimex", "ARM-USB-TINY"},
{OLIMEX_VID, OLIMEX_ARM_OCD_H_PID, NT, "Olimex", "ARM-USB-OCD-H"},
{OLIMEX_VID, OLIMEX_ARM_TINY_H_PID, NT, "Olimex", "ARM-USB-TINY-H"},
+ {GOEPEL_VID, PICOTAP_PID, OK, "GOEPEL electronic GmbH", "PicoTAP"},
{},
};
@@ -66,7 +70,7 @@
* In either case, the divisor is a simple integer clock divider.
* If clock_5x is set, this divisor divides 30MHz, else it divides 6MHz.
*/
-#define DIVIDE_BY 3 /* e.g. '3' will give either 10MHz or 2MHz SPI
clock. */
+#define DIVIDE_BY 1 /* e.g. '3' will give either 10MHz or 2MHz SPI
clock. */
#define BITMODE_BITBANG_NORMAL 1
#define BITMODE_BITBANG_SPI 2
@@ -198,6 +202,10 @@
ft2232_vid = OLIMEX_VID;
ft2232_type = OLIMEX_ARM_TINY_H_PID;
ft2232_interface = INTERFACE_A;
+ } else if (!strcasecmp(arg, "picotap")) {
+ ft2232_vid = GOEPEL_VID;
+ ft2232_type = PICOTAP_PID;
+ ft2232_interface = INTERFACE_A;
} else {
msg_perr("Error: Invalid device type specified.\n");
free(arg);
R,
S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: picotap.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20111015/ef28f44c/attachment.patch>
More information about the flashrom
mailing list