coresight.txt 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. * CoreSight Components:
  2. CoreSight components are compliant with the ARM CoreSight architecture
  3. specification and can be connected in various topologies to suit a particular
  4. SoCs tracing needs. These trace components can generally be classified as
  5. sinks, links and sources. Trace data produced by one or more sources flows
  6. through the intermediate links connecting the source to the currently selected
  7. sink. Each CoreSight component device should use these properties to describe
  8. its hardware characteristcs.
  9. * Required properties for all components *except* non-configurable replicators:
  10. * compatible: These have to be supplemented with "arm,primecell" as
  11. drivers are using the AMBA bus interface. Possible values include:
  12. - Embedded Trace Buffer (version 1.0):
  13. "arm,coresight-etb10", "arm,primecell";
  14. - Trace Port Interface Unit:
  15. "arm,coresight-tpiu", "arm,primecell";
  16. - Trace Memory Controller, used for Embedded Trace Buffer(ETB),
  17. Embedded Trace FIFO(ETF) and Embedded Trace Router(ETR)
  18. configuration. The configuration mode (ETB, ETF, ETR) is
  19. discovered at boot time when the device is probed.
  20. "arm,coresight-tmc", "arm,primecell";
  21. - Trace Funnel:
  22. "arm,coresight-funnel", "arm,primecell";
  23. - Embedded Trace Macrocell (version 3.x) and
  24. Program Flow Trace Macrocell:
  25. "arm,coresight-etm3x", "arm,primecell";
  26. - Embedded Trace Macrocell (version 4.x):
  27. "arm,coresight-etm4x", "arm,primecell";
  28. - Coresight programmable Replicator :
  29. "arm,coresight-dynamic-replicator", "arm,primecell";
  30. - System Trace Macrocell:
  31. "arm,coresight-stm", "arm,primecell"; [1]
  32. - Coresight Address Translation Unit (CATU)
  33. "arm,coresight-catu", "arm,primecell";
  34. * reg: physical base address and length of the register
  35. set(s) of the component.
  36. * clocks: the clocks associated to this component.
  37. * clock-names: the name of the clocks referenced by the code.
  38. Since we are using the AMBA framework, the name of the clock
  39. providing the interconnect should be "apb_pclk", and some
  40. coresight blocks also have an additional clock "atclk", which
  41. clocks the core of that coresight component. The latter clock
  42. is optional.
  43. * port or ports: The representation of the component's port
  44. layout using the generic DT graph presentation found in
  45. "bindings/graph.txt".
  46. * Additional required properties for System Trace Macrocells (STM):
  47. * reg: along with the physical base address and length of the register
  48. set as described above, another entry is required to describe the
  49. mapping of the extended stimulus port area.
  50. * reg-names: the only acceptable values are "stm-base" and
  51. "stm-stimulus-base", each corresponding to the areas defined in "reg".
  52. * Required properties for devices that don't show up on the AMBA bus, such as
  53. non-configurable replicators:
  54. * compatible: Currently supported value is (note the absence of the
  55. AMBA markee):
  56. - "arm,coresight-replicator"
  57. * port or ports: same as above.
  58. * Optional properties for ETM/PTMs:
  59. * arm,cp14: must be present if the system accesses ETM/PTM management
  60. registers via co-processor 14.
  61. * cpu: the cpu phandle this ETM/PTM is affined to. When omitted the
  62. source is considered to belong to CPU0.
  63. * Optional property for TMC:
  64. * arm,buffer-size: size of contiguous buffer space for TMC ETR
  65. (embedded trace router). This property is obsolete. The buffer size
  66. can be configured dynamically via buffer_size property in sysfs.
  67. * arm,scatter-gather: boolean. Indicates that the TMC-ETR can safely
  68. use the SG mode on this system.
  69. * Optional property for CATU :
  70. * interrupts : Exactly one SPI may be listed for reporting the address
  71. error
  72. Example:
  73. 1. Sinks
  74. etb@20010000 {
  75. compatible = "arm,coresight-etb10", "arm,primecell";
  76. reg = <0 0x20010000 0 0x1000>;
  77. clocks = <&oscclk6a>;
  78. clock-names = "apb_pclk";
  79. port {
  80. etb_in_port: endpoint@0 {
  81. slave-mode;
  82. remote-endpoint = <&replicator_out_port0>;
  83. };
  84. };
  85. };
  86. tpiu@20030000 {
  87. compatible = "arm,coresight-tpiu", "arm,primecell";
  88. reg = <0 0x20030000 0 0x1000>;
  89. clocks = <&oscclk6a>;
  90. clock-names = "apb_pclk";
  91. port {
  92. tpiu_in_port: endpoint@0 {
  93. slave-mode;
  94. remote-endpoint = <&replicator_out_port1>;
  95. };
  96. };
  97. };
  98. etr@20070000 {
  99. compatible = "arm,coresight-tmc", "arm,primecell";
  100. reg = <0 0x20070000 0 0x1000>;
  101. clocks = <&oscclk6a>;
  102. clock-names = "apb_pclk";
  103. ports {
  104. #address-cells = <1>;
  105. #size-cells = <0>;
  106. /* input port */
  107. port@0 {
  108. reg = <0>;
  109. etr_in_port: endpoint {
  110. slave-mode;
  111. remote-endpoint = <&replicator2_out_port0>;
  112. };
  113. };
  114. /* CATU link represented by output port */
  115. port@1 {
  116. reg = <1>;
  117. etr_out_port: endpoint {
  118. remote-endpoint = <&catu_in_port>;
  119. };
  120. };
  121. };
  122. };
  123. 2. Links
  124. replicator {
  125. /* non-configurable replicators don't show up on the
  126. * AMBA bus. As such no need to add "arm,primecell".
  127. */
  128. compatible = "arm,coresight-replicator";
  129. ports {
  130. #address-cells = <1>;
  131. #size-cells = <0>;
  132. /* replicator output ports */
  133. port@0 {
  134. reg = <0>;
  135. replicator_out_port0: endpoint {
  136. remote-endpoint = <&etb_in_port>;
  137. };
  138. };
  139. port@1 {
  140. reg = <1>;
  141. replicator_out_port1: endpoint {
  142. remote-endpoint = <&tpiu_in_port>;
  143. };
  144. };
  145. /* replicator input port */
  146. port@2 {
  147. reg = <0>;
  148. replicator_in_port0: endpoint {
  149. slave-mode;
  150. remote-endpoint = <&funnel_out_port0>;
  151. };
  152. };
  153. };
  154. };
  155. funnel@20040000 {
  156. compatible = "arm,coresight-funnel", "arm,primecell";
  157. reg = <0 0x20040000 0 0x1000>;
  158. clocks = <&oscclk6a>;
  159. clock-names = "apb_pclk";
  160. ports {
  161. #address-cells = <1>;
  162. #size-cells = <0>;
  163. /* funnel output port */
  164. port@0 {
  165. reg = <0>;
  166. funnel_out_port0: endpoint {
  167. remote-endpoint =
  168. <&replicator_in_port0>;
  169. };
  170. };
  171. /* funnel input ports */
  172. port@1 {
  173. reg = <0>;
  174. funnel_in_port0: endpoint {
  175. slave-mode;
  176. remote-endpoint = <&ptm0_out_port>;
  177. };
  178. };
  179. port@2 {
  180. reg = <1>;
  181. funnel_in_port1: endpoint {
  182. slave-mode;
  183. remote-endpoint = <&ptm1_out_port>;
  184. };
  185. };
  186. port@3 {
  187. reg = <2>;
  188. funnel_in_port2: endpoint {
  189. slave-mode;
  190. remote-endpoint = <&etm0_out_port>;
  191. };
  192. };
  193. };
  194. };
  195. 3. Sources
  196. ptm@2201c000 {
  197. compatible = "arm,coresight-etm3x", "arm,primecell";
  198. reg = <0 0x2201c000 0 0x1000>;
  199. cpu = <&cpu0>;
  200. clocks = <&oscclk6a>;
  201. clock-names = "apb_pclk";
  202. port {
  203. ptm0_out_port: endpoint {
  204. remote-endpoint = <&funnel_in_port0>;
  205. };
  206. };
  207. };
  208. ptm@2201d000 {
  209. compatible = "arm,coresight-etm3x", "arm,primecell";
  210. reg = <0 0x2201d000 0 0x1000>;
  211. cpu = <&cpu1>;
  212. clocks = <&oscclk6a>;
  213. clock-names = "apb_pclk";
  214. port {
  215. ptm1_out_port: endpoint {
  216. remote-endpoint = <&funnel_in_port1>;
  217. };
  218. };
  219. };
  220. 4. STM
  221. stm@20100000 {
  222. compatible = "arm,coresight-stm", "arm,primecell";
  223. reg = <0 0x20100000 0 0x1000>,
  224. <0 0x28000000 0 0x180000>;
  225. reg-names = "stm-base", "stm-stimulus-base";
  226. clocks = <&soc_smc50mhz>;
  227. clock-names = "apb_pclk";
  228. port {
  229. stm_out_port: endpoint {
  230. remote-endpoint = <&main_funnel_in_port2>;
  231. };
  232. };
  233. };
  234. 5. CATU
  235. catu@207e0000 {
  236. compatible = "arm,coresight-catu", "arm,primecell";
  237. reg = <0 0x207e0000 0 0x1000>;
  238. clocks = <&oscclk6a>;
  239. clock-names = "apb_pclk";
  240. interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
  241. port {
  242. catu_in_port: endpoint {
  243. slave-mode;
  244. remote-endpoint = <&etr_out_port>;
  245. };
  246. };
  247. };
  248. [1]. There is currently two version of STM: STM32 and STM500. Both
  249. have the same HW interface and as such don't need an explicit binding name.