From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8B5AC433FE for ; Thu, 16 Sep 2021 14:00:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2251B61244 for ; Thu, 16 Sep 2021 14:00:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2251B61244 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73A2383124; Thu, 16 Sep 2021 16:00:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 83EBC82F4D; Thu, 16 Sep 2021 16:00:22 +0200 (CEST) Received: from lb2-smtp-cloud8.xs4all.net (lb2-smtp-cloud8.xs4all.net [194.109.24.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EB0CB8312F for ; Thu, 16 Sep 2021 16:00:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kettenis@openbsd.org Received: from cust-df1d398c ([IPv6:fc0c:c1f5:9ac0:c45f:1583:5c5b:91fa:2436]) by smtp-cloud8.xs4all.net with ESMTPA id Qrw0maMpieJ0cQrw1msdCX; Thu, 16 Sep 2021 16:00:17 +0200 From: Mark Kettenis To: u-boot@lists.denx.de Cc: Mark Kettenis , Bin Meng , Marek Vasut Subject: [PATCH] usb: xhci-dwc3: Add support for USB 3.1 controllers Date: Thu, 16 Sep 2021 16:00:09 +0200 Message-Id: <20210916140009.59009-1-kettenis@openbsd.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfPYPolCaXFW94bm0n0k1pP5u06B0fxJC+qy4CPXLEJiJSU3xYP0/ofbDltOugg4n6Xfi+Iu/HisM5/J6X4FrjSgJKjDVDz5/aKlXJJIWzFvl9eVJUTuy Z1FvNjQ8k81cpi+yLewqpj1RUzdyUVsiMdfPl0Zod0z2gcVDb25z5ckGnBsVO4fmasZ9KujJlP+1Bluc/IUoUQswcVe8UzZlCphO2Mt14e4CJctYmAXwk5FO xU7dyS5Xe1EmhFC9qse1Ci5490ADYFb/YVlo0srebQqyI6mBq+KG0OWxfpliv4sI X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- 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