linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
@ 2023-08-27  2:31 Adam Ford
  2023-08-27  2:31 ` [PATCH V2 2/3] arm64: dts: imx8mp: Add easrc node Adam Ford
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Adam Ford @ 2023-08-27  2:31 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

The i.MX8MP appears to have the same easrc support as the Nano, so
add imx8mp as an option with a fallback to imx8mn.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  Fixed errors:
     ['fsl,imx8mn-easrc'] is too short
      'fsl,imx8mn-easrc' is not one of ['fsl,imx8mp-easrc']
        
diff --git a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
index bdde68a1059c..a680d7aff237 100644
--- a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
@@ -14,7 +14,13 @@ properties:
     pattern: "^easrc@.*"
 
   compatible:
-    const: fsl,imx8mn-easrc
+    oneOf:
+      - enum:
+          - fsl,imx8mn-easrc
+      - items:
+          - enum:
+              - fsl,imx8mp-easrc
+          - const: fsl,imx8mn-easrc
 
   reg:
     maxItems: 1
-- 
2.39.2


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

* [PATCH V2 2/3] arm64: dts: imx8mp: Add easrc node
  2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
@ 2023-08-27  2:31 ` Adam Ford
  2023-08-27  2:31 ` [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node Adam Ford
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2023-08-27  2:31 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

The i.MX8MP has an asynchronous sample rate converter which seems
to be the same as what is available on the i.MX8M Nano.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  No change

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 6f2f50e1639c..79cdd4c066c8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1453,6 +1453,26 @@ sai7: sai@30c80000 {
 					interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
 					status = "disabled";
 				};
+
+				easrc: easrc@30c90000 {
+					compatible = "fsl,imx8mp-easrc", "fsl,imx8mn-easrc";
+					reg = <0x30c90000 0x10000>;
+					interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_ASRC_IPG>;
+					clock-names = "mem";
+					dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
+					       <&sdma2 18 23 0> , <&sdma2 19 23 0>,
+					       <&sdma2 20 23 0> , <&sdma2 21 23 0>,
+					       <&sdma2 22 23 0> , <&sdma2 23 23 0>;
+					dma-names = "ctx0_rx", "ctx0_tx",
+						    "ctx1_rx", "ctx1_tx",
+						    "ctx2_rx", "ctx2_tx",
+						    "ctx3_rx", "ctx3_tx";
+					firmware-name = "imx/easrc/easrc-imx8mn.bin";
+					fsl,asrc-rate  = <8000>;
+					fsl,asrc-format = <2>;
+					status = "disabled";
+				};
 			};
 
 			sdma3: dma-controller@30e00000 {
-- 
2.39.2


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

* [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node
  2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
  2023-08-27  2:31 ` [PATCH V2 2/3] arm64: dts: imx8mp: Add easrc node Adam Ford
@ 2023-08-27  2:31 ` Adam Ford
  2023-08-30 22:41   ` Adam Ford
  2023-08-27  7:58 ` [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2023-08-27  2:31 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

The i.MX8MP has a micfil controller which is used for interfacing
with a pulse density microphone. Add the node and mark it as
disabled by default.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  No Change

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 79cdd4c066c8..b44851a2f579 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1473,6 +1473,27 @@ easrc: easrc@30c90000 {
 					fsl,asrc-format = <2>;
 					status = "disabled";
 				};
+
+				micfil: audio-controller@30ca0000 {
+					compatible = "fsl,imx8mp-micfil";
+					reg = <0x30ca0000 0x10000>;
+					#sound-dai-cells = <0>;
+					interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_IPG>,
+						 <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_ROOT>,
+						 <&clk IMX8MP_AUDIO_PLL1_OUT>,
+						 <&clk IMX8MP_AUDIO_PLL2_OUT>,
+						 <&clk IMX8MP_CLK_EXT3>;
+					clock-names = "ipg_clk", "ipg_clk_app",
+						      "pll8k", "pll11k", "clkext3";
+					dmas = <&sdma2 24 25 0x80000000>;
+					dma-names = "rx";
+					status = "disabled";
+				};
+
 			};
 
 			sdma3: dma-controller@30e00000 {
-- 
2.39.2


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

* Re: [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
  2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
  2023-08-27  2:31 ` [PATCH V2 2/3] arm64: dts: imx8mp: Add easrc node Adam Ford
  2023-08-27  2:31 ` [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node Adam Ford
@ 2023-08-27  7:58 ` Krzysztof Kozlowski
  2023-08-27 12:19 ` Conor Dooley
  2023-08-29 19:12 ` (subset) " Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-27  7:58 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: aford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

On 27/08/2023 04:31, Adam Ford wrote:
> The i.MX8MP appears to have the same easrc support as the Nano, so
> add imx8mp as an option with a fallback to imx8mn.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

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

Best regards,
Krzysztof


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

