[flashrom] Add PICkit2 as an SPI programmer

Justin Chevrier jchevrier at gmail.com
Tue Jun 3 03:43:09 CEST 2014


Hi Stefan,

Attached is a second revision of my patch. Hopefully it addresses
everything you pointed out previously! Keep me posted if more work
needs to be done.

I have attached a log of a write as well.

Thanks again,

Justin

On Fri, May 30, 2014 at 8:27 PM, Stefan Tauner
<stefan.tauner at alumni.tuwien.ac.at> wrote:
> On Thu, 1 May 2014 13:39:44 -0400
> Justin Chevrier <jchevrier at gmail.com> wrote:
>
>> Very sorry for not replying to your email (thanks for the review by the way).
>>
>> I do have a newer patch that fixes most if not all of the points you
>> made, but I've been slacking in going over it one last time and
>> getting it sent in. I had someone contact me directly around December
>> and they successfully used this updated patch on their hardware.
>>
>> I'll see if I can get the patch brushed up and sent in shortly.
>>
>> Thanks for the reminder (ugh, can't believe it's been over one year).
>
> Hi Justin,
>
> this is just a friendly ping. I am planning to do a stable release in
> the not too distant future (next few weeks) and would like to include
> your module if it gets ready by then.
>
> --
> Kind regards/Mit freundlichen Grüßen, Stefan Tauner
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 1817)
+++ Makefile	(working copy)
@@ -137,7 +137,7 @@
 else
 override CONFIG_PONY_SPI = no
 endif
-# Dediprog and FT2232 are not supported under DOS (missing USB support).
+# Dediprog, FT2232 and PICkit2 are not supported under DOS (missing USB support).
 ifeq ($(CONFIG_DEDIPROG), yes)
 UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
 else
@@ -153,7 +153,12 @@
 else
 override CONFIG_USBBLASTER_SPI = no
 endif
+ifeq ($(CONFIG_PICKIT2_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_PICKIT2_SPI=yes
+else
+override CONFIG_PICKIT2_SPI = no
 endif
+endif
 
 # FIXME: Should we check for Cygwin/MSVC as well?
 ifeq ($(TARGET_OS), MinGW)
@@ -271,7 +276,7 @@
 else
 override CONFIG_PONY_SPI = no
 endif
-# Dediprog and FT2232 are not supported with libpayload (missing libusb support)
+# Dediprog, FT2232 and PICkit2 are not supported with libpayload (missing libusb support)
 ifeq ($(CONFIG_DEDIPROG), yes)
 UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
 else
@@ -287,7 +292,12 @@
 else
 override CONFIG_USBBLASTER_SPI = no
 endif
+ifeq ($(CONFIG_PICKIT2_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_PICKIT2_SPI=yes
+else
+override CONFIG_PICKIT2_SPI = no
 endif
+endif
 
 ifneq ($(TARGET_OS), Linux)
 ifeq ($(CONFIG_LINUX_SPI), yes)
@@ -408,6 +418,9 @@
 # Always enable Altera USB-Blaster dongles for now.
 CONFIG_USBBLASTER_SPI ?= yes
 
+# Always enable PICkit2 SPI dongles for now.
+CONFIG_PICKIT2_SPI ?= yes
+
 # Always enable dummy tracing for now.
 CONFIG_DUMMY ?= yes
 
@@ -583,6 +596,12 @@
 PROGRAMMER_OBJS += usbblaster_spi.o
 endif
 
+ifeq ($(CONFIG_PICKIT2_SPI), yes)
+FEATURE_CFLAGS += -D'CONFIG_PICKIT2_SPI=1'
+PROGRAMMER_OBJS += pickit2_spi.o
+NEED_USB := yes
+endif
+
 ifeq ($(NEED_FTDI), yes)
 FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
 FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'")
Index: flashrom.8
===================================================================
--- flashrom.8	(working copy)
+++ flashrom.8	(working copy)
@@ -1,4 +1,4 @@
-.TH FLASHROM 8 "Dec, 2012"
+.TH FLASHROM 8 "2014-06-03" "0.9.7-r1817"
 .SH NAME
 flashrom \- detect, read, write, verify and erase flash chips
 .SH SYNOPSIS
@@ -192,12 +192,16 @@
 .sp
 .BR "* atahpt" " (for flash ROMs on Highpoint ATA/RAID controllers)"
 .sp
+.BR "* atavia" " (for flash ROMs on VIA VT6421A SATA controllers)"
+.sp
+.BR "* it8212" " (for flash ROMs on ITE IT8212F ATA/RAID controller)"
+.sp
 .BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H/FT232H family \
 based USB SPI programmer), including the DLP Design DLP-USB1232H, \
 FTDI FT2232H Mini-Module, FTDI FT4232H Mini-Module, openbiosprog-spi, Amontec \
 JTAGkey/JTAGkey-tiny/JTAGkey-2, Dangerous Prototypes Bus Blaster, \
 Olimex ARM-USB-TINY/-H, Olimex ARM-USB-OCD/-H, TIAO/DIYGADGET USB
-Multi-Protocol Adapter (TUMPA), and GOEPEL PicoTAP.
+Multi-Protocol Adapter (TUMPA), TUMPA Lite, and GOEPEL PicoTAP.
 .sp
 .BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog), \
 including AVR flasher by Urja Rannikko, AVR flasher by eightdot, \
@@ -208,8 +212,7 @@
 .sp
 .BR "* dediprog" " (for SPI flash ROMs attached to a Dediprog SF100)"
 .sp
-.BR "* rayer_spi" " (for SPI flash ROMs attached to a RayeR parport "
-or Xilinx DLC5 compatible cable)
+.BR "* rayer_spi" " (for SPI flash ROMs attached to a parallel port by one of various cable types)"
 .sp
 .BR "* pony_spi" " (for SPI flash ROMs attached to a SI-Prog serial port "
 bitbanging adapter)
@@ -220,6 +223,10 @@
 .sp
 .BR "* linux_spi" " (for SPI flash ROMs accessible via /dev/spidevX.Y on Linux)"
 .sp
+.BR "* usbblaster_spi" " (for SPI flash ROMs attached to an Altera USB-Blaster compatible cable)"
+.sp
+.BR "* pickit2_spi" " (for SPI flash ROMs accessible via Microchip PICkit2)"
+.sp
 Some programmers have optional or mandatory parameters which are described
 in detail in the
 .B PROGRAMMER SPECIFIC INFO
@@ -313,6 +320,19 @@
 .TP
 .B ITE IT87 Super I/O
 .sp
+If your mainboard is manufactured by GIGABYTE and supports DualBIOS it is very likely that it uses an
+ITE IT87 series Super I/O to switch between the two flash chips. Only one of them can be accessed at a time
+and you can manually select which one to use with the
+.sp
+.B "  flashrom \-p internal:dualbiosindex=chip"
+.sp
+syntax where
+.B chip
+is the index of the chip to use (0 = main, 1 = backup). You can check which one is currently selected by
+leaving out the
+.B chip
+parameter.
+.sp
 If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus
 translation, flashrom should autodetect that configuration. If you want to
 set the I/O base port of the IT87 series SPI controller manually instead of
@@ -327,6 +347,44 @@
 report so we can diagnose the problem.
 .sp
 .TP
