Commit Graph

20 Commits

Author SHA1 Message Date
Richard Hughes
83a21cb7cd vli: Allow chained usb hub devices where the parent needs GPIOB reset
As both hub devices share a FuVliUsbhubDeviceClass instance we cannot 'hijack'
the vfuncs depending on object type. This allows the downstream hub to proxy to
the upstream hub where a GPIOB reset can be performed.
2020-06-09 11:56:30 +01:00
Richard Hughes
cbc65bc071 vli: Use GPIOB to reset the VL817 found in two Lenovo products 2020-04-30 11:06:28 +01:00
Richard Hughes
36f3218da9 vli: Only show the i2c devices on the USB3 hub
If the hub is running in degraded USB2 recovery mode do not enumerate the
easy-to-brick MSP430 device.
2020-04-18 14:52:50 +01:00
Richard Hughes
5997f2a7da vli: Show all the buffer when debugging with FWUPD_VLI_USBHUB_VERBOSE 2020-04-17 14:15:50 +01:00
Richard Hughes
e95613f670 vli: Do not show the USB 2 recovery devices for USB 3 hubs
The USB 2.0 controller is used as a 'backup' in case the USB 3.0 firmware fails
to start. Set USB 3 hubs as a greater priority so that the USB 2 ones do not
not get added if the USB 3 firmware is working.
2020-04-15 14:11:06 +01:00
Richard Hughes
dd34e51711 trivial: Fix up some argument names with additional docs 2020-03-19 06:43:42 +00:00
Richard Hughes
bd5e6f00d2 vli: Never add USB hub devices that are not upgradable
There's almost no point; you can't interact with them in any meaningful way.
2020-03-16 11:56:35 +00:00
Richard Hughes
75cc9161c5 vli: Always expect the VL103 header at 0x1003 or 0x4000
I misunderstood the original specification, and it seems even USB-hub-less
devices have the same header location as their "write-through" counterparts.
2020-03-10 12:09:27 +00:00
Richard Hughes
09e8e5e7ef vli: Only show the 2nd header if the device ID is valid
Otherwise we get a scary warning about the CRC not being valid, when the block
is just empty.
2020-03-10 12:06:12 +00:00
Richard Hughes
aebd90baad vli: Fix VL103 reboot from ROM mode to FW mode
The logic was wrong; we should have been using command 0xB0 for attach back to
FW mode for both VL10x and VL103. Using a generic reset on VL103 always reset
the device back into bootloader mode as the ROM signatures were being written
by command 0xC0.

As now attach and detach have different code paths, there's no point having a
`FuVliDevice->reset()` vfunc, and so we can make everything a little simpler at
the same time.
2020-03-10 10:46:01 +00:00
Richard Hughes
2b108e4ab1 vli: Show erase progress when doing a v2 recovery 2020-02-11 13:40:05 +00:00
Richard Hughes
5bf8c1a23b vli: Set more of the firmware max sizes automatically
With data from VIA, many thanks.
2020-01-02 13:24:13 +00:00
Richard Hughes
52a7d0bd34 vli: Move generic SPI functionality into the FuVliDevice base class
To implement the SPI commands, objects can derive from FuVliDevice and
implement the new vfuncs. This allows us to override the implementation for
minor API changes.
2020-01-02 13:24:13 +00:00
Richard Hughes
c12163b374 vli: Remove the PD emulation code
I have actual hardware now...
2020-01-02 13:24:13 +00:00
Richard Hughes
050f998835 vli: Make more function names match the docs 2020-01-02 13:24:13 +00:00
Richard Hughes
3243374d41 vli: Move the SPI command quirking from FuVliUsbhubDevice down to FuVliDevice 2020-01-02 13:24:13 +00:00
Richard Hughes
8b5a560b1c vli: Rename FuVliUsbhubPdFirmware to FuVliPdFirmware
This is used by non-usbhub devices too, albeit at offset 0x0.
2020-01-02 13:24:13 +00:00
Richard Hughes
b02d9988ad vli: Add a FuVliDevice as a subclass to FuVliUsbhubDevice
At the moment this doe not do anything clever, but other device types will
derive from the base class in the future.
2020-01-02 13:24:13 +00:00
Richard Hughes
e968c0ec07 vli: Have one 'DeviceKind' for all objects
We'll soon have PD devices that are not children of the FuVliUsbhubDevice and
so it makes sense to flattern out the namespace. Also, less code.
2020-01-02 13:24:13 +00:00
Richard Hughes
f169186700 vli: Rename the vli_usbhub plugin to vli
In the future we'll be doing PD updates without any USB hub at all.
2020-01-02 13:24:13 +00:00