LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Jyri Sarha <jsarha@ti.com>,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] Documentation: of: Document audio graph bindings
Date: Wed, 21 Jan 2015 20:10:17 +0100	[thread overview]
Message-ID: <963571538ba210b4f2099949e03943ae1e9a8541.1421868426.git.moinejf@free.fr> (raw)
In-Reply-To: <cover.1421868426.git.moinejf@free.fr>

This patch adds a document describing common OF bindings for audio devices.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
 .../devicetree/bindings/sound/audio-interfaces.txt | 101 +++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-interfaces.txt

diff --git a/Documentation/devicetree/bindings/sound/audio-interfaces.txt b/Documentation/devicetree/bindings/sound/audio-interfaces.txt
new file mode 100644
index 0000000..4eddb3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-interfaces.txt
@@ -0,0 +1,101 @@
+Common bindings for audio device graphs
+
+The graph of the audio ports follows the common binding for device graphs
+defined in Documentation/devicetree/bindings/graph.txt.
+
+Here are described only the audio specific properties.
+
+Port required properties:
+
+- port-type: "i2s" or "spdif"
+
+Port optional property:
+
+- reg: numeric value which defines how the port is wired to the device.
+	This value depends on the device. Usually, it is the content
+	of the device register which controls the audio pins.
+
+Port required nodes:
+
+- at least one 'endpoint' node must be specified.
+
+
+Example:
+
+The board contains an audio controller with two outputs:
+- the S/PDIF output is connected to two devices:
+	- a S/PDIF optical output
+	- a HDMI transmitter.
+- the I2S output is connected to an other audio input of the HDMI transmitter.
+
+	/* audio controller */
+	&audio1 {
+		status = "okay";
+		...
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* S/PDIF output */
+		port@0 {
+			port-type = "spdif";
+			audio1_spdif0: endpoint@0 {
+				remote-endpoint = <&spdif_out>;
+			};
+			audio1_spdif1: endpoint@1 {
+				remote-endpoint = <&tda998x_spdif>;
+			};
+		};
+
+		/* I2S output */
+		port@1 {
+			port-type = "i2s";
+			audio1_i2s: endpoint {
+				remote-endpoint = <&tda998x_i2s>;
+			};
+		};
+	};
+
+	/* optical output */
+	spdif_codec: spdif-codec {
+		...
+		port {
+			port-type = "spdif";
+			spdif_out: endpoint {
+				remote-endpoint = <&audio1_spdif0>;
+			};
+		};
+	};
+
+	/* HDMI transmitter */
+	hdmi: hdmi-encoder {
+		...
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* video input */
+		port@230145 {
+			port-type = "rgb";
+			reg = <0x230145>;
+			hdmi_0: endpoint {
+				remote-endpoint = <&lcd0_0>;
+			};
+		};
+
+		/* audio input I2S on AP1 */
+		port@3 {
+			port-type = "i2s";
+			reg = <0x03>;
+			tda998x_i2s: endpoint {
+				remote-endpoint = <&audio1_i2s>;
+			};
+		};
+
+		/* audio input S/PDIF on AP2 */
+		port@4 {
+			port-type = "spdif";
+			reg = <0x04>;
+			tda998x_spdif: endpoint {
+				remote-endpoint = <&audio1_spdif1>;
+			};
+		};
+	};
-- 
2.1.4


      parent reply	other threads:[~2015-01-21 19:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 19:27 [PATCH v2 0/3] ASoC: add audio card creation from graph of ports in DT Jean-Francois Moine
2015-01-20 18:47 ` [PATCH v2 1/3] ASoC: core: export snd_soc_get_dai_name Jean-Francois Moine
2015-01-20 19:16 ` [PATCH v2 3/3] ASoC: add generic dt-card support Jean-Francois Moine
2015-01-21 20:14   ` [alsa-devel] " Lars-Peter Clausen
2015-01-22  8:07     ` Jean-Francois Moine
2015-01-22 19:00       ` Mark Brown
2015-01-22 19:25       ` Lars-Peter Clausen
2015-01-23 12:15         ` Jean-Francois Moine
2015-01-23 13:56           ` Lars-Peter Clausen
2015-01-23 17:40             ` Mark Brown
2015-01-23 18:34             ` Jean-Francois Moine
2015-01-23 19:13               ` Mark Brown
2015-01-24  7:30                 ` Jean-Francois Moine
2015-02-03 16:47                   ` Mark Brown
2015-02-03 19:31                     ` Jean-Francois Moine
2015-02-07  8:33                       ` Mark Brown
2015-01-24 11:27               ` Lars-Peter Clausen
2015-01-24 13:18                 ` Jean-Francois Moine
2015-01-26 11:53                   ` Lars-Peter Clausen
2015-01-26 18:22                     ` Jean-Francois Moine
2015-01-21 19:10 ` Jean-Francois Moine [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=963571538ba210b4f2099949e03943ae1e9a8541.1421868426.git.moinejf@free.fr \
    --to=moinejf@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jsarha@ti.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --subject='Re: [PATCH v2 2/3] Documentation: of: Document audio graph bindings' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).