From patchwork Wed Jan 21 19:10:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 5680161 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 47812C058D for ; Wed, 21 Jan 2015 19:34:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84009204AF for ; Wed, 21 Jan 2015 19:34:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E61E3204D3 for ; Wed, 21 Jan 2015 19:34:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B9D062651F0; Wed, 21 Jan 2015 20:34:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, NO_DNS_FOR_FROM,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 50636265171; Wed, 21 Jan 2015 20:33:22 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id CC501260490; Wed, 21 Jan 2015 20:33:19 +0100 (CET) Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by alsa0.perex.cz (Postfix) with ESMTP id 8C355260490 for ; Wed, 21 Jan 2015 20:32:52 +0100 (CET) Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:21c:dfff:fe9f:57fb]) by smtp6-g21.free.fr (Postfix) with ESMTP id 94DA08228B; Wed, 21 Jan 2015 20:30:44 +0100 (CET) X-Mailbox-Line: From 963571538ba210b4f2099949e03943ae1e9a8541 Mon Sep 17 00:00:00 2001 Message-Id: <963571538ba210b4f2099949e03943ae1e9a8541.1421868426.git.moinejf@free.fr> In-Reply-To: References: From: Jean-Francois Moine Date: Wed, 21 Jan 2015 20:10:17 +0100 To: Mark Brown , Kuninori Morimoto Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Russell King - ARM Linux , linux-kernel@vger.kernel.org, Jyri Sarha Subject: [alsa-devel] [PATCH v2 2/3] Documentation: of: Document audio graph bindings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a document describing common OF bindings for audio devices. Signed-off-by: Jean-Francois Moine --- .../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>; + }; + }; + };