stm32-mdma.txt 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. * STMicroelectronics STM32 MDMA controller
  2. The STM32 MDMA is a general-purpose direct memory access controller capable of
  3. supporting 64 independent DMA channels with 256 HW requests.
  4. Required properties:
  5. - compatible: Should be "st,stm32h7-mdma"
  6. - reg: Should contain MDMA registers location and length. This should include
  7. all of the per-channel registers.
  8. - interrupts: Should contain the MDMA interrupt.
  9. - clocks: Should contain the input clock of the DMA instance.
  10. - resets: Reference to a reset controller asserting the DMA controller.
  11. - #dma-cells : Must be <5>. See DMA client paragraph for more details.
  12. Optional properties:
  13. - dma-channels: Number of DMA channels supported by the controller.
  14. - dma-requests: Number of DMA request signals supported by the controller.
  15. - st,ahb-addr-masks: Array of u32 mask to list memory devices addressed via
  16. AHB bus.
  17. Example:
  18. mdma1: dma@52000000 {
  19. compatible = "st,stm32h7-mdma";
  20. reg = <0x52000000 0x1000>;
  21. interrupts = <122>;
  22. clocks = <&timer_clk>;
  23. resets = <&rcc 992>;
  24. #dma-cells = <5>;
  25. dma-channels = <16>;
  26. dma-requests = <32>;
  27. st,ahb-addr-masks = <0x20000000>, <0x00000000>;
  28. };
  29. * DMA client
  30. DMA clients connected to the STM32 MDMA controller must use the format
  31. described in the dma.txt file, using a five-cell specifier for each channel:
  32. a phandle to the MDMA controller plus the following five integer cells:
  33. 1. The request line number
  34. 2. The priority level
  35. 0x00: Low
  36. 0x01: Medium
  37. 0x10: High
  38. 0x11: Very high
  39. 3. A 32bit mask specifying the DMA channel configuration
  40. -bit 0-1: Source increment mode
  41. 0x00: Source address pointer is fixed
  42. 0x10: Source address pointer is incremented after each data transfer
  43. 0x11: Source address pointer is decremented after each data transfer
  44. -bit 2-3: Destination increment mode
  45. 0x00: Destination address pointer is fixed
  46. 0x10: Destination address pointer is incremented after each data
  47. transfer
  48. 0x11: Destination address pointer is decremented after each data
  49. transfer
  50. -bit 8-9: Source increment offset size
  51. 0x00: byte (8bit)
  52. 0x01: half-word (16bit)
  53. 0x10: word (32bit)
  54. 0x11: double-word (64bit)
  55. -bit 10-11: Destination increment offset size
  56. 0x00: byte (8bit)
  57. 0x01: half-word (16bit)
  58. 0x10: word (32bit)
  59. 0x11: double-word (64bit)
  60. -bit 25-18: The number of bytes to be transferred in a single transfer
  61. (min = 1 byte, max = 128 bytes)
  62. -bit 29:28: Trigger Mode
  63. 0x00: Each MDMA request triggers a buffer transfer (max 128 bytes)
  64. 0x01: Each MDMA request triggers a block transfer (max 64K bytes)
  65. 0x10: Each MDMA request triggers a repeated block transfer
  66. 0x11: Each MDMA request triggers a linked list transfer
  67. 4. A 32bit value specifying the register to be used to acknowledge the request
  68. if no HW ack signal is used by the MDMA client
  69. 5. A 32bit mask specifying the value to be written to acknowledge the request
  70. if no HW ack signal is used by the MDMA client
  71. Example:
  72. i2c4: i2c@5c002000 {
  73. compatible = "st,stm32f7-i2c";
  74. reg = <0x5c002000 0x400>;
  75. interrupts = <95>,
  76. <96>;
  77. clocks = <&timer_clk>;
  78. #address-cells = <1>;
  79. #size-cells = <0>;
  80. dmas = <&mdma1 36 0x0 0x40008 0x0 0x0>,
  81. <&mdma1 37 0x0 0x40002 0x0 0x0>;
  82. dma-names = "rx", "tx";
  83. status = "disabled";
  84. };