Merge tag 'mfd-for-linus-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
[pandora-kernel.git] / Documentation / devicetree / bindings / arm / coresight.txt
1 * CoreSight Components:
2
3 CoreSight components are compliant with the ARM CoreSight architecture
4 specification and can be connected in various topologies to suit a particular
5 SoCs tracing needs. These trace components can generally be classified as
6 sinks, links and sources. Trace data produced by one or more sources flows
7 through the intermediate links connecting the source to the currently selected
8 sink. Each CoreSight component device should use these properties to describe
9 its hardware characteristcs.
10
11 * Required properties for all components *except* non-configurable replicators:
12
13         * compatible: These have to be supplemented with "arm,primecell" as
14           drivers are using the AMBA bus interface.  Possible values include:
15                 - "arm,coresight-etb10", "arm,primecell";
16                 - "arm,coresight-tpiu", "arm,primecell";
17                 - "arm,coresight-tmc", "arm,primecell";
18                 - "arm,coresight-funnel", "arm,primecell";
19                 - "arm,coresight-etm3x", "arm,primecell";
20
21         * reg: physical base address and length of the register
22           set(s) of the component.
23
24         * clocks: the clock associated to this component.
25
26         * clock-names: the name of the clock as referenced by the code.
27           Since we are using the AMBA framework, the name should be
28           "apb_pclk".
29
30         * port or ports: The representation of the component's port
31           layout using the generic DT graph presentation found in
32           "bindings/graph.txt".
33
34 * Required properties for devices that don't show up on the AMBA bus, such as
35   non-configurable replicators:
36
37         * compatible: Currently supported value is (note the absence of the
38           AMBA markee):
39                 - "arm,coresight-replicator"
40
41         * port or ports: same as above.
42
43 * Optional properties for ETM/PTMs:
44
45         * arm,cp14: must be present if the system accesses ETM/PTM management
46           registers via co-processor 14.
47
48         * cpu: the cpu phandle this ETM/PTM is affined to. When omitted the
49           source is considered to belong to CPU0.
50
51 * Optional property for TMC:
52
53         * arm,buffer-size: size of contiguous buffer space for TMC ETR
54          (embedded trace router)
55
56
57 Example:
58
59 1. Sinks
60         etb@20010000 {
61                 compatible = "arm,coresight-etb10", "arm,primecell";
62                 reg = <0 0x20010000 0 0x1000>;
63
64                 coresight-default-sink;
65                 clocks = <&oscclk6a>;
66                 clock-names = "apb_pclk";
67                 port {
68                         etb_in_port: endpoint@0 {
69                                 slave-mode;
70                                 remote-endpoint = <&replicator_out_port0>;
71                         };
72                 };
73         };
74
75         tpiu@20030000 {
76                 compatible = "arm,coresight-tpiu", "arm,primecell";
77                 reg = <0 0x20030000 0 0x1000>;
78
79                 clocks = <&oscclk6a>;
80                 clock-names = "apb_pclk";
81                 port {
82                         tpiu_in_port: endpoint@0 {
83                                 slave-mode;
84                                 remote-endpoint = <&replicator_out_port1>;
85                         };
86                 };
87         };
88
89 2. Links
90         replicator {
91                 /* non-configurable replicators don't show up on the
92                  * AMBA bus.  As such no need to add "arm,primecell".
93                  */
94                 compatible = "arm,coresight-replicator";
95
96                 ports {
97                         #address-cells = <1>;
98                         #size-cells = <0>;
99
100                         /* replicator output ports */
101                         port@0 {
102                                 reg = <0>;
103                                 replicator_out_port0: endpoint {
104                                         remote-endpoint = <&etb_in_port>;
105                                 };
106                         };
107
108                         port@1 {
109                                 reg = <1>;
110                                 replicator_out_port1: endpoint {
111                                         remote-endpoint = <&tpiu_in_port>;
112                                 };
113                         };
114
115                         /* replicator input port */
116                         port@2 {
117                                 reg = <0>;
118                                 replicator_in_port0: endpoint {
119                                         slave-mode;
120                                         remote-endpoint = <&funnel_out_port0>;
121                                 };
122                         };
123                 };
124         };
125
126         funnel@20040000 {
127                 compatible = "arm,coresight-funnel", "arm,primecell";
128                 reg = <0 0x20040000 0 0x1000>;
129
130                 clocks = <&oscclk6a>;
131                 clock-names = "apb_pclk";
132                 ports {
133                         #address-cells = <1>;
134                         #size-cells = <0>;
135
136                         /* funnel output port */
137                         port@0 {
138                                 reg = <0>;
139                                 funnel_out_port0: endpoint {
140                                         remote-endpoint =
141                                                         <&replicator_in_port0>;
142                                 };
143                         };
144
145                         /* funnel input ports */
146                         port@1 {
147                                 reg = <0>;
148                                 funnel_in_port0: endpoint {
149                                         slave-mode;
150                                         remote-endpoint = <&ptm0_out_port>;
151                                 };
152                         };
153
154                         port@2 {
155                                 reg = <1>;
156                                 funnel_in_port1: endpoint {
157                                         slave-mode;
158                                         remote-endpoint = <&ptm1_out_port>;
159                                 };
160                         };
161
162                         port@3 {
163                                 reg = <2>;
164                                 funnel_in_port2: endpoint {
165                                         slave-mode;
166                                         remote-endpoint = <&etm0_out_port>;
167                                 };
168                         };
169
170                 };
171         };
172
173 3. Sources
174         ptm@2201c000 {
175                 compatible = "arm,coresight-etm3x", "arm,primecell";
176                 reg = <0 0x2201c000 0 0x1000>;
177
178                 cpu = <&cpu0>;
179                 clocks = <&oscclk6a>;
180                 clock-names = "apb_pclk";
181                 port {
182                         ptm0_out_port: endpoint {
183                                 remote-endpoint = <&funnel_in_port0>;
184                         };
185                 };
186         };
187
188         ptm@2201d000 {
189                 compatible = "arm,coresight-etm3x", "arm,primecell";
190                 reg = <0 0x2201d000 0 0x1000>;
191
192                 cpu = <&cpu1>;
193                 clocks = <&oscclk6a>;
194                 clock-names = "apb_pclk";
195                 port {
196                         ptm1_out_port: endpoint {
197                                 remote-endpoint = <&funnel_in_port1>;
198                         };
199                 };
200         };