From: Philipp Zabel <p.zabel@pengutronix.de>
To: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>,
tomm.merciai@gmail.com
Cc: linux-renesas-soc@vger.kernel.org, biju.das.jz@bp.renesas.com,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Peter Rosin <peda@axentia.se>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 03/21] reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime
Date: Wed, 05 Nov 2025 16:59:24 +0100 [thread overview]
Message-ID: <180fcd1307af02eadc6136512ef78226bc7c00dd.camel@pengutronix.de> (raw)
In-Reply-To: <4b760e6e39679edd7f3d3a9a5b4babc7805ffe29.1762354366.git.tommaso.merciai.xr@bp.renesas.com>
On Mi, 2025-11-05 at 16:38 +0100, Tommaso Merciai wrote:
> The driver was disabling the USB2 PHY clock immediately after register
> initialization in probe() and after each reset operation. This left the
> PHY unclocked even though it must remain active for USB functionality.
>
> The behavior appeared to work only when another driver
> (e.g., USB controller) had already enabled the clock, making operation
> unreliable and hardware-dependent. In configurations where this driver
> is the sole clock user, USB functionality would fail.
>
> Fix this by:
> - Enabling the clock once in probe() via pm_runtime_resume_and_get()
> - Removing all pm_runtime_put() calls from assert/deassert/status
> - Registering a devm cleanup action to release the clock at removal
> - Dropping the unnecessary rzv2h_usbphy_assert_helper() function
>
> This ensures the PHY clock remains enabled for the entire device lifetime,
> preventing instability and aligning with hardware requirements.
>
> Fixes: e3911d7f865b ("reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P)")
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> v1->v2:
> - Improve commit body and commit msg
> - Added Fixes tag
> - Dropped unnecessary rzv2h_usbphy_assert_helper() function
>
> drivers/reset/reset-rzv2h-usb2phy.c | 64 ++++++++---------------------
> 1 file changed, 18 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/reset/reset-rzv2h-usb2phy.c b/drivers/reset/reset-rzv2h-usb2phy.c
> index ae643575b067..5bdd39274612 100644
> --- a/drivers/reset/reset-rzv2h-usb2phy.c
> +++ b/drivers/reset/reset-rzv2h-usb2phy.c
[...]
> @@ -175,14 +143,14 @@ static int rzv2h_usb2phy_reset_probe(struct platform_device *pdev)
> if (error)
> return dev_err_probe(dev, error, "pm_runtime_resume_and_get failed\n");
>
> + error = devm_add_action_or_reset(dev, rzv2h_usb2phy_reset_pm_runtime_put,
> + dev);
> + if (error)
> + return dev_err_probe(dev, error, "unable to register cleanup action\n");
> +
> for (unsigned int i = 0; i < data->init_val_count; i++)
> writel(data->init_vals[i].val, priv->base + data->init_vals[i].reg);
>
> - /* keep usb2phy in asserted state */
> - rzv2h_usbphy_assert_helper(priv);
This change is not mentioned in the patch description.
Is initially asserting the reset not required after all?
regards
Philipp
next prev parent reply other threads:[~2025-11-05 15:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 15:38 [PATCH v2 00/21] Add USB2.0 support for RZ/G3E Tommaso Merciai
2025-11-05 15:38 ` [PATCH v2 01/21] phy: renesas: rcar-gen3-usb2: Use devm_pm_runtime_enable() Tommaso Merciai
2025-11-05 15:38 ` [PATCH v2 02/21] phy: renesas: rcar-gen3-usb2: Factor out VBUS control logic Tommaso Merciai
2025-11-05 15:38 ` [PATCH v2 03/21] reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime Tommaso Merciai
2025-11-05 15:59 ` Philipp Zabel [this message]
2025-11-06 8:30 ` Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 04/21] dt-bindings: reset: renesas,rzv2h-usb2phy: Add '#mux-state-cells' property Tommaso Merciai
2025-11-05 17:16 ` Rob Herring (Arm)
2025-11-07 17:18 ` Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 05/21] mux: Add driver for Renesas RZ/V2H USB VBUS_SEL mux Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 06/21] reset: rzv2h-usb2phy: Add support for VBUS mux controller registration Tommaso Merciai
2025-11-05 16:04 ` Philipp Zabel
2025-11-05 17:24 ` Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 07/21] dt-bindings: phy: renesas,usb2-phy: Document USB VBUS regulator Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 08/21] dt-bindings: phy: renesas,usb2-phy: Document mux-states property Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 09/21] phy: renesas: rcar-gen3-usb2: Add regulator for OTG VBUS control Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 10/21] phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 11/21] dt-bindings: usb: renesas,usbhs: Add RZ/G3E SoC support Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 12/21] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3E SoC Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 13/21] dt-bindings: reset: Document RZ/G3E USB2PHY reset Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 14/21] arm64: dts: renesas: r9a09g057: Add USB2.0 VBUS_SEL mux-controller support Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 15/21] arm64: dts: renesas: r9a09g056: " Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 16/21] arm64: dts: renesas: r9a09g056: Add USB2.0 PHY VBUS internal regulator node Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 17/21] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable USB2 PHY0 VBUS support Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 18/21] arm64: dts: renesas: r9a09g057: Add USB2.0 PHY VBUS internal regulator node Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 19/21] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable USB2 PHY0 VBUS support Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 20/21] arm64: dts: renesas: r9a09g047: Add USB2.0 support Tommaso Merciai
2025-11-05 15:39 ` [PATCH v2 21/21] arm64: dts: renesas: r9a09g047e57-smarc: Enable " Tommaso Merciai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=180fcd1307af02eadc6136512ef78226bc7c00dd.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=arnd@arndb.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=peda@axentia.se \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=tomm.merciai@gmail.com \
--cc=tommaso.merciai.xr@bp.renesas.com \
--cc=vkoul@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).