[flashrom] [commit] r1925 - in trunk: . util

repository service svn at flashrom.org
Sun Feb 14 16:46:00 CET 2016


Author: stefanct
Date: Sun Feb 14 16:46:00 2016
New Revision: 1925
URL: http://flashrom.org/trac/flashrom/changeset/1925

Log:
ft2232_spi: Add support for Google Servo boards (v1 + v2).

This patch has been cherry-picked from various patches in the chromiumos
tree denoted below.

Change-Id: I4b679e23ab37a4357b1e3d23f6f65a1c31f7d71a
Change-Id: Ibda56201ab4519315431c08206c61ceffb7c7e65
Change-Id: I540ad2d304dc69a7c79ca154beb744ef947ff808

Servo V2 has two FT4232H parts. The first one (denoted 'legacy') is
dedicated to supporting orginal Servo V1 functionality. The second,
residing at USB ID 0x18d1:5003 provides two other SPI interfaces on
port A and B respectively.

Additional changes by Alexandru Gagniuc, Hatim Kanchwala and Urja Rannikko:

 - The clock divisor is set to '6', as this creates a 10MHz SPI clock,
   which is the same SPI clock that the chromiumos branch produced.
 - Add udev rule for Google servo boards to util/flashrom.rules.
 - Add Google servo entry to manpage.

Signed-off-by: Todd Broch <tbroch at chromium.org>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Signed-off-by: Hatim Kanchwala <hatim at hatimak.me>
Signed-off-by: Urja Rannikko <urjaman at gmail.com>
Acked-by: Hatim Kanchwala <hatim at hatimak.me>
Acked-by: Urja Rannikko <urjaman at gmail.com>
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>

Modified:
   trunk/flashrom.8.tmpl
   trunk/ft2232_spi.c
   trunk/util/z60_flashrom.rules

Modified: trunk/flashrom.8.tmpl
==============================================================================
--- trunk/flashrom.8.tmpl	Sun Feb  7 04:35:04 2016	(r1924)
+++ trunk/flashrom.8.tmpl	Sun Feb 14 16:46:00 2016	(r1925)
@@ -242,7 +242,7 @@
 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), TUMPA Lite, and GOEPEL PicoTAP.
+Multi-Protocol Adapter (TUMPA), TUMPA Lite, GOEPEL PicoTAP and Google Servo v1/v2.
 .sp
 .BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog, \
 including Arduino-based devices as well as various programmers by Urja Rannikko, \
@@ -701,7 +701,8 @@
 can be
 .BR 2232H ", " 4232H ", " 232H ", " jtagkey ", " busblaster ", " openmoko ", " \
 arm-usb-tiny ", " arm-usb-tiny-h ", " arm-usb-ocd ", " arm-usb-ocd-h \
-", " tumpa ", " tumpalite ", or " picotap
+", " tumpa ", " tumpalite ", " picotap ", " google-servo ", " google-servo-v2 \
+" or " google-servo-v2-legacy
 and
 .B interface
 can be

Modified: trunk/ft2232_spi.c
==============================================================================
--- trunk/ft2232_spi.c	Sun Feb  7 04:35:04 2016	(r1924)
+++ trunk/ft2232_spi.c	Sun Feb 14 16:46:00 2016	(r1925)
@@ -58,6 +58,11 @@
 #define OLIMEX_ARM_OCD_H_PID	0x002B
 #define OLIMEX_ARM_TINY_H_PID	0x002A
 
+#define GOOGLE_VID		0x18D1
+#define GOOGLE_SERVO_PID	0x5001
+#define GOOGLE_SERVO_V2_PID0	0x5002
+#define GOOGLE_SERVO_V2_PID1	0x5003
+
 const struct dev_entry devs_ft2232spi[] = {
 	{FTDI_VID, FTDI_FT2232H_PID, OK, "FTDI", "FT2232H"},
 	{FTDI_VID, FTDI_FT4232H_PID, OK, "FTDI", "FT4232H"},
@@ -66,6 +71,9 @@
 	{FTDI_VID, TIAO_TUMPA_LITE_PID, OK, "TIAO", "USB Multi-Protocol Adapter Lite"},
 	{FTDI_VID, AMONTEC_JTAGKEY_PID, OK, "Amontec", "JTAGkey"},
 	{GOEPEL_VID, GOEPEL_PICOTAP_PID, OK, "GOEPEL", "PicoTAP"},
+	{GOOGLE_VID, GOOGLE_SERVO_PID, OK, "Google", "Servo"},
+	{GOOGLE_VID, GOOGLE_SERVO_V2_PID0, OK, "Google", "Servo V2 Legacy"},
+	{GOOGLE_VID, GOOGLE_SERVO_V2_PID1, OK, "Google", "Servo V2"},
 	{FIC_VID, OPENMOKO_DBGBOARD_PID, OK, "FIC", "OpenMoko Neo1973 Debug board (V2+)"},
 	{OLIMEX_VID, OLIMEX_ARM_OCD_PID, OK, "Olimex", "ARM-USB-OCD"},
 	{OLIMEX_VID, OLIMEX_ARM_TINY_PID, OK, "Olimex", "ARM-USB-TINY"},
@@ -254,6 +262,17 @@
 			ft2232_vid = OLIMEX_VID;
 			ft2232_type = OLIMEX_ARM_TINY_H_PID;
 			channel_count = 2;
+		} else if (!strcasecmp(arg, "google-servo")) {
+			ft2232_vid = GOOGLE_VID;
+			ft2232_type = GOOGLE_SERVO_PID;
+		} else if (!strcasecmp(arg, "google-servo-v2")) {
+			ft2232_vid = GOOGLE_VID;
+			ft2232_type = GOOGLE_SERVO_V2_PID1;
+			/* Default divisor is too fast, and chip ID fails */
+			divisor = 6;
+		} else if (!strcasecmp(arg, "google-servo-v2-legacy")) {
+			ft2232_vid = GOOGLE_VID;
+			ft2232_type = GOOGLE_SERVO_V2_PID0;
 		} else {
 			msg_perr("Error: Invalid device type specified.\n");
 			free(arg);

Modified: trunk/util/z60_flashrom.rules
==============================================================================
--- trunk/util/z60_flashrom.rules	Sun Feb  7 04:35:04 2016	(r1924)
+++ trunk/util/z60_flashrom.rules	Sun Feb 14 16:46:00 2016	(r1925)
@@ -60,6 +60,12 @@
 # http://www.goepel.com/jtagboundary-scan/hardware/picotap.html
 ATTRS{idVendor}=="096c", ATTRS{idProduct}=="1449", MODE="664", GROUP="plugdev"
 
+# Google servo debug board
+# https://www.chromium.org/chromium-os/servo
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5001", MODE="664", GROUP="plugdev"
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5002", MODE="664", GROUP="plugdev"
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5003", MODE="664", GROUP="plugdev"
+
 # Olimex ARM-USB-OCD
 # http://olimex.com/dev/arm-usb-ocd.html
 ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0003", MODE="664", GROUP="plugdev"




More information about the flashrom mailing list