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 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 80EB4C3DA4A for ; Mon, 5 Aug 2024 13:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3JFrvRZb9vvNRdbIxFN0d7+HMTX2dqIwYMeLBd4vNMI=; b=HO5tzep/v7S5fiMArAhCvJeYkJ Kl4iYrU75kx9Cpy7yWFbohRIlWYvjm1EIvDVXm8ySkqbPP9TPe0g8kxc8XYI7n/wY8aCuxhaDn9MO aVrteOcDRRaqpcg92KdrLwL8Ipz7RNQwq6F/YbVFE0DX7Af7fyhFgJj4t6DTAkyYLjPODo+ktjMco UaBl8FHNvjwmxiW233ZswcGbNpxiiWNEReYNtxf6qI0HDTNtGJqflaBzAPTmzxuLZ3JDp6Jg5+Tjy Zy/3XNMCj3r0W3LnufGqI/hOfVTGA4d+1mn63V+cb0XT0Q/n3Le4dhvDhfBPtW7hLmmZj5dZZp2U5 oGPngojQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sayAy-0000000G1vU-2Nq5; Mon, 05 Aug 2024 13:55:04 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sayAR-0000000G1ou-3rYt for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2024 13:54:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 51FEC60B83; Mon, 5 Aug 2024 13:54:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA264C32782; Mon, 5 Aug 2024 13:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722866071; bh=BncnyQonmJ5+HmLoE7oS88pIgg0LaOFqG5VcpwZrO4E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=claQdTGSpGAqM40GuXdBs1yWHEy4DZz79ft29R6GbokVsZ8F4XOHs18Q3ipoTQW7e oKWS8tgz1jwbs4lZAPqGvd3ZdySBQ63wMCp0t1c5YsYDOTkflkDJ+FZ/zO3WOdSmi9 fMXflvuwb9Y46/u7kLpn9wlXuOdHblrj1a+kf/fhz3jXC0r/BYRT8p9CBXr2aUGP1Q Fn9SL24zBYBQNJr2deVfGnkeM8YWBS0g0QeKRoHkkhkFx3+KWc4jIjNDfyaaVjW2uj 6MKfhha5LUxY0Hcg0s7LRVlccttt25IYLNmQt/36D+I4ha+ykur8DGaIqYfJAnLaAa t9bB3is/N0FBg== Message-ID: <0a634553-023c-4a46-8743-28357021c689@kernel.org> Date: Mon, 5 Aug 2024 16:54:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 07/12] usb: cdns3-ti: add J7200 support with reset-on-resume behavior To: =?UTF-8?Q?Th=C3=A9o_Lebrun?= , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Chen , Pawel Laszczak , Mathias Nyman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kevin Hilman , =?UTF-8?Q?Gr=C3=A9gory_Clement?= , Thomas Petazzoni References: <20240726-s2r-cdns-v5-0-8664bfb032ac@bootlin.com> <20240726-s2r-cdns-v5-7-8664bfb032ac@bootlin.com> Content-Language: en-US From: Roger Quadros In-Reply-To: <20240726-s2r-cdns-v5-7-8664bfb032ac@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_065432_036946_7FE59E76 X-CRM114-Status: GOOD ( 17.12 ) 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 On 26/07/2024 21:17, Théo Lebrun wrote: > Add ti,j7200-usb compatible. Match data indicates the controller resets > on resume which tells that to the cdns3 core. This in turn silences a > xHCI warning visible in cases of unexpected resets. > > We also inherit the errata quirk CDNS3_DRD_SUSPEND_RESIDENCY_ENABLE from > the default `cdns_ti_auxdata` configuration. > > Signed-off-by: Théo Lebrun > --- > drivers/usb/cdns3/cdns3-ti.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c > index 159814dfc856..65b8b6f4c654 100644 > --- a/drivers/usb/cdns3/cdns3-ti.c > +++ b/drivers/usb/cdns3/cdns3-ti.c > @@ -258,7 +258,21 @@ static const struct of_dev_auxdata cdns_ti_auxdata[] = { > {}, > }; > > +static struct cdns3_platform_data cdns_ti_j7200_pdata = { > + .quirks = CDNS3_RESET_ON_RESUME | But you mentioned that the behavior can be different based on which idle state the system went into. Setting this flag will means Reset is required on every resume. Instead, you just need to rely on the runtime check and set the xhci->lost_power flag at resume. > + CDNS3_DRD_SUSPEND_RESIDENCY_ENABLE, /* Errata i2409 */ > +}; > + > +static const struct of_dev_auxdata cdns_ti_j7200_auxdata[] = { > + { > + .compatible = "cdns,usb3", > + .platform_data = &cdns_ti_j7200_pdata, > + }, > + {}, > +}; > + > static const struct of_device_id cdns_ti_of_match[] = { > + { .compatible = "ti,j7200-usb", .data = cdns_ti_j7200_auxdata }, > { .compatible = "ti,j721e-usb", .data = cdns_ti_auxdata }, > { .compatible = "ti,am64-usb", .data = cdns_ti_auxdata }, > {}, > -- cheers, -roger