Skip to contentSkip to conversation

phy: mediatek: mipi: mt8183: fix minimal supported frequency

PATCH Applied Michael Walle 3 participants 3 messages Nov 23, 2023 – Nov 27, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: mediatek: mipi: mt8183: fix minimal supported frequency

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")
---
 drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c +1 -1
index f021ec5a70e5..553725e1269c 100644
@@ -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 = {
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 23/11/23 12:02, Michael Walle ha scritto:

Quoted 7 lines

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")
maintainer Applied
#2 lore raw
In reply to Michael Walle
Quoted 6 lines · 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.

Applied, thanks!

[1/1] phy: mediatek: mipi: mt8183: fix minimal supported frequency

      commit: 06f76e464ac81c6915430b7155769ea4ef16efe4

Best regards,

Signature · 1 line
~Vinod