Skip to contentSkip to conversation

dt: Add bindings documentation for the ADI AXI-I2S controller

PATCH Applied Lars-Peter Clausen 3 participants 5 messages Dec 6, 2013 – Dec 9, 2013 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 dt: Add bindings documentation for the ADI AXI-I2S controller

This patch adds the devicetree documentation for the ADI AXI-SPDIF audio controller. The controller has:
* One set of memory mapped register
* Two clocks, one for the memory mapped register interface, one used as the audio reference clock
* One DMA interface each for the transmit and receive data

Cc Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>

---
Changes since v1:
* Use <&a ...>, <&b ...> instead of <&a ..., &b ...> in the examples

---
 .../devicetree/bindings/sound/adi,axi-i2s.txt      | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/adi,axi-i2s.txt
Documentation/devicetree/bindings/sound/adi,axi-i2s.txt new file +31 -0
new file mode 100644
index 0000000..5875ca4
@@ -0,0 +1,31 @@
+ADI AXI-I2S controller
+
+Required properties:
+ - compatible : Must be "adi,axi-i2s-1.00.a"
+ - reg : Must contain I2S core's registers location and length
+ - clocks : Pairs of phandle and specifier referencing the controller's clocks.
+   The controller expects two clocks, the clock used for the AXI interface and
+   the clock used as the sampling rate reference clock sample.
+ - clock-names : "axi" for the clock to the AXI interface, "ref" for the sample
+   rate reference clock.
+ - dmas: Pairs of phandle and specifier for the DMA channels that are used by
+   the core. The core expects two dma channels, one for transmit and one for
+   receive.
+ - dma-names : "tx" for the transmit channel, "rx" for the receive channel.
+
+For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
+please check:
+	* resource-names.txt
+	* clock/clock-bindings.txt
+	* dma/dma.txt
+
+Example:
+
+	i2s: i2s@0x77600000 {
+		compatible = "adi,axi-i2s-1.00.a";
+		reg = <0x77600000 0x1000>;
+		clocks = <&clk 15>, <&audio_clock>;
+		clock-names = "axi", "ref";
+		dmas = <&ps7_dma 0>, <&ps7_dma 1>;
+		dma-names = "tx", "rx";
+	};
Signature · 6 lines
1.8.0

--
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
#1 lore raw

PATCH v2 2/4 ASoC: Add support for the Analog Devices AXI-I2S core

This patch adds support for the AXI-I2S softcore. The core implements a simple bidirectional I2S transceiver and is used by Analog Devices in some of their reference designs for various FPGA platforms.

The driver uses the generic PCM dmaengine driver for its PCM. The only restriction is that we need to set the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag as the dmaengine driver for the DMA core (PL330) that is used with this core has no residue reporting capabilities yet. This will be fixed in the future though.

---
Changes since v1:
* Remove explicit dependency on SND_SOC since there already is an implicit one.
* Added clarifications on the programable I2S word width that is currently hardcoded to 32

---
 sound/soc/Kconfig       |   1 +
 sound/soc/Makefile      |   1 +
 sound/soc/adi/Kconfig   |  13 +++
 sound/soc/adi/Makefile  |   3 +
 sound/soc/adi/axi-i2s.c | 277 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 295 insertions(+)
 create mode 100644 sound/soc/adi/Kconfig
 create mode 100644 sound/soc/adi/Makefile
 create mode 100644 sound/soc/adi/axi-i2s.c
sound/soc/Kconfig +1 -0
index a5dcdec..d62ce48 100644
@@ -31,6 +31,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
 	select SND_DMAENGINE_PCM
 
 # All the supported SoCs
+source "sound/soc/adi/Kconfig"
 source "sound/soc/atmel/Kconfig"
 source "sound/soc/au1x/Kconfig"
 source "sound/soc/bcm/Kconfig"
sound/soc/Makefile +1 -0
index bf32b7a..62a1822 100644
@@ -8,6 +8,7 @@ endif
 obj-$(CONFIG_SND_SOC)	+= snd-soc-core.o
 obj-$(CONFIG_SND_SOC)	+= codecs/
 obj-$(CONFIG_SND_SOC)	+= generic/
+obj-$(CONFIG_SND_SOC)	+= adi/
 obj-$(CONFIG_SND_SOC)	+= atmel/
 obj-$(CONFIG_SND_SOC)	+= au1x/
 obj-$(CONFIG_SND_SOC)	+= bcm/
sound/soc/adi/Kconfig new file +13 -0
new file mode 100644
index 0000000..46f4b79
@@ -0,0 +1,13 @@
+config SND_SOC_ADI
+	tristate "Audio support for Analog Devices reference designs"
+	depends on MICROBLAZE || ARCH_ZYNQ || COMPILE_TEST
+	help
+	  Audio support for various reference designs by Analog Devices.
+
+config SND_SOC_ADI_AXI_I2S
+	tristate "AXI-I2S support"
+	depends on SND_SOC_ADI
+	select SND_SOC_GENERIC_DMAENGINE_PCM
+	select REGMAP_MMIO
+	help
+	  ASoC driver for the Analog Devices AXI-I2S softcore peripheral.
sound/soc/adi/Makefile new file +3 -0
new file mode 100644
index 0000000..d32c21a
@@ -0,0 +1,3 @@
+snd-soc-adi-axi-i2s-objs := axi-i2s.o
+
+obj-$(CONFIG_SND_SOC_ADI_AXI_I2S) += snd-soc-adi-axi-i2s.o
sound/soc/adi/axi-i2s.c new file +277 -0

