mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
FROMGIT: usb: typec: Correct the bit values for the Thunderbolt rounded/non-rounded cable support
Rounded and non-rounded Thunderbolt cables are represented by two bits as
per USB Type-C Connector specification v2.0 section F.2.6.
Corrected that in the Thunderbolt 3 cable discover mode VDO.
Bug: 174347172
Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
--
Changes in v2:
- Removed the fixes tag as there is no functional implication.
--
Link: https://lore.kernel.org/r/20201113202503.6559-2-utkarsh.h.patel@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 13d40ff85d
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Cc: Badhri Jagan Sridharan <badhri@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3094eabac270b07a39fe0ea382a58eb50d857438
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
752f5e3c7b
commit
c536476c98
@@ -40,11 +40,16 @@ struct typec_thunderbolt_data {
|
||||
#define TBT_CABLE_USB3_PASSIVE 2
|
||||
#define TBT_CABLE_10_AND_20GBPS 3
|
||||
#define TBT_CABLE_ROUNDED BIT(19)
|
||||
#define TBT_CABLE_ROUNDED_SUPPORT(_vdo_) \
|
||||
(((_vdo_) & GENMASK(20, 19)) >> 19)
|
||||
#define TBT_GEN3_NON_ROUNDED 0
|
||||
#define TBT_GEN3_GEN4_ROUNDED_NON_ROUNDED 1
|
||||
#define TBT_CABLE_OPTICAL BIT(21)
|
||||
#define TBT_CABLE_RETIMER BIT(22)
|
||||
#define TBT_CABLE_LINK_TRAINING BIT(23)
|
||||
|
||||
#define TBT_SET_CABLE_SPEED(_s_) (((_s_) & GENMASK(2, 0)) << 16)
|
||||
#define TBT_SET_CABLE_ROUNDED(_g_) (((_g_) & GENMASK(1, 0)) << 19)
|
||||
|
||||
/* TBT3 Device Enter Mode VDO bits */
|
||||
#define TBT_ENTER_MODE_CABLE_SPEED(s) TBT_SET_CABLE_SPEED(s)
|
||||
|
||||
Reference in New Issue
Block a user