aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-05-07 06:20:46 -0400
committerTero Kristo <t-kristo@ti.com>2014-05-28 06:06:52 -0400
commit2d5e447914722f3c79103ad54baa1170661ac553 (patch)
tree424338cc2f483c9a3776aa4daedc40585b6a68c1
parent0cccd9190009aa6c037aa88a85f2a1b72a6a7963 (diff)
dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
Audio Tracking Logic is designed to be used by HD Radio applications to synchronize the audio output clocks to the baseband clock. ATL can be also used to track errors between two reference clocks (BWS, AWS) and generate a modulated clock output which averages to some desired frequency. In essence ATL is generating a clock to be used by an audio codec and also to be used by the SoC as MCLK. To be able to integrate the ATL provided clocks to the clock tree we need two types of DT binding: - DT clock nodes to represent the ATL clocks towards the CCF - binding for the ATL IP itself which is going to handle the hw configuration The reason for this type of setup is that ATL itself is a separate device in the SoC, it has it's own address space and clock domain. Other IPs can use the ATL generated clock as their functional clock (McASPs for example) and external components like audio codecs can also use the very same clock as their MCLK. The ATL IP in DRA7 contains 4 ATL instences. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
-rw-r--r--Documentation/devicetree/bindings/clock/ti/dra7-atl.txt96
-rw-r--r--include/dt-bindings/clk/ti-dra7-atl.h40
2 files changed, 136 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt b/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt
new file mode 100644
index 000000000000..585e8c191f50
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt
@@ -0,0 +1,96 @@
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};
diff --git a/include/dt-bindings/clk/ti-dra7-atl.h b/include/dt-bindings/clk/ti-dra7-atl.h
new file mode 100644
index 000000000000..42dd4164f6f4
--- /dev/null
+++ b/include/dt-bindings/clk/ti-dra7-atl.h
@@ -0,0 +1,40 @@
1/*
2 * This header provides constants for DRA7 ATL (Audio Tracking Logic)
3 *
4 * The constants defined in this header are used in dts files
5 *
6 * Copyright (C) 2013 Texas Instruments, Inc.
7 *
8 * Peter Ujfalusi <peter.ujfalusi@ti.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
15 * kind, whether express or implied; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 */
19
20#ifndef _DT_BINDINGS_CLK_DRA7_ATL_H
21#define _DT_BINDINGS_CLK_DRA7_ATL_H
22
23#define DRA7_ATL_WS_MCASP1_FSR 0
24#define DRA7_ATL_WS_MCASP1_FSX 1
25#define DRA7_ATL_WS_MCASP2_FSR 2
26#define DRA7_ATL_WS_MCASP2_FSX 3
27#define DRA7_ATL_WS_MCASP3_FSX 4
28#define DRA7_ATL_WS_MCASP4_FSX 5
29#define DRA7_ATL_WS_MCASP5_FSX 6
30#define DRA7_ATL_WS_MCASP6_FSX 7
31#define DRA7_ATL_WS_MCASP7_FSX 8
32#define DRA7_ATL_WS_MCASP8_FSX 9
33#define DRA7_ATL_WS_MCASP8_AHCLKX 10
34#define DRA7_ATL_WS_XREF_CLK3 11
35#define DRA7_ATL_WS_XREF_CLK0 12
36#define DRA7_ATL_WS_XREF_CLK1 13
37#define DRA7_ATL_WS_XREF_CLK2 14
38#define DRA7_ATL_WS_OSC1_X1 15
39
40#endif