277 lines not on this page · raw message

Signature · 1 line
1.8.0
#2 lore raw

PATCH v2 4/4 ASoC: Add support for the Analog Devices AXI-SPDIF driver

In reply to Lars-Peter Clausen

This patch adds a ASoC driver for the AXI-SPDIF softcore. The core implements a simple SPDIF transmitter and is used on some Analog Devices' reference designs for various FPGA platforms. For now the driver only support the PL330 as the the DMA controller.

The driver uses the generic PCM dmaengine driver for its PCM. The only restriction is that we need to set the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag as the dmaengine driver for the DMA core (PL330) that is used with this core has no residue reporting capabilities yet. This will be fixed in the future though.

---
No changes since v1

---
 sound/soc/adi/Kconfig     |   8 ++
 sound/soc/adi/Makefile    |   2 +
 sound/soc/adi/axi-spdif.c | 272 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 282 insertions(+)
 create mode 100644 sound/soc/adi/axi-spdif.c
sound/soc/adi/Kconfig +8 -0
index 46f4b79..dd763f5 100644
@@ -11,3 +11,11 @@ config SND_SOC_ADI_AXI_I2S
 	select REGMAP_MMIO
 	help
 	  ASoC driver for the Analog Devices AXI-I2S softcore peripheral.
+
+config SND_SOC_ADI_AXI_SPDIF
+	tristate "AXI-SPDIF support"
+	depends on SND_SOC_ADI
+	select SND_SOC_GENERIC_DMAENGINE_PCM
+	select REGMAP_MMIO
+	help
+	  ASoC driver for the Analog Devices AXI-SPDIF softcore peripheral.
sound/soc/adi/Makefile +2 -0
index d32c21a..64456c1 100644
@@ -1,3 +1,5 @@
 snd-soc-adi-axi-i2s-objs := axi-i2s.o
+snd-soc-adi-axi-spdif-objs := axi-spdif.o
 
 obj-$(CONFIG_SND_SOC_ADI_AXI_I2S) += snd-soc-adi-axi-i2s.o
+obj-$(CONFIG_SND_SOC_ADI_AXI_SPDIF) += snd-soc-adi-axi-spdif.o
sound/soc/adi/axi-spdif.c new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
1.8.0

A message that is not in the archive (sent off-list or not yet received): 1386324172-15609-1-git-send-email-lars-Qo5EllUWu/[email protected]

#4 lore raw

PATCH v2 3/4 dt: Add bindings documentation for the ADI AXI-SPDIF audio controller

This patch adds the devicetree documentation for the ADI AXI-SPDIF audio controller. The controller has:
* One set of memory mapped register
* Two clocks, one for the memory mapped register interface, one used as the audio reference clock
* A DMA interface for the transmit data

Cc Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>

---
Changes since v1:
* Use <&a ...>, <&b ...> instead of <&a ..., &b ...> in the examples

---
 .../devicetree/bindings/sound/adi,axi-spdif-tx.txt | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt
Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt new file +30 -0
new file mode 100644
index 0000000..46f3449
@@ -0,0 +1,30 @@
+ADI AXI-SPDIF controller
+
+Required properties:
+ - compatible : Must be "adi,axi-spdif-1.00.a"
+ - reg : Must contain SPDIF core's registers location and length
+ - clocks : Pairs of phandle and specifier referencing the controller's clocks.
+   The controller expects two clocks, the clock used for the AXI interface and
+   the clock used as the sampling rate reference clock sample.
+ - clock-names: "axi" for the clock to the AXI interface, "ref" for the sample
+   rate reference clock.
+ - dmas: Pairs of phandle and specifier for the DMA channel that is used by
+   the core. The core expects one dma channel for transmit.
+ - dma-names : Must be "tx"
+
+For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
+please check:
+	* resource-names.txt
+	* clock/clock-bindings.txt
+	* dma/dma.txt
+
+Example:
+
+	spdif: spdif@0x77400000 {
+		compatible = "adi,axi-spdif-tx-1.00.a";
+		reg = <0x77600000 0x1000>;
+		clocks = <&clk 15>, <&audio_clock>;
+		clock-names = "axi", "ref";
+		dmas = <&ps7_dma 0>;
+		dma-names = "tx";
+	};
Signature · 6 lines
1.8.0

--
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
maintainer Applied
#5 lore raw
In reply to Lars-Peter Clausen
Quoted 2 lines · Lars-Peter Clausen

This patch adds the devicetree documentation for the ADI AXI-SPDIF audio controller. The controller has:

Applied all, thanks.