* [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency
@ 2023-11-23 11:02 Michael Walle
2023-11-23 11:22 ` AngeloGioacchino Del Regno
2023-11-27 13:22 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Michael Walle @ 2023-11-23 11:02 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun, Vinod Koul,
Kishon Vijay Abraham I, Matthias Brugger,
AngeloGioacchino Del Regno, CK Hu, Jitao Shi
Cc: dri-devel, linux-mediatek, linux-arm-kernel, linux-phy,
linux-kernel, Michael Walle
The lowest supported clock frequency of the PHY is 125MHz (see also
mtk_mipi_tx_pll_enable()), but the clamping in .round_rate() has the
wrong minimal value, which will make the .enable() op return -EINVAL on
low frequencies. Fix the minimal clamping value.
Fixes: efda51a58b4a ("drm/mediatek: add mipi_tx driver for mt8183")
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c
index f021ec5a70e5..553725e1269c 100644
--- a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c
+++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c
@@ -100,7 +100,7 @@ static void mtk_mipi_tx_pll_disable(struct clk_hw *hw)
static long mtk_mipi_tx_pll_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
{
- return clamp_val(rate, 50000000, 1600000000);
+ return clamp_val(rate, 125000000, 1600000000);
}
static const struct clk_ops mtk_mipi_tx_pll_ops = {
--
2.39.2
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency
2023-11-23 11:02 [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency Michael Walle
@ 2023-11-23 11:22 ` AngeloGioacchino Del Regno
2023-11-27 13:22 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-11-23 11:22 UTC (permalink / raw)
To: Michael Walle, Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun,
Vinod Koul, Kishon Vijay Abraham I, Matthias Brugger, CK Hu,
Jitao Shi
Cc: dri-devel, linux-mediatek, linux-arm-kernel, linux-phy,
linux-kernel
Il 23/11/23 12:02, Michael Walle ha scritto:
> The lowest supported clock frequency of the PHY is 125MHz (see also
> mtk_mipi_tx_pll_enable()), but the clamping in .round_rate() has the
> wrong minimal value, which will make the .enable() op return -EINVAL on
> low frequencies. Fix the minimal clamping value.
>
> Fixes: efda51a58b4a ("drm/mediatek: add mipi_tx driver for mt8183")
> Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency
2023-11-23 11:02 [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency Michael Walle
2023-11-23 11:22 ` AngeloGioacchino Del Regno
@ 2023-11-27 13:22 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2023-11-27 13:22 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun,
Kishon Vijay Abraham I, Matthias Brugger,
AngeloGioacchino Del Regno, CK Hu, Jitao Shi, Michael Walle
Cc: dri-devel, linux-mediatek, linux-arm-kernel, linux-phy,
linux-kernel
On Thu, 23 Nov 2023 12:02:02 +0100, Michael Walle wrote:
> The lowest supported clock frequency of the PHY is 125MHz (see also
> mtk_mipi_tx_pll_enable()), but the clamping in .round_rate() has the
> wrong minimal value, which will make the .enable() op return -EINVAL on
> low frequencies. Fix the minimal clamping value.
>
>
Applied, thanks!
[1/1] phy: mediatek: mipi: mt8183: fix minimal supported frequency
commit: 06f76e464ac81c6915430b7155769ea4ef16efe4
Best regards,
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-27 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23 11:02 [PATCH] phy: mediatek: mipi: mt8183: fix minimal supported frequency Michael Walle
2023-11-23 11:22 ` AngeloGioacchino Del Regno
2023-11-27 13:22 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox