From patchwork Tue Jul 17 15:36:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10529893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F2AFE60545 for ; Tue, 17 Jul 2018 15:43:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E18AF29629 for ; Tue, 17 Jul 2018 15:43:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF5B1294BD; Tue, 17 Jul 2018 15:43:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A88A295A2 for ; Tue, 17 Jul 2018 15:43:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id ECFE9267871; Tue, 17 Jul 2018 17:37:27 +0200 (CEST) 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 21A22267820; Tue, 17 Jul 2018 17:37:08 +0200 (CEST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by alsa0.perex.cz (Postfix) with ESMTP id 56EB22677F9 for ; Tue, 17 Jul 2018 17:37:05 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id s9-v6so1974673wmh.3 for ; Tue, 17 Jul 2018 08:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Gf0R91kG2d7lDzaIoH7oyEyl99OABalSiO8tr5ySzv0=; b=fEIMBEKO2NmQ+VzmN6lPPq6zgOaL8BDCq0t7FKR550zQSX/s1c1B9HdXQyXL6gXBsz vwczuUhVVvq1Q74r7hGfbUV6f6/j3Kwj4kMnjTYyBIvS5VOVvG8Et/1CpukU2f3pT4BR FIe/2M314l2Tewx8QRpC4qi1vt4I/TJfO2m/qk1VTk0JDaqB6jQAb/U5ybnNeA18ra2U Lrq5AxOs9ijPKaUekbwqlWmWd8xQNDj7ioS6ElSFx241YI0GfAxtUNl/0qobmozI+llb LZ7cRq60UtHDwTqZfRBBicDwaOlxL3Ppf9IRjAsI26CRyLnVklSvWQtzA3kO67U8/OdR e/tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Gf0R91kG2d7lDzaIoH7oyEyl99OABalSiO8tr5ySzv0=; b=SeNhTFAKa7tcAzSarKMcyxz91zxTI+36iBZJA3fncq0E9/Q5TGC+xZsdOvYkC/AVN9 KDbCZmmyLylIrJBDjNJY75iytC+musBwxjkjamCt4W7SRwEhCCX3ALs8Muoh7J/k0rh9 QsXTo98Y63+cdM0uUJMvo5BpXHoAcAQAxEMWyfhvSTInv/CEOVvXAVW3Xb66TljfCqPt JBdVXe3VBUvbAfkKBpY6E4wnffWxqIGZnTbhp5lJj3Xkgu81hb5I5A/oMaRA+u0Va0mO Cg6gCsEwEtJQ9Y9MAeOhQOCAKdqX6n7jecbI7Oha/q6EicCSSzWWGaUwNsIfDQE/g/RP 7ZQw== X-Gm-Message-State: AOUpUlFYs9L0ZFqgSvO6wRDLlS/rHIYNeRdOGnz9OONjCHgK9osmejdt f011jjHBEUXsOBFKMaSqlX3dow== X-Google-Smtp-Source: AAOMgpcmOuVfeysJeGeBXx3jaZVMwa7yZh2pIS3GX8TzPCGJqGMIhUBukOk39i70LkptFvredyOoOg== X-Received: by 2002:a1c:ea53:: with SMTP id i80-v6mr1830568wmh.113.1531841825082; Tue, 17 Jul 2018 08:37:05 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id h12-v6sm16971464wmb.3.2018.07.17.08.37.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 08:37:04 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood , Kevin Hilman , Carlo Caione Date: Tue, 17 Jul 2018 17:36:41 +0200 Message-Id: <20180717153643.8806-18-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180717153643.8806-1-jbrunet@baylibre.com> References: <20180717153643.8806-1-jbrunet@baylibre.com> Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet Subject: [alsa-devel] [PATCH 14/15] ASoC: meson: add axg sound card DT binding documentation 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 Add the DT binding documentation for axg sound card Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-sound-card.txt | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt new file mode 100644 index 000000000000..39e005da0407 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt @@ -0,0 +1,124 @@ +Amlogic AXG sound card: + +Required properties: + +- compatible: "amlogic,axg-sound-card" +- amlogic,name : User specified audio sound card name, one string + +Optional properties: + +- amlogic,aux-devs : List of phandles pointing to auxiliary devices +- amlogic,widgets : Please refer to widgets.txt. +- amlogic,routing : A list of the connections between audio components. + +Subnodes: + +- amlogic,dai-link: Container for dai-link level properties and the + CODEC sub-nodes. There should be at least one (and + probably) subnode of this type. + +Required dai-link properties: + +- sound-dai: phandle and port of the CPU DAI. + +Required TDM Backend dai-link properties: +- dai-format : CPU/CODEC common audio format + +Optional TDM Backend dai-link properties: +- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks +- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks + When omitted, mask is assumed to have to no + slots. A valid must have at one slot, so at + least one these mask should be provided with + an enabled slot. +- dai-tdm-slot-num : Please refer to tdm-slot.txt. + If omitted, slot number is set to accommodate the largest + mask provided. +- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted. +- mclk-fs : Multiplication factor between stream rate and mclk + +Backend dai-link subnodes: + +- codec: dai-link representing backend links should have at least one subnode. + One subnode for each codec of the dai-link. + dai-link representing frontend links have no codec, therefore have no + subnodes + +Required codec subnodes properties: + +- sound-dai: phandle and port of the CODEC DAI. + +Optional codec subnodes properties: + +- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt. +- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt. + +Example: + +sound { + compatible = "amlogic,axg-sound-card"; + amlogic,name = "AXG-S420"; + amlogic,aux-devs = <&tdmin_a>, <&tdmout_c>; + amlogic,widgets = "Line", "Lineout", + "Line", "Linein", + "Speaker", "Speaker1 Left", + "Speaker", "Speaker1 Right"; + "Speaker", "Speaker2 Left", + "Speaker", "Speaker2 Right"; + amlogic,routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "TDM_C Playback", "TDMOUT_C OUT", + "TDMIN_A IN 2", "TDM_C Capture", + "TDMIN_A IN 5", "TDM_C Loopback", + "TODDR_A IN 0", "TDMIN_A OUT", + "Lineout", "Lineout AOUTL", + "Lineout", "Lineout AOUTR", + "Speaker1 Left", "SPK1 OUT_A", + "Speaker2 Left", "SPK2 OUT_A", + "Speaker1 Right", "SPK1 OUT_B", + "Speaker2 Right", "SPK2 OUT_B", + "Linein AINL", "Linein", + "Linein AINR", "Linein"; + + amlogic,dai-link@0 { + sound-dai = <&frddr_a>; + }; + + amlogic,dai-link@1 { + sound-dai = <&toddr_a>; + }; + + amlogic,dai-link@2 { + sound-dai = <&tdmif_c>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + dai-tdm-slot-rx-mask-1 = <1 1>; + mclk-fs = <256>; + + codec@0 { + sound-dai = <&lineout>; + }; + + codec@1 { + sound-dai = <&speaker_amp1>; + }; + + codec@2 { + sound-dai = <&speaker_amp2>; + }; + + codec@3 { + sound-dai = <&linein>; + }; + + }; + + amlogic,dai-link@4 { + sound-dai = <&spdifout>; + + codec { + sound-dai = <&spdif_dit>; + }; + }; +};