fwupd/plugins/vli
Richard Hughes 9f13d8ed1e vli: Be more specific when matching the MSP430
Add a FuDevice->ready() vfunc that is run after ->setup()
This allows plugins to perform setup actions that require quirk matches
after the instance IDs have been converted. This allows us to also
remove FuVliDevice->setup() as the ordering chain has been broken.

There are two USB-3 hubs internally (with the same VID&PID), and the
MSP430 is only attached to the top-level one.

Fixes https://github.com/fwupd/fwupd/issues/3366
2021-06-17 17:09:48 +01:00
..
fu-plugin-vli.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-self-test.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-common.c vli: Add VL822 device+share-spi-pd 2021-03-30 13:06:49 +01:00
fu-vli-common.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-device.c vli: Be more specific when matching the MSP430 2021-06-17 17:09:48 +01:00
fu-vli-device.h vli: Be more specific when matching the MSP430 2021-06-17 17:09:48 +01:00
fu-vli-pd-common.c Only include the start year in the copyright header 2021-01-07 14:48:16 +00:00
fu-vli-pd-common.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-pd-device.c vli: Be more specific when matching the MSP430 2021-06-17 17:09:48 +01:00
fu-vli-pd-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-pd-firmware.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-pd-firmware.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-pd-parade-device.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-pd-parade-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-common.c Allow objects to deserialize to XML 2021-03-15 12:07:30 +00:00
fu-vli-usbhub-common.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-device.c vli: Be more specific when matching the MSP430 2021-06-17 17:09:48 +01:00
fu-vli-usbhub-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-firmware.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-firmware.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-i2c-common.c Only include the start year in the copyright header 2021-01-07 14:48:16 +00:00
fu-vli-usbhub-i2c-common.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-msp430-device.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-msp430-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-pd-device.c Remove FuFirmwareImage and just use FuFirmware instead 2021-03-09 21:14:12 +00:00
fu-vli-usbhub-pd-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-rtd21xx-device.c trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
fu-vli-usbhub-rtd21xx-device.h trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
meson.build Added VID PID for Minibons device 2021-05-26 10:22:29 +01:00
README.md Simplify the quirk file format 2021-03-03 08:30:34 +00:00
vli-pd.quirk Mark the Lenovo VL103 no-power USB-C dongle as dual-image 2021-04-13 07:01:40 +01:00
vli-usbhub-bizlink.quirk vli: Remove deprecated quirk prefixes 2021-04-01 18:40:14 +01:00
vli-usbhub-hyper.quirk Simplify the quirk file format 2021-03-03 08:30:34 +00:00
vli-usbhub-lenovo.quirk vli: Be more specific when matching the MSP430 2021-06-17 17:09:48 +01:00
vli-usbhub-minibons.quirk Set hub2.0 as subcomponent of hub3.0 2021-05-27 18:52:00 +08:00
vli-usbhub.quirk Simplify the quirk file format 2021-03-03 08:30:34 +00:00

VIA Support

Introduction

This plugin is used to update USB hubs from VIA.

Firmware Format

The daemon will decompress the cabinet archive and extract a firmware blob in an undisclosed binary file format.

This plugin supports the following protocol ID:

  • com.vli.i2c
  • com.vli.pd
  • com.vli.usbhub

GUID Generation

These devices use the standard USB DeviceInstanceId values, e.g.

  • USB\VID_17EF&PID_3083&REV_0001
  • USB\VID_17EF&PID_3083
  • USB\VID_17EF

All VLI devices also use custom GUID values for the device type, e.g.

  • USB\VID_17EF&PID_3083&DEV_VL812B3

These devices also use custom GUID values for the SPI flash configuration, e.g.

  • VLI_USBHUB\SPI_37303840
  • VLI_USBHUB\SPI_3730
  • VLI_USBHUB\SPI_37

Optional PD child devices sharing the SPI flash use two extra GUIDs, e.g.

  • USB\VID_17EF&PID_3083&DEV_VL102
  • USB\VID_17EF&PID_3083&APP_26

Optional I²C child devices use just one extra GUID, e.g.

  • USB\VID_17EF&PID_3083&I2C_MSP430
  • USB\VID_17EF&PID_3083&I2C_PS186

Vendor ID Security

The vendor ID is set from the USB vendor, for example set to USB:0x2109

Quirk Use

This plugin uses the following plugin-specific quirks:

Quirk Description Minimum fwupd version
VliDeviceKind Device kind, e.g. VL102 1.3.7
VliSpiAutoDetect SPI autodetect (default 0x1) 1.3.7
VliSpiCmdChipErase Flash command to erase chip 1.3.3
VliSpiCmdChipErase Flash command to erase sector 1.3.3
VliSpiCmdReadId Flash command to read the ID 1.3.3
VliSpiCmdReadIdSz Size of the ReadId response 1.3.3

The VliSpiCmdReadId and VliSpiCmdReadIdSz quirks have to be assigned to the device instance attribute, rather then the flash part as the ID is required to query the other flash chip parameters. For example:

[USB\VID_2109&PID_0210]
Plugin = vli
GType = FuVliUsbhubDevice
VliSpiCmdReadId = 0xf8
VliSpiCmdReadIdSz = 4

# W3IRDFLASHxxx
[VLI_USBHUB\\SPI_37303840]
VliSpiCmdChipErase = 0xc7
VliSpiCmdSectorErase = 0x20

External interface access

This plugin requires read/write access to /dev/bus/usb.