aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/drd.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-02usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockupPawel Laszczak1-1/+4
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 <[email protected]> Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2020-07-24usb: cdns3: drd: simplify *switch_gadet and *switch_hostPawel Laszczak1-2/+4
Patch split function cdns3_drd_switch_gadget and cdns3_drd_switch_host into: - cdns3_drd_host_on - cdns3_drd_host_off - cdns3_drd_gadget_on - cdns3_drd_gadgett_off These functions don't have any shared code so it's better to have smaller, faster and easier functions. Signed-off-by: Pawel Laszczak <[email protected]> Reviewed-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2020-07-24usb: cdns3: Added CDNS3_ID_PERIPHERAL and CDNS3_ID_HOSTPawel Laszczak1-0/+3
Patch adds 2 definitions that make it easier to understand the code. Reviewed-by: Peter Chen <[email protected]> Signed-off-by: Pawel Laszczak <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2020-07-24usb: cdns3: drd: changed return type from int to boolPawel Laszczak1-2/+2
Patch changes return type from int to bool for cdns3_is_host and cdns3_is_device functions. Reviewed-by: Peter Chen <[email protected]> Signed-off-by: Pawel Laszczak <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2019-08-29usb: cdns3: Add Cadence USB3 DRD DriverPawel Laszczak1-0/+167
This patch introduce new Cadence USBSS DRD driver to Linux kernel. The Cadence USBSS DRD Controller is a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI)configurations. The current driver has been validated with FPGA platform. We have support for PCIe bus, which is used on FPGA prototyping. The host side of USBSS-DRD controller is compliant with XHCI specification, so it works with standard XHCI Linux driver. Signed-off-by: Pawel Laszczak <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>