Skip to content

thunderbolt: Offline on-board retimer NVM upgrade support

Mika Westerberg linux-acpi linux-usb 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9thunderbolt: Log the link as TBT instead of TBT3drivers/thunderbolt/usb4.c+1 -10 replies
2/9thunderbolt: Add USB4 port devicesDocumentation/ABI/testing/sysfs-bus-thunderbolt drivers/thunderbolt/Makefile drivers/thunderbolt/retimer.c +4 more+229 -84 replies
3/9thunderbolt: Add support for ACPI _DSM to power on/off retimersdrivers/thunderbolt/acpi.c drivers/thunderbolt/domain.c drivers/thunderbolt/tb.h+225 -30 replies
4/9thunderbolt: Add additional USB4 port operations for retimer accessdrivers/thunderbolt/sb_regs.h drivers/thunderbolt/tb.h drivers/thunderbolt/usb4.c+74 -00 replies
5/9thunderbolt: Add support for retimer NVM upgrade when there is no linkDocumentation/ABI/testing/sysfs-bus-thunderbolt Documentation/admin-guide/thunderbolt.rst drivers/thunderbolt/retimer.c +4 more+277 -280 replies
6/9thunderbolt: Move nvm_write_ops to tb.hdrivers/thunderbolt/switch.c drivers/thunderbolt/tb.h+5 -50 replies
7/9thunderbolt: Allow router NVM authenticate separatelyDocumentation/ABI/testing/sysfs-bus-thunderbolt drivers/thunderbolt/switch.c drivers/thunderbolt/tb.h +1 more+49 -210 replies
8/9thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimersDocumentation/ABI/testing/sysfs-bus-thunderbolt drivers/thunderbolt/retimer.c drivers/thunderbolt/tb.h +1 more+53 -170 replies
9/9thunderbolt: Check for NVM authentication status after the operation starteddrivers/thunderbolt/retimer.c+19 -10 replies

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-Hartman
SeriesR-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] thunderbolt: Offline on-board retimer NVM upgrade support

Hi all,

USB4 retimers are only accessible when the USB4 is up. However, sometimes it may be useful to be able to upgrade on-board retimers even if the link is not up. For instance if the user simply does not have any USB4 devices.

Making retimers accessible in "offline" mode requires some help from the platform firmware (ACPI in our case) to turn on power to the retimers and cycle them through different modes to get the sideband link up. This may also involve other firmwares such as Embedded Controller (as it is the case with recent Chromebooks).

This series adds support for "offline" retimer NVM upgrade so that it first exposes each USB4 port to the userspace. If the platform firmware provides a special _DSM-method (Device Specific Method) under the USB4 port ACPI description, we expose two attributes under the port that the userspace can use to put the port to offline mode and rescan for the retimers. Otherwise the NVM upgrade works the same way than with the online mode. We also add documentation to the admin-guide how this can be done.

In addition to this, at least Intel USB4 devices (and retimers) allow running NVM authenticate (upgrade) separately from write so we make it possible for the userspace to run the write and authenticate in two steps. This allows userspace to trigger the authentication at later time, like when the user logs out.

Mika Westerberg (4):
thunderbolt: Log the link as TBT instead of TBT3
thunderbolt: Add USB4 port devices
thunderbolt: Allow router NVM authenticate separately
thunderbolt: Check for NVM authentication status after the operation started

Rajmohan Mani (5):
thunderbolt: Add support for ACPI _DSM to power on/off retimers
thunderbolt: Add additional USB4 port operations for retimer access
thunderbolt: Add support for retimer NVM upgrade when there is no link
thunderbolt: Move nvm_write_ops to tb.h
thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimers

 .../ABI/testing/sysfs-bus-thunderbolt         |  38 ++-
 Documentation/admin-guide/thunderbolt.rst     |  29 ++
 drivers/thunderbolt/Makefile                  |   2 +-
 drivers/thunderbolt/acpi.c                    | 206 +++++++++++++
 drivers/thunderbolt/domain.c                  |   9 +-
 drivers/thunderbolt/retimer.c                 | 108 +++++--
 drivers/thunderbolt/sb_regs.h                 |   2 +
 drivers/thunderbolt/switch.c                  | 120 +++++---
 drivers/thunderbolt/tb.c                      |   4 +-
 drivers/thunderbolt/tb.h                      |  60 +++-
 drivers/thunderbolt/usb4.c                    | 153 +++++++++-
 drivers/thunderbolt/usb4_port.c               | 281 ++++++++++++++++++
 12 files changed, 930 insertions(+), 82 deletions(-)
 create mode 100644 drivers/thunderbolt/usb4_port.c
Signature · 1 line
2.30.2