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 E8E07226CF1; Mon, 2 Jun 2025 14:05:01 +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=1748873102; cv=none; b=Uyln1ucYYpB91+glwOzoPpq2CjFRaAgbuEsPfMC5fbRnC6+i2lAcAuIdATIh5wJLKk5C1nWtMPAg1VoMNhpR2M8IkKqnyjeHhdS1r2Tjb1aqLpi8Yve+Ag30QOCaarkDgHyD4uhBaecEuC8EbgjvoW/kvxgB8bXkcVYkhNZGLgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748873102; c=relaxed/simple; bh=P4woGr/BI6gR0vrGk0iXsiyreRu1lmiMSkE87zelXwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JO3gXJt57khADewU6dxMeyivXThC29NflAS2xjfvdnvip8/k9gazcOWJHYwzV9mnNzpMw0AyVbn2ae4K3mqaFwsU3wuSoGFRIdO0c+97pKGjA0t9VOp80Qq8NhSe+mBsx004rRRHvPrzIOyd/COMDanetDvceOFdmmSa+1o29WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Rzy1Ygvi; 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="Rzy1Ygvi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 615CDC4CEEB; Mon, 2 Jun 2025 14:05:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748873101; bh=P4woGr/BI6gR0vrGk0iXsiyreRu1lmiMSkE87zelXwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rzy1YgviUJdd1XKXkILU8z3KdJ1XU+Fn2UaUZqWY5YRM/ACTs5y+Qfovo+xVmZKrn OX2BDxtRRRZx5BcF/Qqs6evyIztyLfWWpwbJP6W6bkOiNv7Mz4FBEmkK7tDOwhroIL S2sIajTCXuWrPqEYw64v9m84uuJOpoGwPsuVhhx0= 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.6 011/444] phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off Date: Mon, 2 Jun 2025 15:41:15 +0200 Message-ID: <20250602134341.371179283@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134340.906731340@linuxfoundation.org> References: <20250602134340.906731340@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 793f076171170..9a6391361a0be 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -537,9 +537,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