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 53BF4D18138 for ; Mon, 14 Oct 2024 17:45:36 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:CC:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+kmYsnRSxgBQfl5oIRzC21ET9kJt498XpPwSEuIKuIw=; b=ySASsqygVBpHHd/dRVBwPjTyOZ og3aIN20aufc/A34OJMvsqRZmQdsO80xaUX9QXUm3en966P/HO1iuZG7lm+2FBb5uEf5gkKHBQASZ qHEpQBjdTiw8TsJcC6TevhqYFXqO09JSMoRlkirNzEkKP6OL32IK+FbWbtikzOVHTwYjmf11Uqza0 u1oeL2DT9APef59Caatn6ol1oI01gCUYBQUIreKQX7gZ4Yf15cSxjymIc5CHx9juzhG29+IjUoduS UTMm+QOy2TTq4sJI0IdWqSTc+u+YLSk8IYdo0mdnlQK6BEJ2nU2ERNDm3n8tL8fPbFF0OMqk5gTIM 82rhRexA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0P8I-000000065PF-06ys; Mon, 14 Oct 2024 17:45:26 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0O18-00000005sWQ-2106 for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 16:34:00 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 49EGXpl9094829; Mon, 14 Oct 2024 11:33:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1728923631; bh=+kmYsnRSxgBQfl5oIRzC21ET9kJt498XpPwSEuIKuIw=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=oFKtHA7za/V4aS1nUfpFsFQLigi4doV0pDtsg4LvJIMMn/kLeXb17gJiAf1dYIXbG ZMrXJQTjBIg99510kwPqwrbTYcOkKGF/xCE90+6NH0LwczZG5sXsxj/tZ5M6y0pQ3t fWcMX/5UfeKS56OvqX77yHu0iUO/yNcBAwgEuDAw= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTP id 49EGXpBM082054; Mon, 14 Oct 2024 11:33:51 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 14 Oct 2024 11:33:51 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 14 Oct 2024 11:33:51 -0500 Received: from localhost (lcpd911.dhcp.ti.com [172.24.227.226]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 49EGXoXS127959; Mon, 14 Oct 2024 11:33:50 -0500 Date: Mon, 14 Oct 2024 22:03:49 +0530 From: Dhruva Gole To: Roger Quadros CC: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Thinh Nguyen , Vishal Mahaveer , , , , , , , Subject: Re: [PATCH v3] usb: dwc3: core: Fix system suspend on TI AM62 platforms Message-ID: <20241014163349.oiqocvg6pjmqulus@lcpd911> References: <20241011-am62-lpm-usb-v3-1-562d445625b5@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241011-am62-lpm-usb-v3-1-562d445625b5@kernel.org> X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_093358_745692_85966D22 X-CRM114-Status: GOOD ( 14.64 ) 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 Oct 11, 2024 at 13:53:24 +0300, Roger Quadros wrote: > Since commit 6d735722063a ("usb: dwc3: core: Prevent phy suspend during init"), > system suspend is broken on AM62 TI platforms. > > Before that commit, both DWC3_GUSB3PIPECTL_SUSPHY and DWC3_GUSB2PHYCFG_SUSPHY > bits (hence forth called 2 SUSPHY bits) were being set during core > initialization and even during core re-initialization after a system > suspend/resume. > > These bits are required to be set for system suspend/resume to work correctly > on AM62 platforms. > > Since that commit, the 2 SUSPHY bits are not set for DEVICE/OTG mode if gadget > driver is not loaded and started. > For Host mode, the 2 SUSPHY bits are set before the first system suspend but > get cleared at system resume during core re-init and are never set again. > > This patch resovles these two issues by ensuring the 2 SUSPHY bits are set > before system suspend and restored to the original state during system resume. Thanks for the fix Roger, Reviewed-by: Dhruva Gole > > Cc: stable@vger.kernel.org # v6.9+ > Fixes: 6d735722063a ("usb: dwc3: core: Prevent phy suspend during init") > Link: https://lore.kernel.org/all/1519dbe7-73b6-4afc-bfe3-23f4f75d772f@kernel.org/ > Signed-off-by: Roger Quadros > Acked-by: Thinh Nguyen > --- > Changes in v3: [...] -- Best regards, Dhruva Gole Texas Instruments Incorporated