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: 791231 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp348910wrq; Tue, 23 Apr 2024 07:16:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIkRYVnICuZ4m2CSTeUidquJ1SgiXHNqGqo4di6yYYmTJzR9/Zyt8YaPIrpM45u/UCCdkYtlURhbLZ1soMf0N2 X-Google-Smtp-Source: AGHT+IFUbjSpCBAchsXdnNhYMY5EuJ+v0lkJaj8EdpJMBpBcRNQrI0UFKYJgDzOb0v+SVwqh2Hyf X-Received: by 2002:adf:cb83:0:b0:343:75eb:bb79 with SMTP id q3-20020adfcb83000000b0034375ebbb79mr10852748wrh.49.1713881801182; Tue, 23 Apr 2024 07:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713881801; cv=none; d=google.com; s=arc-20160816; b=wbnydoqvdPxUNfYKf8YauJMq87BIdC1AibxPnn/0lo1wNou9x2oSh2gXxhdfiGHHZq 5tmtyOrIqdctUUt2UrzrKdsvXjsei5Va3+O5B+8NOy/vAIxYZsB46wH58Shbq6zqSxt2 +knvi3DW5s9QnoWpCUB0CIshr9e9N8+J+xyhKJFelEY7M/QGfc6VABtj0Wr7XEoouPKQ pzg37fgxX5WR7UEzKGu3OZ/4hmv4ZoFfbytisPz3P7j0ZAgWNu/Zy/aGwBBw6b0joCpj 9N4GmcdN8OTp4FwomPJx2WErKUR3ifkh+LnPrOhpsZ4/jXwjTlz9sm2zAFhivFVpIlNL pMUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=LvRCGQEa9BDUvOSsZjW4mGOmFskJT5oXXUrF1mJaGmI=; fh=mLXT5QzeP8x9GC13819I1iUONHafYdhBDwcTUzNvb8A=; b=B079mvuZFsYxcPU0mrXxN+6W77uNp/ElbtXUl7B68UKDrXz1i2IfceuV1lWRA4/JqM AOjTnufDPF+mU6WtJTVedlNcBm09eo2dLBu9vz1Zw82XeAlmtqRKR7EFjht/5FeZoJ3o F04SymQ93NyC17YOgpRIUogGI+EovGRP2ClQSnsEGE4Cy9ZsKUkeBiBw1EHSdfVxb6t8 89vtm6MwyriRewxfdTSVnS1Czo1aelQXZWDQkUGgIuN9jZ2wWqBwjOoHyC0XHKweeJmz luvYfEQU1QAgDoyymL+flOQY8+6sbZdTBV5aMrhmT/o6XKyhUDEJWBcG5AWO1fuub2D7 D8iQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAzMHXVj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id dh7-20020a0560000a8700b0034b65cc933esi921933wrb.328.2024.04.23.07.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAzMHXVj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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 --- 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; }