mbox series

[v2,0/5] thunderbolt: Add support for receiver lane margining

Message ID 20220830132751.42518-1-mika.westerberg@linux.intel.com (mailing list archive)
Headers show
Series thunderbolt: Add support for receiver lane margining | expand

Message

Mika Westerberg Aug. 30, 2022, 1:27 p.m. UTC
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/20220823105352.56306-1-mika.westerberg@linux.intel.com/

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(-)

Comments

Mika Westerberg Sept. 5, 2022, 6:06 a.m. UTC | #1
On Tue, Aug 30, 2022 at 04:27:46PM +0300, Mika Westerberg wrote:
>   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

All applied to thunderbolt.git/next.