linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v02 0/6]  ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support
@ 2015-12-17 13:27 Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 1/6] ARM: DTS: da850: fix edma0 reg space Peter Ujfalusi
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

Hi,

Changes since v1:
- Added tested by from Sushaanth Srirangapathi
- Updated to use the non 16bit arrays [1]
- memcpy channels are not reserved as requested by Sekhar - DMA memcpy is
  disabled for now

Switch to use the new eDMA bindings and enable DMA for MMC0, SPI1.
Add node for MMC1.

[1]
As it has been discussed in the following thread:
https://www.mail-archive.com/linux-omap@vger.kernel.org/msg122117.html

the DT bindings has been changes compared to what we had in 4.4-rc1: the arrays
now don't have the 16bit type.
The changes are now merged to mainline and Vinod provided us a branch:

git://git.infradead.org/users/vkoul/slave-dma.git fix/edma

Which is based on 4.4-rc1 and only contains the two patch for changing the eDMA
bindings.

Regards,
Peter
---
Peter Ujfalusi (6):
  ARM: DTS: da850: fix edma0 reg space
  ARM: DTS: da850: Use the new DT bindings for the eDMA3
  ARM: DTS: da850: Enable eDMA1
  ARM: DTS: da850: Enable DMA use for MMC0
  ARM: DTS: da850: Add node for mmc1
  ARM: DTS: da850: Enable DMA for SPI1

 arch/arm/boot/dts/da850-enbw-cmc.dts |  8 +++++
 arch/arm/boot/dts/da850-evm.dts      |  8 +++++
 arch/arm/boot/dts/da850.dtsi         | 58 ++++++++++++++++++++++++++++++++----
 3 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.6.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v02 1/6] ARM: DTS: da850: fix edma0 reg space
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 2/6] ARM: DTS: da850: Use the new DT bindings for the eDMA3 Peter Ujfalusi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

The size of the eDMA0 CC register space is 0x8000 and not 0x10000.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 0bd98cd00816..e73f5efb3aa3 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -152,7 +152,8 @@
 		};
 		edma0: edma@01c00000 {
 			compatible = "ti,edma3";
-			reg =	<0x0 0x10000>;
+			/* eDMA3 CC0: 0x01c0 0000 - 0x01c0 7fff */
+			reg =	<0x0 0x8000>;
 			interrupts = <11 13 12>;
 			#dma-cells = <1>;
 		};
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v02 2/6] ARM: DTS: da850: Use the new DT bindings for the eDMA3
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 1/6] ARM: DTS: da850: fix edma0 reg space Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 3/6] ARM: DTS: da850: Enable eDMA1 Peter Ujfalusi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

Switch to use the ti,edma3-tpcc and ti,edma3-tptc binding for the eDMA3.
With the new bindings boards can customize and tweak the DMA channel
priority to match their needs. With the new binding the memcpy is safe
to be used since with the old binding it was not possible for a driver
to know which channel is allowed to be used as non HW triggered channel.
Using the new binding will allow us to reserve PaRAM slots to be used by
the DSP which was not possible before and prevented the da850 boards to be
moved to DT only.

Note that the DMA memcpy is disabled, it can be enabled by reserving
channels for memcpy by adding the following property to the edma node:
ti,edma-memcpy-channels = <20 21>; /* Reserving channel 20 and 21 for memcpy */

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850-enbw-cmc.dts |  4 ++++
 arch/arm/boot/dts/da850-evm.dts      |  4 ++++
 arch/arm/boot/dts/da850.dtsi         | 26 +++++++++++++++++++++-----
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/da850-enbw-cmc.dts b/arch/arm/boot/dts/da850-enbw-cmc.dts
index e750ab9086d5..1811f8275559 100644
--- a/arch/arm/boot/dts/da850-enbw-cmc.dts
+++ b/arch/arm/boot/dts/da850-enbw-cmc.dts
@@ -28,3 +28,7 @@
 		};
 	};
 };
