diff mbox

[v5,1/2] dt-bindings: dma: Add Spreadtrum SC9860 DMA controller

Message ID 84d9f80ce9853ae8441ef91e8701ba516db8f697.1508824012.git.baolin.wang@spreadtrum.com (mailing list archive)
State Accepted
Headers show

Commit Message

Baolin Wang Oct. 24, 2017, 5:47 a.m. UTC
This patch adds the binding documentation for Spreadtrum SC9860 DMA
controller device.

Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes since v4:
 - No updates.

Changes since v3:
 - No updates.

Changes since v2:
 - No updates.

Changes since v1:
 - Fix typos.
---
 Documentation/devicetree/bindings/dma/sprd-dma.txt |   41 ++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/sprd-dma.txt

Comments

Vinod Koul Oct. 24, 2017, 2:38 p.m. UTC | #1
On Tue, Oct 24, 2017 at 01:47:49PM +0800, Baolin Wang wrote:
> This patch adds the binding documentation for Spreadtrum SC9860 DMA
> controller device.

Applied both after fixing subsytem name, thanks
(Exiting) Baolin Wang Oct. 25, 2017, 1:53 a.m. UTC | #2
Hi Vinod,

On 24 October 2017 at 22:38, Vinod Koul <vinod.koul@intel.com> wrote:
> On Tue, Oct 24, 2017 at 01:47:49PM +0800, Baolin Wang wrote:
>> This patch adds the binding documentation for Spreadtrum SC9860 DMA
>> controller device.
>
> Applied both after fixing subsytem name, thanks

Thanks, especially for your good suggestion.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/dma/sprd-dma.txt b/Documentation/devicetree/bindings/dma/sprd-dma.txt
new file mode 100644
index 0000000..7a10fea
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/sprd-dma.txt
@@ -0,0 +1,41 @@ 
+* Spreadtrum DMA controller
+
+This binding follows the generic DMA bindings defined in dma.txt.
+
+Required properties:
+- compatible: Should be "sprd,sc9860-dma".
+- reg: Should contain DMA registers location and length.
+- interrupts: Should contain one interrupt shared by all channel.
+- #dma-cells: must be <1>. Used to represent the number of integer
+	cells in the dmas property of client device.
+- #dma-channels : Number of DMA channels supported. Should be 32.
+- clock-names: Should contain the clock of the DMA controller.
+- clocks: Should contain a clock specifier for each entry in clock-names.
+
+Example:
+
+Controller:
+apdma: dma-controller@20100000 {
+	compatible = "sprd,sc9860-dma";
+	reg = <0x20100000 0x4000>;
+	interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+	#dma-cells = <1>;
+	#dma-channels = <32>;
+	clock-names = "enable";
+	clocks = <&clk_ap_ahb_gates 5>;
+};
+
+
+Client:
+DMA clients connected to the Spreadtrum DMA controller must use the format
+described in the dma.txt file, using a two-cell specifier for each channel.
+The two cells in order are:
+1. A phandle pointing to the DMA controller.
+2. The channel id.
+
+spi0: spi@70a00000{
+	...
+	dma-names = "rx_chn", "tx_chn";
+	dmas = <&apdma 11>, <&apdma 12>;
+	...
+};