arm64: dts: imx8mm: Add support for micfil
Subsystems (2)
PATCH 1/3 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
@@ -339,6 +339,25 @@ sai6: sai@30060000 { status = "disabled"; }; + micfil: audio-controller@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
PATCH 2/3 arm64: dts: imx8mm: Add node for SPDIF
The i.MX8M Mini can support SPIDF which is very similar to the IP used on the i.MX35.
This patch adds the SPIF node.
arch/arm64/boot/dts/freescale/imx8mm.dtsi +24 -0
@@ -358,6 +358,30 @@ micfil: audio-controller@30080000 { status = "disabled"; }; + spdif1: spdif@30090000 { + compatible = "fsl,imx8mm-spdif", "fsl,imx35-spdif"; + reg = <0x30090000 0x10000>; + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, /* core */ + <&clk IMX8MM_CLK_24M>, /* rxtx0 */ + <&clk IMX8MM_CLK_SPDIF1>, /* rxtx1 */ + <&clk IMX8MM_CLK_DUMMY>, /* rxtx2 */ + <&clk IMX8MM_CLK_DUMMY>, /* rxtx3 */ + <&clk IMX8MM_CLK_DUMMY>, /* rxtx4 */ + <&clk IMX8MM_CLK_AUDIO_AHB>, /* rxtx5 */ + <&clk IMX8MM_CLK_DUMMY>, /* rxtx6 */ + <&clk IMX8MM_CLK_DUMMY>, /* rxtx7 */ + <&clk IMX8MM_CLK_DUMMY>; /* spba */ + clock-names = "core", "rxtx0", + "rxtx1", "rxtx2", + "rxtx3", "rxtx4", + "rxtx5", "rxtx6", + "rxtx7", "spba"; + dmas = <&sdma2 28 18 0>, <&sdma2 29 18 0>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + gpio1: gpio@30200000 { compatible = "fsl,imx8mm-gpio", "fsl,imx35-gpio"; reg = <0x30200000 0x10000>;
Signature · 1 line
2.25.1
PATCH 3/3 arm64: defconfig: Enable additional sound drivers on i.MX8M Mini
In reply to Adam FordThe i.MX8M Mini has micfil and SPDIF support but the drivers are not being loaded.
This patch updates the defconfig to add support for these drivers.
arch/arm64/configs/defconfig +4 -0
@@ -674,6 +674,10 @@ CONFIG_SND_HDA_CODEC_HDMI=m CONFIG_SND_SOC=y CONFIG_SND_BCM2835_SOC_I2S=m CONFIG_SND_SOC_FSL_SAI=m +CONFIG_SND_SOC_FSL_MICFIL=m +CONFIG_SND_IMX_SOC=m +CONFIG_SND_SOC_IMX_SPDIF=m +CONFIG_SND_SOC_IMX_AUDMIX=m CONFIG_SND_MESON_AXG_SOUND_CARD=m CONFIG_SND_MESON_GX_SOUND_CARD=m CONFIG_SND_SOC_SDM845=m
Signature · 1 line
2.25.1
Re: [PATCH 2/3] arm64: dts: imx8mm: Add node for SPDIF
In reply to Adam FordQuoted 1 line · Adam Ford
The i.MX8M Mini can support SPIDF which is very similar to the
SPIDF -> SPDIF
Quoted 3 lines
IP used on the i.MX35.
This patch adds the SPIF node.
Just "Add the SPDIF node", avoid "this patch". And SPIF->SPDIF.
arch/arm64/boot/dts/freescale/imx8mm.dtsi micfil: audio-controller@30080000 { · line 362
Quoted 13 lines
Signed-off-by Adam Ford <[email protected]>arch/arm64/boot/dts/freescale/imx8mm.dtsi +2
-0@@ -358,6 +358,30 @@ micfil: audio-controller@30080000 { status = "disabled"; }; + spdif1: spdif@30090000 { + compatible = "fsl,imx8mm-spdif", "fsl,imx35-spdif";
This does not pass the dtschema validation, so only "fsl,imx35-spdif".
Best regards,
Krzysztof
Fabio Estevam
reviewerRe: [PATCH 2/3] arm64: dts: imx8mm: Add node for SPDIF
Hi Krzysztof,
Quoted 4 lines · Krzysztof Kozlowski
arch/arm64/boot/dts/freescale/imx8mm.dtsi micfil: audio-controller@30080000 { · line 362
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +2
-0+ spdif1: spdif@30090000 { + compatible = "fsl,imx8mm-spdif", "fsl,imx35-spdif";This does not pass the dtschema validation, so only "fsl,imx35-spdif".
Shouldn't the dt schema validation be changed then to accept this format?
Re: [PATCH 2/3] arm64: dts: imx8mm: Add node for SPDIF
Quoted 11 lines · Fabio Estevam
Hi Krzysztof,
Quoted 4 lines · Krzysztof Kozlowski
arch/arm64/boot/dts/freescale/imx8mm.dtsi micfil: audio-controller@30080000 { · line 362
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +2
-0+ spdif1: spdif@30090000 { + compatible = "fsl,imx8mm-spdif", "fsl,imx35-spdif";This does not pass the dtschema validation, so only "fsl,imx35-spdif".
Shouldn't the dt schema validation be changed then to accept this format?
Depends. If a given compatible is in the schema, then the answer is:
rather not. The DTS conform to schema, not the otherwise. When dtschema is sent this is the ABI to which the kernel should conform. User-space or other SW (e.g. U-Boot) could depend on it. Of course there are exceptions...
If the compatible is not in the schema, then of course it could be added if there is a need. In this case, device is simply compatible with "fsl,imx35-spdif" so there is no real need to change the schema. Just use the existing compatible. Look at one funny example in iMX:drivers/pwm/pwm-imx27.c. Someone created multiple compatibles but does not use them at all, because the hardware looks exactly the same. Therefore driver implements only one compatible because entire HW is compatible with fsl,imx27-pwm. In such clear case, why adding many compatibles? It's just a churn.
Best regards,
Krzysztof
Re: [PATCH 3/3] arm64: defconfig: Enable additional sound drivers on i.MX8M Mini
In reply to Adam FordQuoted 6 lines · Adam Ford
The i.MX8M Mini has micfil and SPDIF support but the drivers are not being loaded.
This patch updates the defconfig to add support for these drivers.
Signed-off-by Adam Ford <[email protected]>
Best regards,
Krzysztof