Skip to content

Commit

Permalink
ASoC: fsl: Add S/PDIF CPU DAI driver
Browse files Browse the repository at this point in the history
This patch implements a device-tree-only CPU DAI driver for Freescale
S/PDIF controller that supports stereo playback and record feature.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Nicolin Chen authored and Mark Brown committed Aug 22, 2013
1 parent 0783e64 commit a2388a4
Show file tree
Hide file tree
Showing 5 changed files with 1,486 additions and 0 deletions.
54 changes: 54 additions & 0 deletions Documentation/devicetree/bindings/sound/fsl,spdif.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Freescale Sony/Philips Digital Interface Format (S/PDIF) Controller

The Freescale S/PDIF audio block is a stereo transceiver that allows the
processor to receive and transmit digital audio via an coaxial cable or
a fibre cable.

Required properties:

- compatible : Compatible list, must contain "fsl,imx35-spdif".

- reg : Offset and length of the register set for the device.

- interrupts : Contains the spdif interrupt.

- dmas : Generic dma devicetree binding as described in
Documentation/devicetree/bindings/dma/dma.txt.

- dma-names : Two dmas have to be defined, "tx" and "rx".

- clocks : Contains an entry for each entry in clock-names.

- clock-names : Includes the following entries:
"core" The core clock of spdif controller
"rxtx<0-7>" Clock source list for tx and rx clock.
This clock list should be identical to
the source list connecting to the spdif
clock mux in "SPDIF Transceiver Clock
Diagram" of SoC reference manual. It
can also be referred to TxClk_Source
bit of register SPDIF_STC.

Example:

spdif: spdif@02004000 {
compatible = "fsl,imx35-spdif";
reg = <0x02004000 0x4000>;
interrupts = <0 52 0x04>;
dmas = <&sdma 14 18 0>,
<&sdma 15 18 0>;
dma-names = "rx", "tx";

clocks = <&clks 197>, <&clks 3>,
<&clks 197>, <&clks 107>,
<&clks 0>, <&clks 118>,
<&clks 62>, <&clks 139>,
<&clks 0>;
clock-names = "core", "rxtx0",
"rxtx1", "rxtx2",
"rxtx3", "rxtx4",
"rxtx5", "rxtx6",
"rxtx7";

status = "okay";
};
3 changes: 3 additions & 0 deletions sound/soc/fsl/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
config SND_SOC_FSL_SSI
tristate

config SND_SOC_FSL_SPDIF
tristate

config SND_SOC_FSL_UTILS
tristate

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/fsl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ obj-$(CONFIG_SND_SOC_P1022_RDK) += snd-soc-p1022-rdk.o

# Freescale PowerPC SSI/DMA Platform Support
snd-soc-fsl-ssi-objs := fsl_ssi.o
snd-soc-fsl-spdif-objs := fsl_spdif.o
snd-soc-fsl-utils-objs := fsl_utils.o
snd-soc-fsl-dma-objs := fsl_dma.o
obj-$(CONFIG_SND_SOC_FSL_SSI) += snd-soc-fsl-ssi.o
obj-$(CONFIG_SND_SOC_FSL_SPDIF) += snd-soc-fsl-spdif.o
obj-$(CONFIG_SND_SOC_FSL_UTILS) += snd-soc-fsl-utils.o
obj-$(CONFIG_SND_SOC_POWERPC_DMA) += snd-soc-fsl-dma.o

Expand Down
Loading

0 comments on commit a2388a4

Please sign in to comment.