clk: keystone: syscon-clk: Add support for audio refclk
authorJai Luthra <j-luthra@ti.com>
Thu, 15 Jun 2023 11:55:36 +0000 (17:25 +0530)
committerStephen Boyd <sboyd@kernel.org>
Fri, 16 Jun 2023 19:15:31 +0000 (12:15 -0700)
commit6acab96ee33703497f30b66efa553a7d0ebd5c0f
tree1de760b6ce411adcd2f102ab0007357a7e9fcef0
parentdaecb57cc4e735439d3366778705b21e7bf6f397
clk: keystone: syscon-clk: Add support for audio refclk

TI's AM62 SoC can optionally provide two audio reference clocks
(AUDIO_REFCLKx) to external peripherals.

By default this reference clock is looped-back inside the SoC to a mux
that goes to McASP AHCLK, but can optionally be enabled as an output to
peripherals outside the SoC by setting a bit through CTRL_MMR registers.

This bit only controls the direction of the clock, while the parent
is a muxed input from sci-clk [1] which may be a configurable PLL or a
master clock from one of the McASP instances.

Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62x/clocks.html#clocks-for-board0-device
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20230515-refclk-v3-2-37c0b550f406@ti.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/keystone/syscon-clk.c