Skip to content

Commit 0e3bb7d

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: Add driver for DisplayPort alternate mode
DisplayPort USB Type-C Alt Mode allows DisplayPort displays and adapters to be attached to the USB Type-C ports on the system. Signed-off-by: Heikki Krogerus <[email protected]> Tested-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8a37d87 commit 0e3bb7d

File tree

7 files changed

+741
-0
lines changed

7 files changed

+741
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
What: /sys/bus/typec/devices/.../displayport/configuration
2+
Date: July 2018
3+
Contact: Heikki Krogerus <[email protected]>
4+
Description:
5+
Shows the current DisplayPort configuration for the connector.
6+
Valid values are USB, source and sink. Source means DisplayPort
7+
source, and sink means DisplayPort sink.
8+
9+
All supported configurations are listed as space separated list
10+
with the active one wrapped in square brackets.
11+
12+
Source example:
13+
14+
USB [source] sink
15+
16+
The configuration can be changed by writing to the file
17+
18+
Note. USB configuration does not equal to Exit Mode. It is
19+
separate configuration defined in VESA DisplayPort Alt Mode on
20+
USB Type-C Standard. Functionally it equals to the situation
21+
where the mode has been exited (to exit the mode, see
22+
Documentation/ABI/testing/sysfs-bus-typec, and use file
23+
/sys/bus/typec/devices/.../active).
24+
25+
What: /sys/bus/typec/devices/.../displayport/pin_assignment
26+
Date: July 2018
27+
Contact: Heikki Krogerus <[email protected]>
28+
Description:
29+
VESA DisplayPort Alt Mode on USB Type-C Standard defines six
30+
different pin assignments for USB Type-C connector that are
31+
labeled A, B, C, D, E, and F. The supported pin assignments are
32+
listed as space separated list with the active one wrapped in
33+
square brackets.
34+
35+
Example:
36+
37+
C [D]
38+
39+
Pin assignment can be changed by writing to the file. It is
40+
possible to set pin assignment before configuration has been
41+
set, but the assignment will not be active before the
42+
connector is actually configured.
43+
44+
Note. As of VESA DisplayPort Alt Mode on USB Type-C Standard
45+
version 1.0b, pin assignments A, B, and F are deprecated. Only
46+
pin assignment D can now carry simultaneously one channel of
47+
USB SuperSpeed protocol. From user perspective pin assignments C
48+
and E are equal, where all channels on the connector are used
49+
for carrying DisplayPort protocol (allowing higher resolutions).

drivers/usb/typec/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,6 @@ config TYPEC_TPS6598X
104104

105105
source "drivers/usb/typec/mux/Kconfig"
106106

107+
source "drivers/usb/typec/altmodes/Kconfig"
108+
107109
endif # TYPEC

drivers/usb/typec/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-$(CONFIG_TYPEC) += typec.o
33
typec-y := class.o mux.o bus.o
4+
obj-$(CONFIG_TYPEC) += altmodes/
45
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
56
obj-y += fusb302/
67
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o

drivers/usb/typec/altmodes/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
menu "USB Type-C Alternate Mode drivers"
3+
4+
config TYPEC_DP_ALTMODE
5+
tristate "DisplayPort Alternate Mode driver"
6+
help
7+
DisplayPort USB Type-C Alternate Mode allows DisplayPort
8+
displays and adapters to be attached to the USB Type-C
9+
connectors on the system.
10+
11+
To compile this driver as a module, choose M here: the
12+
module will be called typec_displayport.
13+
14+
endmenu

drivers/usb/typec/altmodes/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_TYPEC_DP_ALTMODE) += typec_displayport.o
2+
typec_displayport-y := displayport.o

0 commit comments

Comments
 (0)