Skip to content

Commit

Permalink
usb: typec: Add driver for DisplayPort alternate mode
Browse files Browse the repository at this point in the history
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 <heikki.krogerus@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Heikki Krogerus authored and Greg Kroah-Hartman committed Jul 2, 2018
1 parent 8a37d87 commit 0e3bb7d
Show file tree
Hide file tree
Showing 7 changed files with 741 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-typec-displayport
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
What: /sys/bus/typec/devices/.../displayport/configuration
Date: July 2018
Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Description:
Shows the current DisplayPort configuration for the connector.
Valid values are USB, source and sink. Source means DisplayPort
source, and sink means DisplayPort sink.

All supported configurations are listed as space separated list
with the active one wrapped in square brackets.

Source example:

USB [source] sink

The configuration can be changed by writing to the file

Note. USB configuration does not equal to Exit Mode. It is
separate configuration defined in VESA DisplayPort Alt Mode on
USB Type-C Standard. Functionally it equals to the situation
where the mode has been exited (to exit the mode, see
Documentation/ABI/testing/sysfs-bus-typec, and use file
/sys/bus/typec/devices/.../active).

What: /sys/bus/typec/devices/.../displayport/pin_assignment
Date: July 2018
Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Description:
VESA DisplayPort Alt Mode on USB Type-C Standard defines six
different pin assignments for USB Type-C connector that are
labeled A, B, C, D, E, and F. The supported pin assignments are
listed as space separated list with the active one wrapped in
square brackets.

Example:

C [D]

Pin assignment can be changed by writing to the file. It is
possible to set pin assignment before configuration has been
set, but the assignment will not be active before the
connector is actually configured.

Note. As of VESA DisplayPort Alt Mode on USB Type-C Standard
version 1.0b, pin assignments A, B, and F are deprecated. Only
pin assignment D can now carry simultaneously one channel of
USB SuperSpeed protocol. From user perspective pin assignments C
and E are equal, where all channels on the connector are used
for carrying DisplayPort protocol (allowing higher resolutions).
2 changes: 2 additions & 0 deletions drivers/usb/typec/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,6 @@ config TYPEC_TPS6598X

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

source "drivers/usb/typec/altmodes/Kconfig"

endif # TYPEC
1 change: 1 addition & 0 deletions drivers/usb/typec/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_TYPEC) += typec.o
typec-y := class.o mux.o bus.o
obj-$(CONFIG_TYPEC) += altmodes/
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
obj-y += fusb302/
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o
Expand Down
14 changes: 14 additions & 0 deletions drivers/usb/typec/altmodes/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

menu "USB Type-C Alternate Mode drivers"

config TYPEC_DP_ALTMODE
tristate "DisplayPort Alternate Mode driver"
help
DisplayPort USB Type-C Alternate Mode allows DisplayPort
displays and adapters to be attached to the USB Type-C
connectors on the system.

To compile this driver as a module, choose M here: the
module will be called typec_displayport.

endmenu
2 changes: 2 additions & 0 deletions drivers/usb/typec/altmodes/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_TYPEC_DP_ALTMODE) += typec_displayport.o
typec_displayport-y := displayport.o
Loading

0 comments on commit 0e3bb7d

Please sign in to comment.