mbox series

[0/6] thunderbolt: Add retimer NVM upgrade support

Message ID 20200616135617.85752-1-mika.westerberg@linux.intel.com (mailing list archive)
Headers show
Series thunderbolt: Add retimer NVM upgrade support | expand

Message

Mika Westerberg June 16, 2020, 1:56 p.m. UTC
Hi all,

USB4 added standard means for accessing retimers on the link. This access
is done through the side-band channel (two side-band wires in Type-C
cable). The retimer specification is part of USB4 spec and can be
downloaded here:

  https://www.usb.org/sites/default/files/USB4%20Specification_5.zip

On-board retimers are represented as devices and added under the router
they belong to with names like <device>:<port>.<index>. We re-use some of
the current NVM upgrade code for routers for retimers as well. Also we only
expose these when software connection manager is used. It is not clear if
firmware connection manager is going to support this (and what kind of
messaging it needs).

The user-space interface is the same we have for routers so that should
allow code re-use for tools such as fwupd.

Currently only Intel NVM format is supported but this will be relaxed once
we learn format of other vendors.

This series applies on top of the tunneling improvements series here:

  https://lore.kernel.org/linux-usb/20200615142645.56209-1-mika.westerberg@linux.intel.com/

Kranthi Kuntala (1):
  thunderbolt: Add support for on-board retimers

Mika Westerberg (4):
  thunderbolt: Add Intel USB-IF ID to the NVM upgrade supported list
  thunderbolt: Split common NVM functionality into a separate file
  thunderbolt: Generalize usb4_switch_do_[read|write]_data()
  thunderbolt: Retry USB4 block read operation

Rajmohan Mani (1):
  thunderbolt: Implement USB4 port sideband operations for retimer access

 .../ABI/testing/sysfs-bus-thunderbolt         |  33 ++
 Documentation/admin-guide/thunderbolt.rst     |  11 +-
 drivers/thunderbolt/Makefile                  |   1 +
 drivers/thunderbolt/domain.c                  |   2 +-
 drivers/thunderbolt/nvm.c                     | 169 ++++++
 drivers/thunderbolt/retimer.c                 | 485 +++++++++++++++++
 drivers/thunderbolt/sb_regs.h                 |  33 ++
 drivers/thunderbolt/switch.c                  | 122 +----
 drivers/thunderbolt/tb.c                      |  10 +
 drivers/thunderbolt/tb.h                      |  85 ++-
 drivers/thunderbolt/tb_regs.h                 |  10 +
 drivers/thunderbolt/usb4.c                    | 505 +++++++++++++++++-
 12 files changed, 1338 insertions(+), 128 deletions(-)
 create mode 100644 drivers/thunderbolt/nvm.c
 create mode 100644 drivers/thunderbolt/retimer.c
 create mode 100644 drivers/thunderbolt/sb_regs.h

Comments

Mika Westerberg June 30, 2020, 12:21 p.m. UTC | #1
On Tue, Jun 16, 2020 at 04:56:11PM +0300, Mika Westerberg wrote:
> Hi all,
> 
> USB4 added standard means for accessing retimers on the link. This access
> is done through the side-band channel (two side-band wires in Type-C
> cable). The retimer specification is part of USB4 spec and can be
> downloaded here:
> 
>   https://www.usb.org/sites/default/files/USB4%20Specification_5.zip
> 
> On-board retimers are represented as devices and added under the router
> they belong to with names like <device>:<port>.<index>. We re-use some of
> the current NVM upgrade code for routers for retimers as well. Also we only
> expose these when software connection manager is used. It is not clear if
> firmware connection manager is going to support this (and what kind of
> messaging it needs).
> 
> The user-space interface is the same we have for routers so that should
> allow code re-use for tools such as fwupd.
> 
> Currently only Intel NVM format is supported but this will be relaxed once
> we learn format of other vendors.
> 
> This series applies on top of the tunneling improvements series here:
> 
>   https://lore.kernel.org/linux-usb/20200615142645.56209-1-mika.westerberg@linux.intel.com/
> 
> Kranthi Kuntala (1):
>   thunderbolt: Add support for on-board retimers
> 
> Mika Westerberg (4):
>   thunderbolt: Add Intel USB-IF ID to the NVM upgrade supported list
>   thunderbolt: Split common NVM functionality into a separate file
>   thunderbolt: Generalize usb4_switch_do_[read|write]_data()
>   thunderbolt: Retry USB4 block read operation
> 
> Rajmohan Mani (1):
>   thunderbolt: Implement USB4 port sideband operations for retimer access

Queued for v5.9.