Skip to contentSkip to conversation

Add support for Tegra210 ADMA

PATCH Superseded Jon Hunter 2 participants 6 messages May 12, 2016 2 messages not in the archive

Subsystems (4)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

v6 cover Add support for Tegra210 ADMA

Add support for the Tegra210 Audio DMA (ADMA) controller which is part of the Audio Processing Engine and used for transferring audio data.

V6 changes:
- Removed stub function tegra_adma_prep_slave_sg() as it is no longer needed.

V5 changes:
- Removed APE and APE2APB clocks as these clocks rightfully belong in the ACONNECT bus driver [0] and the ADMA is child of this device. Dropped power-domain from DT binding as this will be handled by ACONNECT bus driver as well.
- Minor update to case statement formatting based upon feedback from Vinod.
- Make ADMA dependent on Tegra210 as this is the only device (currently) that supports it.

V4 changes:
- Updated DT binding to include 'power-domains' entry for handling the APE power domain inconjunction with runtime-pm.
- Added missing clocks to the DT binding that were being handled by the bootloader.
- Added support for PM_CLK to simplify clock handling

V3 changes:
- Updated DT binding per feedback from Mark and Stephen
- Fixed up items mentioned by Vinod

V2 changes:
- Re-worked device-tree binding

[0] http://marc.info/?l=devicetree&m=146193804830747&w=2

Jon Hunter (3):
Documentation: DT: Add binding documentation for NVIDIA ADMA
dmaengine: tegra-adma: Add support for Tegra210 ADMA
MAINTAINERS: Update Tegra DMA maintainers

 .../bindings/dma/nvidia,tegra210-adma.txt          |  55 ++
 MAINTAINERS                                        |   5 +-
 diff.txt                                           |  10 +
 drivers/dma/Kconfig                                |  14 +
 drivers/dma/Makefile                               |   1 +
 drivers/dma/tegra210-adma.c                        | 840 +++++++++++++++++++++
 6 files changed, 923 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
 create mode 100644 diff.txt
 create mode 100644 drivers/dma/tegra210-adma.c
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH v6 1/3 Documentation: DT: Add binding documentation for NVIDIA ADMA

In reply to a message not in the archive

Add device-tree binding documentation for the Tegra210 Audio DMA controller.

---
 .../bindings/dma/nvidia,tegra210-adma.txt          | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt new file +55 -0
new file mode 100644
index 000000000000..1e1dc8f972e4
@@ -0,0 +1,55 @@
+* NVIDIA Tegra Audio DMA (ADMA) controller
+
+The Tegra Audio DMA controller that is used for transferring data
+between system memory and the Audio Processing Engine (APE).
+
+Required properties:
+- compatible: Must be "nvidia,tegra210-adma".
+- reg: Should contain DMA registers location and length. This should be
+  a single entry that includes all of the per-channel registers in one
+  contiguous bank.
+- interrupt-parent: Phandle to the interrupt parent controller.
+- interrupts: Should contain all of the per-channel DMA interrupts in
+  ascending order with respect to the DMA channel index.
+- clocks: Must contain one entry for the ADMA module clock
+  (TEGRA210_CLK_D_AUDIO).
+- clock-names: Must contain the name "d_audio" for the corresponding
+  'clocks' entry.
+- #dma-cells : Must be 1. The first cell denotes the receive/transmit
+  request number and should be between 1 and the maximum number of
+  requests supported. This value corresponds to the RX/TX_REQUEST_SELECT
+  fields in the ADMA_CHn_CTRL register.
+
+
+Example:
+
+adma: dma@702e2000 {
+	compatible = "nvidia,tegra210-adma";
+	reg = <0x0 0x702e2000 0x0 0x2000>;
+	interrupt-parent = <&tegra_agic>;
+	interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
+	clock-names = "d_audio";
+	#dma-cells = <1>;
+};
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

PATCH v6 2/3 dmaengine: tegra-adma: Add support for Tegra210 ADMA

In reply to a message not in the archive

