From patchwork Tue Jul 17 15:43:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10529943 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 F1EFA6062E for ; Tue, 17 Jul 2018 15:44:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2A2A29401 for ; Tue, 17 Jul 2018 15:44:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6D082942C; Tue, 17 Jul 2018 15:44:06 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 72F9629402 for ; Tue, 17 Jul 2018 15:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JRgCrkM/2mhBmjdiE9+dPNZgsXC/yniUeCYbVyHBDpI=; b=h9NQQ4yqGTEkEe88B7HYGfteaV Tv0zvE0OuHJwdztOjs0+1Ry1tKmr+hu+2BBOUDIf+BMJ6hgpWsBEoyPJqt0z27uR5JV3EWcgueyA4 1GwrftS43MmY7oOibyE7MfU2AUcqtX2CxnADslGYKSGIzSz9gCTAUZCnNDgSdUUCx4oGfOxVOjWxB BFp9XcQp1IclY6hHYPple5ed/xs6fY4gFEpdxLVrPMu2LUQ4fP/wO9DNbIi3ddYwiCqB07IH6Gwdn Kc6MThJvCKVsxlQ8jvyyGIWjOK7V9uVdZbDxaEyBdQoGkHLqKGuATYLac1II+tjC3HQ21ODkkHrg+ T3LPDPDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffS8z-0000Ru-2v; Tue, 17 Jul 2018 15:44:05 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffS8Z-00085a-Qt for linux-amlogic@lists.infradead.org; Tue, 17 Jul 2018 15:43:45 +0000 Received: by mail-wr1-x443.google.com with SMTP id a3-v6so1735053wrt.2 for ; Tue, 17 Jul 2018 08:43:29 -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=N6GTffq4VROTez5mVO69vAu2OUH/qIKN2B9n0MrCC48=; b=gZXCDJkbbxdMAlykgi/nKAkQ+iKUivQ0erasXVwOHa1GW1ovrHFawFOioCSN7CYHxz mFEQj91aGz86zm8Q960qzh3Mgz0Q6azu0TdcMALA1ViqJtQhGo0a4oh3PfL48IzIMxc/ S+OAgmcUP474AxciyUlA9Owfzm4vlJtvdTfXDKoBZjYRmr1ddT3lAFLHSFZNEUqZi35t MniAqp8LlEQE1tgPbCd+qPDShQd8FVf6leJjrioudKW5UfBX/1UtDPxagpUlXrPnAXQW 0Qig/bfpwUSAKJuDmH4MRM+hbd9SOCxF4qroZK4ZjtIO4Xnv10RAvU/lNmh+po3b5ME6 W8fg== 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=N6GTffq4VROTez5mVO69vAu2OUH/qIKN2B9n0MrCC48=; b=JeJjfzoFeS8gm7qcBma4ODflUEGPgf5Z6J5dghC8MuBDa4PnmJFz1HQ4n3/A6p6YG5 SCvT4YYERyffK9gLALp+ERotLV0JwluwA7NzJ5fRScg01tMNHLIVolt12GwZYdKCly9I nIpRXTcfZyLm4vn+to5ZIESfeKdYtofVDQAGwjxYG5rAJQghNCSwJ9aMlfkKLDcLozaH vXQf9z/+32r1VZeJTpky0U2Zo9I18GYhplZ1EE8MOTbKycwHMw0zp8Dt0kdwCVIFvqzm scte976pmrv2TtZUJvFzo6/7EvJH/lZO4buG5nI30u+uF+7SgIuHqVYo9aeIrPq7QuLW EaEQ== X-Gm-Message-State: AOUpUlETMrGXIcw0Iyk3NHTtKkHDMYK+bKaz1A3TakHwMvOKHvzPnP/A aRVyUhNv126BSDzpMFkPYTnT7g== X-Google-Smtp-Source: AAOMgpdSOVL+n3XzlN8eRWD7jgRCHdlYLcJ7T0rlUQ1Oko7RXudoNOa08vutrv8nwRbgLfCrfBETkw== X-Received: by 2002:adf:f210:: with SMTP id p16-v6mr1827816wro.184.1531842208515; Tue, 17 Jul 2018 08:43:28 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id s12-v6sm17598252wmc.2.2018.07.17.08.43.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 08:43:27 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood , Kevin Hilman , Carlo Caione Subject: [PATCH RESEND 14/15] ASoC: meson: add axg sound card DT bindings documentation Date: Tue, 17 Jul 2018 17:43:03 +0200 Message-Id: <20180717154304.9973-15-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180717154304.9973-1-jbrunet@baylibre.com> References: <20180717154304.9973-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180717_084340_333108_57F71E99 X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the DT bindings 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>; + }; + }; +};