+.B AMD chipsets
+.sp
+Beginning with the SB700 chipset there is an integrated microcontroller (IMC) based on the 8051 embedded in
+every AMD southbridge. Its firmware resides in the same flash chip as the host's which makes writing to the
+flash risky if the IMC is active. Flashrom tries to temporarily disable the IMC but even then changing the
+contents of the flash can have unwanted effects: when the IMC continues (at the latest after a reboot) it will
+continue executing code from the flash. If the code was removed or changed in an unfortunate way it is
+unpredictable what the IMC will do. Therefore, if flashrom detects an active IMC it will disable write support
+unless the user forces it with the
+.sp
+.B "  flashrom \-p internal:amd_imc_force=yes"
+.sp
+syntax. The user is responsible for supplying a suitable image or leaving out the IMC region with the help of
+a layout file. This limitation might be removed in the future when we understand the details better and have
+received enough feedback from users. Please report the outcome if you had to use this option to write a chip.
+.sp
+An optional
+.B spispeed
+parameter specifies the frequency of the SPI bus where applicable (i.e.\& SB600 or later with an SPI flash chip
+directly attached to the chipset).
+Syntax is
+.sp
+.B "  flashrom \-p internal:spispeed=frequency"
+.sp
+where
+.B frequency
+can be
+.BR "'16.5\ MHz'" ", " "'22\ MHz'" ", " "'33\ MHz'" ", " "'66\ MHz'" ", " "'100\ MHZ'" ", or " "'800\ kHz'" "."
+Support of individual frequencies depends on the generation of the chipset:
+.sp
+* SB6xx, SB7xx, SP5xxx: from 16.5 MHz up to and including 33 MHz
+.sp
+* SB8xx, SB9xx, Hudson: from 16.5 MHz up to and including 66 MHz
+.sp
+* Yangtze (with SPI 100 engine as found in Kabini and Tamesh): all of them
+.sp
+The default is to use 16.5 MHz and disable Fast Reads.
+.TP
 .B Intel chipsets
 .sp
 If you have an Intel chipset with an ICH8 or later southbridge with SPI flash
@@ -365,7 +423,7 @@
 probably bring it into an inconsistent and unbootable state and we will not
 provide any support in such a case.
 .sp
-If you have an Intel chipset with an ICH6 or later southbridge and if you want
+If you have an Intel chipset with an ICH2 or later southbridge and if you want
 to set specific IDSEL values for a non-default flash chip or an embedded
 controller (EC), you can use the
 .sp
@@ -535,9 +593,9 @@
 .B content
 is an 8-bit hexadecimal value.
 .SS
-.BR "nic3com" , " nicrealtek" , " nicnatsemi" , " nicintel\
-" , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii\
-" , " satamv" ", and " atahpt " programmers
+.BR "nic3com" , " nicrealtek" , " nicnatsemi" , " nicintel"\
+, " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii"\
+, " satamv" , " atahpt" ", " atavia " and " it8212 " programmers
 These programmers have an option to specify the PCI address of the card
 your want to use, which must be specified if more than one card supported
 by the selected programmer is installed in your system. The syntax is
@@ -546,7 +604,7 @@
 .sp
 where
 .B xxxx
-is the name of the programmer
+is the name of the programmer,
 .B bb
 is the PCI bus number,
 .B dd
@@ -557,6 +615,18 @@
 Example:
 .B "flashrom \-p nic3com:pci=05:04.0"
 .SS
+.BR "atavia " programmer
+Due to the mysterious address handling of the VIA VT6421A controller the user can specify an offset with the
+.sp
+.B "  flashrom \-p atavia:offset=addr"
+.sp
+syntax where
+.B addr
+will be interpreted as usual (leading 0x (0) for hexadecimal (octal) values, or else decimal).
+For more information please see
+.nh
+.B http://flashrom.org/VT6421A
+.SS
 .BR "ft2232_spi " programmer
 An optional parameter specifies the controller
 type and channel/interface/port it should support. For that you have to use the
@@ -568,7 +638,7 @@
 can be
 .BR 2232H ", " 4232H ", " 232H ", " jtagkey ", " busblaster ", " openmoko ", " \
 arm-usb-tiny ", " arm-usb-tiny-h ", " arm-usb-ocd ", " arm-usb-ocd-h \
-", " tumpa ", or " picotap
+", " tumpa ", " tumpalite ", or " picotap
 and
 .B interface
 can be
@@ -588,7 +658,9 @@
 is the serial number of the device (which can be found for example in the output of lsusb -v).
 .sp
 All models supported by the ft2232_spi driver can configure the SPI clock rate by setting a divisor. The
-expressible divisors are all even numbers between 2 and 2^17 (=131072) resulting in SPI clock frequencies of
+expressible divisors are all
+.B even
+numbers between 2 and 2^17 (=131072) resulting in SPI clock frequencies of
 6 MHz down to about 92 Hz for 12 MHz inputs. The default divisor is set to 2, but you can use another one by
 specifying the optional
 .B divisor
@@ -613,12 +685,12 @@
 instead. In case the device supports it, you can set the SPI clock frequency
 with the optional
 .B spispeed
-parameter. The frequency is parsed as Hertz, unless an
+parameter. The frequency is parsed as hertz, unless an
 .BR M ", or " k
 suffix is given, then megahertz or kilohertz are used respectively.
 Example that sets the frequency to 2 MHz:
 .sp
-.B "flashrom \-p serprog:dev=/dev/device:baud,spispeed=2M"
+.B "  flashrom \-p serprog:dev=/dev/device:baud,spispeed=2M"
 .sp
 More information about serprog is available in
 .B serprog-protocol.txt
@@ -654,6 +726,34 @@
 .BR "http://dangerousprototypes.com/docs/Practical_guide_to_Bus_Pirate_pull-up_resistors " .
 Only the external supply voltage (Vpu) is supported as of this writing.
 .SS
+.BR "pickit2_spi " programmer
+.B voltage
+parameter specifies the voltage the PICkit2 should use. The default unit is
+Volt if no unit is specified. You can use
+.BR mV ", " milliVolt ", " V " or " Volt
+as unit specifier. Syntax is
+.sp
+.B "  flashrom \-p pickit2_spi:voltage=value"
+.sp
+where
+.B value
+can be
+.BR 0V ", " 1.8V ", " 2.5V ", " 3.5V
+or the equivalent in mV.
+.sp
+An optional
+.B spispeed
+parameter specifies the frequency of the SPI bus.
+Syntax is
+.sp
+.B "  flashrom \-p pickit2_spi:spispeed=frequency"
+.sp
+where
+.B frequency
+can be
+.BR 250k ", " 333k ", " 500k " or " 1M "
+(in Hz). The default is a frequency of 1 MHz.
+.SS
 .BR "dediprog " programmer
 An optional
 .B voltage
@@ -681,7 +781,8 @@
 .sp
 An optional
 .B spispeed
-parameter specifies the frequency of the SPI bus. Syntax is
+parameter specifies the frequency of the SPI bus. The firmware on the device needs to be 5.0.0 or newer.
+Syntax is
 .sp
 .B "  flashrom \-p dediprog:spispeed=frequency"
 .sp
@@ -690,6 +791,18 @@
 can be
 .BR 375k ", " 750k ", " 1.5M ", " 2.18M ", " 3M ", " 8M ", " 12M " or " 24M
 (in Hz). The default is a frequency of 12 MHz.
