omap-mailbox.txt 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. OMAP2+ Mailbox Driver
  2. =====================
  3. The OMAP mailbox hardware facilitates communication between different processors
  4. using a queued mailbox interrupt mechanism. The IP block is external to the
  5. various processor subsystems and is connected on an interconnect bus. The
  6. communication is achieved through a set of registers for message storage and
  7. interrupt configuration registers.
  8. Each mailbox IP block has a certain number of h/w fifo queues and output
  9. interrupt lines. An output interrupt line is routed to an interrupt controller
  10. within a processor subsystem, and there can be more than one line going to a
  11. specific processor's interrupt controller. The interrupt line connections are
  12. fixed for an instance and are dictated by the IP integration into the SoC
  13. (excluding the SoCs that have a Interrupt Crossbar IP). Each interrupt line is
  14. programmable through a set of interrupt configuration registers, and have a rx
  15. and tx interrupt source per h/w fifo. Communication between different processors
  16. is achieved through the appropriate programming of the rx and tx interrupt
  17. sources on the appropriate interrupt lines.
  18. The number of h/w fifo queues and interrupt lines dictate the usable registers.
  19. All the current OMAP SoCs except for the newest DRA7xx SoC has a single IP
  20. instance. DRA7xx has multiple instances with different number of h/w fifo queues
  21. and interrupt lines between different instances. The interrupt lines can also be
  22. routed to different processor sub-systems on DRA7xx as they are routed through
  23. the Crossbar, a kind of interrupt router/multiplexer.
  24. Mailbox Device Node:
  25. ====================
  26. A Mailbox device node is used to represent a Mailbox IP instance within a SoC.
  27. The sub-mailboxes are represented as child nodes of this parent node.
  28. Required properties:
  29. --------------------
  30. - compatible: Should be one of the following,
  31. "ti,omap2-mailbox" for OMAP2420, OMAP2430 SoCs
  32. "ti,omap3-mailbox" for OMAP3430, OMAP3630 SoCs
  33. "ti,omap4-mailbox" for OMAP44xx, OMAP54xx, AM33xx,
  34. AM43xx and DRA7xx SoCs
  35. - reg: Contains the mailbox register address range (base
  36. address and length)
  37. - interrupts: Contains the interrupt information for the mailbox
  38. device. The format is dependent on which interrupt
  39. controller the OMAP device uses
  40. - ti,hwmods: Name of the hwmod associated with the mailbox
  41. - #mbox-cells: Common mailbox binding property to identify the number
  42. of cells required for the mailbox specifier. Should be
  43. 1
  44. - ti,mbox-num-users: Number of targets (processor devices) that the mailbox
  45. device can interrupt
  46. - ti,mbox-num-fifos: Number of h/w fifo queues within the mailbox IP block
  47. Child Nodes:
  48. ============
  49. A child node is used for representing the actual sub-mailbox device that is
  50. used for the communication between the host processor and a remote processor.
  51. Each child node should have a unique node name across all the different
  52. mailbox device nodes.
  53. Required properties:
  54. --------------------
  55. - ti,mbox-tx: sub-mailbox descriptor property defining a Tx fifo
  56. - ti,mbox-rx: sub-mailbox descriptor property defining a Rx fifo
  57. Sub-mailbox Descriptor Data
  58. ---------------------------
  59. Each of the above ti,mbox-tx and ti,mbox-rx properties should have 3 cells of
  60. data that represent the following:
  61. Cell #1 (fifo_id) - mailbox fifo id used either for transmitting
  62. (ti,mbox-tx) or for receiving (ti,mbox-rx)
  63. Cell #2 (irq_id) - irq identifier index number to use from the parent's
  64. interrupts data. Should be 0 for most of the cases, a
  65. positive index value is seen only on mailboxes that have
  66. multiple interrupt lines connected to the MPU processor.
  67. Cell #3 (usr_id) - mailbox user id for identifying the interrupt line
  68. associated with generating a tx/rx fifo interrupt.
  69. Optional Properties:
  70. --------------------
  71. - ti,mbox-send-noirq: Quirk flag to allow the client user of this sub-mailbox
  72. to send messages without triggering a Tx ready interrupt,
  73. and to control the Tx ticker. Should be used only on
  74. sub-mailboxes used to communicate with WkupM3 remote
  75. processor on AM33xx/AM43xx SoCs.
  76. Mailbox Users:
  77. ==============
  78. A device needing to communicate with a target processor device should specify
  79. them using the common mailbox binding properties, "mboxes" and the optional
  80. "mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt
  81. for details). Each value of the mboxes property should contain a phandle to the
  82. mailbox controller device node and an args specifier that will be the phandle to
  83. the intended sub-mailbox child node to be used for communication. The equivalent
  84. "mbox-names" property value can be used to give a name to the communication channel
  85. to be used by the client user.
  86. Example:
  87. --------
  88. /* OMAP4 */
  89. mailbox: mailbox@4a0f4000 {
  90. compatible = "ti,omap4-mailbox";
  91. reg = <0x4a0f4000 0x200>;
  92. interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
  93. ti,hwmods = "mailbox";
  94. #mbox-cells = <1>;
  95. ti,mbox-num-users = <3>;
  96. ti,mbox-num-fifos = <8>;
  97. mbox_ipu: mbox_ipu {
  98. ti,mbox-tx = <0 0 0>;
  99. ti,mbox-rx = <1 0 0>;
  100. };
  101. mbox_dsp: mbox_dsp {
  102. ti,mbox-tx = <3 0 0>;
  103. ti,mbox-rx = <2 0 0>;
  104. };
  105. };
  106. dsp {
  107. ...
  108. mboxes = <&mailbox &mbox_dsp>;
  109. ...
  110. };
  111. /* AM33xx */
  112. mailbox: mailbox@480C8000 {
  113. compatible = "ti,omap4-mailbox";
  114. reg = <0x480C8000 0x200>;
  115. interrupts = <77>;
  116. ti,hwmods = "mailbox";
  117. #mbox-cells = <1>;
  118. ti,mbox-num-users = <4>;
  119. ti,mbox-num-fifos = <8>;
  120. mbox_wkupm3: wkup_m3 {
  121. ti,mbox-tx = <0 0 0>;
  122. ti,mbox-rx = <0 0 3>;
  123. };
  124. };