~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/usb/typec_dp.h

Version: ~ [ linux-5.19-rc3 ] ~ [ linux-5.18.5 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.48 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.123 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.199 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.248 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.284 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.319 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __USB_TYPEC_DP_H
  3 #define __USB_TYPEC_DP_H
  4 
  5 #include <linux/usb/typec_altmode.h>
  6 
  7 #define USB_TYPEC_DP_SID        0xff01
  8 /* USB IF has not assigned a Standard ID (SID) for VirtualLink,
  9  * so the manufacturers of VirtualLink adapters use their Vendor
 10  * IDs as the SVID.
 11  */
 12 #define USB_TYPEC_NVIDIA_VLINK_SID      0x955   /* NVIDIA VirtualLink */
 13 #define USB_TYPEC_DP_MODE       1
 14 
 15 /*
 16  * Connector states matching the pin assignments in DisplayPort Alt Mode
 17  * Specification.
 18  *
 19  * These values are meant primarily to be used by the mux drivers, but they are
 20  * also used as the "value" part in the alternate mode notification chain, so
 21  * receivers of those notifications will always see them.
 22  *
 23  * Note. DisplayPort USB Type-C Alt Mode Specification version 1.0b deprecated
 24  * pin assignments A, B and F, but they are still defined here for legacy
 25  * purposes.
 26  */
 27 enum {
 28         TYPEC_DP_STATE_A = TYPEC_STATE_MODAL,   /* Not supported after v1.0b */
 29         TYPEC_DP_STATE_B,                       /* Not supported after v1.0b */
 30         TYPEC_DP_STATE_C,
 31         TYPEC_DP_STATE_D,
 32         TYPEC_DP_STATE_E,
 33         TYPEC_DP_STATE_F,                       /* Not supported after v1.0b */
 34 };
 35 
 36 /*
 37  * struct typec_displayport_data - DisplayPort Alt Mode specific data
 38  * @status: Status Update command VDO content
 39  * @conf: Configure command VDO content
 40  *
 41  * This structure is delivered as the data part with the notifications. It
 42  * contains the VDOs from the two DisplayPort Type-C alternate mode specific
 43  * commands: Status Update and Configure.
 44  *
 45  * @status will show for example the status of the HPD signal.
 46  */
 47 struct typec_displayport_data {
 48         u32 status;
 49         u32 conf;
 50 };
 51 
 52 enum {
 53         DP_PIN_ASSIGN_A, /* Not supported after v1.0b */
 54         DP_PIN_ASSIGN_B, /* Not supported after v1.0b */
 55         DP_PIN_ASSIGN_C,
 56         DP_PIN_ASSIGN_D,
 57         DP_PIN_ASSIGN_E,
 58         DP_PIN_ASSIGN_F, /* Not supported after v1.0b */
 59 };
 60 
 61 /* DisplayPort alt mode specific commands */
 62 #define DP_CMD_STATUS_UPDATE            VDO_CMD_VENDOR(0)
 63 #define DP_CMD_CONFIGURE                VDO_CMD_VENDOR(1)
 64 
 65 /* DisplayPort Capabilities VDO bits (returned with Discover Modes) */
 66 #define DP_CAP_CAPABILITY(_cap_)        ((_cap_) & 3)
 67 #define   DP_CAP_UFP_D                  1
 68 #define   DP_CAP_DFP_D                  2
 69 #define   DP_CAP_DFP_D_AND_UFP_D        3
 70 #define DP_CAP_DP_SIGNALING             BIT(2) /* Always set */
 71 #define DP_CAP_GEN2                     BIT(3) /* Reserved after v1.0b */
 72 #define DP_CAP_RECEPTACLE               BIT(6)
 73 #define DP_CAP_USB                      BIT(7)
 74 #define DP_CAP_DFP_D_PIN_ASSIGN(_cap_)  (((_cap_) & GENMASK(15, 8)) >> 8)
 75 #define DP_CAP_UFP_D_PIN_ASSIGN(_cap_)  (((_cap_) & GENMASK(23, 16)) >> 16)
 76 
 77 /* DisplayPort Status Update VDO bits */
 78 #define DP_STATUS_CONNECTION(_status_)  ((_status_) & 3)
 79 #define   DP_STATUS_CON_DISABLED        0
 80 #define   DP_STATUS_CON_DFP_D           1
 81 #define   DP_STATUS_CON_UFP_D           2
 82 #define   DP_STATUS_CON_BOTH            3
 83 #define DP_STATUS_POWER_LOW             BIT(2)
 84 #define DP_STATUS_ENABLED               BIT(3)
 85 #define DP_STATUS_PREFER_MULTI_FUNC     BIT(4)
 86 #define DP_STATUS_SWITCH_TO_USB         BIT(5)
 87 #define DP_STATUS_EXIT_DP_MODE          BIT(6)
 88 #define DP_STATUS_HPD_STATE             BIT(7) /* 0 = HPD_Low, 1 = HPD_High */
 89 #define DP_STATUS_IRQ_HPD               BIT(8)
 90 
 91 /* DisplayPort Configurations VDO bits */
 92 #define DP_CONF_CURRENTLY(_conf_)       ((_conf_) & 3)
 93 #define DP_CONF_UFP_U_AS_DFP_D          BIT(0)
 94 #define DP_CONF_UFP_U_AS_UFP_D          BIT(1)
 95 #define DP_CONF_SIGNALING_DP            BIT(2)
 96 #define DP_CONF_SIGNALING_GEN_2         BIT(3) /* Reserved after v1.0b */
 97 #define DP_CONF_PIN_ASSIGNEMENT_SHIFT   8
 98 #define DP_CONF_PIN_ASSIGNEMENT_MASK    GENMASK(15, 8)
 99 
100 /* Helper for setting/getting the pin assignement value to the configuration */
101 #define DP_CONF_SET_PIN_ASSIGN(_a_)     ((_a_) << 8)
102 #define DP_CONF_GET_PIN_ASSIGN(_conf_)  (((_conf_) & GENMASK(15, 8)) >> 8)
103 
104 #endif /* __USB_TYPEC_DP_H */
105 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp