Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5111624ybl; Mon, 26 Aug 2019 22:56:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWnOTvkV9la+bU+t7Yw2trVv8cphMb5BsU29XtkGyMBEWZsALvMAOqXzcUZOiMT0twSXhW X-Received: by 2002:a17:90a:9a90:: with SMTP id e16mr11289985pjp.71.1566885386917; Mon, 26 Aug 2019 22:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566885386; cv=none; d=google.com; s=arc-20160816; b=wFc14sWVKto2gsYKiWlng6ZyTwEc+VR7R6HJ6Tc152qN41I/OBM1z2m6sIIiGtB+9t OkIIriZbIOWGJqI7x7HwOI/8YTqa35uCD+qpRRHkzNidFxKqSpF2mhtaztpLOrmZzUQf WmXpCgfC0CvrOXgjQ1HVUTHlBznR2OxeDQfmJoRbaHwp7cdYs6tmHBGqKw714WgKbU5o q875pLN/lksvTiZ3ZpN90YMGQVZETAYI0Rg6LoYtfmCnvKowq6LLYYuFV92z6eU5ISbp PNuvWql4CfFYRopAY6eODr/aFyZy5QxzxzxjyYUWLvHMTmY/XFQdqlQQcLfr/asXm1ZF D/fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=N+vpsDloTUdy5MvFdUSFeHVMIbrM4Okd8BXV+IVwifM=; b=xJ6HxOIxLB147OAdfZQqeDkIVjwK9htTh7DG5cfnYKzZMJB3u/H0jJuXLjKMl46CcU ap/977jKCfzyi/E8kN5eKwSQEI1Ls3k9gGv4C8KiTa4AWm3oIC2c/mJHQJX/khPsmoux vnqPfdvi07fxPu4HvP1F/w9bMRRKwfK4xYXoBfG1g2eETlU3UHJMF7Kz7gtIpm44ETtZ tlKARf6pdihzIcsN/4bbHnKXbedU1ThdoePMmkfqjxt7wdAhyPx17578b+m48Ia7Tyw5 n38W5Qwn/3WYH902yP/r5tEwNYxiGfjm+28Ws0Q2LrsNmSTI0dl5TcecsGWESaMPNSQS yeNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tBPtAp0W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si13093612pfg.156.2019.08.26.22.56.10; Mon, 26 Aug 2019 22:56:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tBPtAp0W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729313AbfH0FzA (ORCPT + 99 others); Tue, 27 Aug 2019 01:55:00 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37714 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbfH0Fy7 (ORCPT ); Tue, 27 Aug 2019 01:54:59 -0400 Received: by mail-lf1-f65.google.com with SMTP id w67so5988856lff.4 for ; Mon, 26 Aug 2019 22:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N+vpsDloTUdy5MvFdUSFeHVMIbrM4Okd8BXV+IVwifM=; b=tBPtAp0WoXthyCDuxt0/UFLRqezDiJevoRKm/SOQIUlGRldn152fQioRxeB7al5xxT sVoOIxaT/VuG5XuiKbuOW9+y1OHW9NHrC/uPtx+grRsTws3Vq7QqhSTz6j+4C26nCUqr LDMbBJz9Sa7OUTHFnJspqelzZyXBxk3eFAElrk3MWHmSUzcbICTCuExINBxSK/XylvvR ohpvOvP1+OoJDBUHQJQWotFSoTwt7NYPl+x0e1RajCT2jLQU3sCCkvBLETeYiSi3H541 rDNr7/WbU2NPl9VrKwbfQ/oxycmkvFye7tObGO23O2OCVf9LLaBGOow+JWnc2DkFAg20 8Ojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N+vpsDloTUdy5MvFdUSFeHVMIbrM4Okd8BXV+IVwifM=; b=aKIUjmX+388vTNRpMXtMCv4lXSpf0hgN/Js9R+MrDnhuv/Y1d3y80KajzZWe3GWb7H hVw2N9+hkQq9ZioqHirUXjQHnIvrfjryKlvheKiqpWMfO+eqmnEdRmxa1D/oHqQ5u1o4 qQ/S8TLjfIgT7YL6poTZMwigJpb442Rk9W9tpg4pF75VQYUjCu9qijiSjJlh1vN0idCt APJACHhdGheAgpBpGweWZqog26Au1QcLZFm/SmpH99f1w7H55uiCyz5VfeShAFZqbMaW jXw5XMbvCP4Zraudeqa8NDHZfeQuyUWwppgpr6wHY7d/SVX3CAxEv5bxe6gfmlRyzMB4 Gu9Q== X-Gm-Message-State: APjAAAXH2Dn4yLSqNuYynwRry9Qr03MoW95xDIS0KQDy3doRl7cM8+Ls V+hUTkBIRdRC3jdBMZQFuBBR0BudiRC3nkYURlU= X-Received: by 2002:ac2:563c:: with SMTP id b28mr12969143lff.93.1566885297683; Mon, 26 Aug 2019 22:54:57 -0700 (PDT) MIME-Version: 1.0 References: <20190826180734.15801-1-codekipper@gmail.com> <20190826180734.15801-2-codekipper@gmail.com> In-Reply-To: From: Code Kipper Date: Tue, 27 Aug 2019 07:54:45 +0200 Message-ID: Subject: Re: [linux-sunxi] [PATCH v6 1/3] ASoC: sun4i-i2s: incorrect regmap for A83T To: Chen-Yu Tsai Cc: Maxime Ripard , linux-sunxi , linux-arm-kernel , Liam Girdwood , Mark Brown , linux-kernel , Linux-ALSA , "Andrea Venturi (pers)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Aug 2019 at 06:13, Chen-Yu Tsai wrote: > > On Tue, Aug 27, 2019 at 2:07 AM wrote: > > > > From: Marcus Cooper > > > > The regmap configuration is set up for the legacy block on the > > A83T whereas it uses the new block with a larger register map. > > Looking at the code Allwinner previously released [1], that doesn't seem to be > the case. Keep in mind that the register map shown in the user manual is for > the TDM interface, which we don't actually support right now. Should it matter what we support right now?, the block according to the user manual shows the bigger range. I don't have a A83T device and from what I gather not many users do. But the compatible for the H3 has been removed and replaced with the settings for the A83T which also has default settings in registers further up than SUNXI_RXCHMAP. > > The file shows the base address as 0x01c22800, and the last defined register > is SUNXI_RXCHMAP at 0x3c. > > The I2S driver [2] also shows that it is the old register map size, but with > TX_FIFO and INT_STA swapped around. This might mean that it would need a > separate regmap_config, as the read/write callbacks need to be changed to > fit the swapped registers. > > Finally, the TDM driver [3], which matches the TDM section in the manual, shows > a larger register map. > > A83T is SUN8IW6, while SUN8IW7 refers to the H3. Since when have we trusted Allwinner code?, the TDM labelled block clearly supports I2S. The biggest use case for this block is getting HDMI audio working on the newer devices(LibreELEC nightlies has a user base of over 300) and I've tested this on numerous set ups over the last couple of years. Failing that reverting (3e9acd7ac693: "ASoC: sun4i-i2s: Remove duplicated quirks structure") would help. BR, CK > > ChenYu > > [1] https://github.com/allwinner-zh/linux-3.4-sunxi/blob/master/sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.h > [2] https://github.com/allwinner-zh/linux-3.4-sunxi/blob/master/sound/soc/sunxi/i2s0/sunxi-i2s0.h > [3] https://github.com/allwinner-zh/linux-3.4-sunxi/blob/master/sound/soc/sunxi/daudio0/sunxi-daudio0.h > > > Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T") > > Signed-off-by: Marcus Cooper > > --- > > sound/soc/sunxi/sun4i-i2s.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > > index 57bf2a33753e..34575a8aa9f6 100644 > > --- a/sound/soc/sunxi/sun4i-i2s.c > > +++ b/sound/soc/sunxi/sun4i-i2s.c > > @@ -1100,7 +1100,7 @@ static const struct sun4i_i2s_quirks sun6i_a31_i2s_quirks = { > > static const struct sun4i_i2s_quirks sun8i_a83t_i2s_quirks = { > > .has_reset = true, > > .reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG, > > - .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, > > + .sun4i_i2s_regmap = &sun8i_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), > > -- > > 2.23.0 > > > > -- > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190826180734.15801-2-codekipper%40gmail.com.