+.sp
+An optional
+.B target
+parameter specifies which target chip should be used. Syntax is
+.sp
+.B "  flashrom \-p dediprog:target=value"
+.sp
+where
+.B value
+can be
+.BR 1 " or " 2
+to select target chip 1 or 2 repectively. The default is target chip 1.
 .SS
 .BR "rayer_spi " programmer
 The default I/O base address used for the parallel port is 0x378 and you can use
@@ -713,15 +826,21 @@
 syntax where
 .B model
 can be
-.BR rayer " for the RayeR cable or " xilinx " for the Xilinx Parallel Cable III
-(DLC 5).
+.BR rayer " for the RayeR cable, " byteblastermv " for the Altera ByteBlasterMV, " stk200 " for the Atmel \
+STK200/300, " wiggler " for the Macraigor Wiggler, or " xilinx " for the Xilinx Parallel Cable III (DLC 5)."
 .sp
 More information about the RayeR hardware is available at
 .nh
 .BR "http://rayer.ic.cz/elektro/spipgm.htm " .
-The schematic of the Xilinx DLC 5 was published at
+The Altera ByteBlasterMV datasheet can be obtained from
 .nh
-.BR "http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html " .
+.BR "http://www.altera.co.jp/literature/ds/dsbytemv.pdf " .
+For more information about the Macraigor Wiggler see
+.nh
+.BR "http://www.macraigor.com/wiggler.htm " .
+The schematic of the Xilinx DLC 5 was published in
+.nh
+.BR "http://www.xilinx.com/support/documentation/user_guides/xtp029.pdf " .
 .SS
 .BR "pony_spi " programmer
 The serial port (like /dev/ttyS0, /dev/ttyUSB0 on Linux or COM3 on windows) is
@@ -782,6 +901,13 @@
 .B /dev/spidevX.Y
 is the Linux device node for your SPI controller.
 .sp
+In case the device supports it, you can set the SPI clock frequency with the optional
+.B spispeed
+parameter. The frequency is parsed as kilohertz.
+Example that sets the frequency to 8 MHz:
+.sp
+.B "  flashrom \-p linux_spi:dev=/dev/spidevX.Y,spispeed=8000"
+.sp
 Please note that the linux_spi driver only works on Linux.
 .SH EXAMPLES
 To back up and update your BIOS, run
@@ -803,8 +929,7 @@
 .B BUGS
 for contact info.
 .SH EXIT STATUS
-flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
-(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
+flashrom exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails.
 .SH REQUIREMENTS
 flashrom needs different access permissions for different programmers.
 .sp
@@ -812,13 +937,16 @@
 needs raw memory access, PCI configuration space access, raw I/O port
 access (x86) and MSR access (x86).
 .sp
+.B atavia
+needs PCI configuration space access.
+.sp
 .BR nic3com ", " nicrealtek " and " nicnatsemi "
 need PCI configuration space read access and raw I/O port access.
 .sp
 .B atahpt
 needs PCI configuration space access and raw I/O port access.
 .sp
-.BR gfxnvidia " and " drkaiser
+.BR gfxnvidia ", " drkaiser " and " it8212
 need PCI configuration space access and raw memory access.
 .sp
 .B rayer_spi
@@ -837,17 +965,17 @@
 .B buspirate_spi
 needs userspace access to a serial port.
 .sp
-.BR dediprog " and " ft2232_spi
+.BR dediprog ", " ft2232_spi " and " usbblaster_spi and " pickit2_spi
 need access to the USB device via libusb.
 .sp
 .B dummy
 needs no access permissions at all.
 .sp
 .BR internal ", " nic3com ", " nicrealtek ", " nicnatsemi ", "
-.BR gfxnvidia ", " drkaiser ", " satasii ", " satamv " and " atahpt
+.BR gfxnvidia ", " drkaiser ", " satasii ", " satamv ", " atahpt" and " atavia
 have to be run as superuser/root, and need additional raw access permission.
 .sp
-.BR serprog ", " buspirate_spi ", " dediprog " and " ft2232_spi
+.BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi " and " ft2232_spi and " pickit2_spi
 can be run as normal user on most operating systems if appropriate device
 permissions are set.
 .sp
Index: flashrom.8.tmpl
===================================================================
--- flashrom.8.tmpl	(revision 1817)
+++ flashrom.8.tmpl	(working copy)
@@ -225,6 +225,8 @@
 .sp
 .BR "* usbblaster_spi" " (for SPI flash ROMs attached to an Altera USB-Blaster compatible cable)"
 .sp
+.BR "* pickit2_spi" " (for SPI flash ROMs accessible via Microchip PICkit2)"
+.sp
 Some programmers have optional or mandatory parameters which are described
 in detail in the
 .B PROGRAMMER SPECIFIC INFO
@@ -724,6 +726,34 @@
 .BR "http://dangerousprototypes.com/docs/Practical_guide_to_Bus_Pirate_pull-up_resistors " .
 Only the external supply voltage (Vpu) is supported as of this writing.
 .SS
+.BR "pickit2_spi " programmer
+.B voltage
+parameter specifies the voltage the PICkit2 should use. The default unit is
+Volt if no unit is specified. You can use
+.BR mV ", " milliVolt ", " V " or " Volt
+as unit specifier. Syntax is
+.sp
+.B "  flashrom \-p pickit2_spi:voltage=value"
+.sp
+where
+.B value
+can be
+.BR 0V ", " 1.8V ", " 2.5V ", " 3.5V
+or the equivalent in mV.
+.sp
+An optional
+.B spispeed
+parameter specifies the frequency of the SPI bus.
+Syntax is
+.sp
+.B "  flashrom \-p pickit2_spi:spispeed=frequency"
+.sp
+where
+.B frequency
+can be
+.BR 250k ", " 333k ", " 500k " or " 1M "
+(in Hz). The default is a frequency of 1 MHz.
+.SS
 .BR "dediprog " programmer
 An optional
 .B voltage
@@ -935,7 +965,7 @@
 .B buspirate_spi
 needs userspace access to a serial port.
 .sp
-.BR dediprog ", " ft2232_spi " and " usbblaster_spi
+.BR dediprog ", " ft2232_spi " and " usbblaster_spi and " pickit2_spi
 need access to the USB device via libusb.
 .sp
 .B dummy
@@ -945,7 +975,7 @@
 .BR gfxnvidia ", " drkaiser ", " satasii ", " satamv ", " atahpt" and " atavia
 have to be run as superuser/root, and need additional raw access permission.
 .sp
-.BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi " and " ft2232_spi
+.BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi " and " ft2232_spi and " pickit2_spi
 can be run as normal user on most operating systems if appropriate device
 permissions are set.
 .sp
Index: flashrom.c
===================================================================
--- flashrom.c	(revision 1817)
+++ flashrom.c	(working copy)
@@ -345,6 +345,19 @@
 	},
 #endif
 
+#if CONFIG_PICKIT2_SPI == 1
+	{
+		.name			= "pickit2_spi",
+		.type			= OTHER,
+					/* FIXME */
+		.devs.note		= "Microchip PICkit2\n",
+		.init			= pickit2_spi_init,
+		.map_flash_region	= fallback_map,
+		.unmap_flash_region	= fallback_unmap,
+		.delay			= internal_delay,
+	},
+#endif
+
 	{0}, /* This entry corresponds to PROGRAMMER_INVALID. */
 };
 
