mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Trevor Wu <trevor.wu@mediatek.com>,
	broonie@kernel.org, tiwai@suse.com, robh+dt@kernel.org,
	matthias.bgg@gmail.com, p.zabel@pengutronix.de
Cc: alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 08/12] ASoC: mediatek: mt8188: add platform driver
Date: Tue, 4 Oct 2022 11:36:43 +0200	[thread overview]
Message-ID: <50e12f7a-bf15-9f27-0606-5d23b310bf2d@collabora.com> (raw)
In-Reply-To: <20220930145701.18790-9-trevor.wu@mediatek.com>

Il 30/09/22 16:56, Trevor Wu ha scritto:
> Add mt8188 platform driver.
> 
> Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
> ---
> This patch depends on the following series that has not been accepted.
> 
> [1] Add power domain support for MT8188
> https://patchwork.kernel.org/project/linux-mediatek/list/?series=681359
> (linux/soc/mediatek/infracfg.h is included)
> ---
>   sound/soc/mediatek/Kconfig                 |   13 +
>   sound/soc/mediatek/Makefile                |    1 +
>   sound/soc/mediatek/mt8188/Makefile         |   12 +
>   sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 2945 ++++++++++++++++++++
>   4 files changed, 2971 insertions(+)
>   create mode 100644 sound/soc/mediatek/mt8188/Makefile
>   create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> 
> diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig
> index 363fa4d47680..cf0e4c6b61e7 100644
> --- a/sound/soc/mediatek/Kconfig
> +++ b/sound/soc/mediatek/Kconfig
> @@ -206,6 +206,19 @@ config SND_SOC_MTK_BTCVSD
>   	  Select Y if you have such device.
>   	  If unsure select "N".
>   
> +config SND_SOC_MT8188
> +	tristate "ASoC support for Mediatek MT8188 chip"
> +	depends on ARCH_MEDIATEK || COMPILE_TEST
> +	depends on COMMON_CLK
> +	select SND_SOC_MEDIATEK
> +	select SND_SOC_MT6359
> +	select MFD_SYSCON if SND_SOC_MT6359
> +	help
> +	  This adds ASoC platform driver support for Mediatek MT8188 chip
> +	  that can be used with other codecs.
> +	  Select Y if you have such device.
> +	  If unsure select "N".
> +
>   config SND_SOC_MT8192
>   	tristate "ASoC support for Mediatek MT8192 chip"
>   	depends on ARCH_MEDIATEK
> diff --git a/sound/soc/mediatek/Makefile b/sound/soc/mediatek/Makefile
> index 5571c640a288..3de38cfc69e5 100644
> --- a/sound/soc/mediatek/Makefile
> +++ b/sound/soc/mediatek/Makefile
> @@ -5,5 +5,6 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/
>   obj-$(CONFIG_SND_SOC_MT8173) += mt8173/
>   obj-$(CONFIG_SND_SOC_MT8183) += mt8183/
>   obj-$(CONFIG_SND_SOC_MT8186) += mt8186/
> +obj-$(CONFIG_SND_SOC_MT8188) += mt8188/
>   obj-$(CONFIG_SND_SOC_MT8192) += mt8192/
>   obj-$(CONFIG_SND_SOC_MT8195) += mt8195/
> diff --git a/sound/soc/mediatek/mt8188/Makefile b/sound/soc/mediatek/mt8188/Makefile
> new file mode 100644
> index 000000000000..fa5d383c5e47
> --- /dev/null
> +++ b/sound/soc/mediatek/mt8188/Makefile
> @@ -0,0 +1,12 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# platform driver
> +snd-soc-mt8188-afe-objs := \
> +	mt8188-afe-clk.o \
> +	mt8188-afe-pcm.o \
> +	mt8188-audsys-clk.o \
> +	mt8188-dai-adda.o \
> +	mt8188-dai-etdm.o \
> +	mt8188-dai-pcm.o
> +
> +obj-$(CONFIG_SND_SOC_MT8188) += snd-soc-mt8188-afe.o
> diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> new file mode 100644
> index 000000000000..5d8e01c99714
> --- /dev/null
> +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> @@ -0,0 +1,2945 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Mediatek ALSA SoC AFE platform driver for 8188
> + *
> + * Copyright (c) 2022 MediaTek Inc.
> + * Author: Bicycle Tsai <bicycle.tsai@mediatek.com>
> + *         Trevor Wu <trevor.wu@mediatek.com>
> + *         Chun-Chia Chiu <chun-chia.chiu@mediatek.com>
> + */
> +
> +#include <linux/arm-smccc.h>
> +#include <linux/delay.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/module.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +#include <linux/of_platform.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/reset.h>
> +#include <linux/soc/mediatek/infracfg.h>
> +#include <linux/soc/mediatek/mtk_sip_svc.h>
> +#include <sound/pcm_params.h>
> +#include "mt8188-afe-common.h"
> +#include "mt8188-afe-clk.h"
> +#include "mt8188-reg.h"
> +#include "../common/mtk-afe-platform-driver.h"
> +#include "../common/mtk-afe-fe-dai.h"
> +
> +#define MTK_SIP_AUDIO_CONTROL MTK_SIP_SMC_CMD(0x517)

