Commit Graph

6 Commits

Author SHA1 Message Date
Benson Leung
a22310374e cros-ec: Provide device metadata as a part of to_string
Provide the following metadata:

"Dirty firmware" bit
Protocol version
Header type
Maximum PDU Size
Flash protection status
Raw version string
Key Version
Minimum rollback
2020-05-29 06:55:40 +01:00
Benson Leung
092f87ae0c cros-ec: Add board name as a instance id and hash as metadata
These couple of extra things in the CrOS EC version string
were split off of the triplet, so give them a home.
2020-05-29 06:55:40 +01:00
Benson Leung
086d0c0eb6 cros-ec: Parse version number into triplet
Add fu_cros_ec_parse_version to common, as this will be used to
parse the firmware bundle's version string too.
2020-05-29 06:55:40 +01:00
Benson Leung
00bb3341d2 cros-ec: Add enough infrastructure for setup connection
This should do the bulk transfers using protocol 6.

The output here is now equivalent to the output of
usb_updater2 -d 18d1:501a -f

fwupdtool --plugin-whitelist cros_ec get-devices --verbose
Servo Micro
  DeviceId:             84d0e3f2a0f8b2328f7995767b23ebb40494723f
  Guid:                 8e2f7625-a164-55d7-8f09-f193c8ec33f1 <- USB\VID_18D1&PID_501A&REV_0100
  Guid:                 13564257-c649-586d-b4e4-4f048d480f36 <- USB\VID_18D1&PID_501A
  Serial:               CMO653-00166-040491U00771
  Summary:              Servo Micro (aka "uServo") Debug Board
  Plugin:               cros_ec_usb
  Flags:                registered
  Vendor:               Google Inc.
  VendorId:             USB:0x18D1
  Version:              servo_micro_v2.4.17-df61092c3
  VersionFormat:        plain
  Created:              2020-05-20
  PhysicalId:            usb:03:00:02
2020-05-29 06:55:40 +01:00
Benson Leung
7aa00f6ee8 cros-ec: Add usb_findit functionality
Find the interface and endpoint used for firmware updates.
Note: this change now requires libgusb 0.3.3 or later.
2020-05-29 06:55:40 +01:00
Benson Leung
b483044a8d cros-ec: Initial skeleton
Set it up as a USB device plugin, with the initial device in quirks
being Servo Micro debug board.
2020-05-29 06:55:40 +01:00