usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup
authorPawel Laszczak <pawell@cadence.com>
Tue, 15 Sep 2020 11:45:43 +0000 (14:45 +0300)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:39 +0000 (09:57 +0300)
commit2eae2dfd581420f94d6041dddc7a88d7ae9ce2ff
tree01230e0fa5c5bdea716d0b7eab188d3395fb292e
parent5261e48f9a705bf65e3d202eb44dc2e270911684
usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup

USB2.0 PHY hangs in Rx Compliance test when the incoming packet
amplitude is varied below and above the Squelch Level of
Receiver during the active packet multiple times.

Version 1 of the controller allows PHY to be reset when RX fail condition
is detected to work around the above issue. This feature is
disabled by default and needs to be enabled using a bit from
the newly added PHYRST_CFG register. This patch enables the workaround.

There is no way to know controller version before device controller
is started and the workaround needs to be applied for both host and
device modes, so we rely on a DT property do decide when to
apply the workaround.

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/cdns3/core.c
drivers/usb/cdns3/core.h
drivers/usb/cdns3/drd.c
drivers/usb/cdns3/drd.h