Skip to content

Commit 52b1429

Browse files
Frank Oltmannsjernejsk
authored andcommitted
clk: sunxi-ng: a64: Add constraints on PLL-MIPI's n/m ratio and parent rate
The Allwinner A64 manual lists the following constraints for the PLL-MIPI clock: - M/N <= 3 - (PLL_VIDEO0)/M >= 24MHz Use these constraints. Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Frank Oltmanns <frank@oltmanns.dev> Link: https://lore.kernel.org/r/20240310-pinephone-pll-fixes-v4-4-46fc80c83637@oltmanns.dev Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 parent 5723879 commit 52b1429

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

drivers/clk/sunxi-ng/ccu-sun50i-a64.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ static struct ccu_nkm pll_mipi_clk = {
171171
* user manual, and by experiments the PLL doesn't work without
172172
* these bits toggled.
173173
*/
174-
.enable = BIT(31) | BIT(23) | BIT(22),
175-
.lock = BIT(28),
176-
.n = _SUNXI_CCU_MULT(8, 4),
177-
.k = _SUNXI_CCU_MULT_MIN(4, 2, 2),
178-
.m = _SUNXI_CCU_DIV(0, 4),
174+
.enable = BIT(31) | BIT(23) | BIT(22),
175+
.lock = BIT(28),
176+
.n = _SUNXI_CCU_MULT(8, 4),
177+
.k = _SUNXI_CCU_MULT_MIN(4, 2, 2),
178+
.m = _SUNXI_CCU_DIV(0, 4),
179+
.max_m_n_ratio = 3,
180+
.min_parent_m_ratio = 24000000,
179181
.common = {
180182
.reg = 0x040,
181183
.hw.init = CLK_HW_INIT("pll-mipi", "pll-video0",

0 commit comments

Comments
 (0)