Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfba2174 authored by Lu Baolu's avatar Lu Baolu Committed by Greg Kroah-Hartman
Browse files

usb: xhci: Add DbC support in xHCI driver



xHCI compatible USB host controllers(i.e. super-speed USB3 controllers)
can be implemented with the Debug Capability(DbC). It presents a debug
device which is fully compliant with the USB framework and provides the
equivalent of a very high performance full-duplex serial link. The debug
capability operation model and registers interface are defined in 7.6.8
of the xHCI specification, revision 1.1.

The DbC debug device shares a root port with the xHCI host. By default,
the debug capability is disabled and the root port is assigned to xHCI.
When the DbC is enabled, the root port will be assigned to the DbC debug
device, and the xHCI sees nothing on this port. This implementation uses
a sysfs node named <dbc> under the xHCI device to manage the enabling
and disabling of the debug capability.

When the debug capability is enabled, it will present a debug device
through the debug port. This debug device is fully compliant with the
USB3 framework, and it can be enumerated by a debug host on the other
end of the USB link. As soon as the debug device is configured, a TTY
serial device named /dev/ttyDBC0 will be created.

Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67d2ea9f
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
What:		/sys/bus/pci/drivers/xhci_hcd/.../dbc
Date:		June 2017
Contact:	Lu Baolu <baolu.lu@linux.intel.com>
Description:
		xHCI compatible USB host controllers (i.e. super-speed
		USB3 controllers) are often implemented with the Debug
		Capability (DbC). It can present a debug device which
		is fully compliant with the USB framework and provides
		the equivalent of a very high performance full-duplex
		serial link for debug purpose.

		The DbC debug device shares a root port with xHCI host.
		When the DbC is enabled, the root port will be assigned
		to the Debug Capability. Otherwise, it will be assigned
		to xHCI.

		Writing "enable" to this attribute will enable the DbC
		functionality and the shared root port will be assigned
		to the DbC device. Writing "disable" to this attribute
		will disable the DbC functionality and the shared root
		port will roll back to the xHCI.

		Reading this attribute gives the state of the DbC. It
		can be one of the following states: disabled, enabled,
		initialized, connected, configured and stalled.
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,14 @@ config USB_XHCI_HCD
	  module will be called xhci-hcd.

if USB_XHCI_HCD
config USB_XHCI_DBGCAP
	bool "xHCI support for debug capability"
	depends on TTY
	---help---
	  Say 'Y' to enable the support for the xHCI debug capability. Make
	  sure that your xHCI host supports the extended debug capability and
	  you want a TTY serial device based on the xHCI debug capability
	  before enabling this option. If unsure, say 'N'.

config USB_XHCI_PCI
       tristate
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,11 @@ fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o
xhci-hcd-y := xhci.o xhci-mem.o
xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o
xhci-hcd-y += xhci-trace.o

ifneq ($(CONFIG_USB_XHCI_DBGCAP), )
	xhci-hcd-y += xhci-dbgcap.o xhci-dbgtty.o
endif

ifneq ($(CONFIG_USB_XHCI_MTK), )
	xhci-hcd-y += xhci-mtk-sch.o
endif
+996 −0

File added.

Preview size limit exceeded, changes collapsed.

+229 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading