]> git.ipfire.org Git - thirdparty/u-boot.git/commit
usb: dwc3: Add disable u2mac linestate check quirk
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 26 May 2020 03:33:48 +0000 (11:33 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 29 May 2020 10:13:19 +0000 (18:13 +0800)
commitdc18413adbf188ffdfb0706023249e7c03b29545
tree93efaf736c6411c2350dac0af8f1fdb992069d42
parentb34f8b5de0fea945c2683e9e64d941c121aa02ad
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.

Reference from below Linux commit,

commit <65db7a0c9816> ("usb: dwc3: add disable u2mac linestate
check quirk")

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
include/dwc3-uboot.h