All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Timur Tabi <timur@kernel.org>, Xiubo Li <Xiubo.Lee@gmail.com>,
	Angus Ainslie <angus@akkea.ca>,
	Liam Girdwood <lgirdwood@gmail.com>,
	patchwork-lst@pengutronix.de,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH 3/3] ASoC: fsl_sai: add i.MX8M support
Date: Wed, 17 Jul 2019 18:06:01 +0300	[thread overview]
Message-ID: <CAEnQRZB96Q4stM4JsJskMhdH-7ktbc-QxPeibNOLHEXghtS-1w@mail.gmail.com> (raw)
In-Reply-To: <1563374027.2676.18.camel@pengutronix.de>

On Wed, Jul 17, 2019 at 5:33 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Hi Daniel,
>
> Am Mittwoch, den 17.07.2019, 17:16 +0300 schrieb Daniel Baluta:
> > > On Wed, Jul 17, 2019 at 1:59 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> > >
> > > The SAI block on the i.MX8M moved the register layout, as 2 version
> > > registers were added at the start of the register map. We deal with
> > > this by moving the start of the regmap, so both register layouts
> > > look the same to accesses going through the regmap.
> > >
> > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >
> > This is a little bit tricky. We need the verid register in order
> > to differentiate IPs which can support 1:1 ratio for bclk:mclk
>
> And this patch doesn't prevent this usage. If needed we can just read
> the verid via a plain readl on the base mapping in the probe function
> and cache it in struct fsl_sai. This seems way less intrusive than
> carrying a register offset through all of the regmap accessors and
> validation functions. I simply haven't implemented it in this patch, as
> I had no need for it right now.

I must admit this is a very clever idea! Anyhow, I'm having some concerns
because unfortunately not all registers were shifted by 8 bytes.

See: imx6sx [1] (page 3575)  and imx8X [2] (page 5512) RMs.

We have something like this:

i.mx6 SX:

00: TCSR
04: TCR1
08: TCR2
0C: TCR3
....
60: TMR
80: RCSR

i.mx 8X

00: VERID
04: PARAM
08: TCSR
0C: TCR1
...
60: TMR
88: RCSR

[1] https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX6SXRM.pdf?__gda__=1563382650_d60ad6189b2431a35a0757ffc87cfb3f&fileExt=.pdf
[2] https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf

  reply	other threads:[~2019-07-17 15:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 10:56 [PATCH 0/3] i.MX8M support for FSL SAI Lucas Stach
2019-07-17 10:56 ` [PATCH 1/3] ASoC: fsl_sai: add of_match data Lucas Stach
2019-07-17 13:42   ` Angus Ainslie
2019-07-17 14:17   ` Daniel Baluta
2019-07-22 12:22   ` Applied "ASoC: fsl_sai: add of_match data" to the asoc tree Mark Brown
2019-07-17 10:56 ` [PATCH 2/3] ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth Lucas Stach
2019-07-17 13:43   ` Angus Ainslie
2019-07-22 12:22   ` Applied "ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth" to the asoc tree Mark Brown
2019-07-17 10:56 ` [PATCH 3/3] ASoC: fsl_sai: add i.MX8M support Lucas Stach
2019-07-17 13:45   ` Angus Ainslie
2019-07-22 10:39     ` Daniel Baluta
2019-07-22 13:41       ` Angus Ainslie
2019-07-17 14:16   ` Daniel Baluta
2019-07-17 14:33     ` Lucas Stach
2019-07-17 15:06       ` Daniel Baluta [this message]
2019-07-17 15:15         ` Angus Ainslie
2019-07-18  8:35           ` Daniel Baluta
2019-07-18 19:11   ` Cezary Rojewski
2019-07-18 19:22     ` Daniel Baluta
2019-07-18 20:19       ` Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEnQRZB96Q4stM4JsJskMhdH-7ktbc-QxPeibNOLHEXghtS-1w@mail.gmail.com \
    --to=daniel.baluta@gmail.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=angus@akkea.ca \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=nicoleotsuka@gmail.com \
    --cc=patchwork-lst@pengutronix.de \
    --cc=timur@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.