usb: dwc3: add disable u2mac linestate check quirk
authorWilliam Wu <william.wu@rock-chips.com>
Wed, 19 Apr 2017 12:11:38 +0000 (20:11 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 17 May 2017 11:16:57 +0000 (14:16 +0300)
commit65db7a0c9816370da5303500c7ba3754fa430720
tree7da7f0d3a114bc937d06ab1207f3b6bbb0576ca2
parent53e720f332d546dee5a98a55f6e532355727bc4d
usb: dwc3: add disable u2mac linestate check quirk

This patch adds a quirk to disable USB 2.0 MAC linestate check
during HS transmit. Refer the dwc3 databook, we can use it for
some special platforms if the linestate not reflect the expected
line state(J) during transmission.

When use this quirk, the controller implements a fixed 40-bit
TxEndDelay after the packet is given on UTMI and ignores the
linestate during the transmit of a token (during token-to-token
and token-to-data IPGAP).

On some rockchip platforms (e.g. rk3399), it requires to disable
the u2mac linestate check to decrease the SSPLIT token to SETUP
token inter-packet delay from 566ns to 466ns, and fix the issue
that FS/LS devices not recognized if inserted through USB 3.0 HUB.

Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/dwc3.txt
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h