diff options
author | Brian J. Nemec <bnemec@chromium.org> | 2020-05-31 21:53:15 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-24 02:33:04 +0000 |
commit | 7d4f4bf3ea9b002f5935ba0b98698999cd9d94e7 (patch) | |
tree | 91ef5d64edf8d9b73b505516efdc6bc132b7f51d /include | |
parent | ef356b8e6b9fcf665e67a9599323ad0af74eea08 (diff) | |
download | chrome-ec-7d4f4bf3ea9b002f5935ba0b98698999cd9d94e7.tar.gz |
servo: Adds USB SPI protocol V2 commands and responses
Adds the USB SPI protocol V2, this protocol supports larger
SPI transfers that are delivered in multiple USB packets.
This enables us to perform 2 optimizations on the USB SPI
transfer speed for large USB packets:
* USB packets can be grouped together reducing the total
number of packets exchanged. The host can write multiple
data sections sequentially without the device responding
with a packet for each one. Going the other direction,
the host can continue to poll the device for data until
the transmission is complete.
* Only a single SPI transaction is required, this eliminates
overhead in setting up and getting data from SPI transactions.
Benchmark results show a typical 35% improvement in performance
on Servo Micro platforms with these changes on operations which
involve large SPI transfers reading or writing from the flash.
Signed-off-by: Brian Nemec <bnemec@chromium.org>
Blocked on upstream changes to flashrom:
Depends-On:https://review.coreboot.org/c/flashrom/+/41533
BUG=b:139058552
BRANCH=servo
TEST=Tested with Servo Micro with the reading, erase, write,
and verify operations with updated copies of flashrom.
Change-Id: I04b6cf8449e32cc1b75d3501939958887eb57f5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224765
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Brian Nemec <bnemec@chromium.org>
Tested-by: Brian Nemec <bnemec@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_descriptor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_descriptor.h b/include/usb_descriptor.h index 4b7184a311..49114c38e0 100644 --- a/include/usb_descriptor.h +++ b/include/usb_descriptor.h @@ -191,7 +191,7 @@ struct usb_endpoint_descriptor { #define USB_PROTOCOL_GOOGLE_SERIAL 0x01 #define USB_SUBCLASS_GOOGLE_SPI 0x51 -#define USB_PROTOCOL_GOOGLE_SPI 0x01 +#define USB_PROTOCOL_GOOGLE_SPI 0x02 #define USB_SUBCLASS_GOOGLE_I2C 0x52 #define USB_PROTOCOL_GOOGLE_I2C 0x01 |