Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp939870rbd; Fri, 23 Feb 2024 08:08:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVe3d6ZkH+3TTbzUW6yhjdLHRMkzNTmcAu8VqqSXanuJdI3S+KpMB+4/bv2gzhHHeu0OKQky0u7n3IfkOag1LdHSguq4IiivV51sq/P8w== X-Google-Smtp-Source: AGHT+IH06XTbAtV/G+gCmKqFMwSH/JdJzGpTuc1om/Lk0PnNObM6WkWHohNaflMRozyZ8HGcRIvy X-Received: by 2002:ac8:5c10:0:b0:42e:482c:efa5 with SMTP id i16-20020ac85c10000000b0042e482cefa5mr361158qti.25.1708704502189; Fri, 23 Feb 2024 08:08:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708704502; cv=pass; d=google.com; s=arc-20160816; b=heEk9yG2HG0qMN9tX44YnvVBukT6/jKVgbumOQdTOdXmtwEt6vcN+DDZKFuagNIo24 lvhWJAQJAYN83O3S6isn1CTYEtzIgmwYWxavUSR56wT8FmxJSRv/70xSMDvN1N/qwCBe aXFK5Y7SHWivRpchQOU1YrKQvBmbIMnPnQ33vxfG+SKKVuYGKBn4qFWm+iWpTxHR7NIk czGaKwvbZU23KMf/JFjOgLWLeb1uGWMvlbxhFhPOY1/4Ls4MjiXr8Q6LrcyFnd0+pU/D lUH0WzsJDDAiHHFOkMkPLWnAkte3V3TW+255TDWT1sZNKRAHrBw9XaxKZSyjKcFiCcaG D2RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=wF2GEFIGDf1EoCX/WDH7UWK4GOrP+0T9MYnwKzq1lNc=; fh=ETrV/TJQ0D54aecHJ7+ZWHft2hV1Bw4fCfbLWnN7i4U=; b=FGTTRnTPf4eNmyStE1pRZvuiYctPfL3VcUA7z4bHLOSX1m59LzisLyKr6/SGaUYJHH Dl2DDtOHYnVfPNJBiSeny1QrNKkmJyY1uT4FleO+LbRKBudW5OyaBfGdBcCU1cdp+guT p08/PD2XmUYjQ5QsGr+wYqXGhzYAYVe9bnEnfuM+zgvi7axtRz0M8rFLlkJZgR5c1EhH Rr6jQllk+R/C0cHkVmNccIRgTHj4TflqgKGR2k+Ij4PeDo50o4uyQbWDpZ4IihWEs1FQ Ul/hgk8SsueQbEzJjREQq3NE4rkNUtaX5drYg7fxtxrKCjGVFQFn95yNz7y8ZFTsAVbZ QZ9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NEzmvm4U; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v10-20020ac8728a000000b0042e6b020167si394599qto.108.2024.02.23.08.08.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:08:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NEzmvm4U; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9A1631C25984 for ; Fri, 23 Feb 2024 16:07:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4080912B16B; Fri, 23 Feb 2024 16:05:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="NEzmvm4U" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7126384A47; Fri, 23 Feb 2024 16:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708704340; cv=none; b=JXfxiVZ2rGHjtAtGMTOn64W1Sk3hYGZV2Bjgc53VY4pt6sYDEjs7f3w4mE92oC+JiIVcm8cOGfohkLVAJfXz62Tyb50llNiIIzBJnhIRAixyqe7DAyrDLfIKKp8WOVBl3btDtqVAeVtJFVYGwwMeeGAfQlCuHUJbIc8DgjANJ0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708704340; c=relaxed/simple; bh=pOwI5GqJccR2V6G6RA9AszwHgBeEwP4jFC1YS6Zf6zk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZBYF79hdPZtvpcl0zASU9qLOhAWuqndNVFltFgf/c84Pp2X2GiIWQoINbnWwnBLYKhZMXCBis9gGUpxZ4bnBgG77D9DgklLcYulzyH0AC0PvYoMk/dwZ3mxu3HjDoVw1xb7WUmvR0hh4rzGf/Z+KZk+zpsSfBg98GedGBy2S+Kg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=NEzmvm4U; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 215831C000C; Fri, 23 Feb 2024 16:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708704336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wF2GEFIGDf1EoCX/WDH7UWK4GOrP+0T9MYnwKzq1lNc=; b=NEzmvm4U1Qt5t0hcgSEFjjIouzNmvAR3cOFKlNu6MbUu5OjE0Y0X4ZUFs7DDWGon/MJIKN I7oOYJ7kqC0SlplEaxb0OWaz3xPegu3mcqr6jLLzUwHb6YY6j+OOOrVF7y7otmDsN0Fx0m HUShbNCkwob8+61DMz5BXnH2nuyM9eR3Ag17mHuSpfN9Z7bmx/yfqe5KbfhNBjsu8wgFGI anSQFw4RD8Lv8+p3ty3HQSl5HQC3kEHnBmmUzXdoV8xupZnarmXsh5snp4ldezmo9+lwgA V2Qmj8DgVA9GCOTP4ctqnPJQqOs2VrhT/QPWuh8/aU5C1D1q3X4JB32KP6hC2Q== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Fri, 23 Feb 2024 17:05:31 +0100 Subject: [PATCH v3 7/8] usb: cdns3-ti: add J7200 support with reset-on-resume behavior Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240223-j7200-usb-suspend-v3-7-b41c9893a130@bootlin.com> References: <20240223-j7200-usb-suspend-v3-0-b41c9893a130@bootlin.com> In-Reply-To: <20240223-j7200-usb-suspend-v3-0-b41c9893a130@bootlin.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Peter Chen , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Thomas Petazzoni , =?utf-8?q?Gr=C3=A9gory_Clement?= , Kevin Hilman , Alan Stern , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com Add ti,j7200-usb compatible. Match data indicates the controller resets on resume meaning: - The cdns3-ti wrapper init sequence must be ran at resume. - Tell the cdns3 core that we reset on resume. This silences a xHCI warning visible in cases of unexpected resets. Signed-off-by: Théo Lebrun --- drivers/usb/cdns3/cdns3-ti.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index 29fb24c811b3..648243a27987 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -17,6 +17,8 @@ #include #include +#include "core.h" + /* USB Wrapper register offsets */ #define USBSS_PID 0x0 #define USBSS_W1 0x4 @@ -255,7 +257,25 @@ static const struct dev_pm_ops cdns_ti_pm_ops = { SYSTEM_SLEEP_PM_OPS(cdns_ti_suspend, cdns_ti_resume) }; +static struct cdns3_platform_data cdns_ti_j7200_pdata = { + .quirks = CDNS3_RESET_ON_RESUME, +}; + +static const struct of_dev_auxdata cdns_ti_j7200_auxdata[] = { + { + .compatible = "cdns,usb3", + .platform_data = &cdns_ti_j7200_pdata, + }, + {}, +}; + +static const struct cdns_ti_match_data cdns_ti_j7200_match_data = { + .reset_on_resume = true, + .auxdata = cdns_ti_j7200_auxdata, +}; + static const struct of_device_id cdns_ti_of_match[] = { + { .compatible = "ti,j7200-usb", .data = &cdns_ti_j7200_match_data, }, { .compatible = "ti,j721e-usb", }, { .compatible = "ti,am64-usb", }, {}, -- 2.43.2