clk: ingenic: Add X1000 audio clocks
authorAidan MacDonald <aidanmacdonald.0x0@gmail.com>
Wed, 26 Oct 2022 19:43:44 +0000 (20:43 +0100)
committerStephen Boyd <sboyd@kernel.org>
Thu, 27 Oct 2022 18:59:05 +0000 (11:59 -0700)
commit662e8ed7b9500a8f6b74ada79b7672cff7ebffbd
tree93291ec9d350e122b91b70f439e7b8aa11b12d2d
parent5e5b1005f9902a55f551a7bb336ca08d39fe1300
clk: ingenic: Add X1000 audio clocks

The X1000's CGU supplies the I2S system clock to the AIC module
and ultimately the audio codec, represented by the "i2s" clock.
It is a simple mux which can either pass through EXCLK or a PLL
multiplied by a fractional divider (the "i2s_pll" clock).

The AIC contains a separate 1/N divider controlled by the I2S
driver, which generates the bit clock from the system clock.
The frame clock is always fixed to 1/64th of the bit clock.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20221026194345.243007-6-aidanmacdonald.0x0@gmail.com
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ingenic/x1000-cgu.c