]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: rockchip: rk3588: fix up the frac pll calculation
authorElaine Zhang <zhangqing@rock-chips.com>
Thu, 12 Oct 2023 10:18:28 +0000 (18:18 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 23 Oct 2023 10:21:55 +0000 (18:21 +0800)
commit6bfb37e70209d2797c0a37ca257a64ee3f127319
treed8bdec01f2ec039cd8ae955576fdcc2d54919707
parente4916e2c66801c2dad95dc553841f126ee2a81f9
clk: rockchip: rk3588: fix up the frac pll calculation

rk3588 frac pll:
FFVCO = ((m + k / 65536) * FFIN) / p
FFOUT = ((m + k / 65536) * FFIN) / (p * 2s)
k is the original code, but the K[15:0] is complement code
(6'b1000_0000_0000_0000 <= K[15:0] <= 16'b0111_1111_1111_1111),
need to be converted.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/clk/rockchip/clk_pll.c