This adds support for the DWC_sub31 controllers such as those
found on Apple's M1 SoC.  This version of the controller
seems to work fine with the existing driver.

Signed-off-by: Mark Kettenis <kette...@openbsd.org>
---
 drivers/usb/host/xhci-dwc3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 3e0ae80cec..a2ea40bae0 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -70,7 +70,8 @@ int dwc3_core_init(struct dwc3 *dwc3_reg)
 
        revision = readl(&dwc3_reg->g_snpsid);
        /* This should read as U3 followed by revision number */
-       if ((revision & DWC3_GSNPSID_MASK) != 0x55330000) {
+       if ((revision & DWC3_GSNPSID_MASK) != 0x55330000 &&
+           (revision & DWC3_GSNPSID_MASK) != 0x33310000) {
                puts("this is not a DesignWare USB3 DRD Core\n");
                return -1;
        }
-- 
2.33.0

Reply via email to