+
+&edma0 {
+	ti,edma-reserved-slot-ranges = <32 50>;
+};
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index d807285a61cd..94cf9a9b1302 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -243,3 +243,7 @@
 	tx-num-evt = <32>;
 	rx-num-evt = <32>;
 };
+
+&edma0 {
+	ti,edma-reserved-slot-ranges = <32 50>;
+};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index e73f5efb3aa3..6e39f9b06524 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -151,11 +151,27 @@
 
 		};
 		edma0: edma@01c00000 {
-			compatible = "ti,edma3";
+			compatible = "ti,edma3-tpcc";
 			/* eDMA3 CC0: 0x01c0 0000 - 0x01c0 7fff */
 			reg =	<0x0 0x8000>;
-			interrupts = <11 13 12>;
-			#dma-cells = <1>;
+			reg-names = "edma3_cc";
+			interrupts = <11 12>;
+			interrupt-names = "edma3_ccint", "edma3_ccerrint";
+			#dma-cells = <2>;
+
+			ti,tptcs = <&edma0_tptc0 7>, <&edma0_tptc1 0>;
+		};
+		edma0_tptc0: tptc@01c08000 {
+			compatible = "ti,edma3-tptc";
+			reg =	<0x8000 0x400>;
+			interrupts = <13>;
+			interrupt-names = "edm3_tcerrint";
+		};
+		edma0_tptc1: tptc@01c08400 {
+			compatible = "ti,edma3-tptc";
+			reg =	<0x8400 0x400>;
+			interrupts = <32>;
+			interrupt-names = "edm3_tcerrint";
 		};
 		serial0: serial@1c42000 {
 			compatible = "ns16550a";
@@ -286,8 +302,8 @@
 			interrupts = <54>;
 			interrupt-names = "common";
 			status = "disabled";
-			dmas = <&edma0 1>,
-				<&edma0 0>;
+			dmas = <&edma0 1 1>,
+				<&edma0 0 1>;
 			dma-names = "tx", "rx";
 		};
 	};
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v02 3/6] ARM: DTS: da850: Enable eDMA1
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 1/6] ARM: DTS: da850: fix edma0 reg space Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 2/6] ARM: DTS: da850: Use the new DT bindings for the eDMA3 Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 4/6] ARM: DTS: da850: Enable DMA use for MMC0 Peter Ujfalusi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

The eDMA1 in da850 has only one TPTC and for example MMC1 is HW events are
handled by it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850-enbw-cmc.dts |  4 ++++
 arch/arm/boot/dts/da850-evm.dts      |  4 ++++
 arch/arm/boot/dts/da850.dtsi         | 17 +++++++++++++++++
 3 files changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/da850-enbw-cmc.dts b/arch/arm/boot/dts/da850-enbw-cmc.dts
index 1811f8275559..645549e14237 100644
--- a/arch/arm/boot/dts/da850-enbw-cmc.dts
+++ b/arch/arm/boot/dts/da850-enbw-cmc.dts
@@ -32,3 +32,7 @@
 &edma0 {
 	ti,edma-reserved-slot-ranges = <32 50>;
 };
+
+&edma1 {
+	ti,edma-reserved-slot-ranges = <32 90>;
+};
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 94cf9a9b1302..30e2def402ad 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -247,3 +247,7 @@
 &edma0 {
 	ti,edma-reserved-slot-ranges = <32 50>;
 };
+
+&edma1 {
+	ti,edma-reserved-slot-ranges = <32 90>;
+};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 6e39f9b06524..c08b6c04fcf1 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -173,6 +173,23 @@
 			interrupts = <32>;
 			interrupt-names = "edm3_tcerrint";
 		};
