keystone-navigator-qmss.txt 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. * Texas Instruments Keystone Navigator Queue Management SubSystem driver
  2. The QMSS (Queue Manager Sub System) found on Keystone SOCs is one of
  3. the main hardware sub system which forms the backbone of the Keystone
  4. multi-core Navigator. QMSS consist of queue managers, packed-data structure
  5. processors(PDSP), linking RAM, descriptor pools and infrastructure
  6. Packet DMA.
  7. The Queue Manager is a hardware module that is responsible for accelerating
  8. management of the packet queues. Packets are queued/de-queued by writing or
  9. reading descriptor address to a particular memory mapped location. The PDSPs
  10. perform QMSS related functions like accumulation, QoS, or event management.
  11. Linking RAM registers are used to link the descriptors which are stored in
  12. descriptor RAM. Descriptor RAM is configurable as internal or external memory.
  13. The QMSS driver manages the PDSP setups, linking RAM regions,
  14. queue pool management (allocation, push, pop and notify) and descriptor
  15. pool management.
  16. Required properties:
  17. - compatible : Must be "ti,keystone-navigator-qmss";
  18. - clocks : phandle to the reference clock for this device.
  19. - queue-range : <start number> total range of queue numbers for the device.
  20. - linkram0 : <address size> for internal link ram, where size is the total
  21. link ram entries.
  22. - linkram1 : <address size> for external link ram, where size is the total
  23. external link ram entries. If the address is specified as "0"
  24. driver will allocate memory.
  25. - qmgrs : child node describing the individual queue managers on the
  26. SoC. On keystone 1 devices there should be only one node.
  27. On keystone 2 devices there can be more than 1 node.
  28. -- managed-queues : the actual queues managed by each queue manager
  29. instance, specified as <"base queue #" "# of queues">.
  30. -- reg : Address and size of the register set for the device.
  31. Register regions should be specified in the following
  32. order
  33. - Queue Peek region.
  34. - Queue status RAM.
  35. - Queue configuration region.
  36. - Descriptor memory setup region.
  37. - Queue Management/Queue Proxy region for queue Push.
  38. - Queue Management/Queue Proxy region for queue Pop.
  39. - queue-pools : child node classifying the queue ranges into pools.
  40. Queue ranges are grouped into 3 type of pools:
  41. - qpend : pool of qpend(interruptible) queues
  42. - general-purpose : pool of general queues, primarily used
  43. as free descriptor queues or the
  44. transmit DMA queues.
  45. - accumulator : pool of queues on PDSP accumulator channel
  46. Each range can have the following properties:
  47. -- qrange : number of queues to use per queue range, specified as
  48. <"base queue #" "# of queues">.
  49. -- interrupts : Optional property to specify the interrupt mapping
  50. for interruptible queues. The driver additionally sets
  51. the interrupt affinity hint based on the cpu mask.
  52. -- qalloc-by-id : Optional property to specify that the queues in this
  53. range can only be allocated by queue id.
  54. -- accumulator : Accumulator channel specification. Any of the PDSPs in
  55. QMSS can be loaded with the accumulator firmware. The
  56. accumulator firmware’s job is to poll a select number of
  57. queues looking for descriptors that have been pushed
  58. into them. Descriptors are popped from the queue and
  59. placed in a buffer provided by the host. When the list
  60. becomes full or a programmed time period expires, the
  61. accumulator triggers an interrupt to the host to read
  62. the buffer for descriptor information. This firmware
  63. comes in 16, 32, and 48 channel builds. Each of these
  64. channels can be configured to monitor 32 contiguous
  65. queues. Accumulator channel property is specified as:
  66. <pdsp-id, channel, entries, pacing mode, latency>
  67. pdsp-id : QMSS PDSP running accumulator firmware
  68. on which the channel has to be
  69. configured
  70. channel : Accumulator channel number
  71. entries : Size of the accumulator descriptor list
  72. pacing mode : Interrupt pacing mode
  73. 0 : None, i.e interrupt on list full only
  74. 1 : Time delay since last interrupt
  75. 2 : Time delay since first new packet
  76. 3 : Time delay since last new packet
  77. latency : time to delay the interrupt, specified
  78. in microseconds.
  79. -- multi-queue : Optional property to specify that the channel has to
  80. monitor up to 32 queues starting at the base queue #.
  81. - descriptor-regions : child node describing the memory regions for keystone
  82. navigator packet DMA descriptors. The memory for
  83. descriptors will be allocated by the driver.
  84. -- id : region number in QMSS.
  85. -- region-spec : specifies the number of descriptors in the
  86. region, specified as
  87. <"# of descriptors" "descriptor size">.
  88. -- link-index : start index, i.e. index of the first
  89. descriptor in the region.
  90. Optional properties:
  91. - dma-coherent : Present if DMA operations are coherent.
  92. - pdsps : child node describing the PDSP configuration.
  93. -- firmware : firmware to be loaded on the PDSP.
  94. -- id : the qmss pdsp that will run the firmware.
  95. -- reg : Address and size of the register set for the PDSP.
  96. Register regions should be specified in the following
  97. order
  98. - PDSP internal RAM region.
  99. - PDSP control/status region registers.
  100. - QMSS interrupt distributor registers.
  101. - PDSP command interface region.
  102. Example:
  103. qmss: qmss@2a40000 {
  104. compatible = "ti,keystone-qmss";
  105. dma-coherent;
  106. #address-cells = <1>;
  107. #size-cells = <1>;
  108. clocks = <&chipclk13>;
  109. ranges;
  110. queue-range = <0 0x4000>;
  111. linkram0 = <0x100000 0x8000>;
  112. linkram1 = <0x0 0x10000>;
  113. qmgrs {
  114. #address-cells = <1>;
  115. #size-cells = <1>;
  116. ranges;
  117. qmgr0 {
  118. managed-queues = <0 0x2000>;
  119. reg = <0x2a40000 0x20000>,
  120. <0x2a06000 0x400>,
  121. <0x2a02000 0x1000>,
  122. <0x2a03000 0x1000>,
  123. <0x23a80000 0x20000>,
  124. <0x2a80000 0x20000>;
  125. };
  126. qmgr1 {
  127. managed-queues = <0x2000 0x2000>;
  128. reg = <0x2a60000 0x20000>,
  129. <0x2a06400 0x400>,
  130. <0x2a04000 0x1000>,
  131. <0x2a05000 0x1000>,
  132. <0x23aa0000 0x20000>,
  133. <0x2aa0000 0x20000>;
  134. };
  135. };
  136. queue-pools {
  137. qpend {
  138. qpend-0 {
  139. qrange = <658 8>;
  140. interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
  141. 0 43 0xf04 0 44 0xf04 0 45 0xf04
  142. 0 46 0xf04 0 47 0xf04>;
  143. };
  144. qpend-1 {
  145. qrange = <8704 16>;
  146. interrupts = <0 48 0xf04 0 49 0xf04 0 50 0xf04
  147. 0 51 0xf04 0 52 0xf04 0 53 0xf04
  148. 0 54 0xf04 0 55 0xf04 0 56 0xf04
  149. 0 57 0xf04 0 58 0xf04 0 59 0xf04
  150. 0 60 0xf04 0 61 0xf04 0 62 0xf04
  151. 0 63 0xf04>;
  152. qalloc-by-id;
  153. };
  154. qpend-2 {
  155. qrange = <8720 16>;
  156. interrupts = <0 64 0xf04 0 65 0xf04 0 66 0xf04
  157. 0 59 0xf04 0 68 0xf04 0 69 0xf04
  158. 0 70 0xf04 0 71 0xf04 0 72 0xf04
  159. 0 73 0xf04 0 74 0xf04 0 75 0xf04
  160. 0 76 0xf04 0 77 0xf04 0 78 0xf04
  161. 0 79 0xf04>;
  162. };
  163. };
  164. general-purpose {
  165. gp-0 {
  166. qrange = <4000 64>;
  167. };
  168. netcp-tx {
  169. qrange = <640 9>;
  170. qalloc-by-id;
  171. };
  172. };
  173. accumulator {
  174. acc-0 {
  175. qrange = <128 32>;
  176. accumulator = <0 36 16 2 50>;
  177. interrupts = <0 215 0xf01>;
  178. multi-queue;
  179. qalloc-by-id;
  180. };
  181. acc-1 {
  182. qrange = <160 32>;
  183. accumulator = <0 37 16 2 50>;
  184. interrupts = <0 216 0xf01>;
  185. multi-queue;
  186. };
  187. acc-2 {
  188. qrange = <192 32>;
  189. accumulator = <0 38 16 2 50>;
  190. interrupts = <0 217 0xf01>;
  191. multi-queue;
  192. };
  193. acc-3 {
  194. qrange = <224 32>;
  195. accumulator = <0 39 16 2 50>;
  196. interrupts = <0 218 0xf01>;
  197. multi-queue;
  198. };
  199. };
  200. };
  201. descriptor-regions {
  202. #address-cells = <1>;
  203. #size-cells = <1>;
  204. ranges;
  205. region-12 {
  206. id = <12>;
  207. region-spec = <8192 128>; /* num_desc desc_size */
  208. link-index = <0x4000>;
  209. };
  210. };
  211. pdsps {
  212. #address-cells = <1>;
  213. #size-cells = <1>;
  214. ranges;
  215. pdsp0@0x2a10000 {
  216. reg = <0x2a10000 0x1000>,
  217. <0x2a0f000 0x100>,
  218. <0x2a0c000 0x3c8>,
  219. <0x2a20000 0x4000>;
  220. id = <0>;
  221. };
  222. };
  223. }; /* qmss */