dma.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. * Generic DMA Controller and DMA request bindings
  2. Generic binding to provide a way for a driver using DMA Engine to retrieve the
  3. DMA request or channel information that goes from a hardware device to a DMA
  4. controller.
  5. * DMA controller
  6. Required property:
  7. - #dma-cells: Must be at least 1. Used to provide DMA controller
  8. specific information. See DMA client binding below for
  9. more details.
  10. Optional properties:
  11. - dma-channels: Number of DMA channels supported by the controller.
  12. - dma-requests: Number of DMA request signals supported by the
  13. controller.
  14. Example:
  15. dma: dma@48000000 {
  16. compatible = "ti,omap-sdma";
  17. reg = <0x48000000 0x1000>;
  18. interrupts = <0 12 0x4
  19. 0 13 0x4
  20. 0 14 0x4
  21. 0 15 0x4>;
  22. #dma-cells = <1>;
  23. dma-channels = <32>;
  24. dma-requests = <127>;
  25. };
  26. * DMA router
  27. DMA routers are transparent IP blocks used to route DMA request lines from
  28. devices to the DMA controller. Some SoCs (like TI DRA7x) have more peripherals
  29. integrated with DMA requests than what the DMA controller can handle directly.
  30. Required property:
  31. - dma-masters: phandle of the DMA controller or list of phandles for
  32. the DMA controllers the router can direct the signal to.
  33. - #dma-cells: Must be at least 1. Used to provide DMA router specific
  34. information. See DMA client binding below for more
  35. details.
  36. Optional properties:
  37. - dma-requests: Number of incoming request lines the router can handle.
  38. - In the node pointed by the dma-masters:
  39. - dma-requests: The router driver might need to look for this in order
  40. to configure the routing.
  41. Example:
  42. sdma_xbar: dma-router@4a002b78 {
  43. compatible = "ti,dra7-dma-crossbar";
  44. reg = <0x4a002b78 0xfc>;
  45. #dma-cells = <1>;
  46. dma-requests = <205>;
  47. ti,dma-safe-map = <0>;
  48. dma-masters = <&sdma>;
  49. };
  50. * DMA client
  51. Client drivers should specify the DMA property using a phandle to the controller
  52. followed by DMA controller specific data.
  53. Required property:
  54. - dmas: List of one or more DMA specifiers, each consisting of
  55. - A phandle pointing to DMA controller node
  56. - A number of integer cells, as determined by the
  57. #dma-cells property in the node referenced by phandle
  58. containing DMA controller specific information. This
  59. typically contains a DMA request line number or a
  60. channel number, but can contain any data that is
  61. required for configuring a channel.
  62. - dma-names: Contains one identifier string for each DMA specifier in
  63. the dmas property. The specific strings that can be used
  64. are defined in the binding of the DMA client device.
  65. Multiple DMA specifiers can be used to represent
  66. alternatives and in this case the dma-names for those
  67. DMA specifiers must be identical (see examples).
  68. Examples:
  69. 1. A device with one DMA read channel, one DMA write channel:
  70. i2c1: i2c@1 {
  71. ...
  72. dmas = <&dma 2 /* read channel */
  73. &dma 3>; /* write channel */
  74. dma-names = "rx", "tx";
  75. ...
  76. };
  77. 2. A single read-write channel with three alternative DMA controllers:
  78. dmas = <&dma1 5
  79. &dma2 7
  80. &dma3 2>;
  81. dma-names = "rx-tx", "rx-tx", "rx-tx";
  82. 3. A device with three channels, one of which has two alternatives:
  83. dmas = <&dma1 2 /* read channel */
  84. &dma1 3 /* write channel */
  85. &dma2 0 /* error read */
  86. &dma3 0>; /* alternative error read */
  87. dma-names = "rx", "tx", "error", "error";