mbox series

[v2,00/20] thunderbolt: Initial USB4 v2 support

Message ID 20230612082145.62218-1-mika.westerberg@linux.intel.com
Headers show
Series thunderbolt: Initial USB4 v2 support | expand

Message

Mika Westerberg June 12, 2023, 8:21 a.m. UTC
Hi all,

This series adds initial support for the next USB4 version (USB4 v2) and
the Intel Barlow Ridge discrete controller. This includes support for
the 80G symmetric link, the necessary configuration needed to bring up
the router in v2 mode, adaptive TMU, PCIe extended encapsulation, and
CL2 low power link state. We will be sending the rest of the USB4 v2
support, including asymmetric 128/80G link support later on once this
one has settled.

These are based on thunderbolt.git/next.

The previous version of the series can be found:

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

Changes from v1:

  * Make tb_switch_is_usb4() use usb4_switch_version() as well
  * Set TMU mode off by default in tmu_mode_init()
  * Log TMU mode change only if it is actually changed in
    tb_switch_tmu_configure().

Gil Fine (9):
  thunderbolt: Identify USB4 v2 routers
  thunderbolt: Add support for USB4 v2 80 Gb/s link
  thunderbolt: Announce USB4 v2 connection manager support
  thunderbolt: Enable USB4 v2 PCIe TLP/DLLP extended encapsulation
  thunderbolt: Add two additional double words for adapters TMU for USB4 v2 routers
  thunderbolt: Fix DisplayPort IN adapter capability length for USB4 v2 routers
  thunderbolt: Fix PCIe adapter capability length for USB4 v2 routers
  thunderbolt: Move constants related to NVM into nvm.c
  thunderbolt: Increase NVM_MAX_SIZE to support Intel Barlow Ridge controller

Mika Westerberg (11):
  thunderbolt: Ignore data CRC mismatch for USB4 routers
  thunderbolt: Do not touch lane 1 adapter path config space
  thunderbolt: Add the new USB4 v2 notification types
  thunderbolt: Reset USB4 v2 host router
  thunderbolt: Add Intel Barlow Ridge PCI ID
  thunderbolt: Limit Intel Barlow Ridge USB3 bandwidth
  thunderbolt: Add support for enhanced uni-directional TMU mode
  thunderbolt: Enable CL2 low power state
  thunderbolt: Make bandwidth allocation mode function names consistent
  thunderbolt: Add DisplayPort 2.x tunneling support
  thunderbolt: Add test case for 3 DisplayPort tunnels

 drivers/thunderbolt/clx.c      |  31 +-
 drivers/thunderbolt/ctl.c      |  28 ++
 drivers/thunderbolt/debugfs.c  |  29 +-
 drivers/thunderbolt/dma_test.c |  10 +-
 drivers/thunderbolt/eeprom.c   |   3 +-
 drivers/thunderbolt/icm.c      |   6 +-
 drivers/thunderbolt/nhi.c      |  41 ++-
 drivers/thunderbolt/nhi.h      |   4 +
 drivers/thunderbolt/nhi_regs.h |  19 +-
 drivers/thunderbolt/nvm.c      |   4 +
 drivers/thunderbolt/quirks.c   |   8 +
 drivers/thunderbolt/switch.c   | 216 ++++++++----
 drivers/thunderbolt/tb.c       | 132 ++++++--
 drivers/thunderbolt/tb.h       | 144 ++++----
 drivers/thunderbolt/tb_msgs.h  |   7 +
 drivers/thunderbolt/tb_regs.h  |  25 +-
 drivers/thunderbolt/test.c     |  83 +++++
 drivers/thunderbolt/tmu.c      | 595 ++++++++++++++++++++++++++-------
 drivers/thunderbolt/tunnel.c   | 178 +++++++---
 drivers/thunderbolt/usb4.c     | 108 ++++--
 drivers/thunderbolt/xdomain.c  |  82 ++++-
 include/linux/thunderbolt.h    |  18 +-
 22 files changed, 1380 insertions(+), 391 deletions(-)

Comments

Mika Westerberg June 16, 2023, 6:59 a.m. UTC | #1
On Mon, Jun 12, 2023 at 11:21:25AM +0300, Mika Westerberg wrote:
> Hi all,
> 
> This series adds initial support for the next USB4 version (USB4 v2) and
> the Intel Barlow Ridge discrete controller. This includes support for
> the 80G symmetric link, the necessary configuration needed to bring up
> the router in v2 mode, adaptive TMU, PCIe extended encapsulation, and
> CL2 low power link state. We will be sending the rest of the USB4 v2
> support, including asymmetric 128/80G link support later on once this
> one has settled.
> 
> These are based on thunderbolt.git/next.
> 
> The previous version of the series can be found:
> 
> https://lore.kernel.org/linux-usb/20230531090645.5573-1-mika.westerberg@linux.intel.com/
> 
> Changes from v1:
> 
>   * Make tb_switch_is_usb4() use usb4_switch_version() as well
>   * Set TMU mode off by default in tmu_mode_init()
>   * Log TMU mode change only if it is actually changed in
>     tb_switch_tmu_configure().
> 
> Gil Fine (9):
>   thunderbolt: Identify USB4 v2 routers
>   thunderbolt: Add support for USB4 v2 80 Gb/s link
>   thunderbolt: Announce USB4 v2 connection manager support
>   thunderbolt: Enable USB4 v2 PCIe TLP/DLLP extended encapsulation

Tweaked this slightly to use str_enabled_disabled(), and return -EINVAL
in case of non-PCIe adapter. Updated kernel-doc accordingly.

>   thunderbolt: Add two additional double words for adapters TMU for USB4 v2 routers
>   thunderbolt: Fix DisplayPort IN adapter capability length for USB4 v2 routers
>   thunderbolt: Fix PCIe adapter capability length for USB4 v2 routers
>   thunderbolt: Move constants related to NVM into nvm.c
>   thunderbolt: Increase NVM_MAX_SIZE to support Intel Barlow Ridge controller
> 
> Mika Westerberg (11):
>   thunderbolt: Ignore data CRC mismatch for USB4 routers
>   thunderbolt: Do not touch lane 1 adapter path config space
>   thunderbolt: Add the new USB4 v2 notification types
>   thunderbolt: Reset USB4 v2 host router
>   thunderbolt: Add Intel Barlow Ridge PCI ID
>   thunderbolt: Limit Intel Barlow Ridge USB3 bandwidth
>   thunderbolt: Add support for enhanced uni-directional TMU mode
>   thunderbolt: Enable CL2 low power state
>   thunderbolt: Make bandwidth allocation mode function names consistent
>   thunderbolt: Add DisplayPort 2.x tunneling support
>   thunderbolt: Add test case for 3 DisplayPort tunnels

All applied to thunderbolt.git/next.