Hi.
I did a test run today with the latest Colibri V61 Linux kernel (4.4.39). I was mostly interested to test out the SPI DMA support.
I ran in to a problem:
[ 0.239066] fsl-dspi 4002c000.dspi0: rx dma channel not available
[ 0.245272] fsl-dspi 4002c000.dspi0: can't get dma channels
[ 0.246914] fsl-dspi 4002d000.dspi1: rx dma channel not available
[ 0.253101] fsl-dspi 4002d000.dspi1: can't get dma channels
My custom board use dspi1 to communicate with an MCP2515 and dsp0 is used to communicate with an multipurpose chip. And above warnings mean that it falls back to not using DMA. Argh…
Did some hacking and this diff fixes the above:
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index bf4e804..5d7a418 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -220,8 +220,8 @@
clocks = <&clks VF610_CLK_DSPI0>;
clock-names = "dspi";
spi-num-chipselects = <6>;
- dmas = <&edma1 1 12>,
- <&edma1 1 13>;
+ dmas = <&edma0 0 12>,
+ <&edma0 0 13>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -235,8 +235,8 @@
clocks = <&clks VF610_CLK_DSPI1>;
clock-names = "dspi";
spi-num-chipselects = <4>;
- dmas = <&edma1 1 14>,
- <&edma1 1 15>;
+ dmas = <&edma0 0 14>,
+ <&edma0 0 15>;
dma-names = "rx", "tx";
status = "disabled";
};
Opened up the vybrid reference manual 3.3 DMAMUX Request Sources because I made the above changes blindly and above seems correct to me. Also looking at dspi2 and dspi3, they seem wrong.
The complete diff (have not tested dspi2 and dspi3 though):
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index bf4e804..01f66cb 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -220,8 +220,8 @@
clocks = <&clks VF610_CLK_DSPI0>;
clock-names = "dspi";
spi-num-chipselects = <6>;
- dmas = <&edma1 1 12>,
- <&edma1 1 13>;
+ dmas = <&edma0 0 12>,
+ <&edma0 0 13>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -235,8 +235,8 @@
clocks = <&clks VF610_CLK_DSPI1>;
clock-names = "dspi";
spi-num-chipselects = <4>;
- dmas = <&edma1 1 14>,
- <&edma1 1 15>;
+ dmas = <&edma0 0 14>,
+ <&edma0 0 15>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -636,8 +636,8 @@
clocks = <&clks VF610_CLK_DSPI2>;
clock-names = "dspi";
spi-num-chipselects = <2>;
- dmas = <&edma1 0 10>,
- <&edma1 0 11>;
+ dmas = <&edma0 1 10>,
+ <&edma0 1 11>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -651,8 +651,8 @@
clocks = <&clks VF610_CLK_DSPI3>;
clock-names = "dspi";
spi-num-chipselects = <2>;
- dmas = <&edma1 0 12>,
- <&edma1 0 13>;
+ dmas = <&edma0 1 12>,
+ <&edma0 1 13>;
dma-names = "rx", "tx";
status = "disabled";
};
Am I reading the manual wrong or I am correct?
Best Regards
Mirza