This definition goes to include/linux/soc/mediatek/mtk_sip_svc.h

> +
> +#define MT8188_MEMIF_BUFFER_BYTES_ALIGN  (0x40)
> +#define MT8188_MEMIF_DL7_MAX_PERIOD_SIZE (0x3fff)
> +
> +#define MEMIF_AXI_MINLEN 9 //register default value

...and please fix comments style.

> +
> +struct mtk_dai_memif_priv {
> +	unsigned int asys_timing_sel;
> +	unsigned int fs_timing;
> +};
> +

..snip..

> +
> +MODULE_DESCRIPTION("Mediatek ALSA SoC AFE platform driver for 8188");

MediaTek SoC AFE platform driver for ALSA MT8188

> +MODULE_AUTHOR("Chun-Chia.Chiu <chun-chia.chiu@mediatek.com>");
> +MODULE_LICENSE("GPL");




  parent reply	other threads:[~2022-10-04  9:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 14:56 [PATCH 00/12] ASoC: mediatek: Add support for MT8188 SoC Trevor Wu
2022-09-30 14:56 ` [PATCH 01/12] ASoC: mediatek: common: add SMC ops ID Trevor Wu
2022-09-30 14:56 ` [PATCH 02/12] ASoC: mediatek: mt8188: add common header Trevor Wu
2022-09-30 14:56 ` [PATCH 03/12] ASoC: mediatek: mt8188: support audsys clock Trevor Wu
2022-09-30 14:56 ` [PATCH 04/12] ASoC: mediatek: mt8188: support adda in platform driver Trevor Wu
2022-10-04  9:37   ` AngeloGioacchino Del Regno
2022-10-05  7:14     ` Trevor Wu (吳文良)
2022-09-30 14:56 ` [PATCH 05/12] ASoC: mediatek: mt8188: support etdm " Trevor Wu
2022-09-30 14:56 ` [PATCH 06/12] ASoC: mediatek: mt8188: support pcmif " Trevor Wu
2022-09-30 14:56 ` [PATCH 07/12] ASoC: mediatek: mt8188: support audio clock control Trevor Wu
2022-09-30 14:56 ` [PATCH 08/12] ASoC: mediatek: mt8188: add platform driver Trevor Wu
2022-10-01  9:17   ` kernel test robot
2022-10-05  6:50     ` Trevor Wu (吳文良)
2022-10-05 10:59       ` Mark Brown
2022-10-06  3:13         ` Trevor Wu (吳文良)
2022-10-04  9:36   ` AngeloGioacchino Del Regno [this message]
2022-10-06  2:48     ` Trevor Wu (吳文良)
2022-10-15  2:27       ` Trevor Wu (吳文良)
2022-09-30 14:56 ` [PATCH 09/12] ASoC: mediatek: mt8188: add control for timing select Trevor Wu
2022-09-30 14:56 ` [PATCH 10/12] dt-bindings: mediatek: mt8188: add audio afe document Trevor Wu
2022-09-30 22:05   ` Rob Herring
2022-10-05  3:57     ` Trevor Wu (吳文良)
2022-10-28 23:46       ` Krzysztof Kozlowski
2022-10-03 16:30   ` Rob Herring
2022-10-05 10:12     ` Trevor Wu (吳文良)
2022-09-30 14:57 ` [PATCH 11/12] ASoC: mediatek: mt8188: add machine driver with mt6359 Trevor Wu
2022-09-30 14:57 ` [PATCH 12/12] dt-bindings: mediatek: mt8188: add mt8188-mt6359 document Trevor Wu
2022-10-03 16:38   ` Rob Herring
2022-10-06  2:38     ` Trevor Wu (吳文良)
2022-10-21  8:54       ` Trevor Wu (吳文良)
2022-10-21  8:58       ` Trevor Wu (吳文良)

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=50e12f7a-bf15-9f27-0606-5d23b310bf2d@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    --cc=trevor.wu@mediatek.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

all inboxes | Powered by JetHome®