linux/drivers/thunderbolt/sb_regs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * USB4 port sideband registers found on routers and retimers
 *
 * Copyright (C) 2020, Intel Corporation
 * Authors: Mika Westerberg <[email protected]>
 *	    Rajmohan Mani <[email protected]>
 */

#ifndef _SB_REGS
#define _SB_REGS

#define USB4_SB_VENDOR_ID
#define USB4_SB_PRODUCT_ID
#define USB4_SB_FW_VERSION
#define USB4_SB_DEBUG_CONF
#define USB4_SB_DEBUG
#define USB4_SB_LRD_TUNING
#define USB4_SB_OPCODE

enum usb4_sb_opcode {};

#define USB4_SB_METADATA
#define USB4_SB_METADATA_NVM_AUTH_WRITE_MASK
#define USB4_SB_LINK_CONF
#define USB4_SB_GEN23_TXFFE
#define USB4_SB_GEN4_TXFFE
#define USB4_SB_VERSION
#define USB4_SB_DATA

/* USB4_SB_OPCODE_READ_LANE_MARGINING_CAP */
#define USB4_MARGIN_CAP_0_MODES_HW
#define USB4_MARGIN_CAP_0_MODES_SW
#define USB4_MARGIN_CAP_0_2_LANES
#define USB4_MARGIN_CAP_0_VOLTAGE_INDP_MASK
#define USB4_MARGIN_CAP_0_VOLTAGE_MIN
#define USB4_MARGIN_CAP_0_VOLTAGE_HL
#define USB4_MARGIN_CAP_0_VOLTAGE_BOTH
#define USB4_MARGIN_CAP_0_TIME
#define USB4_MARGIN_CAP_0_VOLTAGE_STEPS_MASK
#define USB4_MARGIN_CAP_0_MAX_VOLTAGE_OFFSET_MASK
#define USB4_MARGIN_CAP_1_TIME_DESTR
#define USB4_MARGIN_CAP_1_TIME_INDP_MASK
#define USB4_MARGIN_CAP_1_TIME_MIN
#define USB4_MARGIN_CAP_1_TIME_LR
#define USB4_MARGIN_CAP_1_TIME_BOTH
#define USB4_MARGIN_CAP_1_TIME_STEPS_MASK
#define USB4_MARGIN_CAP_1_TIME_OFFSET_MASK
#define USB4_MARGIN_CAP_1_MIN_BER_MASK
#define USB4_MARGIN_CAP_1_MAX_BER_MASK

/* USB4_SB_OPCODE_RUN_HW_LANE_MARGINING */
#define USB4_MARGIN_HW_TIME
#define USB4_MARGIN_HW_RH
#define USB4_MARGIN_HW_BER_MASK
#define USB4_MARGIN_HW_BER_SHIFT

/* Applicable to all margin values */
#define USB4_MARGIN_HW_RES_1_MARGIN_MASK
#define USB4_MARGIN_HW_RES_1_EXCEEDS
/* Different lane margin shifts */
#define USB4_MARGIN_HW_RES_1_L0_LL_MARGIN_SHIFT
#define USB4_MARGIN_HW_RES_1_L1_RH_MARGIN_SHIFT
#define USB4_MARGIN_HW_RES_1_L1_LL_MARGIN_SHIFT

/* USB4_SB_OPCODE_RUN_SW_LANE_MARGINING */
#define USB4_MARGIN_SW_TIME
#define USB4_MARGIN_SW_RH
#define USB4_MARGIN_SW_COUNTER_MASK
#define USB4_MARGIN_SW_COUNTER_SHIFT
#define USB4_MARGIN_SW_COUNTER_NOP
#define USB4_MARGIN_SW_COUNTER_CLEAR
#define USB4_MARGIN_SW_COUNTER_START
#define USB4_MARGIN_SW_COUNTER_STOP

#endif