clk: sunxi-ng: sun50i: a64: Use sigma-delta modulation for audio PLL
authorChen-Yu Tsai <wens@csie.org>
Thu, 22 Nov 2018 10:23:22 +0000 (18:23 +0800)
committerChen-Yu Tsai <wens@csie.org>
Fri, 23 Nov 2018 15:22:01 +0000 (23:22 +0800)
commit5e06aa50524b45a834b1f22b3160b93fb3adabc4
treefc43ed79a7cb7f49e2f20ac86756de87f90a6d39
parentee678706e46d0d185c27cc214ad97828e0643159
clk: sunxi-ng: sun50i: a64: Use sigma-delta modulation for audio PLL

The audio blocks require specific clock rates. Until now we were using
the closest clock rate possible with integer N-M factors. This resulted
in audio playback being slightly slower than it should be.

The vendor kernel gets around this (for some SoCs) by using sigma-delta
modulation to generate a fractional-N factor. As the PLL hardware is
identical in most chips, we can port the settings for H3 onto the A64.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/clk/sunxi-ng/ccu-sun50i-a64.c