From patchwork Mon Oct 26 18:52:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB483C2D0A3 for ; Mon, 26 Oct 2020 18:55:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 3B2DB2168B for ; Mon, 26 Oct 2020 18:55:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="erI9/2aI"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WJ0Xq134" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B2DB2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=SJvx1Ty/ovv8C5iH1IK5QIaXg0A1p3UewVz3SWZsAZI=; b=erI9/2aIou88tY2qTAqlAnCuK Z48sEJT6xO8VIeM+fIOMGgJmwUut7dotdT5lW1lK3UhcXd/QePJtYCmsMYTiiR3fabR8ntkhm5rmh AB+ok89MmaNsUPsusF4AGpnqE2QjOHVm+Oiulo/XLw2XVG2sPYR+BXshHoUETrAC/M+YYPNdzHiIg UojNUbeKIisyOzZbIY25WsSVQvXpf41TmQiFKFn3Ge0R0NAzsk/6vxC3NDmTiefkLJVUgyNAkJriU 9A6/a6ZYx0lfFq2RSLroyfwRi3IbJghn3Gm4AED/cdgHgX3Kiz90MNC38dLPEBOggAYNEe0LMoPqx HIt00ucnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7c6-00076K-HY; Mon, 26 Oct 2020 18:53:02 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bq-0006wx-MK for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:49 +0000 Received: by mail-wr1-x443.google.com with SMTP id e17so13877160wru.12 for ; Mon, 26 Oct 2020 11:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZOkLUnzWl9ZzJaEpvY0BQeyF9Xi02JdDTj+Ipv+HbgQ=; b=WJ0Xq1340TIzloUUZHjNZaU/k2V+gFbVMFABmIc+Xj3BmGU+QZctUBokbHDUcHveRi txZMnKkF/pozpG4sGojq16zFGrjSWD1Y9JIwYW3puV+JrtOtl9U1O+t9ftqMx+Yi3d2s PFK0wD9AQRnnkMHnLGQAq2GAj6I0hVlIm7ka6pI7k2pRoHzgyekhOZ/Ie5a+Ga2IgjXi t5kAtJ7Na0PoC87EbAW/2VljxGCC0hSoyZM72e7A84biDS80xvqk0vm7fGA6YgzQlH1+ SzbzB9fEEgMEH6M+cwcPE2WuIIzeSHuB4IdVEIvJkzKauK6cFHWmL4IlnKHTROOXl3Wa 40sw== 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=ZOkLUnzWl9ZzJaEpvY0BQeyF9Xi02JdDTj+Ipv+HbgQ=; b=M9fvmEAc0M7p9Af4mavyd5bDfNRySf7qFQDeRK+OgNFwylrKzpWx+FPtp2JhdpypZz DNYBWmCxNsHVMSb9ydT40hbsXnXxchq0A3HPJd4YH8hiRXDCrXHSoRRUBhdfU4lSPf/6 PEUl247c5sfbra8Grm/C2J5+uj8Y3PDEfBWZx67MKXLWLExMutTNNNxq+1o/omBl2wLd mgB6zqUpZCqnPqj3jPiQYVcX16v5kQBkI0/PKu91moHY0ADi/Lb7l+y8Zvh+bIsXVpV3 h+9T/inOWYXOzPCpNGD3nmxrvO+5+MlEqn9cpwbnxD4siRx3VzBtl4iIlenYwXWF6neb 3mHQ== X-Gm-Message-State: AOAM5339kQN/MKxpq6Pym8xaCdyghuRteO5KLoZIRVxxtz2FSx1afyyA g6MGIUdR0fbczSXJCHbWqBU= X-Google-Smtp-Source: ABdhPJz3QiBhHJxavCSNhviQE5xuIrFVUUOvGqbGZ8O6tOJdFQ/qG6f90Md4pX8KCTOu3UT9B1SgnA== X-Received: by 2002:adf:8b15:: with SMTP id n21mr20281915wra.313.1603738364241; Mon, 26 Oct 2020 11:52:44 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:43 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params Date: Mon, 26 Oct 2020 19:52:26 +0100 Message-Id: <20201026185239.379417-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145246_897449_BE50FA39 X-CRM114-Status: GOOD ( 19.86 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As slots and slot_width can be set manually using set_tdm(). These values are then kept in sun4i_i2s struct. So we need to check if these values are set or not. This is not done actually and will trigger a bug. For example, if we set to the simple soundcard in the device-tree dai-tdm-slot-width = <32> and then start a stream using S16_LE, currently we would calculate BCLK for 32-bit slots, but program lrck_period for 16-bit slots, making the sample rate double what we expected. To fix this, we need to check if these values are set or not but as this logic is already done by the caller. Avoid duplicating this logic and just pass the required values as params to set_chan_cfg(). Suggested-by: Samuel Holland Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f23ff29e7c1d..6c10f810b114 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -162,8 +162,9 @@ struct sun4i_i2s_quirks { unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); s8 (*get_sr)(const struct sun4i_i2s *, int); s8 (*get_wss)(const struct sun4i_i2s *, int); - int (*set_chan_cfg)(const struct sun4i_i2s *, - const struct snd_pcm_hw_params *); + int (*set_chan_cfg)(const struct sun4i_i2s *i2s, + unsigned int channels, unsigned int slots, + unsigned int slot_width); int (*set_fmt)(const struct sun4i_i2s *, unsigned int); }; @@ -399,10 +400,9 @@ static s8 sun8i_i2s_get_sr_wss(const struct sun4i_i2s *i2s, int width) } static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, - const struct snd_pcm_hw_params *params) + unsigned int channels, unsigned int slots, + unsigned int slot_width) { - unsigned int channels = params_channels(params); - /* Map the channels for playback and capture */ regmap_write(i2s->regmap, SUN4I_I2S_TX_CHAN_MAP_REG, 0x76543210); regmap_write(i2s->regmap, SUN4I_I2S_RX_CHAN_MAP_REG, 0x00003210); @@ -419,15 +419,11 @@ static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, } static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, - const struct snd_pcm_hw_params *params) + unsigned int channels, unsigned int slots, + unsigned int slot_width) { - unsigned int channels = params_channels(params); - unsigned int slots = channels; unsigned int lrck_period; - if (i2s->slots) - slots = i2s->slots; - /* Map the channels for playback and capture */ regmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG, 0x76543210); regmap_write(i2s->regmap, SUN8I_I2S_RX_CHAN_MAP_REG, 0x76543210); @@ -452,11 +448,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, case SND_SOC_DAIFMT_DSP_B: case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_RIGHT_J: - lrck_period = params_physical_width(params) * slots; + lrck_period = slot_width * slots; break; case SND_SOC_DAIFMT_I2S: - lrck_period = params_physical_width(params); + lrck_period = slot_width; break; default: @@ -480,9 +476,16 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, { struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); unsigned int word_size = params_width(params); - unsigned int slot_width = params_physical_width(params); unsigned int channels = params_channels(params); + + /* + * Here and in set_chan_cfg(), "slots" means channels per frame + + * padding slots, regardless of format. "slot_width" means bits + * per sample + padding bits, regardless of format. + */ unsigned int slots = channels; + unsigned int slot_width = params_physical_width(params); + int ret, sr, wss; u32 width; @@ -492,7 +495,7 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, if (i2s->slot_width) slot_width = i2s->slot_width; - ret = i2s->variant->set_chan_cfg(i2s, params); + ret = i2s->variant->set_chan_cfg(i2s, channels, slots, slot_width); if (ret < 0) { dev_err(dai->dev, "Invalid channel configuration\n"); return ret; From patchwork Mon Oct 26 18:52:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ECAEC5517A for ; Mon, 26 Oct 2020 18:55:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 938022168B for ; Mon, 26 Oct 2020 18:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W3CAV+oT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sUC/U5WI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 938022168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=IwyGpqMfx0QOMW780Z86dePWkVziV98Ho6rQQZfqtQA=; b=W3CAV+oTKfxxj+lJmkW8pIVBd rkmcvtGGNoUeKBIGg75jze5lVoJ7LyafP66lBhHPloUXF5L2sR4lPrcp7RHecQ/2xCdR25JOi0L8d Ra5jybraAvgsHKlHPYV5UtRWSGA7GbXNzlI96l1EXQH11D7i/SzA6neB5aLY4xHPqDxyNRrVqfxwg l3dPk1V6Tjki7Ba/DYgl+T6tvjQMGx+xQAbr0o5W/kZnA7mTo18VGvOwyiec+DGPTI6MnnhG/TMCb 09gQYW7T5Ad0M0ya4d+nS57cn71+P/qVdg7w3szQK4XZit1oBkQOttdU7OR+lFoaxpO5ZgxnFWPJK IltQ7Jovw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7cH-0007Ar-RQ; Mon, 26 Oct 2020 18:53:13 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bq-0006ym-Ej for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:50 +0000 Received: by mail-wm1-x343.google.com with SMTP id c16so13574823wmd.2 for ; Mon, 26 Oct 2020 11:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MGhLXOjm45U8bNXIcJPRY/YaLTbLI7QRwvkZmrc47Z8=; b=sUC/U5WIBYjTY2N6BJ8IxbVUKcDZ1uVcFc0LE7cCq8BGzmcUkYGl19Y42VprwkBl/d 9MqPyvzZkVZZPVVPWflLTftyIjF3cJ22lP7lkTraW4IeobtIN43b9ATcXo3ZfR3wjads IQ8XTlQPHa2kUeNEONGdSt6IWFuOKfP+IQmhiRnC0PdgfjNtb6CXR4g4/k/tnEEvZsWm iN6gn0Veqe+xhOiPqjo79Yiz4KtQxJxgwt7N5NCTxXvNCJxcUv02dpS57DUIUSpZuZ8U LenYBGunrRSmW9KM+OKMLrtc9Kf7buwuMhpwVqzS5G198tE6KtPvq+eIztvUCYotJs2P OjRA== 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=MGhLXOjm45U8bNXIcJPRY/YaLTbLI7QRwvkZmrc47Z8=; b=dn2SmhcUgS905n50ozuKFZ9BH+faaCyBPN1SYT4OLqPIQC30k1F6g3KHckvy0MUlcF 8MRN+0WzDCI9+ssg7F2zMpxVz0LkyOaBPr6ngeRSoyQZ8810936oXeXou5lkVvi/i+kD 6CpAKG6w1jm8wY+m4LT4vHkhqnRqHdhjuR4SKKz5dx1bcNPmN/wsbl3Jjt+sXvGstyTH RyFtNgAv3TdkykwJTaa/8qPXZb5+LcUa9TiOpXen2T9w8mLiH5mSvv3ZvgNPiFu7cfUs +d8MuIHIiovByyQPv+cnx6FgVHmkEXMIe83GbgFVXiHakQsFx4fguR86zaOPprrKMcu/ x4gA== X-Gm-Message-State: AOAM530m1zx81jPqhMwKExwIzYJka+WZ5MMvYLswaFH9kC8rm5OIdOTs tjs0BK83I4u1BqQg/JAkjoR54PihDadsFg== X-Google-Smtp-Source: ABdhPJyPL1eqf4xRFCG28r9vdborcvUUscw06icgjn7+DjqPALr8r6PnCg3nuaqlgSQgGczPDVFp/A== X-Received: by 2002:a1c:2901:: with SMTP id p1mr18056623wmp.170.1603738365449; Mon, 26 Oct 2020 11:52:45 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:44 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 02/14] ASoC: sun4i-i2s: Add support for H6 I2S Date: Mon, 26 Oct 2020 19:52:27 +0100 Message-Id: <20201026185239.379417-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145246_551246_DF8CAE50 X-CRM114-Status: GOOD ( 22.09 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jernej Skrabec H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 222 ++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 6c10f810b114..5bec7fbd0b30 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -124,6 +124,21 @@ #define SUN8I_I2S_RX_CHAN_SEL_REG 0x54 #define SUN8I_I2S_RX_CHAN_MAP_REG 0x58 +/* Defines required for sun50i-h6 support */ +#define SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK GENMASK(21, 20) +#define SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset) ((offset) << 20) +#define SUN50I_H6_I2S_TX_CHAN_SEL_MASK GENMASK(19, 16) +#define SUN50I_H6_I2S_TX_CHAN_SEL(chan) ((chan - 1) << 16) +#define SUN50I_H6_I2S_TX_CHAN_EN_MASK GENMASK(15, 0) +#define SUN50I_H6_I2S_TX_CHAN_EN(num_chan) (((1 << num_chan) - 1)) + +#define SUN50I_H6_I2S_TX_CHAN_MAP0_REG 0x44 +#define SUN50I_H6_I2S_TX_CHAN_MAP1_REG 0x48 + +#define SUN50I_H6_I2S_RX_CHAN_SEL_REG 0x64 +#define SUN50I_H6_I2S_RX_CHAN_MAP0_REG 0x68 +#define SUN50I_H6_I2S_RX_CHAN_MAP1_REG 0x6C + struct sun4i_i2s; /** @@ -470,6 +485,60 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, return 0; } +static int sun50i_h6_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, + unsigned int channels, unsigned int slots, + unsigned int slot_width) +{ + unsigned int lrck_period; + + /* Map the channels for playback and capture */ + regmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP0_REG, 0xFEDCBA98); + regmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x76543210); + regmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0xFEDCBA98); + regmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x76543210); + + /* Configure the channels */ + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL(channels)); + regmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL(channels)); + + regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, + SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK, + SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(channels)); + regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, + SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM_MASK, + SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM(channels)); + + switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_A: + case SND_SOC_DAIFMT_DSP_B: + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: + lrck_period = slot_width * slots; + break; + + case SND_SOC_DAIFMT_I2S: + lrck_period = slot_width; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, + SUN8I_I2S_FMT0_LRCK_PERIOD_MASK, + SUN8I_I2S_FMT0_LRCK_PERIOD(lrck_period)); + + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_EN_MASK, + SUN50I_H6_I2S_TX_CHAN_EN(channels)); + + return 0; +} + static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) @@ -702,6 +771,108 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, return 0; } +static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, + unsigned int fmt) +{ + u32 mode, val; + u8 offset; + + /* + * DAI clock polarity + * + * The setup for LRCK contradicts the datasheet, but under a + * scope it's clear that the LRCK polarity is reversed + * compared to the expected polarity on the bus. + */ + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_IB_IF: + /* Invert both clocks */ + val = SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED; + break; + case SND_SOC_DAIFMT_IB_NF: + /* Invert bit clock */ + val = SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED | + SUN8I_I2S_FMT0_LRCLK_POLARITY_INVERTED; + break; + case SND_SOC_DAIFMT_NB_IF: + /* Invert frame clock */ + val = 0; + break; + case SND_SOC_DAIFMT_NB_NF: + val = SUN8I_I2S_FMT0_LRCLK_POLARITY_INVERTED; + break; + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, + SUN8I_I2S_FMT0_LRCLK_POLARITY_MASK | + SUN8I_I2S_FMT0_BCLK_POLARITY_MASK, + val); + + /* DAI Mode */ + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_A: + mode = SUN8I_I2S_CTRL_MODE_PCM; + offset = 1; + break; + + case SND_SOC_DAIFMT_DSP_B: + mode = SUN8I_I2S_CTRL_MODE_PCM; + offset = 0; + break; + + case SND_SOC_DAIFMT_I2S: + mode = SUN8I_I2S_CTRL_MODE_LEFT; + offset = 1; + break; + + case SND_SOC_DAIFMT_LEFT_J: + mode = SUN8I_I2S_CTRL_MODE_LEFT; + offset = 0; + break; + + case SND_SOC_DAIFMT_RIGHT_J: + mode = SUN8I_I2S_CTRL_MODE_RIGHT; + offset = 0; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, + SUN8I_I2S_CTRL_MODE_MASK, mode); + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset)); + regmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset)); + + /* DAI clock master masks */ + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: + /* BCLK and LRCLK master */ + val = SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT; + break; + + case SND_SOC_DAIFMT_CBM_CFM: + /* BCLK and LRCLK slave */ + val = 0; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, + SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, + val); + + return 0; +} + static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); @@ -982,6 +1153,22 @@ static const struct reg_default sun8i_i2s_reg_defaults[] = { { SUN8I_I2S_RX_CHAN_MAP_REG, 0x00000000 }, }; +static const struct reg_default sun50i_h6_i2s_reg_defaults[] = { + { SUN4I_I2S_CTRL_REG, 0x00060000 }, + { SUN4I_I2S_FMT0_REG, 0x00000033 }, + { SUN4I_I2S_FMT1_REG, 0x00000030 }, + { SUN4I_I2S_FIFO_CTRL_REG, 0x000400f0 }, + { SUN4I_I2S_DMA_INT_CTRL_REG, 0x00000000 }, + { SUN4I_I2S_CLK_DIV_REG, 0x00000000 }, + { SUN8I_I2S_CHAN_CFG_REG, 0x00000000 }, + { SUN8I_I2S_TX_CHAN_SEL_REG, 0x00000000 }, + { SUN50I_H6_I2S_TX_CHAN_MAP0_REG, 0x00000000 }, + { SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_SEL_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x00000000 }, +}; + static const struct regmap_config sun4i_i2s_regmap_config = { .reg_bits = 32, .reg_stride = 4, @@ -1009,6 +1196,19 @@ static const struct regmap_config sun8i_i2s_regmap_config = { .volatile_reg = sun8i_i2s_volatile_reg, }; +static const struct regmap_config sun50i_h6_i2s_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = SUN50I_H6_I2S_RX_CHAN_MAP1_REG, + .cache_type = REGCACHE_FLAT, + .reg_defaults = sun50i_h6_i2s_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(sun50i_h6_i2s_reg_defaults), + .writeable_reg = sun4i_i2s_wr_reg, + .readable_reg = sun8i_i2s_rd_reg, + .volatile_reg = sun8i_i2s_volatile_reg, +}; + static int sun4i_i2s_runtime_resume(struct device *dev) { struct sun4i_i2s *i2s = dev_get_drvdata(dev); @@ -1167,6 +1367,24 @@ static const struct sun4i_i2s_quirks sun50i_a64_codec_i2s_quirks = { .set_fmt = sun4i_i2s_set_soc_fmt, }; +static const struct sun4i_i2s_quirks sun50i_h6_i2s_quirks = { + .has_reset = true, + .reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG, + .sun4i_i2s_regmap = &sun50i_h6_i2s_regmap_config, + .field_clkdiv_mclk_en = REG_FIELD(SUN4I_I2S_CLK_DIV_REG, 8, 8), + .field_fmt_wss = REG_FIELD(SUN4I_I2S_FMT0_REG, 0, 2), + .field_fmt_sr = REG_FIELD(SUN4I_I2S_FMT0_REG, 4, 6), + .bclk_dividers = sun8i_i2s_clk_div, + .num_bclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div), + .mclk_dividers = sun8i_i2s_clk_div, + .num_mclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div), + .get_bclk_parent_rate = sun8i_i2s_get_bclk_parent_rate, + .get_sr = sun8i_i2s_get_sr_wss, + .get_wss = sun8i_i2s_get_sr_wss, + .set_chan_cfg = sun50i_h6_i2s_set_chan_cfg, + .set_fmt = sun50i_h6_i2s_set_soc_fmt, +}; + static int sun4i_i2s_init_regmap_fields(struct device *dev, struct sun4i_i2s *i2s) { @@ -1336,6 +1554,10 @@ static const struct of_device_id sun4i_i2s_match[] = { .compatible = "allwinner,sun50i-a64-codec-i2s", .data = &sun50i_a64_codec_i2s_quirks, }, + { + .compatible = "allwinner,sun50i-h6-i2s", + .data = &sun50i_h6_i2s_quirks, + }, {} }; MODULE_DEVICE_TABLE(of, sun4i_i2s_match); From patchwork Mon Oct 26 18:52:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99405C4363A for ; Mon, 26 Oct 2020 18:55:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 398F22085B for ; Mon, 26 Oct 2020 18:55:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B+RoSleo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EZ3OY1dk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 398F22085B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=+5wJTOUYaYUFSvSwtgFA5QZ9Fcve91C9fDVYM49V2ec=; b=B+RoSleoTOLJMyKDJu461YqHU mjTcI3nSOriB44ZblFGLpm6vb/UWqrMANKurW9mPYUhpHWGZ9WMbEPlkdnNZLBf3DbV2+dH++QgbX TWUyYiIz+LCHM5B0aBeXMeN8GGRuuGuqURhS4t3hDMcMvaobwtB/+zH7kGpCCS/vm9T4kEcA6CmRq 5B9TGw4uUysRbqPqjVW2DRsfA2wKIWI8NDfeIAe3ItBeGNNDwFzyptLvFpmo3ifa1KWztDiNCracg Ls7cg+M5F3086qqsHyZbCsyP3+pqZqwJpyDJtX+5ds1lalZvx5vg8pBa5zfo0LkUdVjgzjRb3J8qZ M5GVxK0xA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7cM-0007CC-2A; Mon, 26 Oct 2020 18:53:18 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7br-0006zw-Bj for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:54 +0000 Received: by mail-wr1-x443.google.com with SMTP id n18so13896128wrs.5 for ; Mon, 26 Oct 2020 11:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wmEJBdHb8VsDTUc8zqykHFK0yjqq1TH3D9eWn2/3Qmw=; b=EZ3OY1dkf31OorA609trYpGLeyIew6esjS9e8BQHbpcZuUwVGTriDEjpCi1Zk+LEkJ 1A18WVYBtHmS7RsvUewv3EQfcuySD5/k+59Zbj1RE86+yY3zZTTCaA1CtaaMCNT81YJ+ 9+DgZR6qq+wGoVBgql1u2KasVdZymdkWNwERujKYhqXU/Dd5YKOX9xvBBPykW8ZwPzjL YUAxHghmvuelssUfQdbIMB+y2SchA3fl6uSibg8T6EUtS9KJZ6V+Q4eIHZ52X+w8CgwA OoRXYBrzdEdAokD1CXQjdRGy3ljDJzWseJ+IbmboKhWJtdipl1fzQE1RInpSx8/Cg+X2 nw1w== 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=wmEJBdHb8VsDTUc8zqykHFK0yjqq1TH3D9eWn2/3Qmw=; b=LTh99BuQL+0yfdd1mY2JrB3+LPzpjG6KTLsetNTwvcPmQjW48+l0MqQ8OZ1wLfSFGf oN9s89X4uiSeBo3lt+O+hrK2ipCd8s3ZFLdk4a8MvUm9Ft/rLySxQ0O0jHzXReEAkZMR q2RDU6MgWW+eUZuTLiT4E16CmrLXfuvTBpkIiGSGTW/d0K8qBo3NCxJUHbf5r4n/iOZA rSePpidQCk1E3TYBeGZFS0vxhHY5jNLMPjpS6+Nec8qEa54vLpMCdevoJE1pGHUZ7nU6 WcgemLBxRUiida0cQBckblQd90yO8D9zZd5od0o7b8/X633a9BllMj8eMs86x3YQaKz0 vLBg== X-Gm-Message-State: AOAM531TX884hYR7vxTCzy1mlzv8CUfR/nXGWxVEO08mO62lqiA9u4hl fmDOk6YlxX1DBkd+DfvMzAWlHFlr4ZTINg== X-Google-Smtp-Source: ABdhPJyml266Cz1fL8lVFciN70lXZHCur+b3U/JH6rFPzhIRH+rKMR3EO1e1BMWSPUXHB/RGAFJ2qQ== X-Received: by 2002:a05:6000:12c2:: with SMTP id l2mr19196554wrx.76.1603738366350; Mon, 26 Oct 2020 11:52:46 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:45 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Date: Mon, 26 Oct 2020 19:52:28 +0100 Message-Id: <20201026185239.379417-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145247_475859_398D6A78 X-CRM114-Status: GOOD ( 16.85 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We are actually using a complex formula to just return a bunch of simple values. Also this formula is wrong for sun4i when calling get_wss() the function return 4 instead of 3. Replace this with a simpler switch case. Also drop the i2s params which is unused and return a simple int as returning an error code could be out of range for an s8 and there is no optim to return a s8 here. Fixes: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation") Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 69 +++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 5bec7fbd0b30..70a2ec99f444 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -175,8 +175,8 @@ struct sun4i_i2s_quirks { unsigned int num_mclk_dividers; unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); - s8 (*get_sr)(const struct sun4i_i2s *, int); - s8 (*get_wss)(const struct sun4i_i2s *, int); + int (*get_sr)(unsigned int width); + int (*get_wss)(unsigned int width); int (*set_chan_cfg)(const struct sun4i_i2s *i2s, unsigned int channels, unsigned int slots, unsigned int slot_width); @@ -381,37 +381,56 @@ static int sun4i_i2s_set_clk_rate(struct snd_soc_dai *dai, return 0; } -static s8 sun4i_i2s_get_sr(const struct sun4i_i2s *i2s, int width) +static int sun4i_i2s_get_sr(unsigned int width) { - if (width < 16 || width > 24) - return -EINVAL; - - if (width % 4) - return -EINVAL; + switch (width) { + case 16: + return 0; + case 20: + return 1; + case 24: + return 2; + } - return (width - 16) / 4; + return -EINVAL; } -static s8 sun4i_i2s_get_wss(const struct sun4i_i2s *i2s, int width) +static int sun4i_i2s_get_wss(unsigned int width) { - if (width < 16 || width > 32) - return -EINVAL; - - if (width % 4) - return -EINVAL; + switch (width) { + case 16: + return 0; + case 20: + return 1; + case 24: + return 2; + case 32: + return 3; + } - return (width - 16) / 4; + return -EINVAL; } -static s8 sun8i_i2s_get_sr_wss(const struct sun4i_i2s *i2s, int width) +static int sun8i_i2s_get_sr_wss(unsigned int width) { - if (width % 4) - return -EINVAL; - - if (width < 8 || width > 32) - return -EINVAL; + switch (width) { + case 8: + return 1; + case 12: + return 2; + case 16: + return 3; + case 20: + return 4; + case 24: + return 5; + case 28: + return 6; + case 32: + return 7; + } - return (width - 8) / 4 + 1; + return -EINVAL; } static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, @@ -581,11 +600,11 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, } i2s->playback_dma_data.addr_width = width; - sr = i2s->variant->get_sr(i2s, word_size); + sr = i2s->variant->get_sr(word_size); if (sr < 0) return -EINVAL; - wss = i2s->variant->get_wss(i2s, slot_width); + wss = i2s->variant->get_wss(slot_width); if (wss < 0) return -EINVAL; From patchwork Mon Oct 26 18:52:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51FF9C388F9 for ; Mon, 26 Oct 2020 18:55:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D50AA2085B for ; Mon, 26 Oct 2020 18:55:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kLAiY7qJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vVLOtK8m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D50AA2085B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=szMhaJcrYo4lhJyyQwGbBQqAa0W9e2x1SylpVaAANe4=; b=kLAiY7qJGtEyT4Z1F1gGAhLhM TQaD4rXBEoMSJMzviL/FCaoWL1IWwgvYp09inpaVbB1ARzSkZk8zmPqma3rGI3D/CmeTEIU+4Lqs5 2SL8ogZ+eGWK76wawKVEzdLPYfja64qpzNCCtK+FBJnurLUEyXY/9D1w14ncU1ZJtmGr2iy55kFJm Wupe9y6J/tnInkClEZJoRuTHphDUf2e/liMa0pSSGTDMI5p2cF79LekFReEkUdTHH8/gZYhf9bzkC j5XF3NHzyswZei4tAeCH8+ZkFOAvi4yraOvdxIkS1IxywQ7HbRiKoPimjmNf7I8DGCAsHNC6gHRYM CpUky+91g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7cR-0007Dj-8s; Mon, 26 Oct 2020 18:53:23 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bs-00070d-I1 for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:55 +0000 Received: by mail-wr1-x443.google.com with SMTP id t9so13878786wrq.11 for ; Mon, 26 Oct 2020 11:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vv6KcEP0pEgRVjwTuPdIp9VfN3czru8sIUJtTzh+O2M=; b=vVLOtK8mYgdzzmwAfgghpGUM/8y74IOQuHf9NfhElj86slhBFUJ2xikU1o8fQXlsys 4ZQ4szXQEKqJtDXSWfPM+ii4jKzr/upkk8MRVYVSyAY5xHFGj7vrDqWmWDL4DggsE6lh Xq3HZmxGTDrW2KiMiGOmO7Bnr0rqnF+yM3wM2XoEwvRd+7T/+we7kNoBs3qog9/3uSas 0hBl51p+Vh7jiWZYGspoTBkyKtKvRkJYGMg0uOIo9fMt7l/EZadsywoErnaB0NgsT4rD StcuYC1KD3hLg3Po5DOtQKn7JoSGrjHTWY9LFT2BVTkZHfZwl6TwmqDkEpYKvKh4O8nA RHKw== 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=Vv6KcEP0pEgRVjwTuPdIp9VfN3czru8sIUJtTzh+O2M=; b=gF8QXihpz63ms2OvG4ROJsdRIPR7UAXqUN/K3HRWbRJyLLjYAkKrejYYlwdSPlDDY+ WMVBbuFz3ANLRsY39PpjyvxmmXVvUJzw7Z5U6D13wNjlo9xRLXgU1eMy2zJydHgQU34Q OMl31PDsgDBGoKaN9uKE5Oj6fRsGESEYmJZGtMhw80ltLP3aCdx93430UE2Z5dj5/EYY Q045v4TV/xvXtZqNRSRKp6OPRrihs052DGf42sGbxp/wjXSAYNhoyXr+0TroPhEx+DUF L1g9mllCkD1m+4w0c6Czvid9Hi1+bVOIwJUiVVX60MQf3Vw5foaTxI6RRlgITNibi7wM zrUg== X-Gm-Message-State: AOAM531F4JH+SCITVFqf12z7lbYN0C87vev2EenwPLofECR4ubNxOA3T WQ/dQKvySrUKLrVzvDBGR1o= X-Google-Smtp-Source: ABdhPJybIWpMD7D972LoAoQPWxab8VJL+oNVfstHnLCgUZLRlCuZFfTLE4t2nKMMxwNLZiytJVTt1Q== X-Received: by 2002:adf:f74e:: with SMTP id z14mr19241370wrp.312.1603738367548; Mon, 26 Oct 2020 11:52:47 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:46 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 04/14] ASoC: sun4i-i2s: Set sign extend sample Date: Mon, 26 Oct 2020 19:52:29 +0100 Message-Id: <20201026185239.379417-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145248_680366_52BDAA22 X-CRM114-Status: GOOD ( 15.08 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marcus Cooper On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem while we have only support for 16bit audio but with larger sample resolution rates in the pipeline then SEXT bits should be cleared so that they also pad at the LSB. Without this the audio gets distorted. Set sign extend sample for all the sunxi generations even if they are not affected. This will keep consistency and avoid relying on default. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 70a2ec99f444..beaca56a44ae 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -48,6 +48,9 @@ #define SUN4I_I2S_FMT0_FMT_I2S (0 << 0) #define SUN4I_I2S_FMT1_REG 0x08 +#define SUN4I_I2S_FMT1_REG_SEXT_MASK BIT(8) +#define SUN4I_I2S_FMT1_REG_SEXT(sext) ((sext) << 8) + #define SUN4I_I2S_FIFO_TX_REG 0x0c #define SUN4I_I2S_FIFO_RX_REG 0x10 @@ -105,6 +108,9 @@ #define SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED (1 << 7) #define SUN8I_I2S_FMT0_BCLK_POLARITY_NORMAL (0 << 7) +#define SUN8I_I2S_FMT1_REG_SEXT_MASK GENMASK(5, 4) +#define SUN8I_I2S_FMT1_REG_SEXT(sext) ((sext) << 4) + #define SUN8I_I2S_INT_STA_REG 0x0c #define SUN8I_I2S_FIFO_TX_REG 0x20 @@ -685,6 +691,7 @@ static int sun4i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, } regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, SUN4I_I2S_CTRL_MODE_MASK, val); + return 0; } @@ -787,6 +794,11 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, val); + /* Set sign extension to pad out LSB with 0 */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT1_REG, + SUN8I_I2S_FMT1_REG_SEXT_MASK, + SUN8I_I2S_FMT1_REG_SEXT(0)); + return 0; } @@ -889,6 +901,11 @@ static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, val); + /* Set sign extension to pad out LSB with 0 */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT1_REG, + SUN8I_I2S_FMT1_REG_SEXT_MASK, + SUN8I_I2S_FMT1_REG_SEXT(0)); + return 0; } From patchwork Mon Oct 26 18:52:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 487F5C4363A for ; Mon, 26 Oct 2020 18:55:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 DD4B9207E8 for ; Mon, 26 Oct 2020 18:55: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="pcmmnUZg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XPITp7Mn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD4B9207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=G+qKPce9m3rXmoCoGCZIC0rh9rO+gRds9E2Z1Kv8WZ8=; b=pcmmnUZgBfXgJ1AeC4CZh+aRg h1incpU3RdiygilKf0YthqLe/hq1ZapeHb+pDAbfQ/LFrh7vZ3SH0aaQeokrrEvflzV/48nCwaGXV Xa/yqYPjl/VvQRVgW5c2gvFbDuhCBwiIBo0Ag5Ak5YreDKKNu1E0TV+VXkQFc8Lsps/EjdUb2JX8Q JRrhgD52ilEtljSTz8C3anqrwwbJ9nH/ixsCkufGfPbaQZ/bmgzqj2o7RbJlPF/ZKFS7C7dvwulAR KxfjF5ERMFup6CfkK+K0N6Rdq+XsPLQClhbi/yQet5BKWwP/j5MJYyDMfrQdWp6JB8fep4ZY+Fu+P qM7+V6Tpg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7cW-0007GA-UZ; Mon, 26 Oct 2020 18:53:29 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bt-00071P-Vq for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:58 +0000 Received: by mail-wr1-x442.google.com with SMTP id t9so13878845wrq.11 for ; Mon, 26 Oct 2020 11:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=djM7OyfVgD6rWaDQbsh+ExufRJOlpqGGlwiwTkQsm9s=; b=XPITp7Mn/F7ykF8dNJcHLgRgIoXgXlp/x/xHlDBwv4gzqpHQZIFPutG/5sI+OJlIMK fiWQqhIt68mai1qt8GzW8z4MKvGRb/YwhrU7cNjkfYjUC2FC1w5FcqiGb4dZaOxoJc6V inp2DbSQjsd7THaT8b9AgiVKvxbb49QaM3wMvOHA2/NMV0UhRh3XBgul+DBqbINOPjHh nDaOr+s1DRoERDgX/yXQRF8q6811drP5IHIstzDRneRb9RfqbltzeNt7O0Fr+fxUHwEN BHzcVtIxco2ocKBM6Ljsd79OSMLetjsLJdcVxKYy5H+YvH6+ZE0WRxG88hKVPyPW2FfI /OjA== 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=djM7OyfVgD6rWaDQbsh+ExufRJOlpqGGlwiwTkQsm9s=; b=NtUhFI05WNRYyrw9fv4Ng/BKep6dP/0lyDfRjAiFxOaOMFxVEU3QFWPSumb+jbjYbV LBrL62G5oBxHmzgywh+8XtdTww5P36DLiAjzyG/3IOErHxWI/hC5y8L6Q2VzUH7p+E0o zRs844wWuzWK95fLFnBNVOUUn+dYiRZTfS7UC0qmoPy+4wsHwl9p76iQ8u1uKzv65+qx t4gtnMuQmHesu78/8b/u64TGnDOc/fZenQD2CsngNPvdPo14I6S1mctBAqrybTcbrFRm fouZdXBXi+0c8iWwCtg1OlXe7iBJaKqLjWKSWhhPgpI1/Yjial0z0iGvVE9LAqSmy4Iz A1uw== X-Gm-Message-State: AOAM533amNjUOrcDwliQYK4mtcWEbWSJqqVJLTVG+dq0gLCwMWmIm+CK gTxiK0pW8CV9TNqcaQx2kM0= X-Google-Smtp-Source: ABdhPJwo6Q8s0AOAx3BYAVnRxx4Uhh3HP4/cvorgqun4R1kWEC8iSfm/uBzLSX1PyYGm0OnWIf8i1A== X-Received: by 2002:adf:f20e:: with SMTP id p14mr455926wro.376.1603738368761; Mon, 26 Oct 2020 11:52:48 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:47 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 05/14] ASoc: sun4i-i2s: Add 20 and 24 bit support Date: Mon, 26 Oct 2020 19:52:30 +0100 Message-Id: <20201026185239.379417-6-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145250_116939_33EE0927 X-CRM114-Status: GOOD ( 16.10 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index beaca56a44ae..eee1e64cd8f4 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -599,6 +599,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, case 16: width = DMA_SLAVE_BUSWIDTH_2_BYTES; break; + case 32: + width = DMA_SLAVE_BUSWIDTH_4_BYTES; + break; default: dev_err(dai->dev, "Unsupported physical sample width: %d\n", params_physical_width(params)); @@ -1080,6 +1083,10 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai) return 0; } +#define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_LE | \ + SNDRV_PCM_FMTBIT_S24_LE) + static struct snd_soc_dai_driver sun4i_i2s_dai = { .probe = sun4i_i2s_dai_probe, .capture = { @@ -1087,14 +1094,14 @@ static struct snd_soc_dai_driver sun4i_i2s_dai = { .channels_min = 1, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SUN4I_FORMATS, }, .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SUN4I_FORMATS, }, .ops = &sun4i_i2s_dai_ops, .symmetric_rates = 1, From patchwork Mon Oct 26 18:52:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11F05C4363A for ; Mon, 26 Oct 2020 18:55:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 7A6B2207E8 for ; Mon, 26 Oct 2020 18:55: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="TsRqZ09T"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FWVA9Dl6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A6B2207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=pFIkwoFXDOlmjiwgPnmRa1x+r66bXFC7ekMKzcVTpyk=; b=TsRqZ09TIsjukbOySdSjhDYL7 yR7FjZqFhLNPo8iuAG3xPOGwvqu35oMjXPFD4Ftmq1+gFVf6gP+OkwdJPpI+z+vneWPgczxOWZvN/ GZ3EulkYa6V7wzhzCjSJfNE1+Ot9/p59EFW7TMbJUCVaZ6hkPpSNJtnnUjmTI9TiWzVJEdqEUqKw3 iJP9sT5eLFglT5y+xSor+HVuk/af6/qaogqBDd1lKwNZWH2D22dOKe8mwE+vLt2UVX+g5Qt/4+WYS 33yHflYv0EDbfq2X+1dNXebY0qRQsiP1bqutTVY5Dx0BFQWzFCv4eXaufUiT431LtB7mPodw7Vxjj BlegYBBJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7cs-0007Ke-K2; Mon, 26 Oct 2020 18:53:50 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bv-00071u-A9 for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:58 +0000 Received: by mail-wr1-x444.google.com with SMTP id e17so13877515wru.12 for ; Mon, 26 Oct 2020 11:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h875RQWcCnQKEon1vZMSs7fd8QdIR1VwpoRUpUdOrgk=; b=FWVA9Dl6Oj8NfNYWfN2+EWXfUan70boVLG9BRrwZqRpsC0i1B8A937J5ZcF+/BXnL7 OObwJKQ99Zd0EXLqZcBbJo+EKuBsgqFxWFiBliQPM9NMT0BFmgBJeSZfyBRWwnYMFjsL w1Rej3RC/ZqmlPJ5EWcwazpY3VDAytOpQ7r+qQXj/dw+zaJ9ujWus44x4fIZ9XieRwId XA5hdvrDFaFxVjJLEbXEIK/HkKpUIc96JQlQfUxnn4CHkvqsWUPVC5qNrnisYH06uPGy UrtwyC2ey3bgr063kjjxX2pDbkEUd0Wq4LfzW4Q6E4aolS0ehRjOH0GN1kRb7Vx0qTm/ QNiA== 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=h875RQWcCnQKEon1vZMSs7fd8QdIR1VwpoRUpUdOrgk=; b=f6re3/EF3DtqlhK4jtbgejtnPIX6FO4PFRUGIyO+VBUXrJ0ox72R/uHpkCUW6fDEBA 18vAdmXgeEuIkOMZN2TK4O9vG7EmFufTLuzp3IuLgYM6lJkG10F925D8Tc+1qoQo5mdz TyAUvc2HhkEiWadQTThCeQV/uqMqyMtJpq1CU7zjI3rQi1yrcLUlBpHMKRrqHHMItz93 HETVzr4ncIMx2CYzLbnXWINMzSWf8oerG/hTS4aBdCyrcxP6HxEg2m0ShC0cy6Wciw5z 7fdCdATnEwhuPM9yEehOwt9YsqYcEADmEH+8rCUPGT5synJRU/oIyzDlYKxeVti5YdG0 dG/g== X-Gm-Message-State: AOAM532KVHVmLogIjLKUMu9qyqxeZ9QMYrwuQQ7FwFW4af99AO2u/V18 g8wUWEppcJbB9i6bi6q2XJA= X-Google-Smtp-Source: ABdhPJypxi18UjO1yoMO6HQLdWad+3pWKFs2BpkRvBv/Ei72mwZ61uqV8oISGr4+IOKfHisiaPaYEQ== X-Received: by 2002:a5d:6407:: with SMTP id z7mr20814807wru.271.1603738369911; Mon, 26 Oct 2020 11:52:49 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:49 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 06/14] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Mon, 26 Oct 2020 19:52:31 +0100 Message-Id: <20201026185239.379417-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145251_440640_5605EE4D X-CRM114-Status: GOOD ( 15.15 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The FIFO TX reg is volatile and sun8i i2s register mapping is different from sun4i. Even if in this case it's doesn't create an issue, Avoid setting some regs that are undefined in sun8i. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index eee1e64cd8f4..dee8688f0d37 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1161,12 +1161,19 @@ static bool sun8i_i2s_rd_reg(struct device *dev, unsigned int reg) static bool sun8i_i2s_volatile_reg(struct device *dev, unsigned int reg) { - if (reg == SUN8I_I2S_INT_STA_REG) + switch (reg) { + case SUN4I_I2S_FIFO_CTRL_REG: + case SUN4I_I2S_FIFO_RX_REG: + case SUN4I_I2S_FIFO_STA_REG: + case SUN4I_I2S_RX_CNT_REG: + case SUN4I_I2S_TX_CNT_REG: + case SUN8I_I2S_FIFO_TX_REG: + case SUN8I_I2S_INT_STA_REG: return true; - if (reg == SUN8I_I2S_FIFO_TX_REG) - return false; - return sun4i_i2s_volatile_reg(dev, reg); + default: + return false; + } } static const struct reg_default sun4i_i2s_reg_defaults[] = { From patchwork Mon Oct 26 18:52:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A6E5C4363A for ; Mon, 26 Oct 2020 18:56:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E643E207E8 for ; Mon, 26 Oct 2020 18:56:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YDnp51Bs"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eZ49tzP1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E643E207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=8pPAli7pgImUP9GF3JZURycinL8b8/xVUXYiR5AbQzE=; b=YDnp51BsTEZGIB1SuNzr/iMRj zXN10XE7+35vu+hyAWzzG4+d/pgKOob9ITFwrha0KJJAeZbzTtIS50hl9zrZQx7QEO/1+arY0tGPA q7uUxD9AhrFeveSO5qcvay4VMKx16PmOCLnKf/PTlrl9Gr5QiC6ZjJ6+PPa/JQVhv0Y2kAUDQpF9S 1xSogCsN5uc9E0SV8MjJ1pRIH7+U7OAZUY1eT2XLVzByRSC8mA9zwm+GhgMrBOYCppLyXIPddDhZK vfO8vOD5xQMypJfIdI6ACJKj9kSfe7BvPxGj5/r1UR70VyufP8ghpvGXsswSvohoOz/HQmPK/Ub9B +DCtYCxnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7de-0007ch-Rw; Mon, 26 Oct 2020 18:54:39 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bw-00072V-AF for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:52:58 +0000 Received: by mail-wr1-x442.google.com with SMTP id h5so13884207wrv.7 for ; Mon, 26 Oct 2020 11:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MV0Vedow4etdUV5MYJB38BsVPsxN1obeyBLGuXltraA=; b=eZ49tzP1pyDtQrusuKWVvPynjdDSUYbYk/Pf7IjVXifYBHVV2xSmh1Y3Lw38u/5kY4 gYHSqwME7tvdlVU7ahKClZ6QaaHoGFxb1FC6NmU2vnl9SKgxQwDcuWfZltwFcXS0UsYY u8Zk0YYeyU+rrAfXzwuUPsgjJb/zaQVG8cSIkgws1xRnUTqXMVGybHVTCOnFBWKtOeoT yC0VHJguAIEAvXa+rR+DxlKlz/IYq/FNw9Cy6CB8/VPFfR1OtQeg5eR+7bqQt54Dq3EO /05v9D7ugOd4S8YI5SIglhv/UhlRyRR4g8e43fyMVGjxmxi2fDMfAh9MZgPsbccMKRlG UZDA== 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=MV0Vedow4etdUV5MYJB38BsVPsxN1obeyBLGuXltraA=; b=WuzjKtysMiESd3IhXIJYzt9vFfFXMRfx9ZAKOVMrPIjkrxa091LHk/5cMpbMXs2AhK Osb6rvc9qQmZ6OYf3VzP6+GqswW3mpSKQz7HAeki752m4gAqqphJo982q6EhnOLTgjrK ZNoT2DYfWi6pjsiyu7UpRDrc9r+wDn0WTly3TNfKVBOgXLJ+KAQi6tzlStJ8/86sj36n nvIG8uYBiqk3qJyOndTf09qHpoUCD6zKm5upQvXglBkfWRreCNQpFgB8EV1G3hk/AUSB S9DwL7OltvUYZK3xML+XJljLmZck+fiGPv82qKAArJKTO1Iz7itJi8m91Y+ixsgbif67 olmA== X-Gm-Message-State: AOAM532zXbpoFUmYuj6pyMYS4b3MzGikUaRvx5hGLvo8UUHwXwdqoDKD sUpX9Vrxndhv7DTg8T9cc6w= X-Google-Smtp-Source: ABdhPJyu8GqRa4KgXOETmGaGeq0afG8g9xoC8IeUU96J0XE4Pcleg0KxfIR8tThfFcir0kcQYxdxYg== X-Received: by 2002:adf:fc8b:: with SMTP id g11mr19587553wrr.300.1603738371204; Mon, 26 Oct 2020 11:52:51 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:50 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 07/14] ASoC: sun4i-i2s: Fix setting of FIFO modes Date: Mon, 26 Oct 2020 19:52:32 +0100 Message-Id: <20201026185239.379417-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145253_149938_DC252A48 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Samuel Holland Because SUN4I_I2S_FIFO_CTRL_REG is volatile, writes done while the regmap is cache-only are ignored. To work around this, move the configuration to a callback that runs while the ASoC core has a runtime PM reference to the device. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index dee8688f0d37..703327dc8606 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -595,6 +595,13 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, return ret; } + /* Set significant bits in our FIFOs */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, + SUN4I_I2S_FIFO_CTRL_TX_MODE_MASK | + SUN4I_I2S_FIFO_CTRL_RX_MODE_MASK, + SUN4I_I2S_FIFO_CTRL_TX_MODE(1) | + SUN4I_I2S_FIFO_CTRL_RX_MODE(1)); + switch (params_physical_width(params)) { case 16: width = DMA_SLAVE_BUSWIDTH_2_BYTES; @@ -923,13 +930,6 @@ static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) return ret; } - /* Set significant bits in our FIFOs */ - regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, - SUN4I_I2S_FIFO_CTRL_TX_MODE_MASK | - SUN4I_I2S_FIFO_CTRL_RX_MODE_MASK, - SUN4I_I2S_FIFO_CTRL_TX_MODE(1) | - SUN4I_I2S_FIFO_CTRL_RX_MODE(1)); - i2s->format = fmt; return 0; From patchwork Mon Oct 26 18:52:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C624C388F9 for ; Mon, 26 Oct 2020 18:57:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C26712168B for ; Mon, 26 Oct 2020 18:57:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WWCkHBoT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dg6m0j7I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C26712168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=07uPG3wpxSD9ZXRcEgejmAKDEXecMHtzUkFde3b83y0=; b=WWCkHBoTeILhU7SqzjGvBMbtF 6CLnhXV4ALHjIAWZbIl9ZsVSY8C1Zb/Hcc4wYkPcy9jZyxcqZAfKCG5y3yTRw9lNl8Tgq3mx9XTT5 rcBswZOxZ/zZ57LZ1dAX2DyVyKP9CpbzjAVN2C/OOXncxlmZZdf5hS/+KaXtjWhKXCAkc1bOmCcki z6axHalE9mhH0SjZis7qAZ0FlGVDHHHhll1ng+F5bb75XzE1Xzs0y7zXnguaGuHHjzpgIc59sTOTJ EaJZyj1Hyo3BXgCTnXneAVMXRyax2WYP5iXA0H/8j0Z5zMORxdjp3hKH1tiMz2g8/nwO8JoHGKK8m 2iobNDeLw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7e5-0007uL-Ni; Mon, 26 Oct 2020 18:55:06 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bx-00072d-Cv for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:01 +0000 Received: by mail-wm1-x343.google.com with SMTP id w23so11626641wmi.4 for ; Mon, 26 Oct 2020 11:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aXcJWmCyjE4JV7N+koe+BuRsgR3wUYxT5G2C2Eoj1hs=; b=dg6m0j7IUyaxxSU6zNyRyN05sgSBqfSaFqDhCqqDDd8ZXK4r1qkDMD/Iff0QYusv3n 6O3W79QMEsHQcYuCGB66HkmD4L4AAypNqleJiN32juSxrrpX85xI09ot4GCHdVAUQIeM NNTh7Q+qQhGnd20oPBqhsJeBYZJBKlLfXBdA4YL/AhH5tG6UBJSYx33P6qjPOhBiC2Yi I2mE4NvyHhSKXRdfZotWWEgpAA4qfZHmil75ENxyaDhLbaMpA2QFq71bg9+8FWRVNm/D TSvAZ5ceIaAM8JqX3Xs0r4eIOKrwb4zOFA2ZHyUHAMLA2Eu5GRwMK0upd3YXcRMI9x9B 4CCw== 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=aXcJWmCyjE4JV7N+koe+BuRsgR3wUYxT5G2C2Eoj1hs=; b=pQnEGs+GjstugnFRrMM1f/cisw3pLQyIPNz88KtW9eNpBb+bixbv3qqKVhQ/KY3arU re87LFsgaF09Av09ab4POyyB/oDQKg8Yve3Fs+RTqtGqXJKXXGnu+tvDjKT7SggwEExg I7wUsI7VG0PyxCPQ8wGknHIGJ0ISnApnNyM7xItVOAgs8y+L3V+RQ5WYzqWsk+KsKIPf /RsqmydlWAIcZwbBtTycvURswXStwZCYCrwDi0PowEl7pVTH7jWPKkQLlutq3DYOFeZu ffp6M058kogCqELqtP3P1U9aDx/TqpG1iq2k7TiZNevidJYcUqXcdM6KdHphCtQY5lnO TcrQ== X-Gm-Message-State: AOAM533p0cIsE8LAoxgEPZCCTpb/SeR+Yl3tnfrWv0ibfZaovJSWZiFl nwQi2aIrEINH1DmUgaJMpq9H9vC6b3dTqw== X-Google-Smtp-Source: ABdhPJxBlv541/Lf2h0pguCkcd6pss2YPC6xpTPtHEpX6NnwTD5nRe155Ai0OS1IncDdwxDMq3iWVg== X-Received: by 2002:a05:600c:2217:: with SMTP id z23mr18338599wml.133.1603738372270; Mon, 26 Oct 2020 11:52:52 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:51 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 08/14] ASoC: sun4i-i2s: fix coding-style for callback definition Date: Mon, 26 Oct 2020 19:52:33 +0100 Message-Id: <20201026185239.379417-9-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145253_551559_D64C1ABC X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Checkpatch script produces warning: WARNING: function definition argument 'const struct sun4i_i2s *' should also have an identifier name. Let's fix this by adding identifier name to get_bclk_parent_rate() and set_fmt() callback definition. Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 703327dc8606..08e9e71f455f 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -180,13 +180,13 @@ struct sun4i_i2s_quirks { const struct sun4i_i2s_clk_div *mclk_dividers; unsigned int num_mclk_dividers; - unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); + unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *i2s); int (*get_sr)(unsigned int width); int (*get_wss)(unsigned int width); int (*set_chan_cfg)(const struct sun4i_i2s *i2s, unsigned int channels, unsigned int slots, unsigned int slot_width); - int (*set_fmt)(const struct sun4i_i2s *, unsigned int); + int (*set_fmt)(const struct sun4i_i2s *i2s, unsigned int fmt); }; struct sun4i_i2s { From patchwork Mon Oct 26 18:52:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6DBC4363A for ; Mon, 26 Oct 2020 18:56:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6A1B7207E8 for ; Mon, 26 Oct 2020 18:56: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="Wtor7Ksp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uBXDPovO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A1B7207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=Cm134K8Ou7vH8szG8/qsuBPWhSh5Wq6iAYalcieDdzI=; b=Wtor7KspLVkpF2hjqXqFPnlvg wsJysXyUK/8OAuvR+6l8W63vI3Mhj8nYDrCK1djwfC2d6ebbYyCwTe/3vhxeSg3lHByjQWPoH/0Md VuSzxFswRHAkmBt5XTAVlGmm35Y7aRP41uZuAXqYf1CevP9n8dJqp7V4ZfIqBDhI+iSLDAkcDBjUF LklVlfU0PoXnajEteUat4z5Z6lN3fr+tkT9OKYgD2pdfgnY5ivCNvAw8g8sx4NQZF5pg1ifyw/Nww erBVJdHxKz3K0RIURRMXtQ28Ro2drfB2kDZAbB7Bn0/c1aq/+G4mH6i7qktazVFLm7mqkH38A/otY CznUOn7mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7dr-0007nd-6C; Mon, 26 Oct 2020 18:54:51 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7by-00073Z-9i for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:01 +0000 Received: by mail-wm1-x344.google.com with SMTP id k21so6341454wmi.1 for ; Mon, 26 Oct 2020 11:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oVJ/FVhCtH2Sw1ZFhzCNscPSk9Fte7d6nvWFGpvDBLs=; b=uBXDPovOBMFZVFMyi0ecnyb7gJHKEa3Y3Pg+Eii0aAU5BShE9k08HtG7/c9C+TFRHi fnfGwvw0D2KJ7aI+fTnroNOkyGXBBNLuzhIu0R60c0if/dTK4v0BmBH/mcQnKzafs8UJ pHp9ccXYpc+GhX++zeZYvY1iLs/DrgaVuqD1sGnexx6lUfGJVY9/bBupxLOTOx9s80Gk ARZPUiQSvZZGio9kDWoxdEEnotFLM+7zm8kbfcbcMM4FkJ3xxROPpbW5ZGCBd1j7bFWh X2vYjj0j7FoU4jbj+XPpSw8bICZICZSNVU3sYx5plZywhvmc60k847pOaFqO7BzgwG44 qKkA== 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=oVJ/FVhCtH2Sw1ZFhzCNscPSk9Fte7d6nvWFGpvDBLs=; b=aipVIsNntwOvWqy5opZj4BTDpKeFgOAqZivOVmBqfYgCvniSqBgA8kW3jY4pWGXYKf JPDItuJy+n3MaO4akCuzpQcqrhQun67tJHGVgteYGzIdckhQ72l2cAq7rb9ElQcaRudx XaAUIqKKVohc3AYiWw4KHWD5NZJjx1lm/0HzJB1LOUZRi/67iBpuMyQ7gcUEewgPpu1y QiZYXi/+JzAO46Bpu+1I8df5Y45VuXnbI19+B1/CDdCjgkNqx4KhVpZHLl0CWc2T6Gfv aZ93bfYpMEYJg6eV2vWGuXOwysJ4tg1RWJ2zJQ/SCCGvLEm0xxSwV2zhLDXS+Y+aMoZX 8L6A== X-Gm-Message-State: AOAM5313kqMC9GB3phIEwAT/OEjbrmILIlVh3T1VFwJY+QaOt5pk2w62 uhCagulqXAeDHzKep34FfBU= X-Google-Smtp-Source: ABdhPJy7j+KMA/VXg7iUDvdY7i2s3it0/Wo2TIqkY/QePxE7/b2ra4Owlarv8r/RVj14DNs1rp1Nug== X-Received: by 2002:a1c:2cd7:: with SMTP id s206mr16706454wms.182.1603738373249; Mon, 26 Oct 2020 11:52:53 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:52 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 09/14] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible Date: Mon, 26 Oct 2020 19:52:34 +0100 Message-Id: <20201026185239.379417-10-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145254_437364_AF5B4812 X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, Rob Herring , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jernej Skrabec H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 112ae00d63c1..606ad2d884a8 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -24,6 +24,7 @@ properties: - items: - const: allwinner,sun50i-a64-i2s - const: allwinner,sun8i-h3-i2s + - const: allwinner,sun50i-h6-i2s reg: maxItems: 1 @@ -59,6 +60,7 @@ allOf: - allwinner,sun8i-a83t-i2s - allwinner,sun8i-h3-i2s - allwinner,sun50i-a64-codec-i2s + - allwinner,sun50i-h6-i2s then: required: From patchwork Mon Oct 26 18:52:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBBC1C2D0A3 for ; Mon, 26 Oct 2020 18:56:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6442B2168B for ; Mon, 26 Oct 2020 18:56:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ibQlcmO1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="u92gL6J5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6442B2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=eGSvFeNfdH0mR9UQpEN/s6mcDQ6QKUk9jeTCpMiUUpk=; b=ibQlcmO1XsctwC/uuoBk8viC9 cldB6Dg/VG6mJklKvxlfZorJMScTc+xPXZboZjE68tT7Iq6ZPpppLxsftmzlJroKd2Di6HMZthDh0 2aN5y6rozu8ZSpRQWXLR/IcCnpIzn0ANJEQSzOOFUEF1kTzh99X6xP3xEdu9f7wixowvMy6hPYKBi 0rV5ThQCK8ufbobqiisEO8mp1cVSnOerISrUoDk1/oEKQwfRyN60AsuGts9wmUeiXXHDN014AGMJO 5h4wi+XQPtCwIURxg7yrTAz7ptpRtVV45XG83WtmEBVB7zPQOsTFA4cT18kT5cx33jJ5kqpiIu9f+ x23fTGnlw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7dx-0007qp-Tj; Mon, 26 Oct 2020 18:54:57 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7bz-000743-DP for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:01 +0000 Received: by mail-wm1-x344.google.com with SMTP id a72so12732574wme.5 for ; Mon, 26 Oct 2020 11:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QarSYS8sybXOFMHVXdp4I9fWDCgninS8jZ0IjR0OesA=; b=u92gL6J5QB2wSKmArlF123sP8XwwWi+2NKdf4veonS68veeQLO6FOpGw3MyzwrD0T4 4FgkFebcUrBd40EwOKP0QbEeccHu1cdWWL2jOWXmnvZTdJ3zkUdB0PxoB8ZHjzbsYrzP 6jJ0UDiqaU6bZlX0dIKlRIjNbN1N63tu76uTKjfcz/rMaz7tVv93lytst3mUoe6f+qh6 xeNDlgL3z7LFizkwxkw140LGmYuqMPHiW68mlbCBuLq8GZMu0rcf+3LmUhvNLlkA/O/X yOn1W1ItYbUuq1AwPFkU3wpkJOdb/d16IXEweZ27LDfiuEaUsz+HwvF+qOLy4OECvEku m4cw== 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=QarSYS8sybXOFMHVXdp4I9fWDCgninS8jZ0IjR0OesA=; b=COiGWuAgLR+YD7ZBvTo+ecKDjc8gqcd2EXBgf3KM/RFiyyEWqMVjHrkypJo4P8eUaX 4jlGAry4Ax0K8fMc4Id4N/75jz+s7iuVoKRkZtApWuvLk7FF9OEueZ0xIeu+zoVoTyYz RDsJhdquEj49QF7SD5obWYV+cmH43Srn5M9fd+FKdDe5R4/43S6SKdh5k1AaCWXqX/fp YGhjc/OXsmb7h/INLI5O2Up6/ar33H5+EthDnywvbtBThb2/t3XY3NtZIUZom0hfvpiU vwajsgTj2h6yFV6NMAI/wvoDB8Jr/9hWq6jDalhyNLJIRH2JQEoTlFssun8VTdDwswgw Vkig== X-Gm-Message-State: AOAM530L89R48EmtOJlEH0is8Zw8JxC96YetVOjair7jjFD20O3tiyPc 1PFAhUxCKKdFjuxn0r+LytA= X-Google-Smtp-Source: ABdhPJxgw5SMQfquJqSrV6lWqN6sjacFWgBT9bI/RfmLwJG2Tyts6s4IQJrbsVWk+LiwpvA8cNv+Tw== X-Received: by 2002:a7b:c387:: with SMTP id s7mr17326513wmj.52.1603738374351; Mon, 26 Oct 2020 11:52:54 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:53 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 10/14] arm64: dts: allwinner: h6: Add I2S1 node Date: Mon, 26 Oct 2020 19:52:35 +0100 Message-Id: <20201026185239.379417-11-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145255_558482_8D56BA7F X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jernej Skrabec Add Allwinner H6 I2S1 node connected to HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 28c77d6872f6..d915aeb13297 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -609,6 +609,19 @@ mdio: mdio { }; }; + i2s1: i2s@5091000 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-h6-i2s"; + reg = <0x05091000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>; + clock-names = "apb", "mod"; + dmas = <&dma 4>, <&dma 4>; + resets = <&ccu RST_BUS_I2S1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + spdif: spdif@5093000 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-h6-spdif"; From patchwork Mon Oct 26 18:52:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78434C4363A for ; Mon, 26 Oct 2020 18:57:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 15047206FB for ; Mon, 26 Oct 2020 18:57: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="FQZ3V3Xo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WlXgi3ym" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15047206FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=dRRXA/dNnL5Sejb3WqO36iKHO7tHtuW3a4FckLMNN40=; b=FQZ3V3Xo83TRSQS3S9t2kx9Q5 lhETrmFbCB7xhM5GQ3yWJXwDGTAzFf6IDfUsrsoQU4zjN7pd4VBVjuXnrQr/zvjmBWq5o6v2NwOAe lxItq7tYcftSn3ts/RIz8AlZZf70VpaLPnNfPKklZDS0tRzzqMeU/gXJb2nioqXn5Y92AHe0HFERG xvaSUUklR9uqVRMT2mFVLkgWsAMu/yOete8IZJ7H3RPtYoobuCbzfkkmwZs2szF9TMK7GfHGs7Bl8 As0cFliLZbhgVHa1Rwz/vk4XUje6L5xoQDqZsG3EYXSJMKodY0fzLFWXaX19pUbIDEyuDDgHhFVJc SIHh+6CmA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7eU-0008B7-Og; Mon, 26 Oct 2020 18:55:30 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7c0-00074j-Mb for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:05 +0000 Received: by mail-wm1-x344.google.com with SMTP id c194so12730051wme.2 for ; Mon, 26 Oct 2020 11:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8Id6RP1VS5hXJUMhUzwY34yVBORZ0nCdjPMNOwgBnW8=; b=WlXgi3ymiC/Ubo/PzKwduzc4BIThfTVXjlRLU4CHZSknn92zErmgO84jYxWUTyYyCL YpSvJ1XB2cYCyWzRrpdXYjdiMMprVs9FCJEXzR+p43kkMa8G16C2Pvu+OXyxdMwoqRLL EX4+mlJqVx92boQCiTBE+aSCk3k0k/eoyEh7kRn00cVnvdgGhZC/cb8uUYdLcmDjJ3wA 54kjh2qL863imX1xYwi/ZFXB4+kLiufojw1o8LdLKOD0/+MKmIfHyqJ7ZcdV0rbKtVNh f9dRRMwYxBJXg8yaIXWjJwIJpnbAUQlCnpm5qXwRaV4trcvTcDHUHXE5oBUy8Jf3XXp/ qZ0Q== 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=8Id6RP1VS5hXJUMhUzwY34yVBORZ0nCdjPMNOwgBnW8=; b=lYdzvRm7QPA2LrxLWdMbXzvdJ0y8BtOZHkEPbPPDwoDv0xfT+Ff0W1V4QAqIKqNmAi xNBld0amDzZs6C30oDxgbBu2bIWWA8nf/xeaTvYgDni5jQGZIg8o/bog3KwErz5BdoWX fpdbe1t4s55lQeyrllZg3snsx8PECkqQ5LGJvdpDg4RpC2nAZ4Rdis7LOA7Fs8fXHfAg SOgSusmM4LHbjgTN91A7z73d8fC8vELJlRBhNRtSatUJxciRL6wR+0rLnZRdS1IAGsZi YSTPeRyBHi5LQcvL74WCBnP7pjfBm9tQ86C2L5DZSfGdai4mFjJ2hfnpO5h0gILfDRHz qqqw== X-Gm-Message-State: AOAM533aI4ytgfxaUaSKDmiJBbSlFZM/zKWCKMLczDGu/0fExzJm4CvJ /bQQyqTLHLMojOSODf1yHOk= X-Google-Smtp-Source: ABdhPJyN4CjTNG4J5Ml9NRNFEcWr332Wcn8VdYW4a5pi8ZXoEXVceEdrWEj8A0jVkbJ6B+hg437e6Q== X-Received: by 2002:a1c:48c3:: with SMTP id v186mr18754491wma.16.1603738375499; Mon, 26 Oct 2020 11:52:55 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:54 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 11/14] arm64: dts: allwinner: a64: Add I2S2 node Date: Mon, 26 Oct 2020 19:52:36 +0100 Message-Id: <20201026185239.379417-12-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145256_872644_8877D0A7 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marcus Cooper Add the I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index dc238814013c..51cc30e84e26 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -846,6 +846,20 @@ i2s1: i2s@1c22400 { status = "disabled"; }; + i2s2: i2s@1c22800 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-a64-i2s", + "allwinner,sun8i-h3-i2s"; + reg = <0x01c22800 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; + clock-names = "apb", "mod"; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "rx", "tx"; + dmas = <&dma 27>, <&dma 27>; + status = "disabled"; + }; + dai: dai@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-a64-codec-i2s"; From patchwork Mon Oct 26 18:52:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFBB4C2D0A3 for ; Mon, 26 Oct 2020 18:57:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6D2932168B for ; Mon, 26 Oct 2020 18:57:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dDgVFioO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iw8Tt0Is" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D2932168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=w5BWTwNx3E0EMBqRHJVvIw2MgmbAlGXRep4CI8O2KZ4=; b=dDgVFioOYd5luacclHHMbNh3S v4HbZVWFdH1ALzaPL+TT9gDTQdN5CaS5FI/fuxHuubfYIV6KaYQg/Wf/G03LOJ4aHtxs/6tzIixT0 lXq5cZK42ixIz1DB/tVlzNJUaskvydSAMNlxKl7xdJQdegYLC0kdmdlKe+SxaVvvKwy6obh2wiQPD RNeNcJxTDxdjrHVRi+ZfmdEE0JaMEOg20363E6DMZuRogtSnKcxFJBA3oUPOUPk+pA24TGgVbTKgz wCMbQ8HwHM1v2a8QEGMf/ax1y7K7UqPMwDDpN6f6xBUPfTWjxo3PlpwNddCZRqofxy+i9EcuudnNh 3LBZqclUQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7eG-00082L-2X; Mon, 26 Oct 2020 18:55:16 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7c1-00075L-PK for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:05 +0000 Received: by mail-wr1-x443.google.com with SMTP id e17so13877965wru.12 for ; Mon, 26 Oct 2020 11:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Q1L59OjiDLpqGnNODju6fMwtd7Ss5Fh+8syeSPkSMs=; b=iw8Tt0Is9e1poafENrpZRdDGZVwI7kf1UF12fsc7eBsHdZG7m/c+OWT9rpHv00odup dtimc86iK7hxhdNQiK1T2fHMKOB41WAQarBsqN7LAHDC/vE/NMqBNRwLgU/ojm1MWIRe TrpqOy0sgIPCyhQ6iJp9FdUq6gpdFdyFj+a1Pi2qU8WzCPgj089ano7c43mgJwr1SCLZ VBQqHv/KZRwg1VYINGpImGAbKEdYS5t36i3vLyjSEII8IZlxSTYIxcYx9JVCLyden0Mg Jo/OYJxHDb7A9p2M/q2S3MGkYq+DfxE97bporPOXdUEgZX3RuNpmRqe3g8iH/MVFb/L1 yJ9Q== 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=9Q1L59OjiDLpqGnNODju6fMwtd7Ss5Fh+8syeSPkSMs=; b=tLCzkIfW8hgXhpGpf6NbEAC2k2LLfoRKQLO6hR/mJTNdZvN0ynpd6UdRr8WHb8AlOZ rZ9uGNMzXc028gUk9vYBtbjK95nbY+0kuaRFrnBQGyYZEBVMfeRvHWAb+NAgI0UGIajj Yr2L5JLrMyprxJApvG5PptIX9wFd7ImLuMCwJhxN7ii9jQ9NfiigerUZtREzy9nOEEiC 1Kh3mx5lJruZnij15obs6kH2PW7FrCJ/o4bw9NL55RJGvJmelu0InfDKEpb0RA480W7n n8iK+VsmDcM4JTroxX0lkljBHj3cZbLwXyRsj4h28P1V81b/IGz4l0iHntW5mDWNJGgo iYGA== X-Gm-Message-State: AOAM533OgjrHd71UTP1qBvG9T0lfgn04rxT39S06rNNWQt8vQQ6u8uuA 0AX+7xShLXgagLn/uHUb8u4= X-Google-Smtp-Source: ABdhPJyiT4V5gb6oDpX/aFZI1JeMO7JWfrwtaDrhwLJO/4XfXKX9LirC57kBfE+n68pmsi9+UXUx2A== X-Received: by 2002:a5d:4409:: with SMTP id z9mr19000599wrq.236.1603738376721; Mon, 26 Oct 2020 11:52:56 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:55 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 12/14] arm64: defconfig: Enable Allwinner i2s driver Date: Mon, 26 Oct 2020 19:52:37 +0100 Message-Id: <20201026185239.379417-13-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145257_870296_CB37005B X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable Allwinner I2S driver for arm64 defconfig. Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 17a2df6a263e..3f89f427a355 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -706,6 +706,7 @@ CONFIG_SND_SOC_ROCKCHIP_RT5645=m CONFIG_SND_SOC_RK3399_GRU_SOUND=m CONFIG_SND_SOC_SAMSUNG=y CONFIG_SND_SOC_RCAR=m +CONFIG_SND_SUN4I_I2S=m CONFIG_SND_SUN4I_SPDIF=m CONFIG_SND_SOC_TEGRA=m CONFIG_SND_SOC_TEGRA210_AHUB=m From patchwork Mon Oct 26 18:52:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12CECC4363A for ; Mon, 26 Oct 2020 18:58:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 7FCCF22242 for ; Mon, 26 Oct 2020 18:58:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q9brsVc/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mY8aroLS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FCCF22242 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=VI2Y6/HqVuJqCXymYCflShYLJljcxFeWoZkScQSBcPA=; b=Q9brsVc/704x8TLd9NYnq3Tva ZSD2+6BAj0ofewHFHIv9dLZnYEjT0RaUwQwqdmLqYkGTLjhhcc3OZ4f4xU/kmN7thOM3RxSAi0RlD ww0Rb749fpWE7Abe0rJ1JPVyL47lZyz3wiNQp9CycgVHQwslMPxuYqf0O5NgJ9UVHE/0LgmC8VhHw bguXTMPt5+JBRlLhBsWVEPwuZV4M91EuXblXab/1BSZ3h2uRYswO5bVKnXRIxgxLH2PXyzcQ4LTzB Bbg5piZfGDKeZ+bkmkrVSnlikwb/1ZY4BO7oqU12WjKmxxUKUOCdLejs1nq+Wq/MNOb97zZIGTQlX eWJitZVzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7em-0008Lm-KY; Mon, 26 Oct 2020 18:55:48 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7c3-00076D-4a for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:09 +0000 Received: by mail-wr1-x443.google.com with SMTP id g12so13894650wrp.10 for ; Mon, 26 Oct 2020 11:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lryb+OP/I/Ms7egySRuAjr25d3wKcdnJ3fbOd1ZGv1M=; b=mY8aroLSz1nGeSrxTnx4Sme9Ni+bW451qsuOiXSkc24mpKnaIx7sbNAOq8L+/XsdGC avDTaXB96y8l3eO8DMVKu/o1Ey5ry7zZ/bdt3gr+06tix6M9L8kMJ5ySpnw2buWKbNYd YGmne1cE5QISH5mQcRwV+0Z19VJ6fDomD3HiTB0kXd0fl+IHlmHXRsXWo0aBj/ueVzfn lum3gxVPEzy746i5yfrsbJCc1AJUOTRuet4tj8CzekBS31XeGQ7GlzqYqzVp/15xgh4X bxDZ5KWf6K+WddQqEa2EzeV8pVvwqY343L+UFFcv9ow3Yag6SBAh7FVLkE76ObcyjWRg H80A== 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=Lryb+OP/I/Ms7egySRuAjr25d3wKcdnJ3fbOd1ZGv1M=; b=r63aXcBQJltImKl0+X26ZKz2bt8o6P80d7/XoKk0/dZK5hM4aYXAQJ6jT2mXyAPy++ z37FLxlpvllLFLHixBSLoCRYqz3eknjBFL1H6Gizrh6PggFG0dFGGzYhhF2og7O4XIki KLZm6bKyUxkJffNVLmw+kaScR/njELrTKl3q8df0Vr4oppyVls/TRmmXixpbC3PDa3DS guGVgRLbhLVUVspCRYHmC4v0zco39hCZdW8Pd/pPzI5ZnSmgrFw1kqi8dQYmV+xS5DGC evE/AXpEIPLXd9kf0oN/mNmMVuJJGjlSm2nTdRV3le6yoA1jcyIbfgSd8IKkoTJwJb/c Rzqw== X-Gm-Message-State: AOAM530nhfxjCiO9clSA6yGoMuwGkVmvJKBgD4fhYtUpJC/ZpNAPCZ1E 5EutHxv5W0MTOGKWac0xH1k= X-Google-Smtp-Source: ABdhPJwEG7gDFVW6v4Is0z5snwiPucvy5DMtgCJWZospVdAskQyaVJFTeCV2jan1tgP2/IFBf9IBWA== X-Received: by 2002:adf:ed07:: with SMTP id a7mr20391118wro.326.1603738377924; Mon, 26 Oct 2020 11:52:57 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:57 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 13/14] dt-bindings: sound: sun4i-i2s: Document H3 with missing RX channel possibility Date: Mon, 26 Oct 2020 19:52:38 +0100 Message-Id: <20201026185239.379417-14-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145259_298457_CC2E3355 X-CRM114-Status: GOOD ( 13.68 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, Rob Herring , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Like A83T the Allwinner H3 doesn't have the DMA reception available for some audio interfaces. As it's already documented for A83T convert this to an enum and add the H3 interface. Acked-by: Rob Herring Signed-off-by: Clément Péron --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 606ad2d884a8..a16e37b01e1d 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -70,7 +70,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun8i-a83t-i2s + enum: + - allwinner,sun8i-a83t-i2s + - allwinner,sun8i-h3-i2s then: properties: From patchwork Mon Oct 26 18:52:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 11858427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F11B0C5517A for ; Mon, 26 Oct 2020 18:58:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 83E74207E8 for ; Mon, 26 Oct 2020 18:58:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D2ssNfNC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DIqiIhUh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83E74207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=SojcYAfoLHdfuBIQ7POmQBiSQz/LuTJfKzt9zj7C4UA=; b=D2ssNfNCe6PRAooyANWixK+rK NSmX9cMIgw5V3TKa3eXhngiueHw7XuL6XBHwliKWg5Aw/Ntb7O4cyhZ7fAdrxPVl3n41PNEBkRvsS 8HJ1U3AliaJaeQ5Tv7qIFnK8B67CNlZWYlkv8e496mc5Nzi4eFeoVUbjyqg4GMZov58Uv46Ei/BWz G4Wi1qaYQAmdCGshav3uBUJwdG2hWugtj/SZDrzcsmYxXSoJO7X47u8Ck3o4wNgYiDWSzLFpqLsoz 6nwzsmTnIYeca8One1oACzvCpdZOtWRnSWYY8p9DkoqJH+Q2MXBftxXl6drIyCR8CHVkpc1s7tk9C HeCW+Y+gg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7fN-00007k-1T; Mon, 26 Oct 2020 18:56:25 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX7c4-000778-KF for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 18:53:09 +0000 Received: by mail-wr1-x441.google.com with SMTP id h5so13884695wrv.7 for ; Mon, 26 Oct 2020 11:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q/UCGl1ZdUoHsUHtTTTH+r1dTXLa/BTl7CcT5LFzhtQ=; b=DIqiIhUhonx804JA3IaeN4hYc06KnnU2EF1HKTwHNUhQNo9r3vUj0GlTOnUeYYaOfp OwS1wS7/1Nc7Tj+8oDShX9ZS+alIoPCpa092o7cB6hNb46HA8Woik4JR2hmwEoHtyFAH ubCydzwQZbyED/0Q/+ZIN6a+9CWlOfyDJP+bODHkx7B2Kdk4LBro1mm4taAYttUWjBlO T1GFKt0B1Zzh5ENqkUeVQW6nbSJnFuvkXXPwJjfKG5qViRhNc6jpYrkCYj80JNWk9wQb z1Iv2Hqz7m4AGNEICuni8oOXh59dlODCdTnGTWZSuOPtWqfV1JgINpGqiL25tmrW1Eih ltIQ== 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=Q/UCGl1ZdUoHsUHtTTTH+r1dTXLa/BTl7CcT5LFzhtQ=; b=Cvjk7ddmj2gVX3ofzqWBedZRwzKQl5x3MceC76VuuE8oApw2nnYkWn/Pv8YfehTPCj 110FnJgINYgLJOusIBuBVtoZl6bejJ2ihCEMhgn6zSJsmc3R6V3HNZ8pDIrqyLBeNTIM jZoTsBrgRsiZc+nllFHehCaqmEW/MdqCmV1JEa0i0SYnMF8erEZ1AvC4olkCJDPVSU+i 9LuKEKiLTKzEIdf7Fxv/5yvXunZERGq8om9hxv/qN9ZW9zVVGX64tM6CXPi8MTx4bno1 vKcQO4ywETG78Gwx8u2wI3LV0fmuf21ANn8o5dicDPbUPTvOwuxv6o+4hhEaaVdmm0Zz yBZg== X-Gm-Message-State: AOAM531gjEeadNoqt3NFt8d4NQZZ0nqlCR6mW+a5iy3TgHcRjMOG05jy vd0P4v6fMUajm38uyJzp+PbVNUT7mCmMzA== X-Google-Smtp-Source: ABdhPJzt15q0t0XPBPjQPAJ/s6VmWe12hX+3q3e0QEM0Az41sDuRv5NLGwZwVlcatelVl1YVh6kC9w== X-Received: by 2002:adf:b787:: with SMTP id s7mr20510174wre.390.1603738379048; Mon, 26 Oct 2020 11:52:59 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id f7sm24885193wrx.64.2020.10.26.11.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 11:52:58 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v8 14/14] arm: dts: sunxi: h3/h5: Add I2S2 node Date: Mon, 26 Oct 2020 19:52:39 +0100 Message-Id: <20201026185239.379417-15-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026185239.379417-1-peron.clem@gmail.com> References: <20201026185239.379417-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_145300_755569_6BE2416E X-CRM114-Status: GOOD ( 13.19 ) X-BeenThere: linux-arm-kernel@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, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marcus Cooper Add H3/H5 I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 22d533d18992..9be13378d4df 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -662,6 +662,19 @@ i2s1: i2s@1c22400 { status = "disabled"; }; + i2s2: i2s@1c22800 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-h3-i2s"; + reg = <0x01c22800 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; + clock-names = "apb", "mod"; + dmas = <&dma 27>; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "tx"; + status = "disabled"; + }; + codec: codec@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-codec";