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