From patchwork Thu Sep 5 12:01:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132875 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05C93112C for ; Thu, 5 Sep 2019 12:01:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D74EC22CEC for ; Thu, 5 Sep 2019 12:01:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sDFeZs3/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="i4HxGKUM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D74EC22CEC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=l4NN9g2Zvmx2mG6sfJwLqnCDkz1e0AofTT9vJuOWtIA=; b=sDFeZs3/cq5sok tF44Y6y8ZCjYNojB4Vx4kw4PcC21gjXfVYo6OEITyDbUO9PWSblOVo4TIbuuz9uh94OTx2uCDoGIw 9RBQJL8HOtkssQ8CpQHHRytuE8nikK/DSreWEcOcdlX+thgAmhZmjObefnpFCvSK3XPbBsvWrzrDR zjks8mpgx/okqEjMEixy8oc725V1iyF6mcHf8mYTuedAlLbDKCStn6ODjk8Qzcm0RgS40YL2a5LoG ceoCJNg1ul6ZwnADz3EhVahNQ2o9/9Eq6/QBDGGWD1qtmNzkNCmKAzd4CYpjk6XbD364zpPfSZj5B KjTt5FnYTqdMfcL23YVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSF-00083T-BY; Thu, 05 Sep 2019 12:01:35 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSB-00080J-Ci for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:33 +0000 Received: by mail-wm1-x341.google.com with SMTP id r195so2676341wme.2 for ; Thu, 05 Sep 2019 05:01:30 -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 :mime-version:content-transfer-encoding; bh=frXECa7oB40w9WZ9n2ecYzcH89/QDSFs1zSP6u+7Qvk=; b=i4HxGKUMtgFYoZ5e+oi5v+JhlTAUa42yN4QdLJHfvLUZyZvd+x6GDzYM8VAmo50xRn NRMPhKfVV9dJhhrhUxM7Hvq7YhR7+HCGoqV4SpkB/isItxpnJHFjtG0ttT1tIS8JU9MJ I9/XLbDxxTLI2rNtvYwbXmiYZUqfHX6W0Jef+ZURbKfOnjNzZ3Hyhz84kw7aOrlv5Fiu Q0EseEc5xuJHTwMboJ5tDsZhWWE7ASGCU83RjCI5yHIGLO6CUFH9ofQTFDij2KaSdHUl sVwcbhWVPWSyyZWejd9g2GuqseEp2/FRfl17WRUgI3ZwWeQtFupyorp5d1hIoBQaRfVv hm1A== 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:mime-version:content-transfer-encoding; bh=frXECa7oB40w9WZ9n2ecYzcH89/QDSFs1zSP6u+7Qvk=; b=R3LRxter7ciT3/k2kCwuV5fRxbasF7qW4HFMV2LHeuDzSxz9OEtHDilyZbbkVvjnB6 oGOQQRKGgIRGP03rN1CJC+tGTKutcQolOpGRGIJBZwpFsGdE3e533w45BgPV/Pe97pM+ wFyOYgx7VQkNxPAj23mUKHmksZPbazNaqJpnNbHmOyrhge+rv+J4R1/6I5ohr7x41WCy dfQlUi+TcLCtgj6ELQsCXyrJ2saOfy6JLv3PuzNaVpjH3jiKODQh2jOXpZEgzuRy4Kba FIRnfxen3tcSGLSOk6DSvmPImJC9gm382nJsxlSeFMgJ1uCMMyHv+7bAAtDUWtrILY57 J6Tg== X-Gm-Message-State: APjAAAUXcxAxiOYZr+qDsZbO9wdQj6B/r+s4MLPIXHqAxZaNBpfb6LeZ XmUYNouas8JvBdh5vaACPSSVTaq+3O2LFQ== X-Google-Smtp-Source: APXvYqxA/Q9whlszOMfcSkbW9Mrtlo0RubDAdo+i8gx27YCkWw9SpbgHeHqvHsmJM0vvSdovJDDBnA== X-Received: by 2002:a7b:cd97:: with SMTP id y23mr2422292wmj.74.1567684889405; Thu, 05 Sep 2019 05:01:29 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:28 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 1/8] ASoC: meson: add sm1 compatibles Date: Thu, 5 Sep 2019 14:01:13 +0200 Message-Id: <20190905120120.31752-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050131_429150_E0D7830E X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org Document the compatible strings of the audio devices of the sm1 SoC family Signed-off-by: Jerome Brunet --- Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt | 4 +++- Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt | 3 ++- .../devicetree/bindings/sound/amlogic,axg-spdifin.txt | 3 ++- .../devicetree/bindings/sound/amlogic,axg-spdifout.txt | 3 ++- .../devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt | 4 +++- .../devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt | 3 ++- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt index 4330fc9dca6d..4b17073c8f8c 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt @@ -4,7 +4,9 @@ Required properties: - compatible: 'amlogic,axg-toddr' or 'amlogic,axg-toddr' or 'amlogic,g12a-frddr' or - 'amlogic,g12a-toddr' + 'amlogic,g12a-toddr' or + 'amlogic,sm1-frddr' or + 'amlogic,sm1-toddr' - reg: physical base address of the controller and length of memory mapped region. - interrupts: interrupt specifier for the fifo. diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt index 73f473a9365f..b3f097976e6b 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt @@ -2,7 +2,8 @@ Required properties: - compatible: 'amlogic,axg-pdm' or - 'amlogic,g12a-pdm' + 'amlogic,g12a-pdm' or + 'amlogic,sm1-pdm' - reg: physical base address of the controller and length of memory mapped region. - clocks: list of clock phandle, one for each entry clock-names. diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt index 0b82504fa419..62e5bca71664 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt @@ -2,7 +2,8 @@ Required properties: - compatible: 'amlogic,axg-spdifin' or - 'amlogic,g12a-spdifin' + 'amlogic,g12a-spdifin' or + 'amlogic,sm1-spdifin' - interrupts: interrupt specifier for the spdif input. - clocks: list of clock phandle, one for each entry clock-names. - clock-names: should contain the following: diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt index 826152730508..d38aa35ec630 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt @@ -2,7 +2,8 @@ Required properties: - compatible: 'amlogic,axg-spdifout' or - 'amlogic,g12a-spdifout' + 'amlogic,g12a-spdifout' or + 'amlogic,sm1-spdifout' - clocks: list of clock phandle, one for each entry clock-names. - clock-names: should contain the following: * "pclk" : peripheral clock. diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt index 8835a43edfbb..5996c0cd89c2 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt @@ -4,7 +4,9 @@ Required properties: - compatible: 'amlogic,axg-tdmin' or 'amlogic,axg-tdmout' or 'amlogic,g12a-tdmin' or - 'amlogic,g12a-tdmout' + 'amlogic,g12a-tdmout' or + 'amlogic,sm1-tdmin' or + 'amlogic,sm1-tdmout - reg: physical base address of the controller and length of memory mapped region. - clocks: list of clock phandle, one for each entry clock-names. diff --git a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt index aa6c35570d31..173a95045540 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt @@ -1,7 +1,8 @@ * Amlogic HDMI Tx control glue Required properties: -- compatible: "amlogic,g12a-tohdmitx" +- compatible: "amlogic,g12a-tohdmitx" or + "amlogic,sm1-tohdmitx" - reg: physical base address of the controller and length of memory mapped region. - #sound-dai-cells: should be 1. From patchwork Thu Sep 5 12:01:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132877 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D11491709 for ; Thu, 5 Sep 2019 12:01:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC52522CEC for ; Thu, 5 Sep 2019 12:01:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PoVJ7Rlt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="KvoyxWVL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC52522CEC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=sTXPAOLjsctQMvY0mmDGJoUIPBoqI7REfHHNXAmyf20=; b=PoVJ7RltzMNhT3 fMnLEZ0U12m2Y3Ueg1uEPwVbkgHNE0BBq1EA5THLs98n/L6lhlVCFaI3c6Xaq+6cN0Iflm7lnsQ9I jokX+QDRM1Dc+ffMsySArJsvftmI//M3b+kq9o6+BvllPMfNzovJi+m8Zgat8n0SxtZdQVNaksqIp unskZkI1lWjvGvtLZ+2m0z5m/Xw727qVA7NA/nDdKS+2yRfbhJ7HJlq3TdGUJVciaRZqSLP2dlZsj 4EzIc2xt4uqh+4J1P4sDj6hdkMAbGVBSpKkv7YYtRaTwtezZqi1bzU6kehjqdpXuy4co4u4JqZeJY bMLcKOiXM8n51cHjjaXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSH-000862-7a; Thu, 05 Sep 2019 12:01:37 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSC-00080N-CO for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:34 +0000 Received: by mail-wr1-x42c.google.com with SMTP id l11so2453573wrx.5 for ; Thu, 05 Sep 2019 05:01:31 -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 :mime-version:content-transfer-encoding; bh=JtJp8hwFJlC+ElDAvP+29EWq9+aj8xhCfyxpFjJGuMU=; b=KvoyxWVLk27MSxWet5eXVTEvqpz7OZQMYgLSKMOIRVRN8rsctD7bnPqdMwnLL3zfea F9a+I+VnlL2sjNeccOjyir/GffR3nHzT5+vvnS40miEitiIwqkwWFePtCCIQQe+6pGKS phg09gOPaLHtB62WhhzohCzkg6ZYAahehhGLmE1UqmkLWSecAcgvcHOUZ2AeMgEUfg7h pSxePwVlV20zeOmm+F3v5RlPjQSSF0OaJlZWhTzoptuJ27kovmuiQ9MFH+B98IzX6gWH Dp/KxNn2aUJZMh96iRGVoPVvSRBn1dVIRDwacVjbTBbNBKoodXk4z/k0x7sTcek7lcjl pgyQ== 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:mime-version:content-transfer-encoding; bh=JtJp8hwFJlC+ElDAvP+29EWq9+aj8xhCfyxpFjJGuMU=; b=alpFPnVmDXficT58pPJdjEI7aUbDg3XWkSEEH/f4FF/5G5zvHvAnvfbnIZNZTWGCYt CksFfPh/YUVgY4puvTcL67PdPkkq8x+lxH2VwRpHua2BH8K6/JIAG+uooSurAWbHLTgI p0u9MzmJ8eO0jfypnDpTr4QeBzacs3JR/gDdwavJSZi6aQcVKrIQc/X4f/b95B9bgzy+ 4jlQQSKv3DmBNH94D89UVAWCxaI3zz8kYlsG9tQCSoz6MEUqWtZS+nt/GgQKLxIuigkr Vf50xwNJlfOll+ZT7sPrnL5dwCFWIhIerhRIJBnt5h13atyWJzzTK/YOPUveJ8/ZFqQX jcUQ== X-Gm-Message-State: APjAAAVCduag9z3BTiqNMQcGdg+PqpuXLUVAmqWG2/JuSinchrWCtFfm tCkPzj1SXlcoXC+VRuuAnmn+Ag== X-Google-Smtp-Source: APXvYqww5BSzZzo/x/XBRxOD6dQ2QeJpWjyU0lTTUfZ8RlpNitNFN1NvIC/CeZ7zZgHLX/5AzWLHbQ== X-Received: by 2002:adf:f543:: with SMTP id j3mr2444374wrp.243.1567684890446; Thu, 05 Sep 2019 05:01:30 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:29 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 2/8] ASoC: meson: add reset binding Date: Thu, 5 Sep 2019 14:01:14 +0200 Message-Id: <20190905120120.31752-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050132_418357_7F29997F X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The g12a audio subsystem, which is a derivative of the axg subsystem, provides a dedicated reset line for each of the audio components. The axg did not provide that and it is unclear if/when these reset are required. The reset already helped solve a channel mapping issue on the tdm formatter devices. Let's add the reset binding for the other components, so we can describe this in DT. We'll use it later on in the driver when/if needed. Signed-off-by: Jerome Brunet --- Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt | 5 ++++- Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt | 3 +++ .../devicetree/bindings/sound/amlogic,axg-spdifin.txt | 3 +++ .../devicetree/bindings/sound/amlogic,axg-spdifout.txt | 3 +++ .../devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt index 4b17073c8f8c..3080979350a0 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt @@ -12,7 +12,10 @@ Required properties: - interrupts: interrupt specifier for the fifo. - clocks: phandle to the fifo peripheral clock provided by the audio clock controller. -- resets: phandle to memory ARB line provided by the arb reset controller. +- resets: list of reset phandle, one for each entry reset-names. +- reset-names: should contain the following: + * "arb" : memory ARB line (required) + * "rst" : dedicated device reset line (optional) - #sound-dai-cells: must be 0. Example of FRDDR A on the A113 SoC: diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt index b3f097976e6b..716878107a24 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt @@ -13,6 +13,9 @@ Required properties: * "sysclk" : dsp system clock - #sound-dai-cells: must be 0. +Optional property: +- resets: phandle to the dedicated reset line of the pdm input. + Example of PDM on the A113 SoC: pdm: audio-controller@ff632000 { diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt index 62e5bca71664..df92a4ecf288 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt @@ -11,6 +11,9 @@ Required properties: * "refclk" : spdif input reference clock - #sound-dai-cells: must be 0. +Optional property: +- resets: phandle to the dedicated reset line of the spdif input. + Example on the A113 SoC: spdifin: audio-controller@400 { diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt index d38aa35ec630..28381dd1f633 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt @@ -10,6 +10,9 @@ Required properties: * "mclk" : master clock - #sound-dai-cells: must be 0. +Optional property: +- resets: phandle to the dedicated reset line of the spdif output. + Example on the A113 SoC: spdifout: audio-controller@480 { diff --git a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt index 173a95045540..4e8cd7eb7cec 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt +++ b/Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt @@ -6,6 +6,7 @@ Required properties: - reg: physical base address of the controller and length of memory mapped region. - #sound-dai-cells: should be 1. +- resets: phandle to the dedicated reset line of the hdmitx glue. Example on the S905X2 SoC: @@ -13,6 +14,7 @@ tohdmitx: audio-controller@744 { compatible = "amlogic,g12a-tohdmitx"; reg = <0x0 0x744 0x0 0x4>; #sound-dai-cells = <1>; + resets = <&clkc_audio AUD_RESET_TOHDMITX>; }; Example of an 'amlogic,axg-sound-card': From patchwork Thu Sep 5 12:01:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132879 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C8EC17EF for ; Thu, 5 Sep 2019 12:01:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A29622CEC for ; Thu, 5 Sep 2019 12:01:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="md0E0RtY"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="hEH6ZzUL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A29622CEC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=kFGzGXt0KNFN9IIUZbpTNGIEYfBdKrUSG29+J5/5/eM=; b=md0E0RtY8iwBa2 lYnlSKWRyrnc0Yb+I2ifMhxvxW54IS0AmVERgplKqXrNeuH6B/LPvxPykbzJIT4TBEYFwxP+HJgha nzhB8VAVwN0vhXFWwS+Ouduugr2Wueemoz10H8yxs1VXhpMFLg/ZpoZD2b++xvEoPjv24dIx9G6sP 7dZh/eKnG0iraSdKoCZAxaAcOO3o/GnPhqSw3Fyxrs18tSHTeMhju1njp0YGTdzhpbS6ef7akLGCU swVKd5uh3lPSJPw34PEtm6XMOZoGkyp/13tfucK2TEwe6J4YzSTS8kJkfCB7D6O3KXx+4wZWW7qyC YlXk+MDPDlA1PC/c2GbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSJ-00088q-HD; Thu, 05 Sep 2019 12:01:39 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSD-00080l-9z for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:34 +0000 Received: by mail-wr1-x441.google.com with SMTP id w13so2447689wru.7 for ; Thu, 05 Sep 2019 05:01:32 -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 :mime-version:content-transfer-encoding; bh=cj+xRSKwyNiG3WxbYk3EzxKZy6mBMzhtFu6vqSlSsIE=; b=hEH6ZzULAcBUkR1Q6yIgBkAgn6572zSGLcHJzNX9o8GjeGom1qFmNHgIUE+FCVzH6m elgPgQsnkhGo7fWdGYHoiHnZtTDhBEVKxW722L5mrvmRjc73MzbyGD9yxrlHw7um4D0w WQqZ3yZk2Y0t8lg3+G1WHbyiXLfkYvCI5LMVHIuYQkIIojDtzaQML0pvjI+xGoe01mXg WgXNYc6VkUeNuo7wsCPWuH0wlvt1OZfepRl3qLGy1TO2nEkkumLhYUqr+NIHmiBRoZAV bINPVS81H26mFy0xV/bkolv4SWJdI7dbTkf5d1xOqwojLzDUdNDSH+NSvE3Oq5uF3Zxl KMIA== 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:mime-version:content-transfer-encoding; bh=cj+xRSKwyNiG3WxbYk3EzxKZy6mBMzhtFu6vqSlSsIE=; b=MILoHa0ejwC131r1CDSC4ZhDAZb4fasqPZIzWARTe87lb6PuWQlm52uxaEAe0WSqq1 ggvBGufY6wO3XsfUDRg1lyL1Uusz7lPY1HCO5IeFkS23UR4lvisfirMwkSATqmCYUkuW xYouH9UNIP44dxSdqSzA7vq60pSPGY1Y7bMXg0g4mEbHHI9NNUCrqbtiN1t9T6aBifED z+H6UMBIzOpyyijhPqIrpRFJ3NR/bpfTFsSp956erhoWETHD0oNtyGSH96zPpSZ7Iv51 os7HJ7Iq2aW0zBEw0ziNfc1F/Auxboo13Z34b/86KYI68ToXatcTpnT2VyaHk/Sl9dgr 21nQ== X-Gm-Message-State: APjAAAWwM3kDE6p6JMl0B4n6k+TEsCFhACFtPVpm7weiujkAD+/t/ZkS P+2KYMyjH1p8J5vO+UUX+GKCVw== X-Google-Smtp-Source: APXvYqziOr8Gaxr0aNjdG/0c+A5ueIJxf7uLcnCfDDYrzhPawEingY+F6Xn70XqHUHjwCEKumyPZiA== X-Received: by 2002:adf:f7c7:: with SMTP id a7mr2255564wrq.273.1567684891412; Thu, 05 Sep 2019 05:01:31 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:30 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 3/8] ASoC: meson: axg-frddr: expose all 8 outputs Date: Thu, 5 Sep 2019 14:01:15 +0200 Message-Id: <20190905120120.31752-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050133_345599_7AB4AC0A X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The FRDDR component, as it, has a maximum of 8 outputs. Depending on the SoC, these may not all be connected. Instead of decribing only the connected outputs of each SoC, describe them all and let ASoC routing do the rest. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-frddr.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/sound/soc/meson/axg-frddr.c b/sound/soc/meson/axg-frddr.c index 2b8807737b2b..0968e8375000 100644 --- a/sound/soc/meson/axg-frddr.c +++ b/sound/soc/meson/axg-frddr.c @@ -104,7 +104,7 @@ static struct snd_soc_dai_driver axg_frddr_dai_drv = { }; static const char * const axg_frddr_sel_texts[] = { - "OUT 0", "OUT 1", "OUT 2", "OUT 3" + "OUT 0", "OUT 1", "OUT 2", "OUT 3", "OUT 4", "OUT 5", "OUT 6", "OUT 7", }; static SOC_ENUM_SINGLE_DECL(axg_frddr_sel_enum, FIFO_CTRL0, CTRL0_SEL_SHIFT, @@ -120,6 +120,10 @@ static const struct snd_soc_dapm_widget axg_frddr_dapm_widgets[] = { SND_SOC_DAPM_AIF_OUT("OUT 1", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_OUT("OUT 2", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_OUT("OUT 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 7", NULL, 0, SND_SOC_NOPM, 0, 0), }; static const struct snd_soc_dapm_route axg_frddr_dapm_routes[] = { @@ -128,6 +132,10 @@ static const struct snd_soc_dapm_route axg_frddr_dapm_routes[] = { { "OUT 1", "OUT 1", "SINK SEL" }, { "OUT 2", "OUT 2", "SINK SEL" }, { "OUT 3", "OUT 3", "SINK SEL" }, + { "OUT 4", "OUT 4", "SINK SEL" }, + { "OUT 5", "OUT 5", "SINK SEL" }, + { "OUT 6", "OUT 6", "SINK SEL" }, + { "OUT 7", "OUT 7", "SINK SEL" }, }; static const struct snd_soc_component_driver axg_frddr_component_drv = { @@ -162,16 +170,12 @@ static struct snd_soc_dai_driver g12a_frddr_dai_drv = { .pcm_new = axg_frddr_pcm_new, }; -static const char * const g12a_frddr_sel_texts[] = { - "OUT 0", "OUT 1", "OUT 2", "OUT 3", "OUT 4", -}; - static SOC_ENUM_SINGLE_DECL(g12a_frddr_sel1_enum, FIFO_CTRL0, CTRL0_SEL_SHIFT, - g12a_frddr_sel_texts); + axg_frddr_sel_texts); static SOC_ENUM_SINGLE_DECL(g12a_frddr_sel2_enum, FIFO_CTRL0, CTRL0_SEL2_SHIFT, - g12a_frddr_sel_texts); + axg_frddr_sel_texts); static SOC_ENUM_SINGLE_DECL(g12a_frddr_sel3_enum, FIFO_CTRL0, CTRL0_SEL3_SHIFT, - g12a_frddr_sel_texts); + axg_frddr_sel_texts); static const struct snd_kcontrol_new g12a_frddr_out1_demux = SOC_DAPM_ENUM("Output Src 1", g12a_frddr_sel1_enum); @@ -211,6 +215,9 @@ static const struct snd_soc_dapm_widget g12a_frddr_dapm_widgets[] = { SND_SOC_DAPM_AIF_OUT("OUT 2", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_OUT("OUT 3", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_OUT("OUT 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 7", NULL, 0, SND_SOC_NOPM, 0, 0), }; static const struct snd_soc_dapm_route g12a_frddr_dapm_routes[] = { @@ -228,16 +235,25 @@ static const struct snd_soc_dapm_route g12a_frddr_dapm_routes[] = { { "OUT 2", "OUT 2", "SINK 1 SEL" }, { "OUT 3", "OUT 3", "SINK 1 SEL" }, { "OUT 4", "OUT 4", "SINK 1 SEL" }, + { "OUT 5", "OUT 5", "SINK 1 SEL" }, + { "OUT 6", "OUT 6", "SINK 1 SEL" }, + { "OUT 7", "OUT 7", "SINK 1 SEL" }, { "OUT 0", "OUT 0", "SINK 2 SEL" }, { "OUT 1", "OUT 1", "SINK 2 SEL" }, { "OUT 2", "OUT 2", "SINK 2 SEL" }, { "OUT 3", "OUT 3", "SINK 2 SEL" }, { "OUT 4", "OUT 4", "SINK 2 SEL" }, + { "OUT 5", "OUT 5", "SINK 2 SEL" }, + { "OUT 6", "OUT 6", "SINK 2 SEL" }, + { "OUT 7", "OUT 7", "SINK 2 SEL" }, { "OUT 0", "OUT 0", "SINK 3 SEL" }, { "OUT 1", "OUT 1", "SINK 3 SEL" }, { "OUT 2", "OUT 2", "SINK 3 SEL" }, { "OUT 3", "OUT 3", "SINK 3 SEL" }, { "OUT 4", "OUT 4", "SINK 3 SEL" }, + { "OUT 5", "OUT 5", "SINK 3 SEL" }, + { "OUT 6", "OUT 6", "SINK 3 SEL" }, + { "OUT 7", "OUT 7", "SINK 3 SEL" }, }; static const struct snd_soc_component_driver g12a_frddr_component_drv = { From patchwork Thu Sep 5 12:01:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132881 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9B7B112C for ; Thu, 5 Sep 2019 12:01:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9720C22CEC for ; Thu, 5 Sep 2019 12:01:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jdB26OUT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="DzwniM7S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9720C22CEC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=OdFBZSkXnajGo34xYK7Q+R6+0DL535sIGklIHlppSRQ=; b=jdB26OUTySeHfg rospWMkFejC8MfonOn8hEkMRPC+1UUVSXKT2j38iOhDxYrI6oH7VmZbMmcwXzTDpjBWEsVP2bc2QA H0TRAumC3xuosSjME95ygaBoECdQg8VxmQkuTSiTqHJPkmrjkmRHhjTlJF508Tfa7/su0sxAG8zyI bMCBkCdHiQz0a4MGKYIt8W8bKG2MkEP3/TxzRIykDgAVtB1DcFk1NGmxsMMt8tGoBHC0Sclbv3nkw 7rP6z5F7XPFXYwTpU1do2KqhTo3tDVixKyUyr+1cHWruuGP3ZQ2p99pWyRNHi+QTdtvCouZZdbTpN VFPTjbwIsaMvr7lpRoDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSM-0008CJ-5Z; Thu, 05 Sep 2019 12:01:42 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSE-000811-9Z for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:35 +0000 Received: by mail-wr1-x442.google.com with SMTP id s18so2472426wrn.1 for ; Thu, 05 Sep 2019 05:01:33 -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 :mime-version:content-transfer-encoding; bh=xyfe6twDn91vPCbiXX1zqgwt25Jhxxgzdbixh4MbER0=; b=DzwniM7S9e2dHldU3F+1DNyQh1GbrFBvALKFQRdXceZd7xAI6n3jUPUCOzCJ39+RDi J/h6MRpzGNtTE/lw14UHMVnmNAGdOEzU7cyD99NofWKpkbPsQOTE1+MDFwj25NmQc3aO W9KH3c2WRcRShGvbDNapGZ8QQDL4sFg+qd7j7Nzc514rBwmGbz2zA1L8LG/nLsogy/fA gbsccH4/iSxF0MbRsw1lImO1xy42xcxgf1z3Y5NcIUrEEWHcKDNlznQroP7+78TwZyWg d0nS6Jm0A0bQ3uda/ZmbM2ajPTylIKrRF9tkaXSX06wgn/nRJlzvISC8J8q1DNDX01Wb 8kfQ== 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:mime-version:content-transfer-encoding; bh=xyfe6twDn91vPCbiXX1zqgwt25Jhxxgzdbixh4MbER0=; b=b8LJ9cvhH1B17i3cxXLhILFjQKMioXhLjIAL/nLqpS4tXlkPZX642hzTsbnlyqOJFk TLGIXGDsimNn74mo1cRB0nQ9lmzHewyVY6FlDHGpBiZ8qWs0K7e2JF9kpJkmhvSutsbi 3WLryfRz3PxkDld1r4DG2p/u3XXf5NVAS+4YecgIOKCZDbBv+ntpy58meWcroB/HcdUQ IIUbyiqVJ703R2URlNvyG8lLLlty9AsqwXx2y8k+3MDG6JksRXTikQrgc9JZ0uPN5kci L+2pbYEEQCubvyftDIh9+jKAjuyalyBtjb6944bq9JvQq5uxqFwmi76P3GCk6HTOUzj1 d/6Q== X-Gm-Message-State: APjAAAUjzyetnsgZkImTTqAdq+0ms1Wn7cddDDlzlKXS5PQxYjqHzFua dFS+3u9xqOUTzyNh3daMhwtcNQ== X-Google-Smtp-Source: APXvYqwctgVu4tqOBuDPlYOZXUwUpykru62hEl6KkwzhkUaceLyj2F4nPnNTNrghrllnO/9ig8jY8A== X-Received: by 2002:a5d:4b41:: with SMTP id w1mr2142326wrs.23.1567684892350; Thu, 05 Sep 2019 05:01:32 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:31 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 4/8] ASoC: meson: axg-toddr: expose all 8 inputs Date: Thu, 5 Sep 2019 14:01:16 +0200 Message-Id: <20190905120120.31752-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050134_333228_2A3F0054 X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The TODDR component, as it, has a maximum of 8 input. Depending on the SoC, these may not all be connected or some input components may not be supported Instead of decribing only the connected inputs, describe them all and let ASoC routing do the rest. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-toddr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c index 4f63e434fad4..2e9a2e5862ce 100644 --- a/sound/soc/meson/axg-toddr.c +++ b/sound/soc/meson/axg-toddr.c @@ -142,16 +142,11 @@ static struct snd_soc_dai_driver axg_toddr_dai_drv = { }; static const char * const axg_toddr_sel_texts[] = { - "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", "IN 6" + "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", "IN 5", "IN 6", "IN 7" }; -static const unsigned int axg_toddr_sel_values[] = { - 0, 1, 2, 3, 4, 6 -}; - -static SOC_VALUE_ENUM_SINGLE_DECL(axg_toddr_sel_enum, FIFO_CTRL0, - CTRL0_SEL_SHIFT, CTRL0_SEL_MASK, - axg_toddr_sel_texts, axg_toddr_sel_values); +static SOC_ENUM_SINGLE_DECL(axg_toddr_sel_enum, FIFO_CTRL0, CTRL0_SEL_SHIFT, + axg_toddr_sel_texts); static const struct snd_kcontrol_new axg_toddr_in_mux = SOC_DAPM_ENUM("Input Source", axg_toddr_sel_enum); @@ -163,7 +158,9 @@ static const struct snd_soc_dapm_widget axg_toddr_dapm_widgets[] = { SND_SOC_DAPM_AIF_IN("IN 2", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_IN("IN 3", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 5", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_IN("IN 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 7", NULL, 0, SND_SOC_NOPM, 0, 0), }; static const struct snd_soc_dapm_route axg_toddr_dapm_routes[] = { @@ -173,7 +170,9 @@ static const struct snd_soc_dapm_route axg_toddr_dapm_routes[] = { { "SRC SEL", "IN 2", "IN 2" }, { "SRC SEL", "IN 3", "IN 3" }, { "SRC SEL", "IN 4", "IN 4" }, + { "SRC SEL", "IN 5", "IN 5" }, { "SRC SEL", "IN 6", "IN 6" }, + { "SRC SEL", "IN 7", "IN 7" }, }; static const struct snd_soc_component_driver axg_toddr_component_drv = { From patchwork Thu Sep 5 12:01:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132883 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3106D112C for ; Thu, 5 Sep 2019 12:01:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E45122CF7 for ; Thu, 5 Sep 2019 12:01:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dIk+Gmtv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="bZvoaN8k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E45122CF7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=kUlprcACeoLaTvEwvScjzzOpRW4T0mRWzMpPnJZUwgQ=; b=dIk+Gmtvap9OL+ DiOt2RbpSeA2N+Y1UpoWQuagQf0PLrTA38+gV6OFYPXwb3VL+UTzZAQpxa5U6JKDlAsATczvaW+Ar 7iuE9K0zf6m/TLNaQNg/OIMsrYxVXpOSMmMt08+G20YCnkhYA7I8vEPgPoss/UY+so+vuzXNuCpW/ 9IZoCD4cBLIyVGBpmVENBCWvlTEMDK3x0W5exhwbD6HoI4HfbdkeSelODmT8LDyiQ35DjlwOU05e4 RyuHDEiILbyCLC0vDMu4scPSS57AWSubPwr6fnzstA3EkeaaAzx0BMdXTvg2/n9dSjxWv3VaiOFxY aeDIJkgosMu2bXKBNplw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSP-0008Fx-H9; Thu, 05 Sep 2019 12:01:45 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSE-00081W-Ga for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:36 +0000 Received: by mail-wr1-x441.google.com with SMTP id i1so1872808wro.4 for ; Thu, 05 Sep 2019 05:01:34 -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 :mime-version:content-transfer-encoding; bh=cwIBL4UHh/W/g2VGAibAzry/ewI4tWE5Tv7d1Udm+yA=; b=bZvoaN8kfBlJr557WiU4RA17OFezviTWtWGEFddijqdVU2icYp6sMDiTVcTPidBX6c DIHAjpnJAcmHLrnFZ4SCWBMqfwSNPA1NnA8yl0ZoteP+Zw3TZFXQGtUBrwx/4WesE+ip K8l5xpQwNjyH09ZncYod4oeArbPlGvBNbiIXyi5cGMRqHo3u0Qd31ig+LcKga4Rzr7Pk mtgMJjp93GlGrUngM0v5BNPOMf2LjPL6qDKxbbHIJtr/esoKcy52bXW8876IpwjJTxqJ 2BkskNQ5IFxJNz6/DDQ/AwsWzTzwYmMq/0HNCUujKTaVPdYEM0CUmRBMVYJGBRzPu0Ym hDwQ== 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:mime-version:content-transfer-encoding; bh=cwIBL4UHh/W/g2VGAibAzry/ewI4tWE5Tv7d1Udm+yA=; b=qajzrvpvGw1ih7zYdUCaJuNZ87pC+g6/UAaZRs7wzbGAXbDsiryK7vWzfhpDeRqRGv wk4a+b6W+/EdsIMB5WKwDqwngYwSI3W5w2IAONo2ZcYfmqEjbnAt66a8AJyLVu60lB16 qxtAvo35KuhcfJoIoGotKgLFVjbDE9e9loB2AvJdfooUTj5XxAm60O+MNbLjNvJswuMM XJBANZIGrXfSYzKF7DL0bkZ0ddCK7rV3ZNOtCtD6LYRMjqD7IdKuBQ8nFHNnE7qShieT T1TMkLGNZGMN323hdcyyaJ5952NlxgsEWmtIWoT4b6JBGI2AP/+xfWq6fzDcVTKKPVvR tRaw== X-Gm-Message-State: APjAAAUkGc0bGpp9SuC+qqKc5RcRSXMAWTrASZ/bVJy6a4Ao8mdUWBCe UcIintGkEP24BIHAC/Z0lQnn4g== X-Google-Smtp-Source: APXvYqzwbqkVLLSjcIoOrfnAmDwBx+OFVpJhIzJAo2/JMbRNzWLPcZyCMfUZhDW8FQH66JXu0xVWRQ== X-Received: by 2002:a05:6000:128d:: with SMTP id f13mr2430516wrx.241.1567684893278; Thu, 05 Sep 2019 05:01:33 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:32 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 5/8] ASoC: meson: tdmin: expose all 16 inputs Date: Thu, 5 Sep 2019 14:01:17 +0200 Message-Id: <20190905120120.31752-6-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050134_631588_51F75296 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.8 UPPERCASE_50_75 message body is 50-75% uppercase X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The TDMIN component, as it, has a maximum of 16 input. Depending on the SoC, these may not all be connected. Instead of decribing only the connected inputs of each SoC, describe them all and let ASoC routing do the rest. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-tdmin.c | 47 +++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/sound/soc/meson/axg-tdmin.c b/sound/soc/meson/axg-tdmin.c index cb87f17f3e95..973d4c02ef8d 100644 --- a/sound/soc/meson/axg-tdmin.c +++ b/sound/soc/meson/axg-tdmin.c @@ -43,7 +43,8 @@ static const struct regmap_config axg_tdmin_regmap_cfg = { }; static const char * const axg_tdmin_sel_texts[] = { - "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", "IN 5", + "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", "IN 5", "IN 6", "IN 7", + "IN 8", "IN 9", "IN 10", "IN 11", "IN 12", "IN 13", "IN 14", "IN 15", }; /* Change to special mux control to reset dapm */ @@ -164,12 +165,22 @@ static int axg_tdmin_prepare(struct regmap *map, } static const struct snd_soc_dapm_widget axg_tdmin_dapm_widgets[] = { - SND_SOC_DAPM_AIF_IN("IN 0", NULL, 0, SND_SOC_NOPM, 0, 0), - SND_SOC_DAPM_AIF_IN("IN 1", NULL, 0, SND_SOC_NOPM, 0, 0), - SND_SOC_DAPM_AIF_IN("IN 2", NULL, 0, SND_SOC_NOPM, 0, 0), - SND_SOC_DAPM_AIF_IN("IN 3", NULL, 0, SND_SOC_NOPM, 0, 0), - SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0), - SND_SOC_DAPM_AIF_IN("IN 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 0", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 1", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 2", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 7", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 8", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 9", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 10", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 11", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 12", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 13", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 14", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 15", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_MUX("SRC SEL", SND_SOC_NOPM, 0, 0, &axg_tdmin_in_mux), SND_SOC_DAPM_PGA_E("DEC", SND_SOC_NOPM, 0, 0, NULL, 0, axg_tdm_formatter_event, @@ -178,12 +189,22 @@ static const struct snd_soc_dapm_widget axg_tdmin_dapm_widgets[] = { }; static const struct snd_soc_dapm_route axg_tdmin_dapm_routes[] = { - { "SRC SEL", "IN 0", "IN 0" }, - { "SRC SEL", "IN 1", "IN 1" }, - { "SRC SEL", "IN 2", "IN 2" }, - { "SRC SEL", "IN 3", "IN 3" }, - { "SRC SEL", "IN 4", "IN 4" }, - { "SRC SEL", "IN 5", "IN 5" }, + { "SRC SEL", "IN 0", "IN 0" }, + { "SRC SEL", "IN 1", "IN 1" }, + { "SRC SEL", "IN 2", "IN 2" }, + { "SRC SEL", "IN 3", "IN 3" }, + { "SRC SEL", "IN 4", "IN 4" }, + { "SRC SEL", "IN 5", "IN 5" }, + { "SRC SEL", "IN 6", "IN 6" }, + { "SRC SEL", "IN 7", "IN 7" }, + { "SRC SEL", "IN 8", "IN 8" }, + { "SRC SEL", "IN 9", "IN 9" }, + { "SRC SEL", "IN 10", "IN 10" }, + { "SRC SEL", "IN 11", "IN 11" }, + { "SRC SEL", "IN 12", "IN 12" }, + { "SRC SEL", "IN 13", "IN 13" }, + { "SRC SEL", "IN 14", "IN 14" }, + { "SRC SEL", "IN 15", "IN 15" }, { "DEC", NULL, "SRC SEL" }, { "OUT", NULL, "DEC" }, }; From patchwork Thu Sep 5 12:01:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132885 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 401041709 for ; Thu, 5 Sep 2019 12:01:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D73A22CF5 for ; Thu, 5 Sep 2019 12:01:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WNDzO9u/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="K1wgI+Bm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D73A22CF5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=PzkysPkI7+YcUgcVmj8SwKpzhRc+3UEITQT9daYkF7A=; b=WNDzO9u/qNqF+F ajGnAUwinQwiDVyMOFePkJNsS9jtGaeRyr5Hzhi1uSIoXH+Nb4outRn+lwMeZCmEQCTVXdCGsKY2j jh/gXXu6g5sugXOJh5JRqORjVHngTZWH/cXmVb9muFHolt2PLOtScFPtNnXiMZQiWEVqsSBvj8iU5 atoT//fWTYHTvPrGlm/2CGqsY4mSaEIBvuvJx6rXomXQsnWgRUA8byp2ho8uQNWIiqDd5tmSQS4qc 77YOS/GKvCgRXIaLual+CN4ZfqpaZkcXFUrkEVqHZEyRV3AJXBn2RQIhxsrNcJ/frQZFA2exPkxiX YCzXAVKP/lszLKc+0pBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSR-0008IO-Ly; Thu, 05 Sep 2019 12:01:47 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSF-00082o-DM for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:36 +0000 Received: by mail-wr1-x442.google.com with SMTP id y8so2433476wrn.10 for ; Thu, 05 Sep 2019 05:01:35 -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 :mime-version:content-transfer-encoding; bh=MS5XJHYT75fAQfNDJZYmwsq3IlOqs5XUG9bj/DNEg1Y=; b=K1wgI+BmLlwGuWLvWOKjgEhqHak7dEDjBF6ia+HKWkPbjOg55sHa+seoDjFEUKR32D EQG+xGcV5myYoBYwljoZI1XJTj2u2VTdMQHT6YaqBzo1naDi19CrI6+xwYm/8O1R1Plt y8xx3bew6U/zIbR1KOWbOFyNqtD7I/e6tBpq7beLfwQMnw5bS5dNE8BCl25cDh3dVh64 X9Xmy4zUUExSFPPO/DWhtKEq5eowO6MSxJE+NZlFIgEGDk7G2zLdmVMr/+Q4yvmQaOfq ql4u1c4Uxts+yUfrXqB8AocXfyskaBTf7MODWsh1uCHHCxKv52CpgYcYKG9+mQQpgxDg 6z4Q== 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:mime-version:content-transfer-encoding; bh=MS5XJHYT75fAQfNDJZYmwsq3IlOqs5XUG9bj/DNEg1Y=; b=QxPuaxwvDOHbDaxtYSxWXz/xt+QdtwNlZsfGe4kd/lgdEY248Y2rZIv/uxtkov8sf4 aPT1+iShgXlh4c12azQvJxAHMYewEbLOdFyehdxdJudirx3OYK55Msxj/hlf8ZlhFKj/ 6JE/Zr23zL8Lh4BH0xvTr6a67DqS3g3pLXSVhNPXCXBSk5sCkSKJvUYfZdGXMqBa/Ycg DhszI3hwm552pXka4nMx/wBklNdQQsAZNFq/DIl9v94H2yAIgWnhNWj14Iu8O12N8BFH xmms19OzL+LYpRnnCu5BgUftm92c0/npDKyzn3PFlomPE7Pk41J51m6PTO67HFRtAaNa L6nQ== X-Gm-Message-State: APjAAAVkR6eRvVZOIMWFFes5c+KZK3er+82EdD+GE6fRZc8/DFrJ88AD 7JUXMwWMWSIO4EzJZlM2VZz0LA== X-Google-Smtp-Source: APXvYqz5PhdEL3jHaKHC3XzHvW9oTc+P2oasn9+crC56FOm8eG1k5Or2C2eIBzLJjHuj8/2pZCZ33A== X-Received: by 2002:adf:e908:: with SMTP id f8mr1956221wrm.210.1567684894141; Thu, 05 Sep 2019 05:01:34 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:33 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 6/8] ASoC: meson: axg-frddr: add sm1 support Date: Thu, 5 Sep 2019 14:01:18 +0200 Message-Id: <20190905120120.31752-7-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050135_511492_A70F6940 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org On sm1, the output routing bits have moved to CTRL2 register Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-fifo.c | 2 +- sound/soc/meson/axg-fifo.h | 1 + sound/soc/meson/axg-frddr.c | 73 +++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index 80a3dde35b5c..5a3749938900 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -306,7 +306,7 @@ static const struct regmap_config axg_fifo_regmap_cfg = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, - .max_register = FIFO_INIT_ADDR, + .max_register = FIFO_CTRL2, }; int axg_fifo_probe(struct platform_device *pdev) diff --git a/sound/soc/meson/axg-fifo.h b/sound/soc/meson/axg-fifo.h index 5caf81241dfe..bb1e2ce50256 100644 --- a/sound/soc/meson/axg-fifo.h +++ b/sound/soc/meson/axg-fifo.h @@ -61,6 +61,7 @@ struct snd_soc_pcm_runtime; #define STATUS1_INT_STS(x) ((x) << 0) #define FIFO_STATUS2 0x18 #define FIFO_INIT_ADDR 0x24 +#define FIFO_CTRL2 0x28 struct axg_fifo { struct regmap *map; diff --git a/sound/soc/meson/axg-frddr.c b/sound/soc/meson/axg-frddr.c index 0968e8375000..6ab111c31b28 100644 --- a/sound/soc/meson/axg-frddr.c +++ b/sound/soc/meson/axg-frddr.c @@ -23,6 +23,12 @@ #define CTRL0_SEL3_SHIFT 8 #define CTRL0_SEL3_EN_SHIFT 11 #define CTRL1_FRDDR_FORCE_FINISH BIT(12) +#define CTRL2_SEL1_SHIFT 0 +#define CTRL2_SEL1_EN_SHIFT 4 +#define CTRL2_SEL2_SHIFT 8 +#define CTRL2_SEL2_EN_SHIFT 12 +#define CTRL2_SEL3_SHIFT 16 +#define CTRL2_SEL3_EN_SHIFT 20 static int g12a_frddr_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) @@ -269,6 +275,70 @@ static const struct axg_fifo_match_data g12a_frddr_match_data = { .dai_drv = &g12a_frddr_dai_drv }; +/* On SM1, the output selection in on CTRL2 */ +static const struct snd_kcontrol_new sm1_frddr_out1_enable = + SOC_DAPM_SINGLE_AUTODISABLE("Switch", FIFO_CTRL2, + CTRL2_SEL1_EN_SHIFT, 1, 0); +static const struct snd_kcontrol_new sm1_frddr_out2_enable = + SOC_DAPM_SINGLE_AUTODISABLE("Switch", FIFO_CTRL2, + CTRL2_SEL2_EN_SHIFT, 1, 0); +static const struct snd_kcontrol_new sm1_frddr_out3_enable = + SOC_DAPM_SINGLE_AUTODISABLE("Switch", FIFO_CTRL2, + CTRL2_SEL3_EN_SHIFT, 1, 0); + +static SOC_ENUM_SINGLE_DECL(sm1_frddr_sel1_enum, FIFO_CTRL2, CTRL2_SEL1_SHIFT, + axg_frddr_sel_texts); +static SOC_ENUM_SINGLE_DECL(sm1_frddr_sel2_enum, FIFO_CTRL2, CTRL2_SEL2_SHIFT, + axg_frddr_sel_texts); +static SOC_ENUM_SINGLE_DECL(sm1_frddr_sel3_enum, FIFO_CTRL2, CTRL2_SEL3_SHIFT, + axg_frddr_sel_texts); + +static const struct snd_kcontrol_new sm1_frddr_out1_demux = + SOC_DAPM_ENUM("Output Src 1", sm1_frddr_sel1_enum); +static const struct snd_kcontrol_new sm1_frddr_out2_demux = + SOC_DAPM_ENUM("Output Src 2", sm1_frddr_sel2_enum); +static const struct snd_kcontrol_new sm1_frddr_out3_demux = + SOC_DAPM_ENUM("Output Src 3", sm1_frddr_sel3_enum); + +static const struct snd_soc_dapm_widget sm1_frddr_dapm_widgets[] = { + SND_SOC_DAPM_AIF_OUT("SRC 1", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("SRC 2", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("SRC 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_SWITCH("SRC 1 EN", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out1_enable), + SND_SOC_DAPM_SWITCH("SRC 2 EN", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out2_enable), + SND_SOC_DAPM_SWITCH("SRC 3 EN", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out3_enable), + SND_SOC_DAPM_DEMUX("SINK 1 SEL", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out1_demux), + SND_SOC_DAPM_DEMUX("SINK 2 SEL", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out2_demux), + SND_SOC_DAPM_DEMUX("SINK 3 SEL", SND_SOC_NOPM, 0, 0, + &sm1_frddr_out3_demux), + SND_SOC_DAPM_AIF_OUT("OUT 0", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 1", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 2", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("OUT 7", NULL, 0, SND_SOC_NOPM, 0, 0), +}; + +static const struct snd_soc_component_driver sm1_frddr_component_drv = { + .dapm_widgets = sm1_frddr_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sm1_frddr_dapm_widgets), + .dapm_routes = g12a_frddr_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(g12a_frddr_dapm_routes), + .ops = &g12a_fifo_pcm_ops +}; + +static const struct axg_fifo_match_data sm1_frddr_match_data = { + .component_drv = &sm1_frddr_component_drv, + .dai_drv = &g12a_frddr_dai_drv +}; + static const struct of_device_id axg_frddr_of_match[] = { { .compatible = "amlogic,axg-frddr", @@ -276,6 +346,9 @@ static const struct of_device_id axg_frddr_of_match[] = { }, { .compatible = "amlogic,g12a-frddr", .data = &g12a_frddr_match_data, + }, { + .compatible = "amlogic,sm1-frddr", + .data = &sm1_frddr_match_data, }, {} }; MODULE_DEVICE_TABLE(of, axg_frddr_of_match); From patchwork Thu Sep 5 12:01:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132887 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0BD81709 for ; Thu, 5 Sep 2019 12:01:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E18B22CF5 for ; Thu, 5 Sep 2019 12:01:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nmIv3aJl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="HGlhMhBa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E18B22CF5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=WNSyiLH/6cNAHpIHTDRvnYGzK5zJeW8DrYLfTFoaKMM=; b=nmIv3aJlatIN9v KbnLip9G41FIDQ1a3EnsaauDLjaoGYrnrf9SXJufhnkACwjFlvuKmJIqW+LBkShab8mAyXSZ2gm74 O4hOBb/86srA4s0bIQYxSKlT1dvchQHuT0+37IZEQkVS2wVjH+I2iJWoPnJjYjCFGzuFXA3FQEfXg TpPoTa1/G9nBhd1e+odJVa645dx6+8aZ8ZV2VA/+qbZmL6UmI3khQbqwUQjrPzfyJ5StuPq1m3qOP /qDIh4I2XNvNELl285yrEZz1svAih3d6wgyZE3aQyLUyA1xMkFBYEBhGZJbL/Nx4+lfO+12998+Mc 9FzW6FhXxKSFfAA1CsHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSV-0008LL-5S; Thu, 05 Sep 2019 12:01:51 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSH-00083y-0z for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:38 +0000 Received: by mail-wm1-x343.google.com with SMTP id o184so2663228wme.3 for ; Thu, 05 Sep 2019 05:01:36 -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 :mime-version:content-transfer-encoding; bh=ty6grr2CqBsGiLMZEwUvr96EbkiXeHRzoxeQk67yQIk=; b=HGlhMhBacIfIQFKMtkZsKhGnnBNTeG4ikwn1/HkS3Ajg2L6g78ZlyF8lhw6v6UbzqC RtheK/89P1pt+0pH3mLz0BKwndFqR0VToA+SyMftxNAqlO5g3ysFe6UUsS2JJDa7TT0U 02CpO0DjOm++hE8RswmYQ3dodOc6Vswu1Lyc5dY3dZlIlH18GXxfWTT3KMzh9iQAWhlL WrS4sMc5IqyT4baQ7udu5pYuIYVQ4eEYuu9FqAY2fEYIlhrVJZtNVTp3tFb7ayqaXIa+ OE9ydQzsc/jQsFWNkwiSwnL8ddqCQvM+elHpmcSgrwbFjqxrtrmpgu+FvSRv7h8YzKQW bP3Q== 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:mime-version:content-transfer-encoding; bh=ty6grr2CqBsGiLMZEwUvr96EbkiXeHRzoxeQk67yQIk=; b=QzzxyVKI59GHRzr9LBZgXUWQ05BWelcuUNqUDfk0mMBQQCnUr5CyRhqzK29TFv9Jws 9frrCQb5BDfnPFj33Qu1SGimFROvx90BX8lSbgC+wHR1zG/Za70FJi2ScDO+1ZbpR77l eFLPPspR52X34/Wmm4hZ/m1QZ0RJvdP8YBEEtdwD8qQI1BtY3Wsj6aqlzEO2SLQESbf+ x0Pt5Xp+rKxynRCmpDius26praCKD6J90ZD+iD7ARU/KPfbLafYcAHQB6RGukc79Bqqv nBzcDeb7fJU9qEUPpL1ynP07L8KW1PSvBj8hJLSCrx3GYyqjD4zYPCXLsVeoU6HEq+UF s49Q== X-Gm-Message-State: APjAAAWAQD48rRKtDyCbOerG/RNCP/WyTmeZGcZr9L90EN/Ut7t4heIm peTtG1Ljs7PY/o8Z5LVD2fQmCg== X-Google-Smtp-Source: APXvYqyQ2uMB+QE10XeT5YDdU0Y7KVgM/kfMVR7Ux0OrquB6l45jM69QHFeZ4laRjHpp8Uaw1YQsJw== X-Received: by 2002:a1c:1903:: with SMTP id 3mr2504214wmz.4.1567684895062; Thu, 05 Sep 2019 05:01:35 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:34 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 7/8] ASoC: meson: axg-toddr: add sm1 support Date: Thu, 5 Sep 2019 14:01:19 +0200 Message-Id: <20190905120120.31752-8-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050137_092683_2C844FA2 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org On sm1, the maximum number TODDR inputs is extended to 16. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-toddr.c | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c index 2e9a2e5862ce..c8ea2145f576 100644 --- a/sound/soc/meson/axg-toddr.c +++ b/sound/soc/meson/axg-toddr.c @@ -25,6 +25,7 @@ #define CTRL0_TODDR_LSB_POS_MASK GENMASK(7, 3) #define CTRL0_TODDR_LSB_POS(x) ((x) << 3) #define CTRL1_TODDR_FORCE_FINISH BIT(25) +#define CTRL1_SEL_SHIFT 28 #define TODDR_MSB_POS 31 @@ -221,6 +222,70 @@ static const struct axg_fifo_match_data g12a_toddr_match_data = { .dai_drv = &g12a_toddr_dai_drv }; +static const char * const sm1_toddr_sel_texts[] = { + "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", "IN 5", "IN 6", "IN 7", + "IN 8", "IN 9", "IN 10", "IN 11", "IN 12", "IN 13", "IN 14", "IN 15" +}; + +static SOC_ENUM_SINGLE_DECL(sm1_toddr_sel_enum, FIFO_CTRL1, CTRL1_SEL_SHIFT, + sm1_toddr_sel_texts); + +static const struct snd_kcontrol_new sm1_toddr_in_mux = + SOC_DAPM_ENUM("Input Source", sm1_toddr_sel_enum); + +static const struct snd_soc_dapm_widget sm1_toddr_dapm_widgets[] = { + SND_SOC_DAPM_MUX("SRC SEL", SND_SOC_NOPM, 0, 0, &sm1_toddr_in_mux), + SND_SOC_DAPM_AIF_IN("IN 0", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 1", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 2", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 5", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 6", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 7", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 8", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 9", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 10", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 11", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 12", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 13", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 14", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 15", NULL, 0, SND_SOC_NOPM, 0, 0), +}; + +static const struct snd_soc_dapm_route sm1_toddr_dapm_routes[] = { + { "Capture", NULL, "SRC SEL" }, + { "SRC SEL", "IN 0", "IN 0" }, + { "SRC SEL", "IN 1", "IN 1" }, + { "SRC SEL", "IN 2", "IN 2" }, + { "SRC SEL", "IN 3", "IN 3" }, + { "SRC SEL", "IN 4", "IN 4" }, + { "SRC SEL", "IN 5", "IN 5" }, + { "SRC SEL", "IN 6", "IN 6" }, + { "SRC SEL", "IN 7", "IN 7" }, + { "SRC SEL", "IN 8", "IN 8" }, + { "SRC SEL", "IN 9", "IN 9" }, + { "SRC SEL", "IN 10", "IN 10" }, + { "SRC SEL", "IN 11", "IN 11" }, + { "SRC SEL", "IN 12", "IN 12" }, + { "SRC SEL", "IN 13", "IN 13" }, + { "SRC SEL", "IN 14", "IN 14" }, + { "SRC SEL", "IN 15", "IN 15" }, +}; + +static const struct snd_soc_component_driver sm1_toddr_component_drv = { + .dapm_widgets = sm1_toddr_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sm1_toddr_dapm_widgets), + .dapm_routes = sm1_toddr_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sm1_toddr_dapm_routes), + .ops = &g12a_fifo_pcm_ops +}; + +static const struct axg_fifo_match_data sm1_toddr_match_data = { + .component_drv = &sm1_toddr_component_drv, + .dai_drv = &g12a_toddr_dai_drv +}; + static const struct of_device_id axg_toddr_of_match[] = { { .compatible = "amlogic,axg-toddr", @@ -228,6 +293,9 @@ static const struct of_device_id axg_toddr_of_match[] = { }, { .compatible = "amlogic,g12a-toddr", .data = &g12a_toddr_match_data, + }, { + .compatible = "amlogic,sm1-toddr", + .data = &sm1_toddr_match_data, }, {} }; MODULE_DEVICE_TABLE(of, axg_toddr_of_match); From patchwork Thu Sep 5 12:01:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 11132889 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3992112C for ; Thu, 5 Sep 2019 12:01:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 815A12332B for ; Thu, 5 Sep 2019 12:01:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ilc6DJDl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="qVswcN+P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 815A12332B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=kap+jxhxpB+sy0CQCkMu+vlOpZMj85nVcK7me91LO/k=; b=ilc6DJDl7jRimW wTqa5NdBvrhBdo9SrgnsnKDAY9/PGYA5UFXpxh/Y2GtAeE2vtrWPtUjrW57gFS5T3dHZYHZJZUW3S ViTH21rh52aV6uf0hknfcpiNRPneiG/6Pd8RuOEyidZyrxwzTQ6xpmeaI6wLpEij5j6RHnbRoIlUt y4w1WDUydMcbYSo63PPfRLfieUdbNtzLLVOBtuuy78lWLSZoJKZuxtoU897UiNbOMGeeOYGPNONUq oVU6Ya6SsVujUJ7eKqfpFXukHQRbx+Nzc9du9YpmK84qiP1Hi1Ypy2Z4HRIWXTkGQhwdvUphzSLI7 60wtwVrlz5Ms3A/t93HQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSX-0008OU-Vs; Thu, 05 Sep 2019 12:01:54 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qSH-000852-CF for linux-amlogic@lists.infradead.org; Thu, 05 Sep 2019 12:01:39 +0000 Received: by mail-wm1-x344.google.com with SMTP id g207so2468121wmg.5 for ; Thu, 05 Sep 2019 05:01:37 -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 :mime-version:content-transfer-encoding; bh=klSkJhbs0NB+xI0c1ebxNosV7pVJl7beazxfFo4LBZg=; b=qVswcN+PucNQH6v4EQigxCZdHKTEzMwj6G2zSXUlL9Q3vyaySUauYMtEwxR5tBfkTX Vl/wABaSlML2K61iULZEg9ci45M0aAYXwsUTPRKD55tXQk4EtDd41q/6q033f5nkHvfJ +qHF+b/8Kowqxp9iuzSOMwteKYzNFPmUoAVTW0FBnhdvtWeVvCGHIFLNS+b55o5njqS4 2EVfcQ5qtdUqtDgwR9T7GbXyUujllGe+DCGRPCI9M5s0RC35d/GTQ9b+eHNo/BPRTHAs 109aM4zFeYs3qeABFt6PzFK8FWOj5EyNdbvW3NeM23Ykr/vHc2xeAA3Q5sFRzOaJ6WV9 yi3Q== 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:mime-version:content-transfer-encoding; bh=klSkJhbs0NB+xI0c1ebxNosV7pVJl7beazxfFo4LBZg=; b=nsP3lv586rICPtVXBQBdWZoMMXUkh2TTIr+nTtkG9QD4X4mxj/aRhBvdNjkEJkYJwx 0yeeUV6OwWgpZqiRCq53sh4feBfQ9vjDuXiel6PUPSGIPalPqqNJM58dmfRFkfagzLGF VVgcfzEclCIlJ1qaVho1xGn7HFfRWq8MZuBNYEJ8lP0Tat9x9nPpPv+dFGa6ZCGGGWhZ jZiyaGIljp/AAyX7yOuC0HRW+2I+vwuETjzUAuPhwV5vIvznca9cVlkYIAMuu2MzN8rP Cn1pS9rWEIbMv9lnXYZAVQsmDhnsh0Zi/spsQx0S2CMMCn/PBfY4gJUTAYQUSUTwJJYx 2rxw== X-Gm-Message-State: APjAAAXsoMyLeOvZKNKULlqHIaVy7i8Z3JVurZTO+pyh1o6oolWoOAXL wM+N+rljAf4t0tdFkveBE6FybQ== X-Google-Smtp-Source: APXvYqzMpRsgyQhdaXkYR6VhupFXcKpJSMlYFG0Sb+nF3uP8ydsPZns1A+Qc1CimphV2UL/tqKaqyQ== X-Received: by 2002:a1c:2b85:: with SMTP id r127mr2607200wmr.30.1567684896038; Thu, 05 Sep 2019 05:01:36 -0700 (PDT) Received: from starbuck.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a18sm3436311wrh.25.2019.09.05.05.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 05:01:35 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood Subject: [PATCH 8/8] ASoC: meson: tdmout: add sm1 support Date: Thu, 5 Sep 2019 14:01:20 +0200 Message-Id: <20190905120120.31752-9-jbrunet@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905120120.31752-1-jbrunet@baylibre.com> References: <20190905120120.31752-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_050137_580027_7628A778 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org On the sm1, the TDMOUT number of input is extended and the the gain enable bit moved to accommodate this extension Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-tdmout.c | 103 ++++++++++++++++++++++++++++------- 1 file changed, 84 insertions(+), 19 deletions(-) diff --git a/sound/soc/meson/axg-tdmout.c b/sound/soc/meson/axg-tdmout.c index 86537fc0ecb5..418ec314b37d 100644 --- a/sound/soc/meson/axg-tdmout.c +++ b/sound/soc/meson/axg-tdmout.c @@ -24,6 +24,7 @@ #define TDMOUT_CTRL1 0x04 #define TDMOUT_CTRL1_TYPE_MASK GENMASK(6, 4) #define TDMOUT_CTRL1_TYPE(x) ((x) << 4) +#define SM1_TDMOUT_CTRL1_GAIN_EN 7 #define TDMOUT_CTRL1_MSB_POS_MASK GENMASK(12, 8) #define TDMOUT_CTRL1_MSB_POS(x) ((x) << 8) #define TDMOUT_CTRL1_SEL_SHIFT 24 @@ -51,25 +52,6 @@ static const struct regmap_config axg_tdmout_regmap_cfg = { .max_register = TDMOUT_MASK_VAL, }; -static const struct snd_kcontrol_new axg_tdmout_controls[] = { - SOC_DOUBLE("Lane 0 Volume", TDMOUT_GAIN0, 0, 8, 255, 0), - SOC_DOUBLE("Lane 1 Volume", TDMOUT_GAIN0, 16, 24, 255, 0), - SOC_DOUBLE("Lane 2 Volume", TDMOUT_GAIN1, 0, 8, 255, 0), - SOC_DOUBLE("Lane 3 Volume", TDMOUT_GAIN1, 16, 24, 255, 0), - SOC_SINGLE("Gain Enable Switch", TDMOUT_CTRL1, - TDMOUT_CTRL1_GAIN_EN, 1, 0), -}; - -static const char * const tdmout_sel_texts[] = { - "IN 0", "IN 1", "IN 2", -}; - -static SOC_ENUM_SINGLE_DECL(axg_tdmout_sel_enum, TDMOUT_CTRL1, - TDMOUT_CTRL1_SEL_SHIFT, tdmout_sel_texts); - -static const struct snd_kcontrol_new axg_tdmout_in_mux = - SOC_DAPM_ENUM("Input Source", axg_tdmout_sel_enum); - static struct snd_soc_dai * axg_tdmout_get_be(struct snd_soc_dapm_widget *w) { @@ -197,6 +179,25 @@ static int axg_tdmout_prepare(struct regmap *map, return axg_tdm_formatter_set_channel_masks(map, ts, TDMOUT_MASK0); } +static const struct snd_kcontrol_new axg_tdmout_controls[] = { + SOC_DOUBLE("Lane 0 Volume", TDMOUT_GAIN0, 0, 8, 255, 0), + SOC_DOUBLE("Lane 1 Volume", TDMOUT_GAIN0, 16, 24, 255, 0), + SOC_DOUBLE("Lane 2 Volume", TDMOUT_GAIN1, 0, 8, 255, 0), + SOC_DOUBLE("Lane 3 Volume", TDMOUT_GAIN1, 16, 24, 255, 0), + SOC_SINGLE("Gain Enable Switch", TDMOUT_CTRL1, + TDMOUT_CTRL1_GAIN_EN, 1, 0), +}; + +static const char * const axg_tdmout_sel_texts[] = { + "IN 0", "IN 1", "IN 2", +}; + +static SOC_ENUM_SINGLE_DECL(axg_tdmout_sel_enum, TDMOUT_CTRL1, + TDMOUT_CTRL1_SEL_SHIFT, axg_tdmout_sel_texts); + +static const struct snd_kcontrol_new axg_tdmout_in_mux = + SOC_DAPM_ENUM("Input Source", axg_tdmout_sel_enum); + static const struct snd_soc_dapm_widget axg_tdmout_dapm_widgets[] = { SND_SOC_DAPM_AIF_IN("IN 0", NULL, 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_IN("IN 1", NULL, 0, SND_SOC_NOPM, 0, 0), @@ -252,6 +253,67 @@ static const struct axg_tdm_formatter_driver g12a_tdmout_drv = { }, }; +static const struct snd_kcontrol_new sm1_tdmout_controls[] = { + SOC_DOUBLE("Lane 0 Volume", TDMOUT_GAIN0, 0, 8, 255, 0), + SOC_DOUBLE("Lane 1 Volume", TDMOUT_GAIN0, 16, 24, 255, 0), + SOC_DOUBLE("Lane 2 Volume", TDMOUT_GAIN1, 0, 8, 255, 0), + SOC_DOUBLE("Lane 3 Volume", TDMOUT_GAIN1, 16, 24, 255, 0), + SOC_SINGLE("Gain Enable Switch", TDMOUT_CTRL1, + SM1_TDMOUT_CTRL1_GAIN_EN, 1, 0), +}; + +static const char * const sm1_tdmout_sel_texts[] = { + "IN 0", "IN 1", "IN 2", "IN 3", "IN 4", +}; + +static SOC_ENUM_SINGLE_DECL(sm1_tdmout_sel_enum, TDMOUT_CTRL1, + TDMOUT_CTRL1_SEL_SHIFT, sm1_tdmout_sel_texts); + +static const struct snd_kcontrol_new sm1_tdmout_in_mux = + SOC_DAPM_ENUM("Input Source", sm1_tdmout_sel_enum); + +static const struct snd_soc_dapm_widget sm1_tdmout_dapm_widgets[] = { + SND_SOC_DAPM_AIF_IN("IN 0", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 1", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 2", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 3", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("IN 4", NULL, 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_MUX("SRC SEL", SND_SOC_NOPM, 0, 0, &sm1_tdmout_in_mux), + SND_SOC_DAPM_PGA_E("ENC", SND_SOC_NOPM, 0, 0, NULL, 0, + axg_tdm_formatter_event, + (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD)), + SND_SOC_DAPM_AIF_OUT("OUT", NULL, 0, SND_SOC_NOPM, 0, 0), +}; + +static const struct snd_soc_dapm_route sm1_tdmout_dapm_routes[] = { + { "SRC SEL", "IN 0", "IN 0" }, + { "SRC SEL", "IN 1", "IN 1" }, + { "SRC SEL", "IN 2", "IN 2" }, + { "SRC SEL", "IN 3", "IN 3" }, + { "SRC SEL", "IN 4", "IN 4" }, + { "ENC", NULL, "SRC SEL" }, + { "OUT", NULL, "ENC" }, +}; + +static const struct snd_soc_component_driver sm1_tdmout_component_drv = { + .controls = sm1_tdmout_controls, + .num_controls = ARRAY_SIZE(sm1_tdmout_controls), + .dapm_widgets = sm1_tdmout_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sm1_tdmout_dapm_widgets), + .dapm_routes = sm1_tdmout_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sm1_tdmout_dapm_routes), +}; + +static const struct axg_tdm_formatter_driver sm1_tdmout_drv = { + .component_drv = &sm1_tdmout_component_drv, + .regmap_cfg = &axg_tdmout_regmap_cfg, + .ops = &axg_tdmout_ops, + .quirks = &(const struct axg_tdm_formatter_hw) { + .invert_sclk = true, + .skew_offset = 2, + }, +}; + static const struct of_device_id axg_tdmout_of_match[] = { { .compatible = "amlogic,axg-tdmout", @@ -259,6 +321,9 @@ static const struct of_device_id axg_tdmout_of_match[] = { }, { .compatible = "amlogic,g12a-tdmout", .data = &g12a_tdmout_drv, + }, { + .compatible = "amlogic,sm1-tdmout", + .data = &sm1_tdmout_drv, }, {} }; MODULE_DEVICE_TABLE(of, axg_tdmout_of_match);