clk: sunxi-ng: h6: Use sigma-delta modulation for audio PLL
authorJernej Skrabec <jernej.skrabec@siol.net>
Sat, 14 Sep 2019 13:51:00 +0000 (15:51 +0200)
committerMaxime Ripard <mripard@kernel.org>
Mon, 30 Sep 2019 20:12:27 +0000 (22:12 +0200)
commit3ee5f8ab5e718afdde9984a089137360bdfc66eb
tree3331528f7de6d5bbe7fa3fd6e33fb4900cc0e35d
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
clk: sunxi-ng: h6: Use sigma-delta modulation for audio PLL

Audio devices needs exact clock rates in order to correctly reproduce
the sound. Until now, only integer factors were used to configure H6
audio PLL which resulted in inexact rates. Fix that by adding support
for fractional factors using sigma-delta modulation look-up table. It
contains values for two most commonly used audio base frequencies.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/clk/sunxi-ng/ccu-sun50i-h6.c