[flashrom] FAILED: MS-7302

Miloud Malagouen miloud.malagouen at gmail.com
Thu Jul 19 04:19:32 CEST 2012


Dear Sir,

I bricked a MSI MS-7302 motherboard with a bad coreboot image. I'm trying
to flash the bios with a C232HM-DDHSL-0 FTDI USB
cable<http://www.ftdichip.com/Products/Cables/USBMPSSE.htm>using the
MSI JSPI1 Header <http://www.coreboot.org/MSI_JSPI1> present on the board
for SPI connection. The FTDI cable uses a FT232H chip witch is capable of
providing a USB to SPI, I2C or JTAG interface.

The FTDI D2XX Linux driver cited that the FT232H chip has type number 6
(while the FT4232H has type 5), so i had to modify the file
*/usr/include/ftdi.h* and change the ftdi_chip_type enumeration definition:

/** FTDI chip type */
enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3,
TYPE_2232H=4, TYPE_4232H=5,*TYPE_232H=6* };

I had to add support to the FT232H chip (vid=0403 pid=6014) in the *
ft2232_spi* programmer of flashrom. I's very simple. Here is the patch of
file ft2232_spi.c:

=======================BEGIN DIFF================================
--- flashrom/ft2232_spi.c    2012-07-19 03:43:28.866724677 +0200
+++ flashrom-0.9.5.2-r1547/ft2232_spi.c    2012-07-16 05:16:53.000000000
+0200
@@ -34,6 +34,7 @@
 #define FTDI_VID        0x0403
 #define FTDI_FT2232H_PID    0x6010
 #define FTDI_FT4232H_PID    0x6011
+#define FTDI_FT232H_PID        0x6014
 #define TIAO_TUMPA_PID        0x8a98
 #define AMONTEC_JTAGKEY_PID    0xCFF8

@@ -52,6 +53,7 @@
 const struct usbdev_status devs_ft2232spi[] = {
     {FTDI_VID, FTDI_FT2232H_PID, OK, "FTDI", "FT2232H"},
     {FTDI_VID, FTDI_FT4232H_PID, OK, "FTDI", "FT4232H"},
+        {FTDI_VID, FTDI_FT232H_PID, NT, "FTDI", "FT232H"},
     {FTDI_VID, TIAO_TUMPA_PID, OK, "TIAO", "USB Multi-Protocol Adapter"},
     {FTDI_VID, AMONTEC_JTAGKEY_PID, OK, "Amontec", "JTAGkey"},
     {GOEPEL_VID, GOEPEL_PICOTAP_PID, OK, "GOEPEL", "PicoTAP"},
@@ -185,6 +187,8 @@ int ft2232_spi_init(void)
             ft2232_type = FTDI_FT2232H_PID;
         else if (!strcasecmp(arg, "4232H"))
             ft2232_type = FTDI_FT4232H_PID;
+                else if (!strcasecmp(arg, "232H"))
+                        ft2232_type = FTDI_FT232H_PID;
         else if (!strcasecmp(arg, "jtagkey")) {
             ft2232_type = AMONTEC_JTAGKEY_PID;
             ft2232_interface = INTERFACE_A;
@@ -285,7 +289,7 @@ int ft2232_spi_init(void)
         return -4;
     }

-    if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H) {
+    if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H &&
ftdic->type != TYPE_232H) {
         msg_pdbg("FTDI chip type %d is not high-speed\n",
             ftdic->type);
         clock_5x = 0;
=======================END DIFF==================================


The flash memory is probed correctly but erase an write operations failed.
Here is flashrom command (bold) and output:
____________________________________________________________________________________

*flashrom   -p ft2232_spi:type=232H,port=A -w A7302AMS.160*
flashrom v0.9.5.2-runknown on Linux 3.4.4-5.fc17.i686.PAE (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
Found Winbond flash chip "W25X80" (1024 kB, SPI) on ft2232_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... ERASE FAILED at 0x00000000!
Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x00000fff: 0x10
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000!
Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x0000ffff:
0x100
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000!
Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x000fffff:
0xffc
ERASE FAILED!
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Your flash chip is in an unknown state.
Get help on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom at flashrom.org with the subject "FAILED: <your board name>"!
-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!

____________________________________________________________________________________

The chip is powered with an external PSU (3.3V orange cable of an ATX PSU).
I will try with a 1200F capacitor on the VCC link. I hope this is just
a magnetic noise issue.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20120719/0c16dc22/attachment.html>


More information about the flashrom mailing list