From patchwork Fri Oct 30 14:46: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: 11869883 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 5FB49C00A89 for ; Fri, 30 Oct 2020 14:47: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 D49D120724 for ; Fri, 30 Oct 2020 14:47: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="JC/YCGlS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y2jToFx4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D49D120724 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=8Q39hVTaTYwON7fAAdTjmbjezvRQ9UF4brZPUtSLO68=; b=JC/YCGlSJ4POHh5WMaQTebwlx hZS2cKzwfvxIITHaaHmKJ659TF4pbPuPtwT0VqrmHXDdyLa2m0ZIVMujFi5MpN1Y7S/2V/k/8HoiE V0Wy3g970SQ2E7DN1HiXVN+/bS7RydMafgpoA/0Sc6/Z3GlZb2/67EFPX4/TEiAnUDzGsdlHeCL+U U+U+RlizNGGRFnl1MIrfgjnNf4iNYoT4oW+wrn56t9tD6JWWcP3yTPUQNPu/m6ai3lL+ETEybzPxA 8Kzmex9hd0hRf+A3lAr5t8gnc8m3vLBykwfNAipOcUSObdd7dV+VvndaeadTiUAhp78c9rKK+f+Xz JTwqXLn/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgQ-0003aJ-9c; Fri, 30 Oct 2020 14:47:14 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgD-0003VU-8m for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:06 +0000 Received: by mail-oi1-x244.google.com with SMTP id s21so6928476oij.0 for ; Fri, 30 Oct 2020 07:47: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=3qfHTl4VFh+ziVF8DZnZZxGvPiZ3kXKnx8+g/Z/rsTU=; b=Y2jToFx4AU4O8l6MTP1yj9T4elz5vBsHBjtqe1vd3QFHWL77In8VjsEzfP3I9Pso/e fCOKMPBOFqUWmuBJ8dMHE66athLBWQjlF/x1pLjV1/cIl2SagQ4rWpotjPeopAqdlUNq i79GbMe0/Pz5I8ELPNrEZMynblgiPRZirosjXMPA7TmyUDBIZ8RAFzo1t0zMOXkMNt8T CI/D6gwN3DeJH8B+xWYc22vRKg43yyAIFWayUuqvy2o/o5sb6EHe4twl+ugCF2l6H/us elkEQVvYHiobuIi6FwCfG7bvsHfPg1/SlzTkpHG+BAXuU46N9W0hK0LN604FvjUA2UmO LQ7w== 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=3qfHTl4VFh+ziVF8DZnZZxGvPiZ3kXKnx8+g/Z/rsTU=; b=E7+n2VURVZAAR4HfRCygtKCf5HeZ0npfLLfoJUuBxBspp00loGeDixQ57uICiQ+1t1 4l8ORdikFhnQeDPUZXoiJGGhsveK+8Brm6KPkq1+wVgIy4+cfeVwoMVMbAx5BLnXVfH2 RQFji4j6AOn5hVAFsCVPNlFoJ99pYqmTX7Tua7yEX/ZN5B5JMZibDf9OLySUMUoI3BFF z1V/GWqxz18ej1AGkek7d7pk+6OD9K3Vw58qSvc3W8yl0ej+NBLt4TOcL1CSE99c8+ZR jMj02B7xKXOYei2I0IueXtAdZ8m0kFsoTM5/TD5UUNjEgj+8nb06ogl43EHEKM5siL7Y Z0eQ== X-Gm-Message-State: AOAM530QX+HwWhT4tdB30pYJ/OoQ3qbHRFolXyuwH5AIkN4AyAp0Yooh vGwgmEL3e2YgyUV1ygESoYQ= X-Google-Smtp-Source: ABdhPJyfZf1kd87pRrrExCJ+b3xLcL62oEsjZJ75v2VM8njyu9n+24QvJpIVGE41DcP5awZPD7qr/A== X-Received: by 2002:aca:3806:: with SMTP id f6mr1826285oia.66.1604069218304; Fri, 30 Oct 2020 07:46:58 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:46:57 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 01/15] ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode Date: Fri, 30 Oct 2020 15:46:34 +0100 Message-Id: <20201030144648.397824-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104701_395957_03A1A7EF X-CRM114-Status: GOOD ( 15.42 ) 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 Left and Right justified mode are computed using the same formula as DSP_A and DSP_B mode. Which is wrong and the user manual explicitly says: LRCK_PERDIOD: PCM Mode: Number of BCLKs within (Left + Right) channel width. I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each individual channel width(Left or Right) Fix this by using the same formula as the I2S mode. Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats") Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- 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 f23ff29e7c1d..a994b5cf87b3 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -450,11 +450,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, 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 = params_physical_width(params) * slots; break; + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_I2S: lrck_period = params_physical_width(params); break; From patchwork Fri Oct 30 14:46: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: 11869897 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 6E911C4363A for ; Fri, 30 Oct 2020 14:49: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 D543C20825 for ; Fri, 30 Oct 2020 14:49:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Km5z+WQ2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AYTrqqkC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D543C20825 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=tEGREkTKJ3efNCkM5gSKUJRW2eZ3xrkIaJhBFOFwZAo=; b=Km5z+WQ2eIOXZKBgsBvnwd1iV n9l2SMeS8dBy/GeszmE9xL0C0zaTA1cb22oB8+XFn4YbJf1scQW22enl4GPLNpE+08zW2JhP7eaQV 3+1Gi/0MIIjJFIe+PWODu+ZjmAY02++eZHQ3SzrdWZzrGxV5Z19sdJgXVvg4OhF9B1/Dx8C+jKVLu Llv4rxfam1twY+9JmIU+zPXKeCCDyQVOHEG7FBoVBgZDP7U0uvmQVHF4qLsDlEQZ9vF/kWIpTXnsx 6/BWW3kailzYtSAASRnw/QeHAkqpf6y0GCZh4gbhKWxVP6mmgRH+m0ltPLsXKCM6DcSQMmTEzoxYC uIUL6TfQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgd-0003dh-Ka; Fri, 30 Oct 2020 14:47:28 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgF-0003WP-Sp for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:09 +0000 Received: by mail-oi1-x244.google.com with SMTP id w145so1221380oie.9 for ; Fri, 30 Oct 2020 07:47:03 -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=WLJXPtjTNSugnrrI4n/vT0cn/oCNnN/c4HbxdKvwJMI=; b=AYTrqqkCTFZ13V0uwZeUgAsQFWspiIzE2Teact5kpugvXy5SI1L6T+/iRuTjN7bO5y Kwqy+Px9klnbI3jvNzDn21DBz2L46Nt0GIRyuKk3Jy1sTiQneK/DlCeuPza3hEmJWyId e1MrLpq+Vn9ysEGn1Q67oMLw5HsnFA/w5ZmoNZDF6YMKz7GmYbyWKcyS+AMztGQ/Rq3I pX3ZjrkC9bxNzvtViIWBWn9nNDYfcQUyGVXVb8SVJWYESaE8cKUxEyoVFaBXGsU0Nh+c 4zebUkfhlby2BFOpqOdComH389TABZEmr1ZUwHA58a5dkL355t+bA65K+P3LSj+mN+uE 6W0Q== 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=WLJXPtjTNSugnrrI4n/vT0cn/oCNnN/c4HbxdKvwJMI=; b=oVJ/EMcvwTHUazCjvSnUHH3oIfKWW/ESpKsHUA11xhrFcULRokPauv5CjJSjqAFb0/ h8vfX1KXsPUOC3199OfPlxhVOaW790Xr2xh8AKBxqYNRJw8+8hUtesZlklJZEgz7BYes emCtm6GKWS12ECJBMnuXK38QQPn7ClxbRBt77tSoBQvpYjMyx2wrEhA/C9oTvh8Ld2lm AlBeqjwJEc3ZeMP5jakjslP1ze+hauob/FSTnOeFEc/neX+ou5PejV5nmULH7yYA6wry GXtKHygCpBchv/7pthKvZRqc2wlT0iqs7RvKTLIdnqzuctqRpYzH4iKoex5A9/3uBGH+ hbFA== X-Gm-Message-State: AOAM530zjRK3Fd7pGsx/SfPDKtFsJJxDty2x6wt7WawHVQZH4GjQhyTP IyVIdeIpZOhsjtPqwPWVfgA= X-Google-Smtp-Source: ABdhPJzb2QcoBWs+YPaug81YlGbLCnvHC+1aQngHoxi68YJ1C7dZrfC6XcD2h36AG4aG6tAvSpBKEA== X-Received: by 2002:aca:7210:: with SMTP id p16mr1934022oic.77.1604069222095; Fri, 30 Oct 2020 07:47:02 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:01 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 02/15] ASoC: sun4i-i2s: Change set_chan_cfg() params Date: Fri, 30 Oct 2020 15:46:35 +0100 Message-Id: <20201030144648.397824-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104704_041807_9013142E X-CRM114-Status: GOOD ( 19.51 ) 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index a994b5cf87b3..4ff2068779fd 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -162,8 +162,15 @@ 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 *); + + /* + * In the set_chan_cfg() function pointer: + * @slots: channels per frame + padding slots, regardless of format + * @slot_width: bits per sample + padding bits, regardless of format + */ + 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 +406,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 +425,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); @@ -450,13 +452,13 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_DSP_A: case SND_SOC_DAIFMT_DSP_B: - lrck_period = params_physical_width(params) * slots; + lrck_period = slot_width * slots; break; case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_I2S: - lrck_period = params_physical_width(params); + lrck_period = slot_width; break; default: @@ -482,7 +484,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, unsigned int word_size = params_width(params); unsigned int slot_width = params_physical_width(params); unsigned int channels = params_channels(params); + unsigned int slots = channels; + int ret, sr, wss; u32 width; @@ -492,7 +496,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 Fri Oct 30 14:46: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: 11869899 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=-9.7 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,UNWANTED_LANGUAGE_BODY,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 4C582C4363A for ; Fri, 30 Oct 2020 14:48:50 +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 9D35B20724 for ; Fri, 30 Oct 2020 14:48:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LiLb2OwG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TpVxUerF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D35B20724 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=1Kf86qOwQxfqkPJCrdUMJc1aEKLd1cSKJ2Ebu+nojH4=; b=LiLb2OwGV2zdTAnnTz4Vhxnpd LsonT00y2HWLGJxqnIUwdOQofJfBTXPjl5gIsQuK76AdErbNJVrGMUGNldCipIVLk2Swlp3m73926 bNTge/lzA2UAPPlOaT2wDNY9UhIMTjHuZGilSMhN2L3OzlEUqPIh3TKFKI4/zIPVzHjLAxuSB9Wlp KsnDJsjE9GVVxDlZPRYsh2yusTVQc2TOOj2T0HFSxPWd82DRyC5AC69f4nNlgKirDN9pNcKbTYSnT sBrfCddwMIxpqu/qjlXGkgNoBu/GB5Zyja4pAr2YXInVGResIupQZ3B0kkBrngMucQeSNTAuEFnbT R9BtH+T2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVh2-0003lr-0A; Fri, 30 Oct 2020 14:47:52 +0000 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgJ-0003XT-4I for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:12 +0000 Received: by mail-ot1-x341.google.com with SMTP id m26so5715365otk.11 for ; Fri, 30 Oct 2020 07:47:06 -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=qV0D51RO9PLBSYYZ16HHBM2lrt27MpHOARuxM+Cckbs=; b=TpVxUerF3LZ6XZ9Sh8omwXvJX6N9XXpyTHqrSLo7TFsHWtFDG68w3FBMgYaiqFVtSy FT54olE/EmKRL1nfx0MoAXzQKNTwUYcNhc3GPlJDncmJcX9eLhHZqpmUDEDOzEIT7pZw i0d1nMfc/N53usdrmFe4wjiwPhmtfoOGlEGt3WH3GZfoAOPJKKdsIhU3UNcpgcB7SPu6 zFBdh/Q0AMErh93c9akiA6i3Wn/wHiQlQ5p/iYgovT8CzzTrXpptgrSyhPsl/s10g+XO QxxyLdEA/K+ULeo48u+dk9YTWkaJww0j9Q1ctyn51HcEtRs7K7AVCOnA9JjngkvMxrcw d1Gw== 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=qV0D51RO9PLBSYYZ16HHBM2lrt27MpHOARuxM+Cckbs=; b=icjU4tyrTTs5Fu5Uyi7WdDmDwSbJXCbaYhZfWO/MzFYIidaRCEYAQqlicvMDX4fvSI Z4ZTRTm+/M7JdRSREepy9X7+WnkmFq8D3/L1uDakFy6uGFtpWObMQOH4CGAkMGAIAGCe Y7UBFmyMzRN4M8JeXLs1aPUUFyE9wD8XembpDuTJPd+6kN13Ro8FjGFrjg/QxB0wUQj+ 7zFXyr63gh0lfq0574Jd/YfslWqMnQBBel8gy7zCiUDA3M61SloOhldOuQ9Vuj5/F/c0 f/4k1RkqYtFZceucMjmjpO9/JanoAkGUzpSePWorHT5uI5BLobcdpTGAgOu91FPJUKaX QXEA== X-Gm-Message-State: AOAM533/O0uG5nzUkO2QELe1Uu16s+x7VmiGf7Sk+UsNUjckEjb3i74e 0R0scKOQjl+6g+uZfwYMqJA= X-Google-Smtp-Source: ABdhPJypCsiZzSgDeHFQZCZAWlNhmyQv7NZTBNp+HPkA8gm3MK2jFdhHBkC4dzFWUdIMDjQnrb2J/A== X-Received: by 2002:a9d:6c8d:: with SMTP id c13mr1943543otr.222.1604069225032; Fri, 30 Oct 2020 07:47:05 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:04 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 03/15] ASoC: sun4i-i2s: Add support for H6 I2S Date: Fri, 30 Oct 2020 15:46:36 +0100 Message-Id: <20201030144648.397824-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104707_381436_9C124992 X-CRM114-Status: GOOD ( 22.04 ) 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- 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 4ff2068779fd..24b3137afbc2 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; /** @@ -476,6 +491,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: + lrck_period = slot_width * slots; + break; + + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: + 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) @@ -703,6 +772,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); @@ -983,6 +1154,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, @@ -1010,6 +1197,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); @@ -1168,6 +1368,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) { @@ -1337,6 +1555,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 Fri Oct 30 14:46: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: 11869915 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 9A072C4363A for ; Fri, 30 Oct 2020 14:50:23 +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 0AA7E20727 for ; Fri, 30 Oct 2020 14:50:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uObw4ZN6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g/nRHam1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AA7E20727 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=Gos4N8WfK7iuc5TXZld91tvW7TCX/qpTyBnTOyKpu+E=; b=uObw4ZN6yWLFeC2BEzFYaX2tt 3HYbTSuShewWAu+Zoqcd/5V87VljzcjiJVHqHS8fILrY3eUHHRNvcXbWzLSvQZgivG1VHvKYpshOA 5UqRiGUUi4csx6giNuCK5Tyv57gk1YxFCRfq2V75JgtfgNdhppJL5H961A6YPGfgWDRHnzW3Fn/pP n4qnXLJhAFYbdHKdtQylWtsIgck7cxBA0fXEZ4yIf/s/ab0RK2qg23/1+afoQA0VfYHjZEY/QXiR6 yH7W4YdB/iWDd4/h6Dprd9UsFPaiyoFtyTEaTzxL3SSkTV9oja+S4aQ4Y5MtBbRjvx2QplaKjTnrw X/WS9cGDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVhK-0003sf-OS; Fri, 30 Oct 2020 14:48:10 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgL-0003YN-Rz for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:12 +0000 Received: by mail-oi1-x241.google.com with SMTP id f7so6897987oib.4 for ; Fri, 30 Oct 2020 07:47:09 -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=5dXPwP3nPMsD1MvZsFZgKNVn/8P2UAXunD7d2xZR25E=; b=g/nRHam1RQHr+gi1IiHlz4fz+p2vaeEcHpT3i2oFxSI5vKJY61ZwIEJK0feGAc9h30 n1QyytLVq7cMQHbh1/vFuqqEmwg0Denm5XepQrQZdmH5b1uphiWbL5judK25RKliemxz uEiy2hTB7BIEEVIi9+vxK08teTYBa+ZdqklX1E+ZSV6mcevsYA+IVvOzXu4PKthpli8q CLCtI1s5ILYFXGPJsQwG7C9dkMXWxLUnVwgHD8QaS4iM+LgxzoC650NUvdxKd6lL9jf7 4AGQRFPTM/YGqRj0iNFaUZJEvAeKL1v7usVgTNYDZSd+PANjelalbDJExcUrb9BHo5Fv SALA== 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=5dXPwP3nPMsD1MvZsFZgKNVn/8P2UAXunD7d2xZR25E=; b=CO2STCLcaBEWsOnHPA0C6bR+6c8FEtphmVoOO1ezot+zDFE9X5cVjHjxs0EgTmptJ3 3sqqGPcRiaXTliZaufsNyXwgQ+qpAHEY2GhHXoY08+Xg5LbjI6vLmtaAjaGeBZJ8/gLw Zees6UQXp2TVgSyMD1hO4NL/mktkANU186xoM4Myk8f3tta1Qm+ygByM7NBYTtEymKpR vn+QWXagq98bFAWsp+CLEj6VaJ5O/CSQPDx1hb1o7ZTTd+yms4YDb1rGunmsb2APSLWt XXjYoNI7svwxGD4BNRZZyXgQPiY1x8de5tD3PK41tTCWJST2vw18jlS9lYC7nVNWo2WJ +2Pw== X-Gm-Message-State: AOAM530mKyhB0DgyQ0p89qLI6sk532NZYfx55nqt2PrAdcPOPRatxAPB e4hXA4paPr+Lw449prohd50= X-Google-Smtp-Source: ABdhPJw9UfyKv2OLKutMa77IpODhqsnntbYeKFty3IdsnEA5PjFgRI0GbmcVqu+ZY8GPiIIv+X71kg== X-Received: by 2002:a05:6808:6c8:: with SMTP id m8mr1825933oih.36.1604069228048; Fri, 30 Oct 2020 07:47:08 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:07 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 04/15] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Date: Fri, 30 Oct 2020 15:46:37 +0100 Message-Id: <20201030144648.397824-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104710_068172_FE7FCC26 X-CRM114-Status: GOOD ( 17.14 ) 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- 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 24b3137afbc2..6ee9c2995b4f 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); /* * In the set_chan_cfg() function pointer: @@ -387,37 +387,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, @@ -582,11 +601,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 Fri Oct 30 14:46: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: 11869901 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 C882FC00A89 for ; Fri, 30 Oct 2020 14:49:37 +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 21C712076E for ; Fri, 30 Oct 2020 14:49:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="g4AlD9/T"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eg6zCeWg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21C712076E 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=nu8/4xv2UOJ9WOcI5kDO4svWy0INi1tkYqTAu468uZw=; b=g4AlD9/TN+MzoJL8IlKWBfnbl UbeGIjLzHZmvPgWf4Mw55lgH9SRTRHgujfcMFiBxeReHDiK1nLwEh0zRRyp1UorlN0QBi4psLsoyX D3St4dEmlWixqRmglyXWvVMVoCUYaHC5VUGYpJtSGTvlKjUkYQW787q8M0F7FaxjUyNWeYQDFO7rb DQUUTinh5ttSWxXf7Ifws/uCpNQspPpJ3kN9Bm3PbwzvgKlChAezfxBus8+1LcPCjg2wnySGq1M2T qf6kE1unQUmJnlHewGrffQHXulVg1mzRGeBZvHWHcXAFaSijpkqoc+vti0CLImIIDndahjDk/M4ml WcRakdTyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVhr-0003zy-VC; Fri, 30 Oct 2020 14:48:44 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgO-0003ZT-U6 for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:19 +0000 Received: by mail-ot1-x344.google.com with SMTP id f37so5727391otf.12 for ; Fri, 30 Oct 2020 07:47:12 -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=/ufOq9Flrrc9vXqwE5zqji5Z5n7SZE+rxtv7Vn1g85Y=; b=eg6zCeWgrp65U4Aijwu42/kgWXWNgE3g/LAzQrSKBgP7g7/9vJN7jqA5NcvacBp9lc qaHeKOBXiyRTlM04TCmgo3jDudiCetwBO54sLSe4pU4FDmwLHdOr0Ljz7KO4Bd+hlQK/ K3lSfXQeTYwzZhuT9mTSyADmwLpH0cV01NYs8xSEp8f2GrVxkg9Kz1ikWLQ67bdKm0Rk BQ2HpSbkMo0lJepa3n7SS96D4ABcq2miMJLzSJeDv/dC/R4n9jZtu5WQzqR37dih54hQ BLsxHaF5xFHpYgvnDGXz9Mi/WEskj7S0lcwDD9NPDcpOk0Zzk7hVJaKtz2f5G7UsLYUk MN7g== 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=/ufOq9Flrrc9vXqwE5zqji5Z5n7SZE+rxtv7Vn1g85Y=; b=lKiT82eU0YL9S6M12a6Nwu2Kbj9/waGrBEZWiAitDrGH5KYAyX6b1Kh3GYzXM2awW8 t9Q0W9PTZev2aMoMo7ZMxWzxejj3k22ErPTlTiO021EcQheuNzSVxUbmONdQD3FknDw7 XzQOk83Wb7q9EkdtuouqqDSn3n61wHU/3frK9RW/TcpI5KI1HKm2t5GGDEYYIVSTFyn8 rLdIeId9LIA5EwXEb+4EM1n2w3XIa8Nm2S1Pd3Wj/HihcGcoezblPj21PhbRYZq6Pm7J viFga2M4dmRIl3DBl3qd9aaX1Xb9N2tdvlIBW9HMfxx9/I1yq3rgPTDMNLjxVA+/lbOg mxpQ== X-Gm-Message-State: AOAM531bAOnmQht5E9t/L0onC3i5m3da2k+4PgDBlcYFyixoIogR3Luf kr2CK62KTtrJZPeWVf81YC4= X-Google-Smtp-Source: ABdhPJxmfFwnN568AH144QV8IaB64bG5SixGAAIGK/ifreoUdVD+GZVjd4ds6xaNAedqG7OUzR9rDg== X-Received: by 2002:a9d:1c7:: with SMTP id e65mr2088601ote.22.1604069231040; Fri, 30 Oct 2020 07:47:11 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:10 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 05/15] ASoC: sun4i-i2s: Set sign extend sample Date: Fri, 30 Oct 2020 15:46:38 +0100 Message-Id: <20201030144648.397824-6-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104713_120910_8B19CDA1 X-CRM114-Status: GOOD ( 15.03 ) 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- 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 6ee9c2995b4f..46e4da18c27f 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 @@ -686,6 +692,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; } @@ -788,6 +795,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; } @@ -890,6 +902,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 Fri Oct 30 14:46: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: 11869911 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 30DFFC00A89 for ; Fri, 30 Oct 2020 14:50:13 +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 ADD092075E for ; Fri, 30 Oct 2020 14:50: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="W1g85Dlk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rEPruIXP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADD092075E 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=zKL1YZrpQBe/BzcvY6+DigPMAEJJdwaAl1IVvqmUAFQ=; b=W1g85DlkIWU4ECERIUxuOe3pL Z9SqWD4RO86hMfDKRxsSJ5RDeUse0ofaQeqWowEWAzLBLGYxYZZj9gTWxgXRbylHGc547CmoIp8fS lHtkaZMUi4lrhgt4fFWKsmjjDrEPkPqeiTog0x97S2nvqX87s34qBtQD4Cx+YumLo59UUvv9AEGeq cBhGXnEmBY2McBraQZXbwGsSVugl64efn011/CRujbcdLHgHwMoMBOYFfrZolbQvhVK8pVWWWw2Gi Y/phkVxD38oc/cic99GhNG4eErk5/mLfJDTq1EikKTz0Ia0/JoJ8lxrktjMvReEtC4fhq66MuK4OD htLqocuNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYViK-0004DD-JZ; Fri, 30 Oct 2020 14:49:12 +0000 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgR-0003ag-Mu for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:19 +0000 Received: by mail-ot1-x341.google.com with SMTP id z16so575950otq.6 for ; Fri, 30 Oct 2020 07:47:15 -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=hVl8qXyL4uyE+bKvgQrUQIjmv0VmS+Xl5odcY5Z+CoI=; b=rEPruIXPTVXLfk67LDH5YCfgYBjZF5vIrUX5Tbnn9ls+c7uvOSpuBR/pxgWaM4eLSA uucxveJU5jrBrOSrMFqsyyhPBvcOeI4XyN2NmHddCtWdlLfsEopLtb5OqTayDGPTX3u4 xg7DRqPCiYusOR/daBojNeKKOYebXxUlXDcNxTita3qsSUKzL2+Yki2pnNB0D7/Dz0jQ 76XaRk7uZ4dpmNl5+4w5lFgXRRrf6+CidQu/MUSiiAZHf8JX5Cl+TjWzDmqDijky8nca UUtDE+1n1CYaGMkN6L/rs//PJWFax6Csj+ooUdl1J8mU9Hjds5ip3msnn/3Ki+Jjqiga Jp1w== 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=hVl8qXyL4uyE+bKvgQrUQIjmv0VmS+Xl5odcY5Z+CoI=; b=qDa03YU6hYvnW0+E4ilGZRCYE6KK89PKOfAyPTmVD6HPgaHxQqzGNSLrayWIVLZqh6 C+ircuBUqDBJDNjZjikhHibxPmgu51dB2PtAYb9/QS6aw0On1t5tPQlFnXmfDPndRpv3 8v0dkf3d2nggieo2/0tnDMYn6YBX0IQda0fzVe7BJYlbvHePWjStR0jf8AHPJLkStSG5 Izt4zLfKlwSGOr0UDBKrRAGexllrra0eHmaWCuIljYGoyAzFc3no8OvEzdbhrDsOBbRR g/U5N0DCS0VP8v8Tnsd1q9gcrfjjMxQlW1ZqpfYpL24nP6scYmGgC4jRfQv10u5SBv7K moJw== X-Gm-Message-State: AOAM531cezRJ57QT5pEW/gbpx8I+k93hhXAzzWqAlm3ypEFygHQIvaFy zsihcU+7tEY2inktiFB2V5E= X-Google-Smtp-Source: ABdhPJyXk1sTONN1FzWWHkaULZ0gNYWaxtyOSeBBxR4VbPDIVIvSmhcinPoe5FOpCzGCuc0JWuo7/A== X-Received: by 2002:a9d:3d44:: with SMTP id a62mr1834140otc.254.1604069233998; Fri, 30 Oct 2020 07:47:13 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:13 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 06/15] ASoC: sun4i-i2s: Add 20 and 24 bit support Date: Fri, 30 Oct 2020 15:46:39 +0100 Message-Id: <20201030144648.397824-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104715_882953_70A78A12 X-CRM114-Status: GOOD ( 15.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, 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 46e4da18c27f..786731191d90 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -600,6 +600,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)); @@ -1081,6 +1084,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 = { @@ -1088,14 +1095,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 Fri Oct 30 14:46:40 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: 11869931 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 59697C4363A for ; Fri, 30 Oct 2020 14:52:00 +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 D791720724 for ; Fri, 30 Oct 2020 14:51:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sxm+pviJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JDTfsx/6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D791720724 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=IblBG1vjeWDruZwnw5dR0X029zUcEocjuc6IjUJMUFk=; b=sxm+pviJDz72jA3YNswH2fJRm V6JydZT07gwKjaFzJXjZLAcijpZ/4Xa3i0zrfYMJXABK5OZ2B5oqr5C25YDg+4c6KtnOq56Y+9r3h aCiBtOfkVqbmUVHCYiz+tOmjpZml/7SdY+g9U6QAcVzTiLgI4Tl/Iy6TBjh9+U5WArbPrcQtIR3mJ CTSgTHvmjPU6iDMLEN8p7BbB1Krpsf9IDlPIPj596DYHalzQroyDaXx0Brw8UoOR3uGctAekALx7s PnvDWulJlzb1z+f8gWqTWOxaK7mDJO2GQcTFwpjXj3Dk/LOPE7GbdjNlsXtBcgLcUjy7libw8K+pw 6LgHGJSZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjA-0004T6-1V; Fri, 30 Oct 2020 14:50:04 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgU-0003bh-OM for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:22 +0000 Received: by mail-oi1-x241.google.com with SMTP id x203so6848521oia.10 for ; Fri, 30 Oct 2020 07:47:18 -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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=JDTfsx/667GOIoeFYPL8+ATV+JIP+HyQlZpIUdUyROlnl1laFM3ZrgazcxvxZ7z95C clBppZn1oOmwlHvERhmWPK9avsBm33h3wus6BFLujMt1WqDwO0UcENp8WkpCXHPJES6E gX3L6jK8L1QXL2AY8gagEA5kxWf26n0Hye3RM50qOy/LoyV7RoQ055PVTT6kqU+Arf14 E3gQ1UfR5p4ZS+kK+WdnAaxFXwri6m02swS5DPntXxrbWWZXIuoVQRJAjTFz05OozT7h +U5qggs/lDF8JmRVaO34plp1RY4RThzD4g4vt1mjvTnwEywxeQfGCjOrog15NPa7D7jD GbjA== 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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=ockGq0Aed5aNg4gJE+nmrOOcAiFekzpTImrgCbALT3bOIG+jiEiz0AgRfd78rnpVKq 19oB75bWCigNM+ip6mSTPgaZNV+k6KQE7nr8KaeHaZ3WRUDK/HuEDX0fVs6ipIcgYVBW 45njmo+wD2BM8ORsoHblnOuTcI/hvzPQPqrsEuwequWymlVkykTc0lBYmkR8Am8+7dBH q0jte53PXvCcun96SzX0MkEDBezcLlVVoTUhP+ZBNbMdAZ78D0bFNBvRVdwfn/nGR29L Mbgyx7YJErPnpzMIXwLWJb8aZMfcY9iPztJ88eBy8SHBJeBddp3sLFoCsPqfFmb3O+OA Vylw== X-Gm-Message-State: AOAM532HrdtZqaYJcFpslhHFzIY2b4xPNbCuOHV/z6m0IP4N/Q2o1LZB Dn2gIwxMU4irQn01KNmgLR+bmhTpSxqeuQ== X-Google-Smtp-Source: ABdhPJxb0Rgt0hrFUpPy/a6TWm63vy8fvs1PgpicFO1L/F9gNYJzJ+657M8+wq2gDmHjFHbdDHfXzQ== X-Received: by 2002:aca:ec92:: with SMTP id k140mr1933772oih.173.1604069237021; Fri, 30 Oct 2020 07:47:17 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:16 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 07/15] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Fri, 30 Oct 2020 15:46:40 +0100 Message-Id: <20201030144648.397824-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104718_917236_02DB195F X-CRM114-Status: GOOD ( 15.01 ) 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 786731191d90..003610c0badf 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1162,12 +1162,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 Fri Oct 30 14:46:41 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: 11869913 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 08AB3C4363A for ; Fri, 30 Oct 2020 14:50: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 7F35320724 for ; Fri, 30 Oct 2020 14:50:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J8sOGLSD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OX4GPg5V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F35320724 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=7TwmBnIsrBQXPu6wJV34ezYzvBjSMAn7xqZ473HGg2Q=; b=J8sOGLSDeLT7OdL7X/9ggPjH9 xA7+dSJlt1IYbbkwblQQ8ugloiQoWCBAe4juD5NTSCM+XlRGBmqgKQj74UJ0SG5XNaSeTJ2Y02/05 Td3guekRWl9oj7FncjH96i6ijAgtkeR/+dAQDgADbCMo1/A+TlXCWXOGthzFFDJMLGGXgapolWOjN 1WJ0awO/gZQjmG97ofzgub5VPxH5GXciiIg17puzp1yx+xPJ55mrY0mL1uGaYkD3qeDZqcdCfjwtS xF2uzlFx8SizTGZxuwIYGcfoFFaMoXy8zKgYgiSu4ll7GkfbOIRVWbxbI3wqgSQniIRCevJnPoQ6N Dlf4InjcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjI-0004YD-II; Fri, 30 Oct 2020 14:50:12 +0000 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgY-0003d0-9R for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:27 +0000 Received: by mail-ot1-x343.google.com with SMTP id f97so5750509otb.7 for ; Fri, 30 Oct 2020 07:47:21 -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=ZdYIRpJXQysolM6oP9zf52EwQrg31M/ZfGFP3DuIu5M=; b=OX4GPg5VsTfhqBx058ybshrvZonS3TOFrNB6pQSQYAt9GOJf/+kvU57cdit7QM6sWg OQp+W+SwmjJkR80VsUmpkDYuNc6SuE99SGUCm5+RylcABXjLczpWr+cCyFtzH90PV1XN ptiSiA5yJ+7Q7MXCWzrawRRbIqzYeIuJdSQJN9gSAJ7g/RPqLvHdWdMSnvm6o/RKr/Fk wEM1RD7d9koaF/h9g1WRGU1aj3r68PoV9LoKUPM3muv+LSYDPlILDz6EYEyvuerNju7I IBEvamVsWC/fz4GlUzS+cJiO5nXB9HPNJqIsAs6Yfgs6eJApEBMVI/k/wiuYDYdueBfB YuLg== 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=ZdYIRpJXQysolM6oP9zf52EwQrg31M/ZfGFP3DuIu5M=; b=CuxNd/ubqngZG1L8jGOTnQC21L7V22KUKI70a1OgtRH08qVRu6lBPF8q9VXfWSS7Ua 8eBx1CPLxmLzE7EqDLI8/mNgLRMilJ/ej0mMj9lkLTagsqbtanJ9hBv2hcWeb7IhoD/M EBrWt9kq7KzknKimTjBWt55HNpSSmV3euDTRHHWQGRlItmjB/yZDGigfQ1xk6g7uoKnF fQ+wtPySCqc3kFa/2cDEy/2OOG57QlMW5rOQdbWAf1F3Y5ANz9kr7YuD50s7ocSpHwTk 3z1reMz+D+t3GUeDIE9mSOunPVRH1hkuSlihvLPBv2dDAMLGElRpoY878XRLv3FreKMJ psRw== X-Gm-Message-State: AOAM5328ND6rkihuqEsPdcYLwKEuje+P4w/0ZTF3mvbdCzXoI+gEsGsb k0dDrenA6HUzHGhsCkgVBAE= X-Google-Smtp-Source: ABdhPJxuVgbxtNmHxZe8XmLqrwhnM3JiW3gaijw6IDQCb9UiO1JffwDqHqrVnxqYvCOajuDO2rv+Hw== X-Received: by 2002:a9d:7cce:: with SMTP id r14mr1989365otn.204.1604069240086; Fri, 30 Oct 2020 07:47:20 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:19 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 08/15] ASoC: sun4i-i2s: Fix setting of FIFO modes Date: Fri, 30 Oct 2020 15:46:41 +0100 Message-Id: <20201030144648.397824-9-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104722_508983_083996F0 X-CRM114-Status: GOOD ( 14.69 ) 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- 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 003610c0badf..4f5cd850752d 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -596,6 +596,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; @@ -924,13 +931,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 Fri Oct 30 14:46:42 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: 11869929 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 BF0BAC4363A for ; Fri, 30 Oct 2020 14:52: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 37BF320724 for ; Fri, 30 Oct 2020 14:52:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YXY0MTKp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OZyMXC1e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37BF320724 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=e54l1Pr72P4Iw0WcxYg5Nd7u1LBwGs9hfDGxOrqtjbo=; b=YXY0MTKpL36f2aVHfvD7NIkyY ibRtMGNP6k02RrXmXbPu1bbcVZBW09vs5xNswagqPWE9FW2H/vGI6hggr2AQXDu6RiBQhJbu6X9ga Ws7DNYn6mndDoGyC11Mj5+Gvv68u/nZL3NZWBxJOQ9iyqWIAx0M61a+x2iUpT2H8i83qPJ66BpKqQ zhK9TbKdo5mvUilrgLw2KAAFtx+HcNIFo1pvRVhRJCxBGpSNmFYHfvP4k5GKpdvHbOTGH/Sdwj2CU xn7caKYqL9LG4NqMr/JvUa3Aa/dLy+2CfcMd6qYsH9XIsXTnuxxIuVXcRMVA6/iuJBIUMTI7YYt4C 8z3FvF7kQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjM-0004Zr-8m; Fri, 30 Oct 2020 14:50:16 +0000 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgb-0003dq-1R for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:34 +0000 Received: by mail-oi1-x242.google.com with SMTP id m128so6872462oig.7 for ; Fri, 30 Oct 2020 07:47:24 -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=A4cYQuVx6gToZbO7mEsQDDx46mIAsBCsMKfd9g+RrIE=; b=OZyMXC1ef5lE3Xj7EkCUy6rsYPbkXx5xYWfAEIIo5YWaZAjyY0ty+oL5VPwh+frYps bzoeey07n25DE9sLmK504tbhohR3dQ8NeDAEgqizrIBpVrk+oCyzQj23E1jwWtBGSFrB 96KJbb6Lf33uIZz0UUcgn0SXcTCD35x4ztoIxmHOPxya7IdwaqIcLi57zhwJ+dKo+mbU q8FiHpds5Uc7osGJ7DmnZFjhhryHJjvP/vzC2EycnbcCbBYRA9PgNrdnUCpqu+WK3KfF 2WItQzButAY+kednd5Ps2Ac5lplYO8BG9NSzvdxVTchu/t4ch/SBc69DvQThQC8Kdtmr TRZA== 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=A4cYQuVx6gToZbO7mEsQDDx46mIAsBCsMKfd9g+RrIE=; b=fi8z/Ilxlq7ZX1pq01AQpW1VJoOdAWauPm4G1BERXsax68OQ3lkuO88In5aixvUqLe PvSP5cHajPiUchyOs6ykOqnWIx5f4A5xLyH45/fF1GB5VvMSc8OcIcNUQ2plZFXuSnMC PGI+zBM6cs1Q1T0Gnc0FdFNA9tHEy+DW3DMV3BFTe5p0HsD0yOZgmLjyW08Zs8apWxZb LZjqy8sVEcOqb3oKADMn5s9HJb74hBDJEP7YpGb89tI8qpV8Ukdrvs99nNkpcZxj6Ds4 IdWYPLLknJVNL3y7rSxawy2k8edFd/gExJWe9blhN2RTOIhoZj7orX1E+g4zTdS8kG4A 4Gqg== X-Gm-Message-State: AOAM530f47JkzY9sFF70aUsnPzLpYNCg753FT11O1fggk/ezJ5kwupDj 1/b2zdXDZfV1d1NRNkCnSl0= X-Google-Smtp-Source: ABdhPJzrOWnh3LX5MzGR+X7zGa6JPDHD+fQTH83s8TF39Z3LXslaoMt/hLpsPrl7NryxcUkW3CpMOQ== X-Received: by 2002:a05:6808:915:: with SMTP id w21mr1236071oih.124.1604069243013; Fri, 30 Oct 2020 07:47:23 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 09/15] ASoC: sun4i-i2s: fix coding-style for callback definition Date: Fri, 30 Oct 2020 15:46:42 +0100 Message-Id: <20201030144648.397824-10-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104725_173413_8ADC6B15 X-CRM114-Status: GOOD ( 15.73 ) 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 4f5cd850752d..4b8ca5be0a29 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -180,7 +180,7 @@ 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); @@ -192,7 +192,7 @@ struct sun4i_i2s_quirks { 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 Fri Oct 30 14:46:43 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: 11869941 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 379B8C4363A for ; Fri, 30 Oct 2020 14:52: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 997DE20578 for ; Fri, 30 Oct 2020 14:52: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="zIqDD0rr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fo41DSUE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 997DE20578 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=zIqDD0rrQCi7knaEsMcphzWYO Va0D2rNNGnkjcRuTtHK6YO0a+zzbj7dzPJnxicSYzdsgyJcDyzZumg+KWV4JqKYRVK8twkW35YPRs O1LpGHjGM2yFgjljf21sm2KJeXZ/1APjIQIRZQ65OXXmu1MH+CFXJb8j0LQ3l0ut84jRLTzLczSHq DvMR0hd08gJ8mOzZUJR8aHJ/HtmhLheKhYl56hwMCpxHakQHCFgNIDbnYN2Id9flX6ywReMcx52ai lhXDdai/dtxhbBvC7KfurYu4Pkhx7UgZD9sVa0O4m0ZGOT+pjigFqvI8eSzRibFgsoQes6Gaah4Q+ 2hkrYbikw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjR-0004d3-So; Fri, 30 Oct 2020 14:50:21 +0000 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgd-0003ey-Pi for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:46 +0000 Received: by mail-ot1-x341.google.com with SMTP id z16so576541otq.6 for ; Fri, 30 Oct 2020 07:47:27 -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=Fo41DSUEVbzQPAdEL5Qtyz4z2iSNc4Le4KQFuUlEHBRFha5WMVd0X8S5hSRZDgTwiR UzYmACLYwUxNWcoVuRbLboW7VF1Yd0xkIENJsQ4PxQ3+xp/JpROX4OW1WHkRf4xsK+2b boERIt9wtvMSVMk8Y+SHluG9mtVHKNB2rVMS+z5XafLynCEKlRCSgbPgreloqUdnTC1m MwScAHNBy5sCmE2UwlugVIcfEagWL9tWiEKW9GZP70CL7JGXDOgRvuRD+BL1AcXA+VhB /X0FdXz6k6TEqIAlQOOYzSgwATtzMMj7ubIqtsrmrL/GuJliUGY+gCn205xtvnAc/zWp PGHA== 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=m8xLGr8tpLcgPjkJdqPEcLQGBBj07Pa4ga2kOjkOM3FbhhfHIm9uS9CpVdItouutyw vOEjed4bAk/0T9oFi+1RhuI8kV2DYmLWwkIaDQhQQlkescoU5LS9ellrBVNIW9w1UZpi PL0jrex6AsOX94keQggphD5B+KRFYQhG85Bh816aW/CYe5wOzJca2n4u7emPpEL8vm5/ G4TlBTvgNzve791tpBmbVWApa7warEQ/lx5dbRT0nXKM1ZPpRZbtY6AiHutZHgr58ahA CyHtwr8mFqB/pe1I2b6/X0Nji0dm+vnY+3edcoaB2BNTwPBsmjacNwKCRIz5AGK2TZUR /ipQ== X-Gm-Message-State: AOAM5316GrkW2ibGUSUi563wEppqPBGr+uZu9Mrov3L63W/rwm2La7+T UbV56QWly9wOo8f/SPOO2gg= X-Google-Smtp-Source: ABdhPJyKZ6t6HzCgn0v344wc7X+L4p2mhZJAK+1PwynZRyu/yG4kuGiR1Ckhd/jwemoqXYLH1kUSyA== X-Received: by 2002:a9d:649:: with SMTP id 67mr1989186otn.233.1604069246097; Fri, 30 Oct 2020 07:47:26 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:25 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 10/15] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible Date: Fri, 30 Oct 2020 15:46:43 +0100 Message-Id: <20201030144648.397824-11-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104728_407481_0B730CD1 X-CRM114-Status: GOOD ( 13.07 ) 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 Fri Oct 30 14:46:44 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: 11869927 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 6B221C4363A for ; Fri, 30 Oct 2020 14:51:13 +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 BCBB820724 for ; Fri, 30 Oct 2020 14:51: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="VX6kzArD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NgX1FlX5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCBB820724 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=VX6kzArDGlrdS9jNEUDNm9Coi TwQ75YeHyAT0/dY8xVolGB+F2jaZzd9UwSmaJrhSHMcLKVG9qHRdKGgYPdOYgsgDVmqLkWhvp8HJw V2/8W0IS2o8cJb/4wb8rQCWH4RhXLprdl3X0Gy2FcNIKGT01ZV626E1dAMM9b5+nuSo/BLrcIZtZV VLn1mjWPD37gElooIxWt3hqb/D8tPRc/u/r6BoR1yJPts14eAjW8zrkmXjJGmYIJkNRDOeM8NIoLK q2QOcwF88RFRWqZ/sEJwMlIRGIi0g4o2vKbyupyptApqZEo68bOZKrRsSHaBUBdqiM1kvnvlflDEE awybmkQHA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjZ-0004fy-3K; Fri, 30 Oct 2020 14:50:29 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgg-0003g3-MK for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:49 +0000 Received: by mail-ot1-x344.google.com with SMTP id m26so5716524otk.11 for ; Fri, 30 Oct 2020 07:47:30 -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=NgX1FlX5YkyHohpOSQ2l9OML3jroD7MZvSCFKsqgsoG7fO5zdOLRWBbP++Pmt27xis ugOsJObZ4nCGDZ5ef+lgJJka6u0Y3baTlLSNlx8UnOQCfOznmJnEkZOJxMi9xImoy2li wHXErFRIA4kpRLraXBUbPIVT8OnNLJZZTMihLaPW9QcbYRNA6YFOEuhUSftV0N52l1ht W6nNcbhf+AQjCdDWOxNmxYH4ltln9u4ssE9RP9kYr/B8pBx8KmYmbx+P73go6KFo4WGd 0sldLajjud0wG1MMsqLiyhWkevIlThuoX+eImNK3l/DxMwsYb7PzyUNf4sTFkWvWEV/O X+JA== 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=F/zrU9eP1zkAlNTJ4LwBJU42lGiHA/N2ubXD0BJM9Hr3/miSzqlMHT+0djtF17M4fq tncS9gekgHH9F5wzg/qs65sVgBwkJiBTx3EfszWF87pZ4LD+Sjb03QRUBxUtbfiCc/KI pQLVj/XuDrxZUTRKHzF7F6ObNPYH3Nolt8DEeArV9KDeN69qZzZuJujex1GWN3Am3qLM VypHaWY/qiyDXjQnCOgp0q51u3OJIp1/3KUvcBTBwFIXv4bo/RK+JTRYNrvHKsHQLTGM cza5Yj5rFoUCFa9CpDVZ0DLSbnKCoUo1qOjtYhc6K/F0vAF5ApRJStI812ijFuPRPve3 oXRQ== X-Gm-Message-State: AOAM531u1yJdqP0YoeIDt8L1Gn6pJc5atmBMatuT9tUlEzaldNI+uJpw A9qbE3h0ZnpeAm92Ai4aSJw= X-Google-Smtp-Source: ABdhPJx3MWI3HyQs3AtAuz2YanJIJ4mGqrfUrBvH2doCOj6pGUPRyX84UJrWnFLA58Nis8V1qpR9OQ== X-Received: by 2002:a9d:5d2:: with SMTP id 76mr1786858otd.99.1604069249008; Fri, 30 Oct 2020 07:47:29 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:28 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 11/15] arm64: dts: allwinner: h6: Add I2S1 node Date: Fri, 30 Oct 2020 15:46:44 +0100 Message-Id: <20201030144648.397824-12-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104730_806892_A54A7302 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: 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 Fri Oct 30 14:46:45 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: 11869939 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 D7311C4363A for ; Fri, 30 Oct 2020 14:52:33 +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 5601420727 for ; Fri, 30 Oct 2020 14:52:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bupfGBGP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WdNk/maS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5601420727 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=bupfGBGPnaPxNPPQp+kRZJ/Yq d0oNCpvlNCXipIdqOt/WvoWqNWUY48ErIvlrrMbbiwFUtwQoYch94G5NoZtktKrCNJOVgHK6PP+5i w024ubA1GlyZ+v6UQ96XnV0XzKs7EfhzxNzdxRNxXcH80x0ZVXuJczoinKkp7u26Vfi0b2D66bQ0S FtZTXuWOpjMCVTMfS8F1clwPT3vfNIe4Ejh3QP0UJuZOIX3FivjO/YGvBV6Za0IfYEbpG5HqHTM06 SHea+81fI7lESGU94y1VDNO0olOk3tTu87+1GUde2eq5ZYxu0Gx+mYbM/7Sj1gBwi9HbIc7zhwKVD CfOS0uRSw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVjm-0004lo-40; Fri, 30 Oct 2020 14:50:42 +0000 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgj-0003gr-RT for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:50 +0000 Received: by mail-ot1-x342.google.com with SMTP id a6so5737319otp.10 for ; Fri, 30 Oct 2020 07:47:33 -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=WdNk/maSnufv6lQD7+3w9GrNmVH8iqqH5NfjsMjqXFEqtE8foZTWoQarE2o3+RpUXi 68PwhvvpVuVuQWFelQ2c9UgVyPW5sSX1DZaJQ+ZtnJCAMCHxoX3a01eYd5MQnZ9qOCWX Ve+njlu4hPHKuHEY5VCpfTZngbcrTOaalrZDGXq934csEyvbyhFmKeobV0OVLtirgXIY WKo2pR9TFOUp64lkAS8fKPbMgtrbXrdeFqBo5rKgH4aAVVmJhhztVZjdwiieCoyoQvko BXYdFir0vCRVZmLdKDlc7FLVKMKk1+q8ulkSN/S9Rk4G2YvYB7S5AAfnY0rRvO4OsyMO ACSg== 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=LhsC1vJQGMkAcn3mKRT9uwlQWFbdqYic3SIf2rRfmG1PxQVKFkCcB1Akjdgw53zi/O knHWN+326SJm93Iw9ikxhDn/4q1GiAkMSTTYl0Y6WuE17K8e6FnwSn3ZqhQ/EJZ98xou sfQDHWab6H8SDigjAHe0yefbLGDcELaSCPUtAnGnN4lwAZNAjfzNB39UAmVf97iEAYJu tU26C9pQTU6HMCIHYyfln5kPcLqkcrltmjtgMbko/L6cKcvI77yZ/BVDcS5M7t/u+5W6 sAnek6H/xrnl2NUsT1cGECdm2OMl10Ddtg4gv2WjqDzTvVXBvntyh8oqqAZTmZt38GoL 9bCA== X-Gm-Message-State: AOAM5329xKXbYbpMe3D20pUd3JzepCKTheuPV2ORNq1Xb2kGXdp5B19c /3+zTT3I1aCOKtnwKX8s/EhFBPfP8YnLGg== X-Google-Smtp-Source: ABdhPJwdhY99fmpkW+U8mY6UuxGKLEsNDlligIDXRDSrvMAxcuSKIvAwSX2olqwkokvqL/0Y+3Ns0Q== X-Received: by 2002:a9d:51d1:: with SMTP id d17mr1949640oth.81.1604069251888; Fri, 30 Oct 2020 07:47:31 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:31 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 12/15] arm64: dts: allwinner: a64: Add I2S2 node Date: Fri, 30 Oct 2020 15:46:45 +0100 Message-Id: <20201030144648.397824-13-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104733_985967_48D0144C X-CRM114-Status: GOOD ( 13.49 ) 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 Fri Oct 30 14:46:46 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: 11869945 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 02452C4363A for ; Fri, 30 Oct 2020 14:52:54 +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 7669D2075E for ; Fri, 30 Oct 2020 14:52:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q+iokPrw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HAg/Wot2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7669D2075E 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=Yq2gDD5j1bfKHXhbVtbu362yoEl5ZzFag+0V7QJl7ZE=; b=Q+iokPrwsQhhAgRe9UTuANPJA YqhR1fJC1d/LZ/ax7CLGPI/Q+pwLEe2hzdXoN27BoYjCLaE1AZYoft4zCww0cGpCJUlPQf0lA7qFf VbjDxFte5zBZQ14nIHUDM7COpNT/Rprsep90Y428HqomG/HntcfItzK/74zefnCWJ56f8XurYP7YJ Nu/Y972YBNYo+xzTP4bfT2ltWePSTHu9cNWCmu3djoCOHjhu4GvuS6cXKnNw8+/HCxFHJU5/EdYFd Oy4iSsXKxsu5xLFvxOU5yauAqpzqPzA1nAlhnwQja9LZZWsvpxaKexo/WLANbWFxpMiIsw3rSNRtG BANxcLTdg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVkD-00051h-2Z; Fri, 30 Oct 2020 14:51:10 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgo-0003i4-Ga for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:53 +0000 Received: by mail-ot1-x335.google.com with SMTP id m22so5766063ots.4 for ; Fri, 30 Oct 2020 07:47:36 -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=DcxJttVJPuefUSZyGyu/mOpEqxZT+d3F8rDRrStvw20=; b=HAg/Wot2lobXoMZzDzeRlBy6HiM7gf8w/Y1DibKsoL2Z1u5vu5Hle8J55reIPywx0g DxkAWrZtfKwvNLEPHpNeV0tTEkw5cS+BZFWaQ0W4R76s8RaroOFFPbexCEGAuwQQR9aa 57JHr1i3T2Mw12C3JHLO09zgWzw0oDIgisNRqz4OwPhX7OeChhkToLGN49IOC9w2eGHQ Sc15BZ5CS04UhFSFpH34rOxANPGJ4NRHXKYmRbbeEr3BkSSbGZYFuREJpeWsXXMTwvgs 1T6osRQ4wMlGruHHruI1zlnUitA+VfP1JXdKj6m8cRcK+N2xKl6VGy70mm1PdKRBkBmV 5TnA== 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=DcxJttVJPuefUSZyGyu/mOpEqxZT+d3F8rDRrStvw20=; b=mD7PxVokI5tymGolAJeuLOXsIVmjPCdOsrBBvFgRs5azgB7Saw9RF5sdU/zjQRsuGG pc8xujl356o6LY4qZ3hYKEEy27oF0+K4DaL1o5CQtqiyHGr8dqgc6KDuqRJjYD486tCH +lRiB/0WmWMgE7B5w3sNufVxst44kEHtHSldffuf82HUhLEfjZWwFCYNY9Io17EiPHx0 i3coJ6/a0n0V4Lv59a6q1b/+m9QeKKwTPwxhdchNSwddpaVH6DELWhjJAovL43tEwXOC v5qHSZkBspiRNqg3dC4EEHqZMMCC1ckSL27SmmcmQifVvsq9Hmttd1HeA4Pc/kgRxjYp giuQ== X-Gm-Message-State: AOAM532UdEXwXlWo1TGLp7Z5hEKZhzRBnRdiaTvAuxmKIBzf6kADHVPi 5ivR+eoPsV9Zq+G4LiZaFp0= X-Google-Smtp-Source: ABdhPJxn9qZf+LM4hk27YO0jHAmOCxZs1cQgIQXn2jsLewVxXPBD1fXNRtSew9+I9GVm6X0MmGEJhg== X-Received: by 2002:a9d:1c7:: with SMTP id e65mr2089985ote.22.1604069254826; Fri, 30 Oct 2020 07:47:34 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:34 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 13/15] arm64: defconfig: Enable Allwinner i2s driver Date: Fri, 30 Oct 2020 15:46:46 +0100 Message-Id: <20201030144648.397824-14-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104738_666699_1643C286 X-CRM114-Status: GOOD ( 13.17 ) 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. Acked-by: Chen-Yu Tsai 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 Fri Oct 30 14:46:47 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: 11869947 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 03A8DC4363A for ; Fri, 30 Oct 2020 14:53:07 +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 85A9A20578 for ; Fri, 30 Oct 2020 14:53:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mRATSxrc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TyBDGJ3w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85A9A20578 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=mRATSxrcFyRpceOWJ+pIvI+sf uyIw46Q6Yqd3YFD94fColG8U+MUuZrt+gtKGV95rDCHF0COBoZJ+hnv+gQ6HcSbNWGuEJJBxII/sT DkYK/qghmljlmQFU3YZOdtKAS+lZ1741/V62QjCB28+QIqaVO0yknHe6aUgXBpySb9zYyuHzRuJLi FrM1RiKBitPKbNCgJ+/ejCP3rw+1kAIzEf8/RStV8u8yXzsjHs/c4NqyvoXptqCicKvq2po0cGUNa XLoP1RfRbeIh+BFH89CmR9nwXhLaxRNFEhRJ42s/KPun3U5dmuxX33GZYUA5HrPyquSQwb8rH8wbN C75/J/KGA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVkp-0005SA-2o; Fri, 30 Oct 2020 14:51:47 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgp-0003ir-MZ for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:54 +0000 Received: by mail-ot1-x344.google.com with SMTP id a6so5737663otp.10 for ; Fri, 30 Oct 2020 07:47:39 -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=TyBDGJ3wIylb4gjlBDCtDtpfP+nJ9PmgmGbLZ3Dm2jAdxrwElvjrd+tFDAnXq4oqde huO6S08fJ6TysELD2fXV5zwyVIWZIxCPY2ouO0Qn3YXaWWXJr9Wc8l/ADvFNnKouDhue ivafVtR0gqzjl9DwS8zd2fB0J/z4Ne52OsYn6taeFk7KlrJcDZLkZO6fuO5+XiBRRsjJ 1XddmUpBqrzgRwjiaBGI06A11Wa57MrTimVbOvsZmm8D1MNPuhcynjxI/GD5T33vuy2z iwuRn35R4S8dxT3gCuZQTbant7/D40rAuv+/ve60CuV6zrmvuYsoOkfqp7QzwDjIV3dX 6J8Q== 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=CnvYJuzANMZPw5aHTwFK/kQlgALN41CUvsDE2GWF4D8/gCciBoVBtBBIpKzv8stsSO EIhtv478GPqf1NmrXWZFbOaCRjJDMkri35xy2mFKtDYxZATahPKRqn/GwecRB8D8K9bA s9i7U7NDz/so+xeGwFRDoqeGXbtqf0Ggmf5srvhrtA7dCbQ6yGcmH9xXot2codR2HFoO N4My6T7lqnGXPvmnq7MNzRCjii2FJVtJFh05CTmEkpkheJpxuTfOOi6Ee2gdGTxIYFdC z2/UvDR+WK3Uc5eRFtb/wBINhvuMpaG2L6aiq9J2WJbRwxSa143kX1WVtCdRNt55OTfv D7tA== X-Gm-Message-State: AOAM530WCcHjUHei2AZ3YQNymQLDpHvwvWn3yMYeAtJZFbeQVu4lP+PY kr4DaPRZNPAB0yy8PV58awM= X-Google-Smtp-Source: ABdhPJx/zMztCtP29RQZq2MUgF2cChnQA8L4sJ0hBJ9oMvypsiYMDKoZgstrh1rIdiCERnuM0cnt0g== X-Received: by 2002:a05:6830:154d:: with SMTP id l13mr2074653otp.61.1604069257953; Fri, 30 Oct 2020 07:47:37 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:37 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 14/15] dt-bindings: sound: sun4i-i2s: Document H3 with missing RX channel possibility Date: Fri, 30 Oct 2020 15:46:47 +0100 Message-Id: <20201030144648.397824-15-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104739_918584_DF3AA9E3 X-CRM114-Status: GOOD ( 13.66 ) 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 Fri Oct 30 14:46:48 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: 11869943 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 98563C00A89 for ; Fri, 30 Oct 2020 14:52: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 0F8D42076E for ; Fri, 30 Oct 2020 14:52: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="XVRIW3OR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L8NewlTl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F8D42076E 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=XVRIW3ORDi6cUi1rlMhy3PA7d Kjb5Yc1jVeuRnhx/0oKvqHamBK9vNKIjoNzLHrYJlJk9jk2WN/6/7DOMD3UWwdPxTtPc/9D5A4QcY l22z8PGpxN7Q61lypuh+z6WQ8jpdn2K7ahzDdFlp7gUMmrV1rzJd6VV0N1JB2FicJCZ1SMGhDR3co YNM7TPrM2vm4jC7rsNV7xUu2OK9pVhuUQXf4X0qyQNC5aiNQ3qrccpUj4WAgd5sbx9L2OcD7nbLXk dxPUsgmezEP9pzFKNp9jVb87T1h/JeqFrwR4KE5g3mutKcGGx6iI5ldPF9UcSaLuHUCh6CVymoz0S yNpndH1oA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVkv-0005Yf-7k; Fri, 30 Oct 2020 14:51:53 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVgt-0003kO-M6 for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:47:57 +0000 Received: by mail-oi1-x243.google.com with SMTP id k65so6875273oih.8 for ; Fri, 30 Oct 2020 07:47:42 -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=L8NewlTl2v389QZz8ht74WOfDH8lbv8sEbUY62YMCIc1MPp0XqhWtIMQqyPK3Pbht7 ic/aKAjTU+oGl9cnLGAUGJNVbZtCWOrn3T6Yjn9urVLbuARWMhwAKGPdPhP+Qs67XDYh mgMnHLLQIIs7XW6W+fPNuP+y1CiKhY4GnokUwNW+llbZj01BG5W5PEOWjk32vSWuuQOl EPtw2ISuQhuma8JYz8Oqi7HRk7zkxJaQkSaQzBD/e3DYjcMpL8kr8Q4roHHaYKg89G8C qL2tKrkikxgmmTGDX5F4APhCYiPRZVe47aXA3byMHRO3cx2u6JsdOBeVfRwKzv5MZ//1 +Yaw== 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=mSM/ze7bqFn3XyCZkwSdZTLkyoI3kiTDVIaxar2GwK6KfjgYMtKUoHqUpDKG1/6AZ9 YHnmySF92LFR9LXuGlumI/+8Xm6gmcYEggMhzdfIiVgg+/OanLVltdHc5ipX/8DoNIVj cGeCHAq8HhghGMu7xtQCIwcul3lhFe00tmu08iUN5SidmCDMih3cf1QLy3ZU3R+Di+O7 Gmj+cqZqmagquOtN3jmchR5fcMGeN75TIUyWWQnBQbdCGSq0ZmLs1Bg2lCUTXkmvDdeo 7JpKG9gEyGwVk0Oml37rEl+H0GCAxjCHFYYH2QR+QEQmLu+Xa/65w5uQTg/0Aek+iX1Y JzDw== X-Gm-Message-State: AOAM533QIz/bt7/AqGMQHW/37PP1DhZOjppWqdb+UQkF2UpWLqKNUI5H M3cbnub2qsDTVT+oHpVIf6s= X-Google-Smtp-Source: ABdhPJwnuy2Hle+FbWPJ+65edNgwFb56SDLKD8JH7gKIYhEi8Q4jZAAu1NPE1Wv/nSiQZuWwCNMFqA== X-Received: by 2002:aca:4d14:: with SMTP id a20mr1789519oib.46.1604069260878; Fri, 30 Oct 2020 07:47:40 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:40 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v10 15/15] arm: dts: sunxi: h3/h5: Add I2S2 node Date: Fri, 30 Oct 2020 15:46:48 +0100 Message-Id: <20201030144648.397824-16-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-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-20201030_104743_877665_505972E5 X-CRM114-Status: GOOD ( 13.05 ) 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";