[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6915fde3171d0e063b931abbe04e3216375af8fd.camel@pengutronix.de>
Date: Fri, 24 Oct 2025 11:06:46 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>, Alim Akhtar
<alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>, Bart Van
Assche <bvanassche@....org>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, Chunfeng Yun
<chunfeng.yun@...iatek.com>, Vinod Koul <vkoul@...nel.org>, Kishon Vijay
Abraham I <kishon@...nel.org>, Peter Wang <peter.wang@...iatek.com>,
Stanley Jhu <chu.stanley@...il.com>, "James E.J. Bottomley"
<James.Bottomley@...senPartnership.com>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Liam Girdwood <lgirdwood@...il.com>, Mark
Brown <broonie@...nel.org>
Cc: Louis-Alexis Eyraud <louisalexis.eyraud@...labora.com>,
kernel@...labora.com, linux-scsi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-phy@...ts.infradead.org
Subject: Re: [PATCH v3 05/24] phy: mediatek: ufs: Add support for resets
Hi Nicolas,
On Do, 2025-10-23 at 21:49 +0200, Nicolas Frattaroli wrote:
> The MediaTek UFS PHY supports PHY resets. Until now, they've been
> implemented in the UFS host driver. Since they were never documented in
> the UFS HCI node's DT bindings, and no mainline DT uses it, it's fine if
> it's moved to the correct location, which is the PHY driver.
>
> Implement the MPHY reset logic in this driver and expose it through the
> phy subsystem's reset op. The reset itself is optional, as judging by
> other mainline devices that use this hardware, it's not required for the
> device to function.
>
> If no reset is present, the reset op returns -EOPNOTSUPP, which means
> that the ufshci driver can detect it's present and not double sleep in
> its own reset function, where it will call the phy reset.
>
> Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Reviewed-by: Peter Wang <peter.wang@...iatek.com>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
> ---
> drivers/phy/mediatek/phy-mtk-ufs.c | 71 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 71 insertions(+)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b/drivers/phy/mediatek/phy-mtk-ufs.c
> index 0cb5a25b1b7a..d77ba689ebc8 100644
> --- a/drivers/phy/mediatek/phy-mtk-ufs.c
> +++ b/drivers/phy/mediatek/phy-mtk-ufs.c
[...]
> @@ -163,8 +224,18 @@ static int ufs_mtk_phy_probe(struct platform_device *pdev)
> if (IS_ERR(phy->mmio))
> return PTR_ERR(phy->mmio);
>
> + phy->reset = devm_reset_control_get_optional(dev, NULL);
Please use devm_reset_control_get_optional_exclusive() directly.
regards
Philipp
Powered by blists - more mailing lists