[Letux-kernel] [PATCH 1/8] arm: dts: omap3pandora: Don't use DMA channels for unused SPI masters

Grond grond66 at riseup.net
Fri Dec 31 01:58:08 CET 2021


On the pandora, only mcspi1 (spi0) is actually used. Because the device tree
defaults in arch/arm/boot/dts/omap3.dtsi leave all of the mcspi interfaces
enabled, the DMA channels which the device tree assigns to them cannot be used
for anything else. This is a problem because OMAP3's sDMA controller can only
have 32 DMA channels configured at any one time. So when we try to use (for
example) the McBSP subsystem (which is required for sound) it doesn't work
because we've already exhausted our available DMA channels. Fix this by
disabling mcspi[2-4] on the pandora device tree.

Signed-off-by: Grond <grond66 at riseup.net>
---
 arch/arm/boot/dts/omap3-pandora-common.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index ab8476098953..391f53ed28d2 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -841,6 +841,23 @@ lcd_in: endpoint {
 
 };
 
+/*
+ * Only mcspi1 is used on the pandora, the others do not surface on the board
+ * due to pinmux configuration. disable the unused ones so that they do not
+ * consume DMA channels
+ */
+&mcspi2 {
+	status = "disabled";
+};
+
+&mcspi3 {
+	status = "disabled";
+};
+
+&mcspi4 {
+	status = "disabled";
+};
+
 /* n/a - used as GPIOs */
 &mcbsp1 {
 };
-- 
2.30.2



More information about the Letux-kernel mailing list