clk: clk_versaclock: Add support for versaclock driver
The driver is based on the Versaclock driver from the Linux code, but
due differences in the clock API between them, some pieces had to be
changed.
This driver creates a mux, pfd, pll, and a series of fod ouputs.
Rate Usecnt Name
------------------------------------------
25000000 0 `-- x304-clock
25000000 0 `-- clock-controller@6a.mux
25000000 0 |-- clock-controller@6a.pfd
2800000000 0 | `-- clock-controller@6a.pll
33333333 0 | |-- clock-controller@6a.fod0
33333333 0 | | `-- clock-controller@6a.out1
33333333 0 | |-- clock-controller@6a.fod1
33333333 0 | | `-- clock-controller@6a.out2
50000000 0 | |-- clock-controller@6a.fod2
50000000 0 | | `-- clock-controller@6a.out3
125000000 0 | `-- clock-controller@6a.fod3
125000000 0 | `-- clock-controller@6a.out4
25000000 0 `-- clock-controller@6a.out0_sel_i2cb
A translation function is added so the references to <&versaclock X> get routed
to the corresponding clock-controller@6a.outX.
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index e07c6dd..baac8d2 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -220,4 +220,13 @@
Enable this option if you want to test the Linux kernel's Common
Clock Framework [CCF] code in U-Boot's Sandbox clock driver.
+config CLK_VERSACLOCK
+ tristate "Enable VersaClock 5/6 devices"
+ depends on CLK
+ depends on CLK_CCF
+ depends on OF_CONTROL
+ help
+ This driver supports the IDT VersaClock 5 and VersaClock 6
+ programmable clock generators.
+
endmenu