Commit b50a2da0 authored by Roger Quadros's avatar Roger Quadros Committed by Greg Kroah-Hartman
Browse files

usb: cdns3-ti: Add workaround for Errata i2409

TI USB2 PHY is known to have a lockup issue on very short
suspend intervals. Enable the Suspend Residency quirk flag to
workaround this as described in Errata i2409 [1].

[1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf



Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
Acked-by: default avatarPeter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20240516044537.16801-3-r-gunasekaran@ti.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0aca19e4
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include "core.h"

/* USB Wrapper register offsets */
#define USBSS_PID		0x0
@@ -85,6 +86,18 @@ static inline void cdns_ti_writel(struct cdns_ti *data, u32 offset, u32 value)
	writel(value, data->usbss + offset);
}

static struct cdns3_platform_data cdns_ti_pdata = {
	.quirks = CDNS3_DRD_SUSPEND_RESIDENCY_ENABLE,   /* Errata i2409 */
};

static const struct of_dev_auxdata cdns_ti_auxdata[] = {
	{
		.compatible = "cdns,usb3",
		.platform_data = &cdns_ti_pdata,
	},
	{},
};

static int cdns_ti_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
@@ -176,7 +189,7 @@ static int cdns_ti_probe(struct platform_device *pdev)
	reg |= USBSS_W1_PWRUP_RST;
	cdns_ti_writel(data, USBSS_W1, reg);

	error = of_platform_populate(node, NULL, NULL, dev);
	error = of_platform_populate(node, NULL, cdns_ti_auxdata, dev);
	if (error) {
		dev_err(dev, "failed to create children: %d\n", error);
		goto err;