]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI
authorFrank Oltmanns <frank@oltmanns.dev>
Sun, 10 Mar 2024 13:21:12 +0000 (14:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:33 +0000 (12:02 +0200)
commit785c2392c51e1bedbe0647addcfd87f4c77a7e2e
treedef3f36e509805c8b662e13e78c2f05be4a208c3
parent547263745e15a038ec3954b5c283805529377626
clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI

commit 69f16d9b789821183d342719d2ebd4a5ac7178bc upstream.

When the Allwinner A64's TCON0 searches the ideal rate for the connected
panel, it may happen that it requests a rate from its parent PLL-MIPI
which PLL-MIPI does not support.

This happens for example on the Olimex TERES-I laptop where TCON0
requests PLL-MIPI to change to a rate of several GHz which causes the
panel to stay blank. It also happens on the pinephone where a rate of
less than 500 MHz is requested which causes instabilities on some
phones.

Set the minimum and maximum rate of Allwinner A64's PLL-MIPI according
to the Allwinner User Manual.

Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux")
Reported-by: Diego Roversi <diegor@tiscali.it>
Closes: https://groups.google.com/g/linux-sunxi/c/Rh-Uqqa66bw
Tested-by: Diego Roversi <diegor@tiscali.it>
Cc: stable@vger.kernel.org
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240310-pinephone-pll-fixes-v4-2-46fc80c83637@oltmanns.dev
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/sunxi-ng/ccu-sun50i-a64.c