fsl-imx-sdma.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. * Freescale Smart Direct Memory Access (SDMA) Controller for i.MX
  2. Required properties:
  3. - compatible : Should be one of
  4. "fsl,imx25-sdma"
  5. "fsl,imx31-sdma", "fsl,imx31-to1-sdma", "fsl,imx31-to2-sdma"
  6. "fsl,imx35-sdma", "fsl,imx35-to1-sdma", "fsl,imx35-to2-sdma"
  7. "fsl,imx51-sdma"
  8. "fsl,imx53-sdma"
  9. "fsl,imx6q-sdma"
  10. "fsl,imx7d-sdma"
  11. The -to variants should be preferred since they allow to determine the
  12. correct ROM script addresses needed for the driver to work without additional
  13. firmware.
  14. - reg : Should contain SDMA registers location and length
  15. - interrupts : Should contain SDMA interrupt
  16. - #dma-cells : Must be <3>.
  17. The first cell specifies the DMA request/event ID. See details below
  18. about the second and third cell.
  19. - fsl,sdma-ram-script-name : Should contain the full path of SDMA RAM
  20. scripts firmware
  21. The second cell of dma phandle specifies the peripheral type of DMA transfer.
  22. The full ID of peripheral types can be found below.
  23. ID transfer type
  24. ---------------------
  25. 0 MCU domain SSI
  26. 1 Shared SSI
  27. 2 MMC
  28. 3 SDHC
  29. 4 MCU domain UART
  30. 5 Shared UART
  31. 6 FIRI
  32. 7 MCU domain CSPI
  33. 8 Shared CSPI
  34. 9 SIM
  35. 10 ATA
  36. 11 CCM
  37. 12 External peripheral
  38. 13 Memory Stick Host Controller
  39. 14 Shared Memory Stick Host Controller
  40. 15 DSP
  41. 16 Memory
  42. 17 FIFO type Memory
  43. 18 SPDIF
  44. 19 IPU Memory
  45. 20 ASRC
  46. 21 ESAI
  47. 22 SSI Dual FIFO (needs firmware ver >= 2)
  48. 23 Shared ASRC
  49. 24 SAI
  50. The third cell specifies the transfer priority as below.
  51. ID transfer priority
  52. -------------------------
  53. 0 High
  54. 1 Medium
  55. 2 Low
  56. Optional properties:
  57. - gpr : The phandle to the General Purpose Register (GPR) node.
  58. - fsl,sdma-event-remap : Register bits of sdma event remap, the format is
  59. <reg shift val>.
  60. reg is the GPR register offset.
  61. shift is the bit position inside the GPR register.
  62. val is the value of the bit (0 or 1).
  63. Examples:
  64. sdma@83fb0000 {
  65. compatible = "fsl,imx51-sdma", "fsl,imx35-sdma";
  66. reg = <0x83fb0000 0x4000>;
  67. interrupts = <6>;
  68. #dma-cells = <3>;
  69. fsl,sdma-ram-script-name = "/*(DEBLOBBED)*/";
  70. };
  71. DMA clients connected to the i.MX SDMA controller must use the format
  72. described in the dma.txt file.
  73. Examples:
  74. ssi2: ssi@70014000 {
  75. compatible = "fsl,imx51-ssi", "fsl,imx21-ssi";
  76. reg = <0x70014000 0x4000>;
  77. interrupts = <30>;
  78. clocks = <&clks 49>;
  79. dmas = <&sdma 24 1 0>,
  80. <&sdma 25 1 0>;
  81. dma-names = "rx", "tx";
  82. fsl,fifo-depth = <15>;
  83. };
  84. Using the fsl,sdma-event-remap property:
  85. If we want to use SDMA on the SAI1 port on a MX6SX:
  86. &sdma {
  87. gpr = <&gpr>;
  88. /* SDMA events remap for SAI1_RX and SAI1_TX */
  89. fsl,sdma-event-remap = <0 15 1>, <0 16 1>;
  90. };
  91. The fsl,sdma-event-remap property in this case has two values:
  92. - <0 15 1> means that the offset is 0, so GPR0 is the register of the
  93. SDMA remap. Bit 15 of GPR0 selects between UART4_RX and SAI1_RX.
  94. Setting bit 15 to 1 selects SAI1_RX.
  95. - <0 16 1> means that the offset is 0, so GPR0 is the register of the
  96. SDMA remap. Bit 16 of GPR0 selects between UART4_TX and SAI1_TX.
  97. Setting bit 16 to 1 selects SAI1_TX.