Skip to contentSkip to conversation

arm64: defconfig: Enable some audio drivers on i.MX8M Mini

PATCH In review Adam Ford 3 participants 6 messages May 2, 2020 – Oct 29, 2020

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 arm64: defconfig: Enable some audio drivers on i.MX8M Mini

The i.MX8M Mini has SAI and micfil support but the drivers are not being loaded.

This patch updates the defconfig to add support CONFIG_SND_SOC_FSL_SAI and CONFIG_SND_SOC_FSL_MICFIL to support these drivers.

arch/arm64/configs/defconfig +2 -0
index 366857dfa9de..4e60e8a98b83 100644
@@ -638,6 +638,8 @@ CONFIG_SND_HDA_TEGRA=m
 CONFIG_SND_HDA_CODEC_HDMI=m
 CONFIG_SND_SOC=y
 CONFIG_SND_BCM2835_SOC_I2S=m
+CONFIG_SND_SOC_FSL_SAI=y
+CONFIG_SND_SOC_FSL_MICFIL=y
 CONFIG_SND_MESON_AXG_SOUND_CARD=m
 CONFIG_SND_SOC_SDM845=m
 CONFIG_SND_SOC_ROCKCHIP=m
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/1 arm64: dts: imx8mm: Add support for micfil

The i.MX8M Mini has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing.

This patch adds the micfil node.

arch/arm64/boot/dts/freescale/imx8mm.dtsi +19 -0
index c63685ae80ee..d46e727fc362 100644
@@ -339,6 +339,25 @@ sai6: sai@30060000 {
 				status = "disabled";
 			};
 
+			micfil: micfil@30080000 {
+				compatible = "fsl,imx8mm-micfil";
+				reg = <0x30080000 0x10000>;
+				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 = <&clk IMX8MM_CLK_PDM_IPG>,
+					 <&clk IMX8MM_CLK_PDM_ROOT>,
+					 <&clk IMX8MM_AUDIO_PLL1_OUT>,
+					 <&clk IMX8MM_AUDIO_PLL2_OUT>,
+					 <&clk IMX8MM_CLK_EXT3>;
+				clock-names = "ipg_clk", "ipg_clk_app",
+					      "pll8k", "pll11k", "clkext3";
+				dmas = <&sdma2 24 25 0x80000000>;
+				dma-names = "rx";
+				status = "disabled";
+			};
+
 			gpio1: gpio@30200000 {
 				compatible = "fsl,imx8mm-gpio", "fsl,imx35-gpio";
 				reg = <0x30200000 0x10000>;
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH] arm64: dts: imx8mm: Add support for micfil

Quoted 13 lines · Adam Ford

The i.MX8M Mini has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing.

This patch adds the micfil node.

arch/arm64/boot/dts/freescale/imx8mm.dtsi +0 -0
index c63685ae80ee..d46e727fc362 100644

