1Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC.
2
3The ATL IP is used to generate clock to be used to synchronize baseband and
4audio codec. A single ATL IP provides four ATL clock instances sharing the same
5functional clock but can be configured to provide different clocks.
6ATL can maintain a clock averages to some desired frequency based on the bws/aws
7signals - can compensate the drift between the two ws signal.
8
9In order to provide the support for ATL and it's output clocks (which can be used
10internally within the SoC or external components) two sets of bindings is needed:
11
12Clock tree binding:
13This binding uses the common clock binding[1].
14To be able to integrate the ATL clocks with DT clock tree.
15Provides ccf level representation of the ATL clocks to be used by drivers.
16Since the clock instances are part of a single IP this binding is used as a node
17for the DT clock tree, the IP driver is needed to handle the actual configuration
18of the IP.
19
20[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
21
22Required properties:
23- compatible : shall be "ti,dra7-atl-clock"
24- #clock-cells : from common clock binding; shall be set to 0.
25- clocks : link phandles to functional clock of ATL
26
27Binding for the IP driver:
28This binding is used to configure the IP driver which is going to handle the
29configuration of the IP for the ATL clock instances.
30
31Required properties:
32- compatible : shall be "ti,dra7-atl"
33- reg : base address for the ATL IP
34- ti,provided-clocks : List of phandles to the clocks associated with the ATL
35- clocks : link phandles to functional clock of ATL
36- clock-names : Shall be set to "fck"
37- ti,hwmods : Shall be set to "atl"
38
39Optional properties:
40Configuration of ATL instances:
41- atl{0/1/2/3} {
42	- bws : Baseband word select signal selection
43	- aws : Audio word select signal selection
44};
45
46For valid word select signals, see the dt-bindings/clk/ti-dra7-atl.h include
47file.
48
49Examples:
50/* clock bindings for atl provided clocks */
51atl_clkin0_ck: atl_clkin0_ck {
52	#clock-cells = <0>;
53	compatible = "ti,dra7-atl-clock";
54	clocks = <&atl_gfclk_mux>;
55};
56
57atl_clkin1_ck: atl_clkin1_ck {
58	#clock-cells = <0>;
59	compatible = "ti,dra7-atl-clock";
60	clocks = <&atl_gfclk_mux>;
61};
62
63atl_clkin2_ck: atl_clkin2_ck {
64	#clock-cells = <0>;
65	compatible = "ti,dra7-atl-clock";
66	clocks = <&atl_gfclk_mux>;
67};
68
69atl_clkin3_ck: atl_clkin3_ck {
70	#clock-cells = <0>;
71	compatible = "ti,dra7-atl-clock";
72	clocks = <&atl_gfclk_mux>;
73};
74
75/* binding for the IP */
76atl: atl@4843c000 {
77	compatible = "ti,dra7-atl";
78	reg = <0x4843c000 0x3ff>;
79	ti,hwmods = "atl";
80	ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>,
81				<&atl_clkin2_ck>, <&atl_clkin3_ck>;
82	clocks = <&atl_gfclk_mux>;
83	clock-names = "fck";
84	status = "disabled";
85};
86
87#include <dt-bindings/clk/ti-dra7-atl.h>
88
89&atl {
90	status = "okay";
91
92	atl2 {
93		bws = <DRA7_ATL_WS_MCASP2_FSX>;
94		aws = <DRA7_ATL_WS_MCASP3_FSX>;
95	};
96};
97