Add support for the Tegra210 Audio DMA controller that is used for transferring data between system memory and the Audio sub-system. The driver only supports cyclic transfers because this is being solely used for audio.

This driver is based upon the work by Dara Ramesh <[email protected]>.

---
 diff.txt                    |  10 +
 drivers/dma/Kconfig         |  14 +
 drivers/dma/Makefile        |   1 +
 drivers/dma/tegra210-adma.c | 840 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 865 insertions(+)
 create mode 100644 diff.txt
 create mode 100644 drivers/dma/tegra210-adma.c
diff.txt new file +10 -0
new file mode 100644
index 000000000000..0562f35b6e82
@@ -0,0 +1,10 @@
+ drivers/i2c/i2c-core.c                             |    61 +-
+ drivers/i2c/i2c-mux.c                              |   170 +-
+ drivers/i2c/muxes/i2c-mux-gpio.c                   |    18 +
+ drivers/i2c/muxes/i2c-mux-pinctrl.c                |    38 +
+ drivers/irqchip/irq-gic-common.c                   |    13 +
+ drivers/irqchip/irq-gic-common.h                   |     3 +
+ drivers/irqchip/irq-gic.c                          |    87 +-
+ sound/core/timer.c                                 |     3 +
+ sound/soc/codecs/rt5645.c                          |    10 +-
+ sound/soc/soc-topology.c                           |     2 +
drivers/dma/Kconfig +14 -0
index f843dd51f4c1..8c98779a12b1 100644
@@ -467,6 +467,20 @@ config TEGRA20_APB_DMA
 	  This DMA controller transfers data from memory to peripheral fifo
 	  or vice versa. It does not support memory to memory data transfer.
 
+config TEGRA210_ADMA
+	bool "NVIDIA Tegra210 ADMA support"
+	depends on ARCH_TEGRA_210_SOC
+	select DMA_ENGINE
+	select DMA_VIRTUAL_CHANNELS
+	select PM_CLK
+	help
+	  Support for the NVIDIA Tegra210 ADMA controller driver. The
+	  DMA controller has multiple DMA channels and is used to service
+	  various audio clients in the Tegra210 audio processing engine
+	  (APE). This DMA controller transfers data from memory to
+	  peripheral and vice versa. It does not support memory to
+	  memory data transfer.
+
 config TIMB_DMA
 	tristate "Timberdale FPGA DMA support"
 	depends on MFD_TIMBERDALE
drivers/dma/Makefile +1 -0
index 6084127c1486..614f28b0b739 100644
@@ -59,6 +59,7 @@ obj-$(CONFIG_STM32_DMA) += stm32-dma.o
 obj-$(CONFIG_S3C24XX_DMAC) += s3c24xx-dma.o
 obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o
 obj-$(CONFIG_TEGRA20_APB_DMA) += tegra20-apb-dma.o
+obj-$(CONFIG_TEGRA210_ADMA) += tegra210-adma.o
 obj-$(CONFIG_TIMB_DMA) += timb_dma.o
 obj-$(CONFIG_TI_CPPI41) += cppi41.o
 obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma-crossbar.o
drivers/dma/tegra210-adma.c new file +840 -0

840 lines not on this page · raw message

Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#7 lore raw

PATCH v6 3/3 MAINTAINERS: Update Tegra DMA maintainers

In reply to a message not in the archive

Update the Tegra DMA driver maintainer field to include the newly added Tegra210 ADMA and add Jon Hunter as a co-maintainer for Tegra DMA.

---
 MAINTAINERS | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
MAINTAINERS +3 -2
index 09744d2fefc6..b756cd245897 100644
@@ -11188,10 +11188,11 @@ M:	Prashant Gaikwad <[email protected]>
 S:	Supported
 F:	drivers/clk/tegra/
 
-TEGRA DMA DRIVER
+TEGRA DMA DRIVERS
 M:	Laxman Dewangan <[email protected]>
+M:	Jon Hunter <[email protected]>
 S:	Supported
