From patchwork Tue Apr 23 14:15:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 1926606 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VAzMHXVj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VP4111KbXz1ySm for ; Wed, 24 Apr 2024 00:16:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57F4888340; Tue, 23 Apr 2024 16:16:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VAzMHXVj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1CD388349; Tue, 23 Apr 2024 16:16:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3D5BD88343 for ; Tue, 23 Apr 2024 16:16:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2dd6c14d000so30614621fa.0 for ; Tue, 23 Apr 2024 07:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713881771; x=1714486571; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LvRCGQEa9BDUvOSsZjW4mGOmFskJT5oXXUrF1mJaGmI=; b=VAzMHXVjTPF0WO91eKiLiOPPdyf22Dh0mVii3XoAmpv9pEh0ZCors3ab8Os5jVciaf 57H3yWJCAekMcE2DNbXN5n0tM0bhI+cCPDIh47T7fbVHG0If02wowrR+hmrACr8bQmhM 910sNsIvGhKdCyO9ZioHTj3jn5+RU5J8BrJzDZs9GHBAa417+s/OX4qrNgPmV9uLR2Nz Zdx0jnMTBru6rcP+Ie/o2DsmLV1lPzGNXPJ8N1fq59WPil9jFDmvrxSZcla5ZVNOtKPi Zc0+lwrhNxmmHhK6YJfdN7agbKYoh2hxbtEDXbG7u5i0QFcKtSeG/t1zRPDejGRSM9pu XvQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713881771; x=1714486571; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LvRCGQEa9BDUvOSsZjW4mGOmFskJT5oXXUrF1mJaGmI=; b=hB0zzaw9zOSd6vKew0fjRxrJ12B3DvW0nr4y1vjjQo6N/eCcpfnFEOnH7DorRPllR+ 5wUhQWwydaoyq+C46E579Tp9pH8Sw04gp2l3XtW22wj+ApPN3JI5yQzSjstX/lYJ7jcf cP1VYIMghweLEtJg+tbhsxKAgy40q73GowM3tpkZO85tZnGrvyGfnJ2SYnThErAYl+fp Se0x1YqxthDTbT8sQUKngWnaOp555/jZm6t9VFtUGkdabFtxMapsud3p7fe3KRZU2VsY g0fYbDM5vcFe+PJMoHVr/cVahb4uW3bcyZrrgcHpmep3fDjJpoaj5Uv9GF18TigSCTBM aPMw== X-Forwarded-Encrypted: i=1; AJvYcCXFcm7OgdYVHpdSxetZOFRabzlAqVscm9f79uM/jhLZ3+uaO+lyZ7Ep1/hq7UhS214QgqSOiYu67vHMsSnOmo2XHoo3LA== X-Gm-Message-State: AOJu0YylZc+RANtOgSh5OAcqQAPwW59g0QXxYnZQlCR6KdwqeYqQT6om DJ7VSV8++UmcM2XRq2w1EquEOfT1hzs1/FhzXFyBZK7QzYfIKYg6YKeYu5eXYDc= X-Google-Smtp-Source: AGHT+IF4DJTWIPMQU6k1DPyOYiVC2FoocQr01EFEEvu7hMWyffoUOtKmsC+MnJnv4P3JUSTQgZEFdQ== X-Received: by 2002:a05:651c:a12:b0:2de:2fc0:245a with SMTP id k18-20020a05651c0a1200b002de2fc0245amr1420647ljq.40.1713881771491; Tue, 23 Apr 2024 07:16:11 -0700 (PDT) Received: from cymric.caleb.rex.connolly.tech ([2a02:8109:aa0d:be00::1795]) by smtp.gmail.com with ESMTPSA id p19-20020a05640210d300b00572033ec969sm2862261edu.60.2024.04.23.07.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:16:10 -0700 (PDT) From: Caleb Connolly To: Caleb Connolly , Igor Prusov , Marek Vasut , Mattijs Korpershoek , Nishanth Menon , Patrice Chotard , Stefan Bosch , Tom Rini Cc: Neil Armstrong , Eugen Hristev , Marek Vasut , u-boot@lists.denx.de Subject: [PATCH v2] usb: dwc3: support USB 3.1 controllers Date: Tue, 23 Apr 2024 16:15:06 +0200 Message-ID: <20240423141551.2410199-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean The revision is different for these, add the additional check as in xhci-dwc3 core_init code. Equivalent upstream Linux patch: 690fb3718a70 ("usb: dwc3: Support Synopsys USB 3.1 IP") Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550 Reviewed-by: Mattijs Korpershoek Reviewed-by: Marek Vasut Signed-off-by: Caleb Connolly Reviewed-by: Marek Vasut --- Changes since v1: * Reference Linux patch * V1: https://lore.kernel.org/u-boot/20240411160527.835767-1-caleb.connolly@linaro.org --- drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 96e850b7170f..db045f5822d4 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -594,9 +594,10 @@ static int dwc3_core_init(struct dwc3 *dwc) int ret; reg = dwc3_readl(dwc->regs, DWC3_GSNPSID); /* This should read as U3 followed by revision number */ - if ((reg & DWC3_GSNPSID_MASK) != 0x55330000) { + if ((reg & DWC3_GSNPSID_MASK) != 0x55330000 && + (reg & DWC3_GSNPSID_MASK) != 0x33310000) { dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n"); ret = -ENODEV; goto err0; }