From dfaebb509b9240430aff9482881cdc29f929e7c2 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:47 +0200 Subject: [PATCH 1/6] ARM: DTS: da850: fix edma0 reg space The size of the eDMA0 CC register space is 0x8000 and not 0x10000. Signed-off-by: Peter Ujfalusi Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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>; }; From 7a7faedde65307c364f831046ded1a7720d5a6fe Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:48 +0200 Subject: [PATCH 2/6] ARM: DTS: da850: Use the new DT bindings for the eDMA3 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 Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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 4f935ad9f27b..b7ea8318c7fe 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -242,3 +242,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"; }; }; From b47a8560695c552889923c71605000ac1f5e4b2d Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:49 +0200 Subject: [PATCH 3/6] ARM: DTS: da850: Enable eDMA1 The eDMA1 in da850 has only one TPTC and for example MMC1 is HW events are handled by it. Signed-off-by: Peter Ujfalusi Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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 b7ea8318c7fe..ef061e9a2315 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -246,3 +246,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>; From 684892a2f10c1845a35b9cfa4c086d4254bb06ae Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:50 +0200 Subject: [PATCH 4/6] ARM: DTS: da850: Enable DMA use for MMC0 Add the needed bindings for MMC0 in order to be able to utilize the DMA instead of PIO mode. Signed-off-by: Peter Ujfalusi Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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 { From 3c497582e1e2e3baf88bc994dd1ce3e3422cb00b Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:51 +0200 Subject: [PATCH 5/6] ARM: DTS: da850: Add node for mmc1 da850 has two MMC controller, MMCSD1 is served by eDMA1 Signed-off-by: Peter Ujfalusi Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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>; From f0ad43539af41bc2f8baff9ce3237d368d55654e Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 17 Dec 2015 15:27:52 +0200 Subject: [PATCH 6/6] ARM: DTS: da850: Enable DMA for SPI1 Add the needed bindings so the SPI driver can use DMA with SPI1. Signed-off-by: Peter Ujfalusi Tested-by: Sushaanth Srirangapathi Signed-off-by: Sekhar Nori --- 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 {