-F:	drivers/dma/tegra20-apb-dma.c
+F:	drivers/dma/tegra*
 
 TEGRA I2C DRIVER
 M:	Laxman Dewangan <[email protected]>
Signature · 1 line
2.1.4
#5 lore raw

Re: [PATCH V6 2/3] dmaengine: tegra-adma: Add support for Tegra210 ADMA

In reply to a message not in the archive
Quoted 23 lines · Jon Hunter

Add support for the Tegra210 Audio DMA controller that is used for transferring data between system memory and the Audio sub-system. The driver only supports cyclic transfers because this is being solely used for audio.

This driver is based upon the work by Dara Ramesh <[email protected]>.

---
 diff.txt                    |  10 +
 drivers/dma/Kconfig         |  14 +
 drivers/dma/Makefile        |   1 +
 drivers/dma/tegra210-adma.c | 840 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 865 insertions(+)
 create mode 100644 diff.txt
 create mode 100644 drivers/dma/tegra210-adma.c
diff.txt new file +0 -0
new file mode 100644
index 000000000000..0562f35b6e82

diff.txt line 10

Quoted 10 lines
diff.txt new file +10 -0
@@ -0,0 +1,10 @@
+ drivers/i2c/i2c-core.c                             |    61 +-
+ drivers/i2c/i2c-mux.c                              |   170 +-
+ drivers/i2c/muxes/i2c-mux-gpio.c                   |    18 +
+ drivers/i2c/muxes/i2c-mux-pinctrl.c                |    38 +
+ drivers/irqchip/irq-gic-common.c                   |    13 +
+ drivers/irqchip/irq-gic-common.h                   |     3 +
+ drivers/irqchip/irq-gic.c                          |    87 +-
+ sound/core/timer.c                                 |     3 +
+ sound/soc/codecs/rt5645.c                          |    10 +-
+ sound/soc/soc-topology.c                           |     2 +

???

Quoted 3 lines

+ * ADMA driver for Nvidia's Tegra210 ADMA controller.
+ *
+ * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.

2016?

Signature · 1 line
~Vinod
author
#6 lore raw

Re: [PATCH V6 2/3] dmaengine: tegra-adma: Add support for Tegra210 ADMA

Quoted 28 lines · Vinod Koul
Quoted 27 lines · Jon Hunter

Add support for the Tegra210 Audio DMA controller that is used for transferring data between system memory and the Audio sub-system. The driver only supports cyclic transfers because this is being solely used for audio.

This driver is based upon the work by Dara Ramesh <[email protected]>.

---
 diff.txt                    |  10 +
 drivers/dma/Kconfig         |  14 +
 drivers/dma/Makefile        |   1 +
 drivers/dma/tegra210-adma.c | 840 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 865 insertions(+)
 create mode 100644 diff.txt
 create mode 100644 drivers/dma/tegra210-adma.c
diff.txt new file +4 -0
new file mode 100644
index 000000000000..0562f35b6e82
@@ -0,0 +1,10 @@
+ drivers/i2c/i2c-core.c                             |    61 +-
+ drivers/i2c/i2c-mux.c                              |   170 +-
+ drivers/i2c/muxes/i2c-mux-gpio.c                   |    18 +
+ drivers/i2c/muxes/i2c-mux-pinctrl.c                |    38 +
Quoted 8 lines

diff.txt line 10

Quoted 6 lines
diff.txt new file +6 -0
+ drivers/irqchip/irq-gic-common.c                   |    13 +
+ drivers/irqchip/irq-gic-common.h                   |     3 +
+ drivers/irqchip/irq-gic.c                          |    87 +-
+ sound/core/timer.c                                 |     3 +
+ sound/soc/codecs/rt5645.c                          |    10 +-
+ sound/soc/soc-topology.c                           |     2 +

???

Ugh ... sorry some left over debug.

Quoted 6 lines
Quoted 4 lines

+ * ADMA driver for Nvidia's Tegra210 ADMA controller.
+ *
+ * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.

2016?

Yes will fix.

Jon