Index: pickit2_spi.c
===================================================================
--- pickit2_spi.c	(revision 0)
+++ pickit2_spi.c	(working copy)
@@ -0,0 +1,527 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2010 Carl-Daniel Hailfinger
+ * Copyright (C) 2014 Justin Chevrier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/*
+ * Connections are as follows:
+ *
+ *      +------+-----+----------+
+ *      | SPI  | Pin | PICkit2  |
+ *      +------+-----+----------+
+ *      | /CS  | 1   | VPP/MCLR |
+ *      | VCC  | 2   | VDD      |
+ *      | GND  | 3   | GND      |
+ *      | MISO | 4   | PGD      |
+ *      | SCLK | 5   | PDC      |
+ *      | MOSI | 6   | AUX      |
+ *      +------+-----+----------+
+ *
+ * Inspiration and some specifics of the interface came via the AVRDude 
+ * PICkit2 code: https://github.com/steve-m/avrdude/blob/master/pickit2.c
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+#include <usb.h>
+#include "flash.h"
+#include "chipdrivers.h"
+#include "programmer.h"
+#include "spi.h"
+
+static usb_dev_handle *pickit2_handle;
+
+/* Default USB transaction timeout in ms */
+#define DEFAULT_TIMEOUT         10000
+
+#define CMD_LENGTH              64
+#define ENDPOINT_OUT            0x01
+#define ENDPOINT_IN             0x81
+
+#define PICKIT2_VID             0x04D8
+#define PICKIT2_PID             0x0033
+
+#define CMD_GET_VERSION         0x76
+#define CMD_SET_VDD             0xA0
+#define CMD_SET_VPP             0xA1
+#define CMD_READ_VDD_VPP        0xA3
+#define CMD_EXEC_SCRIPT         0xA6
+#define CMD_CLR_DLOAD_BUFF      0xA7
+#define CMD_DOWNLOAD_DATA       0xA8
+#define CMD_CLR_ULOAD_BUFF      0xA9
+#define CMD_UPLOAD_DATA         0xAA
+#define CMD_END_OF_BUFFER       0xAD
+
+#define SCR_SPI_READ_BUF        0xC5
+#define SCR_SPI_WRITE_BUF       0xC6
+#define SCR_SET_AUX             0xCF
+#define SCR_LOOP                0xE9
+#define SCR_SET_ICSP_CLK_PERIOD 0xEA
+#define SCR_SET_PINS            0xF3
+#define SCR_BUSY_LED_OFF        0xF4
+#define SCR_BUSY_LED_ON         0xF5
+#define SCR_MCLR_GND_OFF        0xF6
+#define SCR_MCLR_GND_ON         0xF7
+#define SCR_VPP_PWM_OFF         0xF8
+#define SCR_VPP_PWM_ON          0xF9
+#define SCR_VPP_OFF             0xFA
+#define SCR_VPP_ON              0xFB
+#define SCR_VDD_OFF             0xFE
+#define SCR_VDD_ON              0xFF
+
+/* Copied from dediprog.c */
+/* Might be useful for other USB devices as well. static for now. */
+/* device parameter allows user to specify one device of multiple installed */
+static struct usb_device *get_device_by_vid_pid(uint16_t vid, uint16_t pid, unsigned int device)
+{
+	struct usb_bus *bus;
+	struct usb_device *dev;
+
+	for (bus = usb_get_busses(); bus; bus = bus->next)
+		for (dev = bus->devices; dev; dev = dev->next)
+			if ((dev->descriptor.idVendor == vid) &&
+			    (dev->descriptor.idProduct == pid)) {
+				if (device == 0)
+					return dev;
+				device--;
+			}
+
+	return NULL;
+}
+
+static int pickit2_get_firmware_version(void)
+{
+	int ret;
+	uint8_t command[CMD_LENGTH] = {CMD_GET_VERSION, CMD_END_OF_BUFFER};
+
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)command, CMD_LENGTH, DEFAULT_TIMEOUT);
+	ret = usb_interrupt_read(pickit2_handle, ENDPOINT_IN, (char *)command, CMD_LENGTH, DEFAULT_TIMEOUT);
+	
+	msg_pdbg("PICkit2 Firmware Version: %d.%d\n", (int)command[0], (int)command[1]);
+	if (ret != CMD_LENGTH) {
+		msg_perr("Command Get Firmware Version failed (%s)!\n",
+			 usb_strerror());
+		return 1;
+	}
+
+	return 0;
+}
+
+static int pickit2_set_spi_voltage(int millivolt)
+{
+	int ret;
+	double voltage_selector;
+
+	switch (millivolt) {
+	case 0:
+		/* Admittedly this one is an assumption. */
+		voltage_selector = 0;
+		break;
+	case 1800:
+		voltage_selector = 1.8;
+		break;
+	case 2500:
+		voltage_selector = 2.5;
+		break;
+	case 3500:
+		voltage_selector = 3.5;
+		break;
+	default:
+		msg_perr("Unknown voltage %i mV! Aborting.\n", millivolt);
+		return 1;
+	}
+	msg_pdbg("Setting SPI voltage to %u.%03u V\n", millivolt / 1000,
+		 millivolt % 1000);
+
+	uint8_t command[CMD_LENGTH] = {
+		CMD_SET_VDD,
+		voltage_selector * 2048 + 672,
+		(voltage_selector * 2048 + 672) / 256,
+		voltage_selector * 36,
+		CMD_SET_VPP,
+		0x40,
+		voltage_selector * 18.61,
+		voltage_selector * 13,
+		CMD_END_OF_BUFFER
+	};
+
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)command, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+	if (ret != CMD_LENGTH) {
+		msg_perr("Command Set Voltage failed (%s)!\n",
+			 usb_strerror());
+		return 1;
+	}
+
+	return 0;
+}
+
+
+struct pickit2_spispeeds {
+	const char *const name;
+	const int speed;
+};
+
+static const struct pickit2_spispeeds spispeeds[] = {
+	{ "1M",		0x1 },
+	{ "500k",	0x2 },
+	{ "333k",	0x3 },
+	{ "250k",	0x4 },
+	{ NULL,		0x0 },
+};
+
+static int pickit2_set_spi_speed(unsigned int spispeed_idx)
+{
+	int ret;
+
+	msg_pdbg("SPI speed is %sHz\n", spispeeds[spispeed_idx].name);
+
+	uint8_t command[CMD_LENGTH] = {
+		CMD_EXEC_SCRIPT,
+		2,
+		SCR_SET_ICSP_CLK_PERIOD,
+		spispeed_idx,
+		CMD_END_OF_BUFFER
+	};
+
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)command, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+	if (ret != CMD_LENGTH) {
+		msg_perr("Command Set SPI Speed failed (%s)!\n",
+			 usb_strerror());
+		return 1;
+	}
+
+	return 0;
+}
+
+static int pickit2_spi_send_command(struct flashctx *flash,
+				     unsigned int writecnt,
+				     unsigned int readcnt,
+				     const unsigned char *writearr,
+				     unsigned char *readarr)
+{
+	int ret, i;
+
+	uint8_t buf[CMD_LENGTH] = {CMD_DOWNLOAD_DATA, writecnt};
+
+	/* Maximum number of bytes per transaction (including command overhead) is 64. Lets play it safe
+	 * and always assume the worst case scenario of 20 bytes command overhead.
+	 */
+	msg_pspew("%s, writecnt=%i, readcnt=%i\n", __func__, writecnt, readcnt);
+	if (writecnt + readcnt + 20 > CMD_LENGTH) {
+		msg_perr("\nTotal packetsize (%i) is greater than 64 supported, aborting.\n", writecnt + readcnt + 20);
+		return 1;
+	}
+
+	for (i = 2; i < writecnt + 2; i++) {
+		buf[i] = writearr[i - 2];
+	}
+
+	buf[i++] = CMD_CLR_ULOAD_BUFF;
+	buf[i++] = CMD_EXEC_SCRIPT;
+
+	/* Determine script length based on number of bytes to be read or written */
+	if (writecnt == 1 && readcnt == 1)
+		buf[i++] = 7;
+	else if (writecnt == 1 || readcnt == 1)
+		buf[i++] = 10;
+	else
+		buf[i++] = 13;
+		
+	/* Assert CS# */
+	buf[i++] = SCR_VPP_OFF;
+	buf[i++] = SCR_MCLR_GND_ON;
+
+	buf[i++] = SCR_SPI_WRITE_BUF;
+
+	if (writecnt > 1) {
+		buf[i++] = SCR_LOOP;
+		buf[i++] = 1; /* Loop back one instruction */
+		buf[i++] = writecnt - 1; /* Number of times to loop */
+	}
+
+	if (readcnt)
+		buf[i++] = SCR_SPI_READ_BUF;
+
+	if (readcnt > 1) {
+		buf[i++] = SCR_LOOP;
+		buf[i++] = 1; /* Loop back one instruction */
+		buf[i++] = readcnt - 1; /* Number of times to loop */
+	}
+
+	/* De-assert CS# */
+	buf[i++] = SCR_MCLR_GND_OFF;
+	buf[i++] = SCR_VPP_PWM_ON;
+	buf[i++] = SCR_VPP_ON;
+
+	buf[i++] = CMD_UPLOAD_DATA;
+	buf[i++] = CMD_END_OF_BUFFER;
+
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)buf, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+	if (ret != CMD_LENGTH) {
+		msg_perr("Send SPI failed, expected %i, got %i %s!\n",
+			writecnt, ret, usb_strerror());
+			return 1;
+	}
+
+	if (readcnt) {
+		ret = usb_interrupt_read(pickit2_handle, ENDPOINT_IN, (char *)buf, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+		if (ret != CMD_LENGTH) {
+			msg_perr("Receive SPI failed, expected %i, got %i %s!\n",
+				readcnt, ret, usb_strerror());
+			return 1;
+		}
+
+		/* First byte indicates number of bytes transferred from upload buffer */
+		if (buf[0] != readcnt) {
+			msg_perr("Unexpected number of bytes transferred, expected %i, got %i!\n",
+				 readcnt, ret);
+			return 1;
+		}
+		
+		/* Actual data starts at byte number two */
+		memcpy(readarr, &buf[1], readcnt);
+	}
+
+	return 0;
+}
+
+/* Copied from dediprog.c */
+/* Might be useful for other USB devices as well. static for now. */
+static int parse_voltage(char *voltage)
+{
+	char *tmp = NULL;
+	int i;
+	int millivolt = 0, fraction = 0;
+
+	if (!voltage || !strlen(voltage)) {
+		msg_perr("Empty voltage= specified.\n");
+		return -1;
+	}
+	millivolt = (int)strtol(voltage, &tmp, 0);
+	voltage = tmp;
+	/* Handle "," and "." as decimal point. Everything after it is assumed
+	 * to be in decimal notation.
+	 */
+	if ((*voltage == '.') || (*voltage == ',')) {
+		voltage++;
+		for (i = 0; i < 3; i++) {
+			fraction *= 10;
+			/* Don't advance if the current character is invalid,
+			 * but continue multiplying.
+			 */
+			if ((*voltage < '0') || (*voltage > '9'))
+				continue;
+			fraction += *voltage - '0';
+			voltage++;
+		}
+		/* Throw away remaining digits. */
+		voltage += strspn(voltage, "0123456789");
+	}
+	/* The remaining string must be empty or "mV" or "V". */
+	tolower_string(voltage);
+
+	/* No unit or "V". */
+	if ((*voltage == '\0') || !strncmp(voltage, "v", 1)) {
+		millivolt *= 1000;
+		millivolt += fraction;
+	} else if (!strncmp(voltage, "mv", 2) ||
+		   !strncmp(voltage, "milliv", 6)) {
+		/* No adjustment. fraction is discarded. */
+	} else {
+		/* Garbage at the end of the string. */
+		msg_perr("Garbage voltage= specified.\n");
+		return -1;
+	}
+	return millivolt;
+}
+
+static const struct spi_programmer spi_programmer_pickit2 = {
+	.type		= SPI_CONTROLLER_PICKIT2,
+	.max_data_read	= 40,
+	.max_data_write	= 40,
+	.command	= pickit2_spi_send_command,
+	.multicommand	= default_spi_send_multicommand,
+	.read		= default_spi_read,
+	.write_256	= default_spi_write_256,
+	.write_aai	= default_spi_write_aai,
+};
+
+static int pickit2_shutdown(void *data)
+{
+	int ret;
+	msg_pspew("%s\n", __func__);
+
+	/* Set all pins to float and turn voltages off */
+	uint8_t command[CMD_LENGTH] = {
+		CMD_EXEC_SCRIPT,
+		8,
+		SCR_SET_PINS,
+		/* Bit-0=1(PDC In), Bit-1=1(PGD In), Bit-2=0(PDC LL), Bit-3=0(PGD LL) */
+		3,
+		SCR_SET_AUX,
+		/* Bit-0=1(Aux In), Bit-1=0(Aux LL) */
+		1,
+		SCR_MCLR_GND_OFF,
+		SCR_VPP_OFF,
+		SCR_VDD_OFF,
+		SCR_BUSY_LED_OFF,
+		CMD_END_OF_BUFFER
+	};
+
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)command, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+	if (ret != CMD_LENGTH) {
+		msg_perr("Command Shutdown failed (%s)!\n",
+			 usb_strerror());
+		return 1;
+	}
+
+	if (usb_release_interface(pickit2_handle, 0)) {
+		msg_perr("Could not release USB interface!\n");
+		return 1;
+	}
+	if (usb_close(pickit2_handle)) {
+		msg_perr("Could not close USB device!\n");
+		return 1;
+	}
+	return 0;
+}
+
+int pickit2_spi_init(void)
+{
+	struct usb_device *dev;
+	char *voltage, *spispeed;
+	int spispeed_idx = 0;
+	int millivolt = 3500;
+	long usedevice = 0;
+	int i, ret;
+
+	uint8_t buf[CMD_LENGTH] = {
+		CMD_EXEC_SCRIPT,
+		10,			/* Script length */
+		SCR_SET_PINS,
+		/* Bit-0=0(PDC Out), Bit-1=1(PGD In), Bit-2=0(PDC LL), Bit-3=0(PGD LL) */
+		2,
+		SCR_SET_AUX,
+		/* Bit-0=0(Aux Out), Bit-1=0(Aux LL) */
+		0,
+		SCR_VDD_ON,
+		SCR_MCLR_GND_OFF,	/* Let CS# float */
+		SCR_VPP_PWM_ON,
+		SCR_VPP_ON,		/* Pull CS# high */
+		SCR_BUSY_LED_ON,
+		CMD_CLR_DLOAD_BUFF,
+		CMD_CLR_ULOAD_BUFF,
+		CMD_END_OF_BUFFER
+	};
+
+	msg_pspew("%s\n", __func__);
+
+	spispeed = extract_programmer_param("spispeed");
+	if (spispeed) {
+		for (i = 0; spispeeds[i].name; ++i) {
+			if (!strcasecmp(spispeeds[i].name, spispeed)) {
+				spispeed_idx = i;
+				break;
+			}
+		}
+		if (!spispeeds[i].name) {
+			msg_perr("Error: Invalid 'spispeed' value.\n");
+			free(spispeed);
+			return 1;
+		}
+		free(spispeed);
+	}
+	voltage = extract_programmer_param("voltage");
+	if (voltage) {
+		millivolt = parse_voltage(voltage);
+		free(voltage);
+		if (millivolt < 0)
+			return 1;
+		msg_pinfo("Setting voltage to %i mV\n", millivolt);
+	}
+
+	/* Here comes the USB stuff */
+	usb_init();
+	usb_find_busses();
+	usb_find_devices();
+	dev = get_device_by_vid_pid(PICKIT2_VID, PICKIT2_PID, (unsigned int) usedevice);
+	if (!dev) {
+		msg_perr("Could not find a PICkit2 on USB!\n");
+		return 1;
+	}
+	msg_pdbg("Found USB device (%04x:%04x).\n",
+		 dev->descriptor.idVendor, dev->descriptor.idProduct);
+
+	pickit2_handle = usb_open(dev);
+	ret = usb_set_configuration(pickit2_handle, 1);
+	if (ret < 0) {
+		msg_perr("Could not set USB device configuration: %i %s\n",
+			 ret, usb_strerror());
+		if (usb_close(pickit2_handle))
+			msg_perr("Could not close USB device!\n");
+		return 1;
+	}
+	ret = usb_claim_interface(pickit2_handle, 0);
+	if (ret < 0) {
+		msg_perr("Could not claim USB device interface %i: %i %s\n",
+			 0, ret, usb_strerror());
+		if (usb_close(pickit2_handle))
+			msg_perr("Could not close USB device!\n");
+		return 1;
+	}
+
+	if (register_shutdown(pickit2_shutdown, NULL))
+		return 1;
+
+	if (pickit2_get_firmware_version()) {
+		return 1;
+	}
+
+	/* Command Set SPI Speed */
+	if (pickit2_set_spi_speed(spispeed_idx)) {
+		return 1;
+	}
+
+	/* Command Set SPI Voltage */
+	if (pickit2_set_spi_voltage(millivolt)) {
+		return 1;
+	}
+
+	/* Perform basic setup */
+	/* Configure pins for correct directions and logic levels,
+	 * turn Vdd on, turn busy LED on and clear buffers
+	 */
+	ret = usb_interrupt_write(pickit2_handle, ENDPOINT_OUT, (char *)buf, CMD_LENGTH, DEFAULT_TIMEOUT);
+
+	if (ret != CMD_LENGTH) {
+		msg_perr("Command Setup failed (%s)!\n",
+			  usb_strerror());
+		return 1;
+	}
+
+	register_spi_programmer(&spi_programmer_pickit2);
+
+	return 0;
+}
Index: programmer.h
===================================================================
--- programmer.h	(revision 1817)
+++ programmer.h	(working copy)
@@ -96,6 +96,9 @@
 #if CONFIG_USBBLASTER_SPI == 1
 	PROGRAMMER_USBBLASTER_SPI,
 #endif
