Skip to content

Commit

Permalink
phy: mediatek: mipi: mt8183: fix minimal supported frequency
Browse files Browse the repository at this point in the history
[ Upstream commit 06f76e4 ]

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: efda51a ("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>
Link: https://lore.kernel.org/r/20231123110202.2025585-1-mwalle@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mwalle authored and gregkh committed Jan 10, 2024
1 parent 9cdfbfc commit c7573ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit c7573ba

Please sign in to comment.