From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4023B1DF73C; Mon, 2 Jun 2025 15:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876635; cv=none; b=c0RXuWeU3U7DcvSjdlTip72iCHJrMKRl0xLIurzZzn32R65hPeFozVkIG3jynhe0M9i5AS/JJFQX9hRmbgapPerybaKRI5caSulJMjG8P1npGJeuVKk8qLGDsYcbi2lMksX+Pz3XAdwynLgDcutUJU+gRYqxCFJ7GOpYh71+Qq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876635; c=relaxed/simple; bh=cpK3IXFm6UA+yYH1mOnn4T4ZLH5XANfJ/VA0x+BFG78=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XawodKh8fyUiqfJiWjoa+MDsaNg1IRxJ25puIzpip2RTPNsKd86I2EX5d9o8cChOsbeQxYTE/RKBJv/7HXIrXntaR+WEG25OiGuU+CnQZQpyEeHb5stO3N0wNycls8RI7YBbX+mdN8Ftv0lwbRCxHON9KjigUGXWhoUIj5OLJUQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=c8nkcwzN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="c8nkcwzN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A09F5C4CEEB; Mon, 2 Jun 2025 15:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748876635; bh=cpK3IXFm6UA+yYH1mOnn4T4ZLH5XANfJ/VA0x+BFG78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c8nkcwzNQM8t1zPy69uZrmqdRGWqSE3GggrTLCgWuQigA+TivUWKlAaiKubvpDNG3 7r07Q0WCRvClHxr1xo2Q0nchYjZOjMXkVsA1a5yarQAQG/V4Pnbf08gWNxh7L9NpSZ KbsuNf5oNHEGtG2/UkW3IVH7Xmpg7YHABb4eEBnE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yoshihiro Shimoda , Lad Prabhakar , Claudiu Beznea , Vinod Koul , Sasha Levin Subject: [PATCH 6.1 008/325] phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off Date: Mon, 2 Jun 2025 15:44:44 +0200 Message-ID: <20250602134320.077519995@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134319.723650984@linuxfoundation.org> References: <20250602134319.723650984@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea [ Upstream commit 9ce71e85b29eb63e48e294479742e670513f03a0 ] Assert PLL reset on PHY power off. This saves power. Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver") Cc: stable@vger.kernel.org Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Reviewed-by: Lad Prabhakar Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250507125032.565017-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 8b1280cdbcef8..024cc5ce68a37 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -539,9 +539,17 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p) struct rcar_gen3_chan *channel = rphy->ch; int ret = 0; - scoped_guard(spinlock_irqsave, &channel->lock) + scoped_guard(spinlock_irqsave, &channel->lock) { rphy->powered = false; + if (rcar_gen3_are_all_rphys_power_off(channel)) { + u32 val = readl(channel->base + USB2_USBCTR); + + val |= USB2_USBCTR_PLL_RST; + writel(val, channel->base + USB2_USBCTR); + } + } + if (channel->vbus) ret = regulator_disable(channel->vbus); -- 2.39.5