stm32-dma.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. * STMicroelectronics STM32 DMA controller
  2. The STM32 DMA is a general-purpose direct memory access controller capable of
  3. supporting 8 independent DMA channels. Each channel can have up to 8 requests.
  4. Required properties:
  5. - compatible: Should be "st,stm32-dma"
  6. - reg: Should contain DMA registers location and length. This should include
  7. all of the per-channel registers.
  8. - interrupts: Should contain all of the per-channel DMA interrupts in
  9. ascending order with respect to the DMA channel index.
  10. - clocks: Should contain the input clock of the DMA instance.
  11. - #dma-cells : Must be <4>. See DMA client paragraph for more details.
  12. Optional properties:
  13. - dma-requests : Number of DMA requests supported.
  14. - resets: Reference to a reset controller asserting the DMA controller
  15. - st,mem2mem: boolean; if defined, it indicates that the controller supports
  16. memory-to-memory transfer
  17. Example:
  18. dma2: dma-controller@40026400 {
  19. compatible = "st,stm32-dma";
  20. reg = <0x40026400 0x400>;
  21. interrupts = <56>,
  22. <57>,
  23. <58>,
  24. <59>,
  25. <60>,
  26. <68>,
  27. <69>,
  28. <70>;
  29. clocks = <&clk_hclk>;
  30. #dma-cells = <4>;
  31. st,mem2mem;
  32. resets = <&rcc 150>;
  33. dma-requests = <8>;
  34. };
  35. * DMA client
  36. DMA clients connected to the STM32 DMA controller must use the format
  37. described in the dma.txt file, using a four-cell specifier for each
  38. channel: a phandle to the DMA controller plus the following four integer cells:
  39. 1. The channel id
  40. 2. The request line number
  41. 3. A 32bit mask specifying the DMA channel configuration which are device
  42. dependent:
  43. -bit 9: Peripheral Increment Address
  44. 0x0: no address increment between transfers
  45. 0x1: increment address between transfers
  46. -bit 10: Memory Increment Address
  47. 0x0: no address increment between transfers
  48. 0x1: increment address between transfers
  49. -bit 15: Peripheral Increment Offset Size
  50. 0x0: offset size is linked to the peripheral bus width
  51. 0x1: offset size is fixed to 4 (32-bit alignment)
  52. -bit 16-17: Priority level
  53. 0x0: low
  54. 0x1: medium
  55. 0x2: high
  56. 0x3: very high
  57. 4. A 32bit bitfield value specifying DMA features which are device dependent:
  58. -bit 0-1: DMA FIFO threshold selection
  59. 0x0: 1/4 full FIFO
  60. 0x1: 1/2 full FIFO
  61. 0x2: 3/4 full FIFO
  62. 0x3: full FIFO
  63. Example:
  64. usart1: serial@40011000 {
  65. compatible = "st,stm32-uart";
  66. reg = <0x40011000 0x400>;
  67. interrupts = <37>;
  68. clocks = <&clk_pclk2>;
  69. dmas = <&dma2 2 4 0x10400 0x3>,
  70. <&dma2 7 5 0x10200 0x3>;
  71. dma-names = "rx", "tx";
  72. };