All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for SAI on i.MX93 platform
@ 2022-10-27  6:03 Chancel Liu
  2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Chancel Liu @ 2022-10-27  6:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

This patchset supports SAI on i.MX93 platform.

Chancel Liu (3):
  ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
  ASoC: fsl_sai: Add support for i.MX93 platform
  ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform

 .../devicetree/bindings/sound/fsl,sai.yaml    |  1 +
 sound/soc/fsl/fsl_sai.c                       | 23 +++++++++++++++----
 sound/soc/fsl/fsl_sai.h                       |  1 +
 3 files changed, 21 insertions(+), 4 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/3] ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
  2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
@ 2022-10-27  6:03   ` Chancel Liu
  2022-10-27  6:03 ` [PATCH 2/3] ASoC: fsl_sai: Add support " Chancel Liu
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Chancel Liu @ 2022-10-27  6:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

Add compatible string "fsl,imx93-sai" for i.MX93 platform

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index 70c4111d59c7..11aab891288d 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -26,6 +26,7 @@ properties:
           - fsl,imx8mq-sai
           - fsl,imx8qm-sai
           - fsl,imx8ulp-sai
+          - fsl,imx93-sai
       - items:
           - enum:
               - fsl,imx8mm-sai
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 1/3] ASoC: dt-bindings: fsl, sai: Add compatible string for i.MX93 platform
@ 2022-10-27  6:03   ` Chancel Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Chancel Liu @ 2022-10-27  6:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

Add compatible string "fsl,imx93-sai" for i.MX93 platform

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index 70c4111d59c7..11aab891288d 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -26,6 +26,7 @@ properties:
           - fsl,imx8mq-sai
           - fsl,imx8qm-sai
           - fsl,imx8ulp-sai
+          - fsl,imx93-sai
       - items:
           - enum:
               - fsl,imx8mm-sai
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/3] ASoC: fsl_sai: Add support for i.MX93 platform
  2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
  2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
@ 2022-10-27  6:03 ` Chancel Liu
  2022-10-28  8:25     ` Shengjiu Wang
  2022-10-27  6:03 ` [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on " Chancel Liu
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Chancel Liu @ 2022-10-27  6:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

Add compatible string and specific soc data to support SAI on i.MX93
platform.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/fsl/fsl_sai.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 81f89f6767a2..68e1cc4c369a 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1579,6 +1579,17 @@ static const struct fsl_sai_soc_data fsl_sai_imx8ulp_data = {
 	.max_register = FSL_SAI_RTCAP,
 };
 
+static const struct fsl_sai_soc_data fsl_sai_imx93_data = {
+	.use_imx_pcm = true,
+	.use_edma = true,
+	.fifo_depth = 128,
+	.reg_offset = 8,
+	.mclk0_is_mclk1 = false,
+	.pins = 4,
+	.flags = 0,
+	.max_register = FSL_SAI_MCTL,
+};
+
 static const struct of_device_id fsl_sai_ids[] = {
 	{ .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data },
 	{ .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data },
@@ -1590,6 +1601,7 @@ static const struct of_device_id fsl_sai_ids[] = {
 	{ .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data },
 	{ .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data },
 	{ .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mp_data },
+	{ .compatible = "fsl,imx93-sai", .data = &fsl_sai_imx93_data },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, fsl_sai_ids);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform
  2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
  2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
  2022-10-27  6:03 ` [PATCH 2/3] ASoC: fsl_sai: Add support " Chancel Liu
@ 2022-10-27  6:03 ` Chancel Liu
  2022-10-28  8:25     ` Shengjiu Wang
  2022-10-27  7:13   ` Daniel Baluta
  2022-10-28 16:02 ` Mark Brown
  4 siblings, 1 reply; 15+ messages in thread
From: Chancel Liu @ 2022-10-27  6:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev
  Cc: Chancel Liu

There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a
multiple of 8bytes can enable scatter-gather. NBYTES is calculated by
bus width times maxburst. On i.MX93 platform the value of maxburst is
specified to 8. It makes sure that NBYTES is a multiple of 8bytes.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/fsl/fsl_sai.c | 11 +++++++----
 sound/soc/fsl/fsl_sai.h |  1 +
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 68e1cc4c369a..a0ea27f06997 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -872,10 +872,10 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
 
 	regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),
 			   FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
-			   sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX);
+			   sai->soc_data->fifo_depth - sai->dma_params_tx.maxburst);
 	regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),
 			   FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
-			   FSL_SAI_MAXBURST_RX - 1);
+			   sai->dma_params_rx.maxburst - 1);
 
 	snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
 				&sai->dma_params_rx);
@@ -1416,8 +1416,10 @@ static int fsl_sai_probe(struct platform_device *pdev)
 
 	sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0;
 	sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0;
-	sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;
-	sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX;
+	sai->dma_params_rx.maxburst =
+		sai->soc_data->max_burst[RX] ? sai->soc_data->max_burst[RX] : FSL_SAI_MAXBURST_RX;
+	sai->dma_params_tx.maxburst =
+		sai->soc_data->max_burst[TX] ? sai->soc_data->max_burst[TX] : FSL_SAI_MAXBURST_TX;
 
 	sai->pinctrl = devm_pinctrl_get(&pdev->dev);
 
@@ -1588,6 +1590,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx93_data = {
 	.pins = 4,
 	.flags = 0,
 	.max_register = FSL_SAI_MCTL,
+	.max_burst = {8, 8},
 };
 
 static const struct of_device_id fsl_sai_ids[] = {
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 697f6690068c..197748a888d5 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -235,6 +235,7 @@ struct fsl_sai_soc_data {
 	unsigned int reg_offset;
 	unsigned int flags;
 	unsigned int max_register;
+	unsigned int max_burst[2];
 };
 
 /**
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] Add support for SAI on i.MX93 platform
  2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
  2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
@ 2022-10-27  7:13   ` Daniel Baluta
  2022-10-27  6:03 ` [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on " Chancel Liu
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Daniel Baluta @ 2022-10-27  7:13 UTC (permalink / raw)
  To: Chancel Liu
  Cc: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel,
	robh+dt, devicetree, krzysztof.kozlowski+dt, shengjiu.wang,
	Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev

On Thu, Oct 27, 2022 at 9:14 AM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> This patchset supports SAI on i.MX93 platform.
>
> Chancel Liu (3):
>   ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
>   ASoC: fsl_sai: Add support for i.MX93 platform
>   ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] Add support for SAI on i.MX93 platform
@ 2022-10-27  7:13   ` Daniel Baluta
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Baluta @ 2022-10-27  7:13 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, linuxppc-dev, lgirdwood, festevam,
	Xiubo.Lee, linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, shengjiu.wang

On Thu, Oct 27, 2022 at 9:14 AM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> This patchset supports SAI on i.MX93 platform.
>
> Chancel Liu (3):
>   ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
>   ASoC: fsl_sai: Add support for i.MX93 platform
>   ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] Add support for SAI on i.MX93 platform
@ 2022-10-27  7:13   ` Daniel Baluta
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Baluta @ 2022-10-27  7:13 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, linuxppc-dev, lgirdwood, festevam,
	Xiubo.Lee, linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, perex, shengjiu.wang

On Thu, Oct 27, 2022 at 9:14 AM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> This patchset supports SAI on i.MX93 platform.
>
> Chancel Liu (3):
>   ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
>   ASoC: fsl_sai: Add support for i.MX93 platform
>   ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
  2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
@ 2022-10-27 16:45     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 16:45 UTC (permalink / raw)
  To: Chancel Liu, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, robh+dt, devicetree, krzysztof.kozlowski+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev

On 27/10/2022 02:03, Chancel Liu wrote:
> Add compatible string "fsl,imx93-sai" for i.MX93 platform
> 
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 +


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/3] ASoC: dt-bindings: fsl, sai: Add compatible string for i.MX93 platform
@ 2022-10-27 16:45     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-27 16:45 UTC (permalink / raw)
  To: Chancel Liu, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, robh+dt, devicetree, krzysztof.kozlowski+dt,
	shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, linuxppc-dev

On 27/10/2022 02:03, Chancel Liu wrote:
> Add compatible string "fsl,imx93-sai" for i.MX93 platform
> 
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 +


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/3] ASoC: fsl_sai: Add support for i.MX93 platform
  2022-10-27  6:03 ` [PATCH 2/3] ASoC: fsl_sai: Add support " Chancel Liu
@ 2022-10-28  8:25     ` Shengjiu Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Shengjiu Wang @ 2022-10-28  8:25 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, lgirdwood, linuxppc-dev, Xiubo.Lee,
	linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, festevam

On Thu, Oct 27, 2022 at 2:04 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> Add compatible string and specific soc data to support SAI on i.MX93
> platform.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

best regards
wang shengjiu

> ---
>  sound/soc/fsl/fsl_sai.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 81f89f6767a2..68e1cc4c369a 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -1579,6 +1579,17 @@ static const struct fsl_sai_soc_data
> fsl_sai_imx8ulp_data = {
>         .max_register = FSL_SAI_RTCAP,
>  };
>
> +static const struct fsl_sai_soc_data fsl_sai_imx93_data = {
> +       .use_imx_pcm = true,
> +       .use_edma = true,
> +       .fifo_depth = 128,
> +       .reg_offset = 8,
> +       .mclk0_is_mclk1 = false,
> +       .pins = 4,
> +       .flags = 0,
> +       .max_register = FSL_SAI_MCTL,
> +};
> +
>  static const struct of_device_id fsl_sai_ids[] = {
>         { .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data },
>         { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data },
> @@ -1590,6 +1601,7 @@ static const struct of_device_id fsl_sai_ids[] = {
>         { .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data },
>         { .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data },
>         { .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mp_data },
> +       { .compatible = "fsl,imx93-sai", .data = &fsl_sai_imx93_data },
>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, fsl_sai_ids);
> --
> 2.25.1
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/3] ASoC: fsl_sai: Add support for i.MX93 platform
@ 2022-10-28  8:25     ` Shengjiu Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Shengjiu Wang @ 2022-10-28  8:25 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, lgirdwood, linuxppc-dev, Xiubo.Lee,
	linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, perex, festevam

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

On Thu, Oct 27, 2022 at 2:04 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> Add compatible string and specific soc data to support SAI on i.MX93
> platform.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

best regards
wang shengjiu

> ---
>  sound/soc/fsl/fsl_sai.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 81f89f6767a2..68e1cc4c369a 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -1579,6 +1579,17 @@ static const struct fsl_sai_soc_data
> fsl_sai_imx8ulp_data = {
>         .max_register = FSL_SAI_RTCAP,
>  };
>
> +static const struct fsl_sai_soc_data fsl_sai_imx93_data = {
> +       .use_imx_pcm = true,
> +       .use_edma = true,
> +       .fifo_depth = 128,
> +       .reg_offset = 8,
> +       .mclk0_is_mclk1 = false,
> +       .pins = 4,
> +       .flags = 0,
> +       .max_register = FSL_SAI_MCTL,
> +};
> +
>  static const struct of_device_id fsl_sai_ids[] = {
>         { .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data },
>         { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data },
> @@ -1590,6 +1601,7 @@ static const struct of_device_id fsl_sai_ids[] = {
>         { .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data },
>         { .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data },
>         { .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mp_data },
> +       { .compatible = "fsl,imx93-sai", .data = &fsl_sai_imx93_data },
>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, fsl_sai_ids);
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2562 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform
  2022-10-27  6:03 ` [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on " Chancel Liu
@ 2022-10-28  8:25     ` Shengjiu Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Shengjiu Wang @ 2022-10-28  8:25 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, lgirdwood, linuxppc-dev, Xiubo.Lee,
	linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, festevam

On Thu, Oct 27, 2022 at 2:04 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a
> multiple of 8bytes can enable scatter-gather. NBYTES is calculated by
> bus width times maxburst. On i.MX93 platform the value of maxburst is
> specified to 8. It makes sure that NBYTES is a multiple of 8bytes.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

best regards
wang shengjiu

> ---
>  sound/soc/fsl/fsl_sai.c | 11 +++++++----
>  sound/soc/fsl/fsl_sai.h |  1 +
>  2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 68e1cc4c369a..a0ea27f06997 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -872,10 +872,10 @@ static int fsl_sai_dai_probe(struct snd_soc_dai
> *cpu_dai)
>
>         regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),
>                            FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
> -                          sai->soc_data->fifo_depth -
> FSL_SAI_MAXBURST_TX);
> +                          sai->soc_data->fifo_depth -
> sai->dma_params_tx.maxburst);
>         regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),
>                            FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
> -                          FSL_SAI_MAXBURST_RX - 1);
> +                          sai->dma_params_rx.maxburst - 1);
>
>         snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
>                                 &sai->dma_params_rx);
> @@ -1416,8 +1416,10 @@ static int fsl_sai_probe(struct platform_device
> *pdev)
>
>         sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0;
>         sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0;
> -       sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;
> -       sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX;
> +       sai->dma_params_rx.maxburst =
> +               sai->soc_data->max_burst[RX] ?
> sai->soc_data->max_burst[RX] : FSL_SAI_MAXBURST_RX;
> +       sai->dma_params_tx.maxburst =
> +               sai->soc_data->max_burst[TX] ?
> sai->soc_data->max_burst[TX] : FSL_SAI_MAXBURST_TX;
>
>         sai->pinctrl = devm_pinctrl_get(&pdev->dev);
>
> @@ -1588,6 +1590,7 @@ static const struct fsl_sai_soc_data
> fsl_sai_imx93_data = {
>         .pins = 4,
>         .flags = 0,
>         .max_register = FSL_SAI_MCTL,
> +       .max_burst = {8, 8},
>  };
>
>  static const struct of_device_id fsl_sai_ids[] = {
> diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
> index 697f6690068c..197748a888d5 100644
> --- a/sound/soc/fsl/fsl_sai.h
> +++ b/sound/soc/fsl/fsl_sai.h
> @@ -235,6 +235,7 @@ struct fsl_sai_soc_data {
>         unsigned int reg_offset;
>         unsigned int flags;
>         unsigned int max_register;
> +       unsigned int max_burst[2];
>  };
>
>  /**
> --
> 2.25.1
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform
@ 2022-10-28  8:25     ` Shengjiu Wang
  0 siblings, 0 replies; 15+ messages in thread
From: Shengjiu Wang @ 2022-10-28  8:25 UTC (permalink / raw)
  To: Chancel Liu
  Cc: devicetree, alsa-devel, lgirdwood, linuxppc-dev, Xiubo.Lee,
	linux-kernel, robh+dt, tiwai, nicoleotsuka, broonie,
	krzysztof.kozlowski+dt, perex, festevam

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]

On Thu, Oct 27, 2022 at 2:04 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a
> multiple of 8bytes can enable scatter-gather. NBYTES is calculated by
> bus width times maxburst. On i.MX93 platform the value of maxburst is
> specified to 8. It makes sure that NBYTES is a multiple of 8bytes.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

best regards
wang shengjiu

> ---
>  sound/soc/fsl/fsl_sai.c | 11 +++++++----
>  sound/soc/fsl/fsl_sai.h |  1 +
>  2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 68e1cc4c369a..a0ea27f06997 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -872,10 +872,10 @@ static int fsl_sai_dai_probe(struct snd_soc_dai
> *cpu_dai)
>
>         regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),
>                            FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
> -                          sai->soc_data->fifo_depth -
> FSL_SAI_MAXBURST_TX);
> +                          sai->soc_data->fifo_depth -
> sai->dma_params_tx.maxburst);
>         regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),
>                            FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
> -                          FSL_SAI_MAXBURST_RX - 1);
> +                          sai->dma_params_rx.maxburst - 1);
>
>         snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
>                                 &sai->dma_params_rx);
> @@ -1416,8 +1416,10 @@ static int fsl_sai_probe(struct platform_device
> *pdev)
>
>         sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0;
>         sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0;
> -       sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;
> -       sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX;
> +       sai->dma_params_rx.maxburst =
> +               sai->soc_data->max_burst[RX] ?
> sai->soc_data->max_burst[RX] : FSL_SAI_MAXBURST_RX;
> +       sai->dma_params_tx.maxburst =
> +               sai->soc_data->max_burst[TX] ?
> sai->soc_data->max_burst[TX] : FSL_SAI_MAXBURST_TX;
>
>         sai->pinctrl = devm_pinctrl_get(&pdev->dev);
>
> @@ -1588,6 +1590,7 @@ static const struct fsl_sai_soc_data
> fsl_sai_imx93_data = {
>         .pins = 4,
>         .flags = 0,
>         .max_register = FSL_SAI_MCTL,
> +       .max_burst = {8, 8},
>  };
>
>  static const struct of_device_id fsl_sai_ids[] = {
> diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
> index 697f6690068c..197748a888d5 100644
> --- a/sound/soc/fsl/fsl_sai.h
> +++ b/sound/soc/fsl/fsl_sai.h
> @@ -235,6 +235,7 @@ struct fsl_sai_soc_data {
>         unsigned int reg_offset;
>         unsigned int flags;
>         unsigned int max_register;
> +       unsigned int max_burst[2];
>  };
>
>  /**
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 4023 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] Add support for SAI on i.MX93 platform
  2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
                   ` (3 preceding siblings ...)
  2022-10-27  7:13   ` Daniel Baluta
@ 2022-10-28 16:02 ` Mark Brown
  4 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2022-10-28 16:02 UTC (permalink / raw)
  To: devicetree, tiwai, festevam, linux-kernel, nicoleotsuka,
	lgirdwood, krzysztof.kozlowski+dt, Xiubo.Lee, shengjiu.wang,
	alsa-devel, linuxppc-dev, robh+dt, Chancel Liu, perex

On Thu, 27 Oct 2022 14:03:08 +0800, Chancel Liu wrote:
> This patchset supports SAI on i.MX93 platform.
> 
> Chancel Liu (3):
>   ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
>   ASoC: fsl_sai: Add support for i.MX93 platform
>   ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform
      commit: aa8289fda86ede0e164a260316647c8bf0400d41
[2/3] ASoC: fsl_sai: Add support for i.MX93 platform
      commit: 67d5c6c19923ad26def8a001e86fc0f42264a8b5
[3/3] ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform
      commit: 870b89d118a29bd845ea706a74e313f9b83f5a45

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-10-29 22:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  6:03 [PATCH 0/3] Add support for SAI on i.MX93 platform Chancel Liu
2022-10-27  6:03 ` [PATCH 1/3] ASoC: dt-bindings: fsl,sai: Add compatible string for " Chancel Liu
2022-10-27  6:03   ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Chancel Liu
2022-10-27 16:45   ` [PATCH 1/3] ASoC: dt-bindings: fsl,sai: " Krzysztof Kozlowski
2022-10-27 16:45     ` [PATCH 1/3] ASoC: dt-bindings: fsl, sai: " Krzysztof Kozlowski
2022-10-27  6:03 ` [PATCH 2/3] ASoC: fsl_sai: Add support " Chancel Liu
2022-10-28  8:25   ` Shengjiu Wang
2022-10-28  8:25     ` Shengjiu Wang
2022-10-27  6:03 ` [PATCH 3/3] ASoC: fsl_sai: Specify the maxburst to 8 on " Chancel Liu
2022-10-28  8:25   ` Shengjiu Wang
2022-10-28  8:25     ` Shengjiu Wang
2022-10-27  7:13 ` [PATCH 0/3] Add support for SAI " Daniel Baluta
2022-10-27  7:13   ` Daniel Baluta
2022-10-27  7:13   ` Daniel Baluta
2022-10-28 16:02 ` Mark Brown

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.