| 1 |
Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC. |
| 2 |
|
| 3 |
The ATL IP is used to generate clock to be used to synchronize baseband and |
| 4 |
audio codec. A single ATL IP provides four ATL clock instances sharing the same |
| 5 |
functional clock but can be configured to provide different clocks. |
| 6 |
ATL can maintain a clock averages to some desired frequency based on the bws/aws |
| 7 |
signals - can compensate the drift between the two ws signal. |
| 8 |
|
| 9 |
In order to provide the support for ATL and its output clocks (which can be used |
| 10 |
internally within the SoC or external components) two sets of bindings is needed: |
| 11 |
|
| 12 |
Clock tree binding: |
| 13 |
This binding uses the common clock binding[1]. |
| 14 |
To be able to integrate the ATL clocks with DT clock tree. |
| 15 |
Provides ccf level representation of the ATL clocks to be used by drivers. |
| 16 |
Since the clock instances are part of a single IP this binding is used as a node |
| 17 |
for the DT clock tree, the IP driver is needed to handle the actual configuration |
| 18 |
of the IP. |
| 19 |
|
| 20 |
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt |
| 21 |
|
| 22 |
Required 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 |
|
| 27 |
Binding for the IP driver: |
| 28 |
This binding is used to configure the IP driver which is going to handle the |
| 29 |
configuration of the IP for the ATL clock instances. |
| 30 |
|
| 31 |
Required 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 |
|
| 39 |
Optional properties: |
| 40 |
Configuration 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 |
|
| 46 |
For valid word select signals, see the dt-bindings/clock/ti-dra7-atl.h include |
| 47 |
file. |
| 48 |
|
| 49 |
Examples: |
| 50 |
/* clock bindings for atl provided clocks */ |
| 51 |
atl_clkin0_ck: atl_clkin0_ck { |
| 52 |
#clock-cells = <0>; |
| 53 |
compatible = "ti,dra7-atl-clock"; |
| 54 |
clocks = <&atl_gfclk_mux>; |
| 55 |
}; |
| 56 |
|
| 57 |
atl_clkin1_ck: atl_clkin1_ck { |
| 58 |
#clock-cells = <0>; |
| 59 |
compatible = "ti,dra7-atl-clock"; |
| 60 |
clocks = <&atl_gfclk_mux>; |
| 61 |
}; |
| 62 |
|
| 63 |
atl_clkin2_ck: atl_clkin2_ck { |
| 64 |
#clock-cells = <0>; |
| 65 |
compatible = "ti,dra7-atl-clock"; |
| 66 |
clocks = <&atl_gfclk_mux>; |
| 67 |
}; |
| 68 |
|
| 69 |
atl_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 */ |
| 76 |
atl: 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 |
}; |
| 85 |
|
| 86 |
#include <dt-bindings/clock/ti-dra7-atl.h> |
| 87 |
|
| 88 |
&atl { |
| 89 |
|
| 90 |
atl2 { |
| 91 |
bws = <DRA7_ATL_WS_MCASP2_FSX>; |
| 92 |
aws = <DRA7_ATL_WS_MCASP3_FSX>; |
| 93 |
}; |
| 94 |
}; |