xilinx_dma.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Xilinx AXI VDMA engine, it does transfers between memory and video devices.
  2. It can be configured to have one channel or two channels. If configured
  3. as two channels, one is to transmit to the video device and another is
  4. to receive from the video device.
  5. Xilinx AXI DMA engine, it does transfers between memory and AXI4 stream
  6. target devices. It can be configured to have one channel or two channels.
  7. If configured as two channels, one is to transmit to the device and another
  8. is to receive from the device.
  9. Xilinx AXI CDMA engine, it does transfers between memory-mapped source
  10. address and a memory-mapped destination address.
  11. Required properties:
  12. - compatible: Should be "xlnx,axi-vdma-1.00.a" or "xlnx,axi-dma-1.00.a" or
  13. "xlnx,axi-cdma-1.00.a""
  14. - #dma-cells: Should be <1>, see "dmas" property below
  15. - reg: Should contain VDMA registers location and length.
  16. - xlnx,addrwidth: Should be the vdma addressing size in bits(ex: 32 bits).
  17. - dma-ranges: Should be as the following <dma_addr cpu_addr max_len>.
  18. - dma-channel child node: Should have at least one channel and can have up to
  19. two channels per device. This node specifies the properties of each
  20. DMA channel (see child node properties below).
  21. - clocks: Input clock specifier. Refer to common clock bindings.
  22. - clock-names: List of input clocks
  23. For VDMA:
  24. Required elements: "s_axi_lite_aclk"
  25. Optional elements: "m_axi_mm2s_aclk" "m_axi_s2mm_aclk",
  26. "m_axis_mm2s_aclk", "s_axis_s2mm_aclk"
  27. For CDMA:
  28. Required elements: "s_axi_lite_aclk", "m_axi_aclk"
  29. FOR AXIDMA:
  30. Required elements: "s_axi_lite_aclk"
  31. Optional elements: "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
  32. "m_axi_sg_aclk"
  33. Required properties for VDMA:
  34. - xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.
  35. Optional properties:
  36. - xlnx,include-sg: Tells configured for Scatter-mode in
  37. the hardware.
  38. Optional properties for AXI DMA:
  39. - xlnx,mcdma: Tells whether configured for multi-channel mode in the hardware.
  40. Optional properties for VDMA:
  41. - xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
  42. It takes following values:
  43. {1}, flush both channels
  44. {2}, flush mm2s channel
  45. {3}, flush s2mm channel
  46. Required child node properties:
  47. - compatible:
  48. For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
  49. "xlnx,axi-vdma-s2mm-channel".
  50. For CDMA: It should be "xlnx,axi-cdma-channel".
  51. For AXIDMA: It should be either "xlnx,axi-dma-mm2s-channel" or
  52. "xlnx,axi-dma-s2mm-channel".
  53. - interrupts: Should contain per channel VDMA interrupts.
  54. - xlnx,datawidth: Should contain the stream data width, take values
  55. {32,64...1024}.
  56. Optional child node properties:
  57. - xlnx,include-dre: Tells hardware is configured for Data
  58. Realignment Engine.
  59. Optional child node properties for VDMA:
  60. - xlnx,genlock-mode: Tells Genlock synchronization is
  61. enabled/disabled in hardware.
  62. Optional child node properties for AXI DMA:
  63. -dma-channels: Number of dma channels in child node.
  64. Example:
  65. ++++++++
  66. axi_vdma_0: axivdma@40030000 {
  67. compatible = "xlnx,axi-vdma-1.00.a";
  68. #dma_cells = <1>;
  69. reg = < 0x40030000 0x10000 >;
  70. dma-ranges = <0x00000000 0x00000000 0x40000000>;
  71. xlnx,num-fstores = <0x8>;
  72. xlnx,flush-fsync = <0x1>;
  73. xlnx,addrwidth = <0x20>;
  74. clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
  75. clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
  76. "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
  77. dma-channel@40030000 {
  78. compatible = "xlnx,axi-vdma-mm2s-channel";
  79. interrupts = < 0 54 4 >;
  80. xlnx,datawidth = <0x40>;
  81. } ;
  82. dma-channel@40030030 {
  83. compatible = "xlnx,axi-vdma-s2mm-channel";
  84. interrupts = < 0 53 4 >;
  85. xlnx,datawidth = <0x40>;
  86. } ;
  87. } ;
  88. * DMA client
  89. Required properties:
  90. - dmas: a list of <[Video DMA device phandle] [Channel ID]> pairs,
  91. where Channel ID is '0' for write/tx and '1' for read/rx
  92. channel.
  93. - dma-names: a list of DMA channel names, one per "dmas" entry
  94. Example:
  95. ++++++++
  96. vdmatest_0: vdmatest@0 {
  97. compatible ="xlnx,axi-vdma-test-1.00.a";
  98. dmas = <&axi_vdma_0 0
  99. &axi_vdma_0 1>;
  100. dma-names = "vdma0", "vdma1";
  101. } ;