fsl/usb: Workaround for USB erratum-A005275
Workaround makes FS as default mode on all affected socs.
Add support to check erratum-A005275 validity for an soc. This info is
required to determine whether a given soc is affected by this erratum.
Add quirk for this erratum "has_fsl_erratum_a005275" . This quirk is used
to enable workaround for the errata
Force FS mode as default by:
- making EPS as FS
- setting PFSC bit to disable HS chirping
This workaround can be disabled by mentioning "no_erratum_a005275" in
hwconfig string
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 7945016..6c359af 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -8,6 +8,7 @@
#ifndef USB_EHCI_H
#define USB_EHCI_H
+#include <stdbool.h>
#include <usb.h>
#include <generic-phy.h>
@@ -66,6 +67,8 @@
#define PORTSC_PSPD_FS 0x0
#define PORTSC_PSPD_LS 0x1
#define PORTSC_PSPD_HS 0x2
+#define PORTSC_FSL_PFSC BIT(24) /* PFSC bit to disable HS chirping */
+
uint32_t or_systune;
} __attribute__ ((packed, aligned(4)));
@@ -251,6 +254,7 @@
uint32_t *periodic_list;
int periodic_schedules;
int ntds;
+ bool has_fsl_erratum_a005275; /* Freescale HS silicon quirk */
struct ehci_ops ops;
void *priv; /* client's private data */
};