From patchwork Thu Mar 7 09:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13585306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37142C48BF6 for ; Thu, 7 Mar 2024 09:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MKjAmkV06YwAiUTHYIUldbVVTuQM2Gu26/pxSCbWMi8=; b=Mrjrv4V2ysKQoP t+16sc21/LY4ElqzvBELShvgj1fRpiLF7VhxrulxQGteQeY0cK8d+9oiu2nxBcOpL4K89tKKSfSfb +8DnbYWYhDD1Uc/45/yKWpRA484zRL3/449o5LaC2YdvR0LpiORZg4YDMNEhf702K4SlgO7GLHbBm GKGBsHXiMxpNdukjcwvogLWuKepwmqmBSIgVmYsdS91CvzDR5x4DCPjY6i6Si682xqW50UWYX+owy Tj32Isjo4DlyT1XRt7RQ1/IFR2LpTEgTVUwWPVJZjWo99GzeczaviPdpv8hP2HL26w0v+tjoM2L1o +BFUWNnkDOVgLdsnXkQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riATI-00000003wuB-0k0F; Thu, 07 Mar 2024 09:55:28 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riAT6-00000003wmD-26eY for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 09:55:19 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 20B4D1C0007; Thu, 7 Mar 2024 09:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709805314; 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=VBad9+782slCv5Qy3FoQAjnODyjhm1RvWeZ1RJq9nxg=; b=k5CD1p26mVRjdWhzTx+n0zObpEKSqgXeW1htxo1cDxzY6KFL5w5fIkE6zmyq021wepeUAs SM6bYG+VOTT5F2p6abg4uLFwonEiGK7RxUJm5amVo1F6fo4481e8nuf1N33PjWTgfMAVGO hhJ1qfyfLanmXMwqm/XPTgxld9lzUAkL/AWKwy36VGlS5IzjSFQjuTDd9wN7lZyQFh627X eBeLJbtfavMh1qX05pF77RuGBuPVYo8BebWMHaTOcomidaEShUlXdCsixmD/rugTOwSR1w 0hBiyWIpxpb4gMb+jWCatDLMl6rhS0x7Vaz4o/yJcP0CSqIJSSE4U+TU2b0qvA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Thu, 07 Mar 2024 10:55:08 +0100 Subject: [PATCH v4 7/9] usb: cdns3-ti: add J7200 support with reset-on-resume behavior MIME-Version: 1.0 Message-Id: <20240307-j7200-usb-suspend-v4-7-5ec7615431f3@bootlin.com> References: <20240307-j7200-usb-suspend-v4-0-5ec7615431f3@bootlin.com> In-Reply-To: <20240307-j7200-usb-suspend-v4-0-5ec7615431f3@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_?= =?utf-8?q?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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_015517_721592_E7BF0B57 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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", }, {},