From: Zidan Wang <zidan.wang@freescale.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: fabio.estevam@freescale.com, alsa-devel@alsa-project.org,
tiwai@suse.com, timur@tabi.org, broonie@kernel.org
Subject: Re: [PATCH] ASoC: fsl-asoc-card: add wm8960 support
Date: Fri, 14 Aug 2015 10:21:18 +0800 [thread overview]
Message-ID: <20150814022116.GA11145@shlinux2> (raw)
In-Reply-To: <20150812222735.GA57015@Asurada-CZ80>
On Wed, Aug 12, 2015 at 03:27:36PM -0700, Nicolin Chen wrote:
> On Wed, Aug 12, 2015 at 03:39:00PM +0800, Zidan Wang wrote:
> > On Tue, Aug 11, 2015 at 11:40:54PM -0700, Nicolin Chen wrote:
> > > On Wed, Aug 12, 2015 at 12:45:10PM +0800, Zidan Wang wrote:
> > >
> > > > > > + /*
> > > > > > + * for imx6ul we should set SAI2_MCLK_DIR to enable
> > > > > > + * codec MCLK
> > > > > > + */
> > > > > > + if (of_device_is_compatible(np, "fsl,imx6ul-evk-wm8960"))
> > > > > > + regmap_update_bits(priv->gpr, 4, 1 << 20, 1 << 20);
> > >
> > > > > What's this SAI2_MCLK_DIR? Can you provide the description of it?
> > > > SAI2_MCLK_DIR: SD1_CLK data direction control when sai2.MCLK is selected (ALT2)
> > > > 0 SD1_CLK output driver is disabled when configured for ALT2
> > > > 1 SD1_CLK output driver is enabled when configured for ALT2
> > >
> > > > We are using SAI2 now, so we should enable SAI2_MCLK_DIR. If we want to
> > > > use SAI1 and SAI3, we should also enable SAI1_MCLK_DIR and SAI3_MCLK_DIR.
> > > > I don't consider SAI1 and SAI3 case, should i add it like below:
> > >
> > > Yes. Just think about a general interface/configuration that can
> > > satisfy all the MCLK cases you can imagine.
>
> > > And I still don't understand the meaning of this MCLK at all.
> > > Does it indicate SAI's MCLK or an MCLK for external CODEC chips?
> > > Will it be possible that a user needs this MCLK bit to be unset?
>
> > For imx6ul-evk, MCLK for wm8960 CODEC chips and SAI's MCLK is the same pin.
> > So it should always be set for SAI.
>
> Since the MCLK is driven to the external CODEC chip, it should
> be similar to the CLKO for wm8962 on the imx6qdl-sabresd board.
> So this configuration might be included in the clock tree in my
> opinion.
>
> And I Just checked the Reference Manual, it seems the direction
> could be totally set to input by leaving this bit unset: MCLK
> outputs via the SD1_CLK pad of IOMUX when setting this bit in
> the GPR; and MCLK inputs from an external clock source on the
> board level when clearing this bit. The SAI chapter mentions
> something similar in its MCLK section as well.
>
> But I can't find any clock MUX for the MCLK of SAI by selecting
> between the CCM and the external PAD: there is only a MUX inside
> the CCM. So I think you need to confirm with the IC team about
> this bit and the clock source of SAI MCLK.
Don't have such clock MUX. So i think it can't be add to clock tree.
>
> And there is a crucial problem I can imagine:
> Is it okay to set this bit while setting SD1_CLK PAD as one
> of other functions rather than SAI MCLK? -- Customers might
> keep your code as they also use SAI2 while using SD1_CLK PAD
> as a GPIO input.
>
I just add a gpr node in device tree, if customer want to use SD1_CLK PAD as a GPIO input, remove the gpr node.
Best Regards,
Zidan Wang
> Nicolin
next prev parent reply other threads:[~2015-08-14 3:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 3:22 [PATCH] ASoC: fsl-asoc-card: add wm8960 support Zidan Wang
2015-08-12 3:42 ` Nicolin Chen
2015-08-12 4:45 ` Zidan Wang
2015-08-12 6:40 ` Nicolin Chen
2015-08-12 7:39 ` Zidan Wang
2015-08-12 9:03 ` Nicolin Chen
2015-08-12 22:27 ` Nicolin Chen
2015-08-14 2:21 ` Zidan Wang [this message]
2015-08-14 3:58 ` Nicolin Chen
2015-08-14 7:38 ` Zidan Wang
2015-08-14 9:22 ` Nicolin Chen
2015-09-06 11:33 ` Shawn Guo
2015-09-17 8:03 ` Nicolin Chen
2015-09-18 13:19 ` Shawn Guo
2015-09-19 17:50 ` Nicolin Chen
2015-08-12 12:05 ` Fabio Estevam
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=20150814022116.GA11145@shlinux2 \
--to=zidan.wang@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=nicoleotsuka@gmail.com \
--cc=timur@tabi.org \
--cc=tiwai@suse.com \
/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.