+		edma1: edma@01e30000 {
+			compatible = "ti,edma3-tpcc";
+			/* eDMA3 CC1: 0x01e3 0000 - 0x01e3 7fff */
+			reg =	<0x230000 0x8000>;
+			reg-names = "edma3_cc";
+			interrupts = <93 94>;
+			interrupt-names = "edma3_ccint", "edma3_ccerrint";
+			#dma-cells = <2>;
+
+			ti,tptcs = <&edma1_tptc0 7>;
+		};
+		edma1_tptc0: tptc@01e38000 {
+			compatible = "ti,edma3-tptc";
+			reg =	<0x238000 0x400>;
+			interrupts = <95>;
+			interrupt-names = "edm3_tcerrint";
+		};
 		serial0: serial@1c42000 {
 			compatible = "ns16550a";
 			reg = <0x42000 0x100>;
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v02 4/6] ARM: DTS: da850: Enable DMA use for MMC0
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
                   ` (2 preceding siblings ...)
  2015-12-17 13:27 ` [PATCH v02 3/6] ARM: DTS: da850: Enable eDMA1 Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 5/6] ARM: DTS: da850: Add node for mmc1 Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 6/6] ARM: DTS: da850: Enable DMA for SPI1 Peter Ujfalusi
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

Add the needed bindings for MMC0 in order to be able to utilize the DMA
instead of PIO mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index c08b6c04fcf1..1538959f2853 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -235,6 +235,8 @@
 			compatible = "ti,da830-mmc";
 			reg = <0x40000 0x1000>;
 			interrupts = <16>;
+			dmas = <&edma0 16 0>, <&edma0 17 0>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 		ehrpwm0: ehrpwm@01f00000 {
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v02 5/6] ARM: DTS: da850: Add node for mmc1
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
                   ` (3 preceding siblings ...)
  2015-12-17 13:27 ` [PATCH v02 4/6] ARM: DTS: da850: Enable DMA use for MMC0 Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  2015-12-17 13:27 ` [PATCH v02 6/6] ARM: DTS: da850: Enable DMA for SPI1 Peter Ujfalusi
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

da850 has two MMC controller, MMCSD1 is served by eDMA1

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 1538959f2853..31ca5768fccf 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -239,6 +239,14 @@
 			dma-names = "rx", "tx";
 			status = "disabled";
 		};
+		mmc1: mmc@1e1b000 {
+			compatible = "ti,da830-mmc";
+			reg = <0x21b000 0x1000>;
+			interrupts = <72>;
+			dmas = <&edma1 28 0>, <&edma1 29 0>;
+			dma-names = "rx", "tx";
+			status = "disabled";
+		};
 		ehrpwm0: ehrpwm@01f00000 {
 			compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
 			#pwm-cells = <3>;
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v02 6/6] ARM: DTS: da850: Enable DMA for SPI1
  2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
                   ` (4 preceding siblings ...)
  2015-12-17 13:27 ` [PATCH v02 5/6] ARM: DTS: da850: Add node for mmc1 Peter Ujfalusi
@ 2015-12-17 13:27 ` Peter Ujfalusi
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2015-12-17 13:27 UTC (permalink / raw)
  To: nsekhar, arnd; +Cc: linux-arm-kernel, devicetree, linux-kernel, khilman

Add the needed bindings so the SPI driver can use DMA with SPI1.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
 arch/arm/boot/dts/da850.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 31ca5768fccf..226cda76e77c 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -285,6 +285,8 @@
 			num-cs = <4>;
 			ti,davinci-spi-intr-line = <1>;
 			interrupts = <56>;
+			dmas = <&edma0 18 0>, <&edma0 19 0>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 		mdio: mdio@1e24000 {
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-17 13:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17 13:27 [PATCH v02 0/6] ARM: DTS: da850: eDMA new bindings and MMC/SPI DMA support Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 1/6] ARM: DTS: da850: fix edma0 reg space Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 2/6] ARM: DTS: da850: Use the new DT bindings for the eDMA3 Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 3/6] ARM: DTS: da850: Enable eDMA1 Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 4/6] ARM: DTS: da850: Enable DMA use for MMC0 Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 5/6] ARM: DTS: da850: Add node for mmc1 Peter Ujfalusi
2015-12-17 13:27 ` [PATCH v02 6/6] ARM: DTS: da850: Enable DMA for SPI1 Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).