coresight.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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. - Qualcomm Configurable Replicator (version 1.x):
  29. "qcom,coresight-replicator1x", "arm,primecell";
  30. - System Trace Macrocell:
  31. "arm,coresight-stm", "arm,primecell"; [1]
  32. * reg: physical base address and length of the register
  33. set(s) of the component.
  34. * clocks: the clocks associated to this component.
  35. * clock-names: the name of the clocks referenced by the code.
  36. Since we are using the AMBA framework, the name of the clock
  37. providing the interconnect should be "apb_pclk", and some
  38. coresight blocks also have an additional clock "atclk", which
  39. clocks the core of that coresight component. The latter clock
  40. is optional.
  41. * port or ports: The representation of the component's port
  42. layout using the generic DT graph presentation found in
  43. "bindings/graph.txt".
  44. * Additional required properties for System Trace Macrocells (STM):
  45. * reg: along with the physical base address and length of the register
  46. set as described above, another entry is required to describe the
  47. mapping of the extended stimulus port area.
  48. * reg-names: the only acceptable values are "stm-base" and
  49. "stm-stimulus-base", each corresponding to the areas defined in "reg".
  50. * Required properties for devices that don't show up on the AMBA bus, such as
  51. non-configurable replicators:
  52. * compatible: Currently supported value is (note the absence of the
  53. AMBA markee):
  54. - "arm,coresight-replicator"
  55. * port or ports: same as above.
  56. * Optional properties for ETM/PTMs:
  57. * arm,cp14: must be present if the system accesses ETM/PTM management
  58. registers via co-processor 14.
  59. * cpu: the cpu phandle this ETM/PTM is affined to. When omitted the
  60. source is considered to belong to CPU0.
  61. * Optional property for TMC:
  62. * arm,buffer-size: size of contiguous buffer space for TMC ETR
  63. (embedded trace router)
  64. Example:
  65. 1. Sinks
  66. etb@20010000 {
  67. compatible = "arm,coresight-etb10", "arm,primecell";
  68. reg = <0 0x20010000 0 0x1000>;
  69. clocks = <&oscclk6a>;
  70. clock-names = "apb_pclk";
  71. port {
  72. etb_in_port: endpoint@0 {
  73. slave-mode;
  74. remote-endpoint = <&replicator_out_port0>;
  75. };
  76. };
  77. };
  78. tpiu@20030000 {
  79. compatible = "arm,coresight-tpiu", "arm,primecell";
  80. reg = <0 0x20030000 0 0x1000>;
  81. clocks = <&oscclk6a>;
  82. clock-names = "apb_pclk";
  83. port {
  84. tpiu_in_port: endpoint@0 {
  85. slave-mode;
  86. remote-endpoint = <&replicator_out_port1>;
  87. };
  88. };
  89. };
  90. 2. Links
  91. replicator {
  92. /* non-configurable replicators don't show up on the
  93. * AMBA bus. As such no need to add "arm,primecell".
  94. */
  95. compatible = "arm,coresight-replicator";
  96. ports {
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99. /* replicator output ports */
  100. port@0 {
  101. reg = <0>;
  102. replicator_out_port0: endpoint {
  103. remote-endpoint = <&etb_in_port>;
  104. };
  105. };
  106. port@1 {
  107. reg = <1>;
  108. replicator_out_port1: endpoint {
  109. remote-endpoint = <&tpiu_in_port>;
  110. };
  111. };
  112. /* replicator input port */
  113. port@2 {
  114. reg = <0>;
  115. replicator_in_port0: endpoint {
  116. slave-mode;
  117. remote-endpoint = <&funnel_out_port0>;
  118. };
  119. };
  120. };
  121. };
  122. funnel@20040000 {
  123. compatible = "arm,coresight-funnel", "arm,primecell";
  124. reg = <0 0x20040000 0 0x1000>;
  125. clocks = <&oscclk6a>;
  126. clock-names = "apb_pclk";
  127. ports {
  128. #address-cells = <1>;
  129. #size-cells = <0>;
  130. /* funnel output port */
  131. port@0 {
  132. reg = <0>;
  133. funnel_out_port0: endpoint {
  134. remote-endpoint =
  135. <&replicator_in_port0>;
  136. };
  137. };
  138. /* funnel input ports */
  139. port@1 {
  140. reg = <0>;
  141. funnel_in_port0: endpoint {
  142. slave-mode;
  143. remote-endpoint = <&ptm0_out_port>;
  144. };
  145. };
  146. port@2 {
  147. reg = <1>;
  148. funnel_in_port1: endpoint {
  149. slave-mode;
  150. remote-endpoint = <&ptm1_out_port>;
  151. };
  152. };
  153. port@3 {
  154. reg = <2>;
  155. funnel_in_port2: endpoint {
  156. slave-mode;
  157. remote-endpoint = <&etm0_out_port>;
  158. };
  159. };
  160. };
  161. };
  162. 3. Sources
  163. ptm@2201c000 {
  164. compatible = "arm,coresight-etm3x", "arm,primecell";
  165. reg = <0 0x2201c000 0 0x1000>;
  166. cpu = <&cpu0>;
  167. clocks = <&oscclk6a>;
  168. clock-names = "apb_pclk";
  169. port {
  170. ptm0_out_port: endpoint {
  171. remote-endpoint = <&funnel_in_port0>;
  172. };
  173. };
  174. };
  175. ptm@2201d000 {
  176. compatible = "arm,coresight-etm3x", "arm,primecell";
  177. reg = <0 0x2201d000 0 0x1000>;
  178. cpu = <&cpu1>;
  179. clocks = <&oscclk6a>;
  180. clock-names = "apb_pclk";
  181. port {
  182. ptm1_out_port: endpoint {
  183. remote-endpoint = <&funnel_in_port1>;
  184. };
  185. };
  186. };
  187. 4. STM
  188. stm@20100000 {
  189. compatible = "arm,coresight-stm", "arm,primecell";
  190. reg = <0 0x20100000 0 0x1000>,
  191. <0 0x28000000 0 0x180000>;
  192. reg-names = "stm-base", "stm-stimulus-base";
  193. clocks = <&soc_smc50mhz>;
  194. clock-names = "apb_pclk";
  195. port {
  196. stm_out_port: endpoint {
  197. remote-endpoint = <&main_funnel_in_port2>;
  198. };
  199. };
  200. };
  201. [1]. There is currently two version of STM: STM32 and STM500. Both
  202. have the same HW interface and as such don't need an explicit binding name.