arch/arm64/boot/dts/freescale/imx8mm.dtsi sai6: sai@30060000 { · line 342

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +1 -0
@@ -339,6 +339,25 @@ sai6: sai@30060000 {
 				status = "disabled";
 			};
 
+			micfil: micfil@30080000 {

Find a generic node name, audio-controller maybe?

Shawn

Quoted 24 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +18 -0
+				compatible = "fsl,imx8mm-micfil";
+				reg = <0x30080000 0x10000>;
+				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 = <&clk IMX8MM_CLK_PDM_IPG>,
+					 <&clk IMX8MM_CLK_PDM_ROOT>,
+					 <&clk IMX8MM_AUDIO_PLL1_OUT>,
+					 <&clk IMX8MM_AUDIO_PLL2_OUT>,
+					 <&clk IMX8MM_CLK_EXT3>;
+				clock-names = "ipg_clk", "ipg_clk_app",
+					      "pll8k", "pll11k", "clkext3";
+				dmas = <&sdma2 24 25 0x80000000>;
+				dma-names = "rx";
+				status = "disabled";
+			};
+
 			gpio1: gpio@30200000 {
 				compatible = "fsl,imx8mm-gpio", "fsl,imx35-gpio";
 				reg = <0x30200000 0x10000>;
Signature · 1 line
2.25.1
author
#3 lore raw

Re: [PATCH] arm64: dts: imx8mm: Add support for micfil

Quoted 18 lines · Shawn Guo
Quoted 16 lines · Adam Ford

The i.MX8M Mini has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing.

This patch adds the micfil node.

arch/arm64/boot/dts/freescale/imx8mm.dtsi +0 -0
index c63685ae80ee..d46e727fc362 100644
@@ -339,6 +339,25 @@ sai6: sai@30060000 {
                              status = "disabled";
                      };
 
Quoted 3 lines

arch/arm64/boot/dts/freescale/imx8mm.dtsi sai6: sai@30060000 { · line 342

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mm.dtsi +1 -0
+                     micfil: micfil@30080000 {

Find a generic node name, audio-controller maybe?

The SAI's nodes are called SAI@xxxx

If that's a deal-breaker, I can push a V3.

I didn't see anyone from the device tree side comment, and the device tree binding doc states 'micfil@xxxxxx' so I used what was documented in the fsl,micfil.txt

adam

Quoted 27 lines

Shawn

Quoted 24 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +18 -1
+                             compatible = "fsl,imx8mm-micfil";
+                             reg = <0x30080000 0x10000>;
+                             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 = <&clk IMX8MM_CLK_PDM_IPG>,
+                                      <&clk IMX8MM_CLK_PDM_ROOT>,
+                                      <&clk IMX8MM_AUDIO_PLL1_OUT>,
+                                      <&clk IMX8MM_AUDIO_PLL2_OUT>,
+                                      <&clk IMX8MM_CLK_EXT3>;
+                             clock-names = "ipg_clk", "ipg_clk_app",
+                                           "pll8k", "pll11k", "clkext3";
+                             dmas = <&sdma2 24 25 0x80000000>;
+                             dma-names = "rx";
+                             status = "disabled";
+                     };
+
                      gpio1: gpio@30200000 {
                              compatible = "fsl,imx8mm-gpio", "fsl,imx35-gpio";
                              reg = <0x30200000 0x10000>;
--

2.25.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Re: [PATCH] arm64: dts: imx8mm: Add support for micfil

Quoted 23 lines · Adam Ford
Quoted 18 lines · Shawn Guo
Quoted 16 lines · Adam Ford

The i.MX8M Mini has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing.

This patch adds the micfil node.

arch/arm64/boot/dts/freescale/imx8mm.dtsi +0 -0
index c63685ae80ee..d46e727fc362 100644
@@ -339,6 +339,25 @@ sai6: sai@30060000 {
                              status = "disabled";
                      };
 
Quoted 3 lines

arch/arm64/boot/dts/freescale/imx8mm.dtsi sai6: sai@30060000 { · line 342

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mm.dtsi +1 -0
+                     micfil: micfil@30080000 {

Find a generic node name, audio-controller maybe?

Quoted 7 lines

The SAI's nodes are called SAI@xxxx

If that's a deal-breaker, I can push a V3.

I didn't see anyone from the device tree side comment, and the device tree binding doc states 'micfil@xxxxxx' so I used what was documented in the fsl,micfil.txt

Hi,

The example in the binding is not a binding itself. It can be misleading or even incorrect and it is not a reason to use such in DTS.

Could be also audio-codec but it is not accurate (as it is only from the microphone to digital).

Shawn's proposal is the best, I think.

Best regards,
Krzysztof

#5 lore raw
In reply to Adam Ford
Quoted 14 lines · Adam Ford

The i.MX8M Mini has SAI and micfil support but the drivers are not being loaded.

This patch updates the defconfig to add support CONFIG_SND_SOC_FSL_SAI and CONFIG_SND_SOC_FSL_MICFIL to support these drivers.

arch/arm64/configs/defconfig +0 -0
index 366857dfa9de..4e60e8a98b83 100644

arch/arm64/configs/defconfig CONFIG_SND_HDA_TEGRA=m · line 642

Quoted 5 lines
arch/arm64/configs/defconfig +2 -0
@@ -638,6 +638,8 @@ CONFIG_SND_HDA_TEGRA=m
 CONFIG_SND_HDA_CODEC_HDMI=m
 CONFIG_SND_SOC=y
 CONFIG_SND_BCM2835_SOC_I2S=m
+CONFIG_SND_SOC_FSL_SAI=y
+CONFIG_SND_SOC_FSL_MICFIL=y

Please enable them as 'm'.

Shawn

Quoted 6 lines
arch/arm64/configs/defconfig +0 -0
 CONFIG_SND_MESON_AXG_SOUND_CARD=m
 CONFIG_SND_SOC_SDM845=m
 CONFIG_SND_SOC_ROCKCHIP=m
Signature · 1 line
2.25.1