From: "TingHan Shen (沈廷翰)" <TingHan.Shen@mediatek.com>
To: "robh+dt@kernel.org" <robh+dt@kernel.org>,
"YC Hung (洪堯俊)" <yc.hung@mediatek.com>,
"kai.vehmanen@linux.intel.com" <kai.vehmanen@linux.intel.com>,
"Chunxu Li (李春旭)" <Chunxu.Li@mediatek.com>,
"pierre-louis.bossart@linux.intel.com"
<pierre-louis.bossart@linux.intel.com>,
"Allen-KH Cheng (程冠勳)" <Allen-KH.Cheng@mediatek.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"tiwai@suse.com" <tiwai@suse.com>,
"yung-chuan.liao@linux.intel.com"
<yung-chuan.liao@linux.intel.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"peter.ujfalusi@linux.intel.com" <peter.ujfalusi@linux.intel.com>,
"perex@perex.cz" <perex@perex.cz>,
"daniel.baluta@nxp.com" <daniel.baluta@nxp.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"ranjani.sridharan@linux.intel.com"
<ranjani.sridharan@linux.intel.com>,
"error27@gmail.com" <error27@gmail.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"sound-open-firmware@alsa-project.org"
<sound-open-firmware@alsa-project.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH v1 2/3] ASoC: SOF: mediatek: Support mt8188 platform
Date: Tue, 10 Jan 2023 08:32:10 +0000 [thread overview]
Message-ID: <d139005348032f44684488df9c7c9727ccb36ffe.camel@mediatek.com> (raw)
In-Reply-To: <31b2946b-d4f2-5e5b-a107-45b3454c601b@collabora.com>
Hi Angelo,
On Thu, 2022-12-22 at 12:09 +0100, AngeloGioacchino Del Regno wrote:
> Il 22/12/22 08:21, Tinghan Shen ha scritto:
> > Add support of SOF on MediaTek MT8188 SoC.
> > MT8188 ADSP integrates with a single core Cadence HiFi-5 DSP.
> > The IPC communication between AP and DSP is based on shared DRAM and
> > mailbox interrupt.
> >
> > The change in the mt8186.h is compatible on both mt8186 and
> > mt8188. The register controls booting the DSP core with the
> > default address or the user specified address. Both mt8186
> > and mt8188 should boot with the user specified boot in the driver.
> > The usage of the register is the same on both SoC, but the
> > control bit is different on mt8186 and mt8188, which is bit 1 on mt8186
> > and bit 0 on mt8188. Configure the redundant bit has noside effect
> > on both SoCs.
> >
> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
> > Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> > ---
> > sound/soc/sof/mediatek/mt8186/mt8186.c | 17 +++++++++++++++++
> > sound/soc/sof/mediatek/mt8186/mt8186.h | 3 ++-
> > 2 files changed, 19 insertions(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c
> > index 79da25725987..af0dfc2fc4cc 100644
> > --- a/sound/soc/sof/mediatek/mt8186/mt8186.c
> > +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c
> > @@ -625,8 +625,25 @@ static const struct sof_dev_desc sof_of_mt8186_desc = {
> > .ops = &sof_mt8186_ops,
> > };
> >
> > +static const struct sof_dev_desc sof_of_mt8188_desc = {
> > + .ipc_supported_mask = BIT(SOF_IPC),
> > + .ipc_default = SOF_IPC,
> > + .default_fw_path = {
> > + [SOF_IPC] = "mediatek/sof",
> > + },
> > + .default_tplg_path = {
> > + [SOF_IPC] = "mediatek/sof-tplg",
> > + },
> > + .default_fw_filename = {
> > + [SOF_IPC] = "sof-mt8188.ri",
> > + },
> > + .nocodec_tplg_filename = "sof-mt8188-nocodec.tplg",
> > + .ops = &sof_mt8186_ops,
> > +};
> > +
> > static const struct of_device_id sof_of_mt8186_ids[] = {
> > { .compatible = "mediatek,mt8186-dsp", .data = &sof_of_mt8186_desc},
> > + { .compatible = "mediatek,mt8188-dsp", .data = &sof_of_mt8188_desc},
> > { }
> > };
> > MODULE_DEVICE_TABLE(of, sof_of_mt8186_ids);
> > diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.h b/sound/soc/sof/mediatek/mt8186/mt8186.h
> > index 98b2965e5ba6..886d687449e3 100644
> > --- a/sound/soc/sof/mediatek/mt8186/mt8186.h
> > +++ b/sound/soc/sof/mediatek/mt8186/mt8186.h
> > @@ -52,7 +52,8 @@ struct snd_sof_dev;
> > #define ADSP_PRID 0x0
> > #define ADSP_ALTVEC_C0 0x04
> > #define ADSP_ALTVECSEL 0x0C
> > -#define ADSP_ALTVECSEL_C0 BIT(1)
> > +/* BIT(1) for mt8186. BIT(0) for mt8188 */
>
> We can be clearer here:
>
> #define MT8188_ADSP_ALTVECSEL_C0 BIT(0)
> #define MT8186_ADSP_ALTVECSEL_C0 BIT(1)
>
> /*
> * On MT8188, BIT(1) is not evaluated and on MT8186 BIT(0) is not evaluated:
> * We can simplify the driver by safely setting both bits regardless of the SoC.
> */
> #define ADSP_ALTVECSEL_C0 (MT8188_ADSP_ALTVECSEL_C0 |
> MT8186_ADSP_ALTVECSEL_C0)
>
> ...so that we don't have to check the commit history to understand what's going
> on here, and it becomes clear that ALTVECSEL is not both bits, but one of them.
>
> Cheers,
> Angelo
>
Ok, I'll udpate in the next version.
Thank you.
--
Best regards,
TingHan
next prev parent reply other threads:[~2023-01-10 8:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 7:21 [PATCH v1 0/3] Add support of MediaTek mt8188 to SOF Tinghan Shen
2022-12-22 7:21 ` [PATCH v1 1/3] dt-bindings: dsp: mediatek: Add mt8188 dsp compatible Tinghan Shen
2022-12-22 11:10 ` AngeloGioacchino Del Regno
2022-12-22 12:04 ` Krzysztof Kozlowski
2022-12-22 7:21 ` [PATCH v1 2/3] ASoC: SOF: mediatek: Support mt8188 platform Tinghan Shen
2022-12-22 11:09 ` AngeloGioacchino Del Regno
2023-01-10 8:32 ` TingHan Shen (沈廷翰) [this message]
2022-12-22 7:21 ` [PATCH v1 3/3] ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core Tinghan Shen
2022-12-22 11:10 ` AngeloGioacchino Del Regno
2023-01-10 16:53 ` [PATCH v1 0/3] Add support of MediaTek mt8188 to SOF Mark Brown
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=d139005348032f44684488df9c7c9727ccb36ffe.camel@mediatek.com \
--to=tinghan.shen@mediatek.com \
--cc=Allen-KH.Cheng@mediatek.com \
--cc=Chunxu.Li@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=error27@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=robh+dt@kernel.org \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yc.hung@mediatek.com \
--cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).