+#if CONFIG_PICKIT2_SPI == 1
+	PROGRAMMER_PICKIT2_SPI,
+#endif
 	PROGRAMMER_INVALID /* This must always be the last entry. */
 };
 
@@ -464,6 +467,11 @@
 extern const struct dev_entry devs_usbblasterspi[];
 #endif
 
+/* pickit2_spi.c */
+#if CONFIG_PICKIT2_SPI == 1
+int pickit2_spi_init(void);
+#endif
+
 /* rayer_spi.c */
 #if CONFIG_RAYER_SPI == 1
 int rayer_spi_init(void);
@@ -546,6 +554,9 @@
 #if CONFIG_USBBLASTER_SPI == 1
 	SPI_CONTROLLER_USBBLASTER,
 #endif
+#if CONFIG_PICKIT2_SPI == 1
+	SPI_CONTROLLER_PICKIT2,
+#endif
 };
 
 #define MAX_DATA_UNSPECIFIED 0
-------------- next part --------------
flashrom v0.9.7-r1817 on Linux 3.10.17-gentoo (x86_64)
flashrom is free software, get the source code at http://www.flashrom.org

flashrom was built with libpci 3.2.0, GCC 4.7.3, little endian
Command line (5 args): ./flashrom --programmer pickit2_spi:voltage=3.5 -w output.rom -V
Calibrating delay loop... OS timer resolution is 1 usecs, 2655M loops per second, 10 myus = 13 us, 100 myus = 100 us, 1000 myus = 1001 us, 10000 myus = 10005 us, 4 myus = 4 us, OK.
Initializing pickit2_spi programmer
Setting voltage to 3500 mV
Found USB device (04d8:0033).
PICkit2 Firmware Version: 2.32
SPI speed is 1MHz
Setting SPI voltage to 3.500 V
The following protocols are supported: SPI.
Probing for AMIC A25L05PT, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L05PU, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L10PT, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L10PU, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L20PT, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L20PU, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L40PT, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L40PU, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L80P, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L16PT, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L16PU, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L512, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L010, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L020, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L040, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L080, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L016, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25L032, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25LQ16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25LQ032/A25LQ32A, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for AMIC A25LQ64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF021, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF041A, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF081, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF081A, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF161, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF321, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF321A, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DF641(A), 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DL081, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DL161, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25DQ161, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25F512, 64 kB: probe_spi_at25f: id1 0x00, id2 0x00
Probing for Atmel AT25F512A, 64 kB: probe_spi_at25f: id1 0x00, id2 0x00
Probing for Atmel AT25F512B, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25F1024(A), 128 kB: probe_spi_at25f: id1 0x00, id2 0x00
Probing for Atmel AT25F2048, 256 kB: probe_spi_at25f: id1 0x00, id2 0x00
Probing for Atmel AT25F4096, 512 kB: probe_spi_at25f: id1 0x00, id2 0x00
Probing for Atmel AT25FS010, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT25FS040, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT26DF041, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT26DF081A, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT26DF161, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT26DF161A, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT26F004, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45CS1282, 16896 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB011D, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB021D, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB041D, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB081D, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB161D, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB321C, 4224 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB321D, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB321E, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel AT45DB642D, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for ESMT F25L008A, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for ESMT F25L32PA, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B05, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B05T, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B10T, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B20T, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B40T, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B80T, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B16T, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B32T, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25B64T, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F05, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25F64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q80(A), 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q32(A/B), 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25Q128, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25QH16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25QH32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25QH64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25QH128, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon EN25S64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25LQ32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q512, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q20(B), 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q40(B), 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q80(B), 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Found GigaDevice flash chip "GD25Q80(B)" (1024 kB, SPI) on pickit2_spi.
Chip status register is 0x00.
Chip status register: Status Register Write Disable (SRWD, SRP, ...) is not set
Chip status register: Block Protect 4 (BP4) is not set
Chip status register: Block Protect 3 (BP3) is not set
Chip status register: Block Protect 2 (BP2) is not set
Chip status register: Block Protect 1 (BP1) is not set
Chip status register: Block Protect 0 (BP0) is not set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
Probing for GigaDevice GD25Q16(B), 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q32(B), 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q64(B), 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25Q128B, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for GigaDevice GD25T80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F160S33B8, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F160S33T8, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F320S33B8, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F320S33T8, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F640S33B8, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Intel 25F640S33T8, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX23L3254, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L512(E)/MX25V512(C), 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1005(C)/MX25L1006E, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L2005(C), 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L4005(A/C), 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L8005/MX25V8005, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1605, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1605A/MX25L1606E, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1605D/MX25L1608D/MX25L1673E, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1635D, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L1635E, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L3205(A), 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L3205D/MX25L3208D, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L3206E, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L3273E, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L3235D, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L6405(D), 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L6406E/MX25L6436E, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L6445E/MX25L6473E, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25L12805(D), 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25U1635E, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25U3235E/F, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix MX25U6435E/F, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P05-A, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P05, 64 kB: Ignoring RES in favour of RDID.
Probing for Micron/Numonyx/ST M25P10-A, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P10, 128 kB: Ignoring RES in favour of RDID.
Probing for Micron/Numonyx/ST M25P20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P20-old, 256 kB: Ignoring RES in favour of RDID.
Probing for Micron/Numonyx/ST M25P40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P40-old, 512 kB: Ignoring RES in favour of RDID.
Probing for Micron/Numonyx/ST M25P80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25P128, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PE10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PE20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PE40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PE80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PE16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PX80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PX16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PX32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M25PX64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M45PE10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M45PE20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M45PE40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M45PE80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST M45PE16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q016, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q032..1E, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q032..3E, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q064..1E, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q064..3E, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q128..1E, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Micron/Numonyx/ST N25Q128..3E, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Nantronics N25S10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Nantronics N25S20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Nantronics N25S40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Nantronics N25S80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Nantronics N25S16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LD256C, 32 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LD512(C), 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LD010(C), 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LD020(C), 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LD040(C), 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LV512(A), 64 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for PMC Pm25LV010, 128 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for PMC Pm25LV010A, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LV020, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LV040, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LV080B, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC Pm25LV016B, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Sanyo LE25FW406A, 512 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for Sanyo LE25FU406B, 512 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for Sanyo LE25FW203A, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Sanyo LE25FW403A, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Sanyo LE25FW418A, 512 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for Sanyo LE25FW806, 1024 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for Sanyo LE25FW808, 1024 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for Spansion S25FL004A, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL008A, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL016A, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL032A/P, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL064A/P, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL204K, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL208K, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL116K/S25FL216K, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL132K, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL164K, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Spansion S25FL128S......0, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25LF020A, 256 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25LF040A, 512 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for SST SST25LF080(A), 1024 kB: probe_spi_res2: id1 0x13, id2 0x13
Probing for SST SST25VF512A, 64 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25VF010, 128 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25VF020, 256 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25VF020B, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25VF040, 512 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25VF040B, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25VF040B.REMS, 512 kB: probe_spi_rems: id1 0xc8, id2 0x13
Probing for SST SST25VF080B, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25VF016B, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25VF032B, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25VF064C, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25WF512, 64 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25WF010, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25WF020, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25WF040, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST SST25WF080, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q80.V, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q16.V, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q32.V, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q64.V, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q128.V, 16384 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q20.W, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q40.W, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q80.W, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q16.W, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q32.W, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25Q64.W, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X10, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X20, 256 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X40, 512 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X80, 1024 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X16, 2048 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X32, 4096 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond W25X64, 8192 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Unknown SFDP-capable chip, 0 kB: No SFDP signature found.
Probing for AMIC unknown AMIC SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Atmel unknown Atmel SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Eon unknown Eon SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Macronix unknown Macronix SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for PMC unknown PMC SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for SST unknown SST SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for ST unknown ST SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Sanyo unknown Sanyo SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Winbond unknown Winbond (ex Nexcom) SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Generic unknown SPI chip (RDID), 0 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x4014
Probing for Generic unknown SPI chip (REMS), 0 kB: probe_spi_rems: id1 0xc8, id2 0x13
Found GigaDevice flash chip "GD25Q80(B)" (1024 kB, SPI).
This chip may contain one-time programmable memory. flashrom cannot read
and may never be able to write it, hence it may not be able to completely
clone the contents of this chip (see man page for details).
Reading old flash chip contents... done.
Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:EW, 0x001000-0x001fff:EW, 0x002000-0x002fff:EW, 0x003000-0x003fff:EW, 0x004000-0x004fff:EW, 0x005000-0x005fff:EW, 0x006000-0x006fff:EW, 0x007000-0x007fff:EW, 0x008000-0x008fff:EW, 0x009000-0x009fff:EW, 0x00a000-0x00afff:EW, 0x00b000-0x00bfff:EW, 0x00c000-0x00cfff:EW, 0x00d000-0x00dfff:EW, 0x00e000-0x00efff:EW, 0x00f000-0x00ffff:EW, 0x010000-0x010fff:EW, 0x011000-0x011fff:EW, 0x012000-0x012fff:EW, 0x013000-0x013fff:EW, 0x014000-0x014fff:EW, 0x015000-0x015fff:EW, 0x016000-0x016fff:EW, 0x017000-0x017fff:EW, 0x018000-0x018fff:EW, 0x019000-0x019fff:EW, 0x01a000-0x01afff:EW, 0x01b000-0x01bfff:EW, 0x01c000-0x01cfff:EW, 0x01d000-0x01dfff:EW, 0x01e000-0x01efff:EW, 0x01f000-0x01ffff:EW, 0x020000-0x020fff:EW, 0x021000-0x021fff:EW, 0x022000-0x022fff:EW, 0x023000-0x023fff:EW, 0x024000-0x024fff:EW, 0x025000-0x025fff:EW, 0x026000-0x026fff:EW, 0x027000-0x027fff:EW, 0x028000-0x028fff:EW, 0x029000-0x029fff:EW, 0x02a000-0x02afff:EW, 0x02b000-0x02bfff:EW, 0x02c000-0x02cfff:EW, 0x02d000-0x02dfff:EW, 0x02e000-0x02efff:EW, 0x02f000-0x02ffff:EW, 0x030000-0x030fff:EW, 0x031000-0x031fff:EW, 0x032000-0x032fff:EW, 0x033000-0x033fff:EW, 0x034000-0x034fff:EW, 0x035000-0x035fff:EW, 0x036000-0x036fff:EW, 0x037000-0x037fff:EW, 0x038000-0x038fff:EW, 0x039000-0x039fff:EW, 0x03a000-0x03afff:EW, 0x03b000-0x03bfff:EW, 0x03c000-0x03cfff:EW, 0x03d000-0x03dfff:EW, 0x03e000-0x03efff:EW, 0x03f000-0x03ffff:EW, 0x040000-0x040fff:EW, 0x041000-0x041fff:EW, 0x042000-0x042fff:EW, 0x043000-0x043fff:EW, 0x044000-0x044fff:EW, 0x045000-0x045fff:EW, 0x046000-0x046fff:EW, 0x047000-0x047fff:EW, 0x048000-0x048fff:EW, 0x049000-0x049fff:EW, 0x04a000-0x04afff:EW, 0x04b000-0x04bfff:EW, 0x04c000-0x04cfff:EW, 0x04d000-0x04dfff:EW, 0x04e000-0x04efff:EW, 0x04f000-0x04ffff:EW, 0x050000-0x050fff:EW, 0x051000-0x051fff:EW, 0x052000-0x052fff:EW, 0x053000-0x053fff:EW, 0x054000-0x054fff:EW, 0x055000-0x055fff:EW, 0x056000-0x056fff:EW, 0x057000-0x057fff:EW, 0x058000-0x058fff:EW, 0x059000-0x059fff:EW, 0x05a000-0x05afff:EW, 0x05b000-0x05bfff:EW, 0x05c000-0x05cfff:EW, 0x05d000-0x05dfff:EW, 0x05e000-0x05efff:EW, 0x05f000-0x05ffff:EW, 0x060000-0x060fff:EW, 0x061000-0x061fff:EW, 0x062000-0x062fff:EW, 0x063000-0x063fff:EW, 0x064000-0x064fff:EW, 0x065000-0x065fff:EW, 0x066000-0x066fff:EW, 0x067000-0x067fff:EW, 0x068000-0x068fff:EW, 0x069000-0x069fff:EW, 0x06a000-0x06afff:EW, 0x06b000-0x06bfff:EW, 0x06c000-0x06cfff:EW, 0x06d000-0x06dfff:EW, 0x06e000-0x06efff:EW, 0x06f000-0x06ffff:EW, 0x070000-0x070fff:EW, 0x071000-0x071fff:EW, 0x072000-0x072fff:EW, 0x073000-0x073fff:EW, 0x074000-0x074fff:EW, 0x075000-0x075fff:EW, 0x076000-0x076fff:EW, 0x077000-0x077fff:EW, 0x078000-0x078fff:EW, 0x079000-0x079fff:EW, 0x07a000-0x07afff:EW, 0x07b000-0x07bfff:EW, 0x07c000-0x07cfff:EW, 0x07d000-0x07dfff:EW, 0x07e000-0x07efff:EW, 0x07f000-0x07ffff:EW, 0x080000-0x080fff:EW, 0x081000-0x081fff:EW, 0x082000-0x082fff:EW, 0x083000-0x083fff:EW, 0x084000-0x084fff:EW, 0x085000-0x085fff:EW, 0x086000-0x086fff:EW, 0x087000-0x087fff:EW, 0x088000-0x088fff:EW, 0x089000-0x089fff:EW, 0x08a000-0x08afff:EW, 0x08b000-0x08bfff:EW, 0x08c000-0x08cfff:EW, 0x08d000-0x08dfff:EW, 0x08e000-0x08efff:EW, 0x08f000-0x08ffff:EW, 0x090000-0x090fff:EW, 0x091000-0x091fff:EW, 0x092000-0x092fff:EW, 0x093000-0x093fff:EW, 0x094000-0x094fff:EW, 0x095000-0x095fff:EW, 0x096000-0x096fff:EW, 0x097000-0x097fff:EW, 0x098000-0x098fff:EW, 0x099000-0x099fff:EW, 0x09a000-0x09afff:EW, 0x09b000-0x09bfff:EW, 0x09c000-0x09cfff:EW, 0x09d000-0x09dfff:EW, 0x09e000-0x09efff:EW, 0x09f000-0x09ffff:EW, 0x0a0000-0x0a0fff:EW, 0x0a1000-0x0a1fff:EW, 0x0a2000-0x0a2fff:EW, 0x0a3000-0x0a3fff:EW, 0x0a4000-0x0a4fff:EW, 0x0a5000-0x0a5fff:EW, 0x0a6000-0x0a6fff:EW, 0x0a7000-0x0a7fff:EW, 0x0a8000-0x0a8fff:EW, 0x0a9000-0x0a9fff:EW, 0x0aa000-0x0aafff:EW, 0x0ab000-0x0abfff:EW, 0x0ac000-0x0acfff:EW, 0x0ad000-0x0adfff:EW, 0x0ae000-0x0aefff:EW, 0x0af000-0x0affff:EW, 0x0b0000-0x0b0fff:EW, 0x0b1000-0x0b1fff:EW, 0x0b2000-0x0b2fff:EW, 0x0b3000-0x0b3fff:EW, 0x0b4000-0x0b4fff:EW, 0x0b5000-0x0b5fff:EW, 0x0b6000-0x0b6fff:EW, 0x0b7000-0x0b7fff:EW, 0x0b8000-0x0b8fff:EW, 0x0b9000-0x0b9fff:EW, 0x0ba000-0x0bafff:EW, 0x0bb000-0x0bbfff:EW, 0x0bc000-0x0bcfff:EW, 0x0bd000-0x0bdfff:EW, 0x0be000-0x0befff:EW, 0x0bf000-0x0bffff:EW, 0x0c0000-0x0c0fff:EW, 0x0c1000-0x0c1fff:EW, 0x0c2000-0x0c2fff:EW, 0x0c3000-0x0c3fff:EW, 0x0c4000-0x0c4fff:EW, 0x0c5000-0x0c5fff:EW, 0x0c6000-0x0c6fff:EW, 0x0c7000-0x0c7fff:EW, 0x0c8000-0x0c8fff:EW, 0x0c9000-0x0c9fff:EW, 0x0ca000-0x0cafff:EW, 0x0cb000-0x0cbfff:EW, 0x0cc000-0x0ccfff:EW, 0x0cd000-0x0cdfff:EW, 0x0ce000-0x0cefff:EW, 0x0cf000-0x0cffff:EW, 0x0d0000-0x0d0fff:EW, 0x0d1000-0x0d1fff:EW, 0x0d2000-0x0d2fff:EW, 0x0d3000-0x0d3fff:EW, 0x0d4000-0x0d4fff:EW, 0x0d5000-0x0d5fff:EW, 0x0d6000-0x0d6fff:EW, 0x0d7000-0x0d7fff:EW, 0x0d8000-0x0d8fff:EW, 0x0d9000-0x0d9fff:EW, 0x0da000-0x0dafff:EW, 0x0db000-0x0dbfff:EW, 0x0dc000-0x0dcfff:EW, 0x0dd000-0x0ddfff:EW, 0x0de000-0x0defff:EW, 0x0df000-0x0dffff:EW, 0x0e0000-0x0e0fff:EW, 0x0e1000-0x0e1fff:EW, 0x0e2000-0x0e2fff:EW, 0x0e3000-0x0e3fff:EW, 0x0e4000-0x0e4fff:EW, 0x0e5000-0x0e5fff:EW, 0x0e6000-0x0e6fff:EW, 0x0e7000-0x0e7fff:EW, 0x0e8000-0x0e8fff:EW, 0x0e9000-0x0e9fff:EW, 0x0ea000-0x0eafff:EW, 0x0eb000-0x0ebfff:EW, 0x0ec000-0x0ecfff:EW, 0x0ed000-0x0edfff:EW, 0x0ee000-0x0eefff:EW, 0x0ef000-0x0effff:EW, 0x0f0000-0x0f0fff:EW, 0x0f1000-0x0f1fff:EW, 0x0f2000-0x0f2fff:EW, 0x0f3000-0x0f3fff:EW, 0x0f4000-0x0f4fff:EW, 0x0f5000-0x0f5fff:EW, 0x0f6000-0x0f6fff:EW, 0x0f7000-0x0f7fff:EW, 0x0f8000-0x0f8fff:EW, 0x0f9000-0x0f9fff:EW, 0x0fa000-0x0fafff:W, 0x0fb000-0x0fbfff:W, 0x0fc000-0x0fcfff:W, 0x0fd000-0x0fdfff:W, 0x0fe000-0x0fefff:W, 0x0ff000-0x0fffff:W
Erase/write done.
Verifying flash... VERIFIED.


More information about the flashrom mailing list