* Re: [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
  2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
                   ` (2 preceding siblings ...)
  2023-08-27  7:58 ` [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Krzysztof Kozlowski
@ 2023-08-27 12:19 ` Conor Dooley
  2023-08-29 19:12 ` (subset) " Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-08-27 12:19 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, aford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

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

On Sat, Aug 26, 2023 at 09:31:53PM -0500, Adam Ford wrote:
> The i.MX8MP appears to have the same easrc support as the Nano, so
> add imx8mp as an option with a fallback to imx8mn.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2:  Fixed errors:
>      ['fsl,imx8mn-easrc'] is too short
>       'fsl,imx8mn-easrc' is not one of ['fsl,imx8mp-easrc']
>         
> diff --git a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
> index bdde68a1059c..a680d7aff237 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
> @@ -14,7 +14,13 @@ properties:
>      pattern: "^easrc@.*"
>  
>    compatible:
> -    const: fsl,imx8mn-easrc
> +    oneOf:
> +      - enum:
> +          - fsl,imx8mn-easrc

This one should probably stay const, no?
Either way,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> +      - items:
> +          - enum:
> +              - fsl,imx8mp-easrc
> +          - const: fsl,imx8mn-easrc
>  
>    reg:
>      maxItems: 1
> -- 
> 2.39.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: (subset) [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
  2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
                   ` (3 preceding siblings ...)
  2023-08-27 12:19 ` Conor Dooley
@ 2023-08-29 19:12 ` Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2023-08-29 19:12 UTC (permalink / raw)
  To: linux-arm-kernel, Adam Ford
  Cc: aford, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Shengjiu Wang, alsa-devel,
	devicetree, linux-kernel

On Sat, 26 Aug 2023 21:31:53 -0500, Adam Ford wrote:
> The i.MX8MP appears to have the same easrc support as the Nano, so
> add imx8mp as an option with a fallback to imx8mn.
> 
> 

Applied to

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

Thanks!

[1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
      commit: b5f3cec3159dd28563e5a88096769f7b77272790

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] 7+ messages in thread

* Re: [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node
  2023-08-27  2:31 ` [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node Adam Ford
@ 2023-08-30 22:41   ` Adam Ford
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2023-08-30 22:41 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Shengjiu Wang, alsa-devel, devicetree, linux-kernel

On Sat, Aug 26, 2023 at 9:32 PM Adam Ford <aford173@gmail.com> wrote:
>
> The i.MX8MP has a micfil controller which is used for interfacing
> with a pulse density microphone. Add the node and mark it as
> disabled by default.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---

Nak.  I guess I'll Nak myself.

> V2:  No Change
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 79cdd4c066c8..b44851a2f579 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -1473,6 +1473,27 @@ easrc: easrc@30c90000 {
>                                         fsl,asrc-format = <2>;
>                                         status = "disabled";
>                                 };
> +
> +                               micfil: audio-controller@30ca0000 {
> +                                       compatible = "fsl,imx8mp-micfil";
> +                                       reg = <0x30ca0000 0x10000>;
> +                                       #sound-dai-cells = <0>;
> +                                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
> +                                                    <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
> +                                                    <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
> +                                                    <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
> +                                       clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_IPG>,
> +                                                <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_ROOT>,

After a bunch of attempts to get this working on real hardware, it
turns out that IMX8MP_CLK_AUDIOMIX_PDM_ROOT doesn't really exist.  Its
real name is IMX8MP_CLK_AUDIOMIX_PDM_SEL.  I'll submit a patch to
remove this from imx8mp-clock.h and and a V3 of this series to update
the clock reference in this node.

> +                                                <&clk IMX8MP_AUDIO_PLL1_OUT>,
> +                                                <&clk IMX8MP_AUDIO_PLL2_OUT>,
> +                                                <&clk IMX8MP_CLK_EXT3>;
> +                                       clock-names = "ipg_clk", "ipg_clk_app",
> +                                                     "pll8k", "pll11k", "clkext3";
> +                                       dmas = <&sdma2 24 25 0x80000000>;
> +                                       dma-names = "rx";
> +                                       status = "disabled";
> +                               };
> +
>                         };
>
>                         sdma3: dma-controller@30e00000 {
> --
> 2.39.2
>

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

end of thread, other threads:[~2023-08-30 22:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27  2:31 [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Adam Ford
2023-08-27  2:31 ` [PATCH V2 2/3] arm64: dts: imx8mp: Add easrc node Adam Ford
2023-08-27  2:31 ` [PATCH V2 3/3] arm64: dts: imx8mp: Add micfil node Adam Ford
2023-08-30 22:41   ` Adam Ford
2023-08-27  7:58 ` [PATCH V2 1/3] ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc Krzysztof Kozlowski
2023-08-27 12:19 ` Conor Dooley
2023-08-29 19:12 ` (subset) " Mark Brown

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).