Skip to content

thunderbolt: Add support for receiver lane margining

Mika Westerberg linux-usb 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v14 patches 2 repliesSuperseded

Changes from the previous version from the cover letter

* Pass bitmask of CL states into tb_port_clx_supported(). This is a

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5thunderbolt: Move tb_xdomain_parent() to tb.hdrivers/thunderbolt/tb.h drivers/thunderbolt/xdomain.c+5 -50 replies
2/5thunderbolt: Move port CL state functions into correct place in switch.cdrivers/thunderbolt/switch.c+106 -1060 replies
3/5thunderbolt: Pass CL state bitmask to tb_port_clx_supported()drivers/thunderbolt/switch.c drivers/thunderbolt/tb.h drivers/thunderbolt/tb_regs.h+9 -130 replies
4/5thunderbolt: Add helper to check if CL states are enabled on portdrivers/thunderbolt/switch.c drivers/thunderbolt/tb.h drivers/thunderbolt/tb_regs.h+30 -00 replies
5/5thunderbolt: Add support for receiver lane marginingdrivers/thunderbolt/Kconfig drivers/thunderbolt/debugfs.c drivers/thunderbolt/sb_regs.h +3 more+1043 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] thunderbolt: Add support for receiver lane margining

Hi all,

This series adds support for receiver lane margining. This is standard USB4 port feature that can be used in manufacturing to check electrical robustness and quality of given USB4 port. This is a separate Kconfig option (CONFIG_USB4_DEBUGFS_MARGINING) that can be enabled by the kernels used in manufacturing floor (normal distro kernels do not need this to be enabled).

This exposes a new debugfs directory "margining" under each connected USB4 port that can be used to run the margining test. This supports both hardware and software lane margining although I have only tested the former as the current Intel hardware only supports that.

Previous version of the series can be found here:

https://lore.kernel.org/linux-usb/[email protected]/

Changes from the previous version:

* Pass bitmask of CL states into tb_port_clx_supported(). This is a

    new patch 3/5.
  * Use bitmask of CL states also in tb_port_is_clx_enabled() and drop
    tb_port_are_clx_enabled().

Mika Westerberg (5):
thunderbolt: Move tb_xdomain_parent() to tb.h
thunderbolt: Move port CL state functions into correct place in switch.c
thunderbolt: Pass CL state bitmask to tb_port_clx_supported()
thunderbolt: Add helper to check if CL states are enabled on port
thunderbolt: Add support for receiver lane margining

 drivers/thunderbolt/Kconfig   |  10 +
 drivers/thunderbolt/debugfs.c | 836 ++++++++++++++++++++++++++++++++++
 drivers/thunderbolt/sb_regs.h |  58 +++
 drivers/thunderbolt/switch.c  | 235 +++++-----
 drivers/thunderbolt/tb.h      |  25 +-
 drivers/thunderbolt/tb_regs.h |   2 +
 drivers/thunderbolt/usb4.c    | 120 +++++
 drivers/thunderbolt/xdomain.c |   9 +-
 8 files changed, 1182 insertions(+), 113 deletions(-)
Signature · 1 line
2.35.1