* [PATCH v2 1/3] arm64: dts: imx91-9x9-qsb: Add audio-related board muxes
2026-07-10 2:42 [PATCH v2 0/3] Add audio support on i.MX91 9x9 QSB Chancel Liu
@ 2026-07-10 2:42 ` Chancel Liu
2026-07-10 2:42 ` [PATCH v2 2/3] arm64: dts: imx91-9x9-qsb: Add WM8524 sound card support Chancel Liu
2026-07-10 2:42 ` [PATCH v2 3/3] arm64: dts: imx91-9x9-qsb: Add PDM microphone " Chancel Liu
2 siblings, 0 replies; 5+ messages in thread
From: Chancel Liu @ 2026-07-10 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, Frank.Li, s.hauer
Cc: kernel, festevam, devicetree, linux-kernel, imx, linux-arm-kernel
From: Chancel Liu <chancel.liu@nxp.com>
The board uses GPIO-controlled muxes to route shared signals between
different functions.
Add the audio-related mux states for:
- selecting PDM or CAN1
- selecting SAI1 or M.2
- enabling the SAI1 audio path or not
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx91-9x9-qsb.dts | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
index ea8cf14e0bc6..4821ac312ab2 100644
--- a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
@@ -30,6 +30,55 @@ chosen {
stdout-path = &lpuart1;
};
+ can_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6524 17 GPIO_ACTIVE_HIGH>;
+ };
+
+ sai1_mux: mux-controller-1 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6524 18 GPIO_ACTIVE_HIGH>;
+ };
+
+ sai1_en_mux: mux-controller-2 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6524 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ can_fun: can-grp {
+ mux-states = <&can_mux 1>;
+ };
+
+ m2_fun: m2-grp {
+ mux-states = <&sai1_mux 1>;
+ };
+
+ pdm_fun: pdm-grp {
+ mux-states = <&can_mux 0>;
+ };
+
+ sai1_disable: sai1-disable-grp {
+ mux-states = <&sai1_en_mux 1>;
+ };
+
+ sai1_enable: sai1-enable-grp {
+ mux-states = <&sai1_en_mux 0>;
+ };
+
+ sai1_fun: sai1-grp {
+ mux-states = <&sai1_mux 0>;
+ };
+ };
+
reg_vref_1v8: regulator-adc-vref {
compatible = "regulator-fixed";
regulator-name = "vref_1v8";
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/3] arm64: dts: imx91-9x9-qsb: Add WM8524 sound card support
2026-07-10 2:42 [PATCH v2 0/3] Add audio support on i.MX91 9x9 QSB Chancel Liu
2026-07-10 2:42 ` [PATCH v2 1/3] arm64: dts: imx91-9x9-qsb: Add audio-related board muxes Chancel Liu
@ 2026-07-10 2:42 ` Chancel Liu
2026-07-10 2:42 ` [PATCH v2 3/3] arm64: dts: imx91-9x9-qsb: Add PDM microphone " Chancel Liu
2 siblings, 0 replies; 5+ messages in thread
From: Chancel Liu @ 2026-07-10 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, Frank.Li, s.hauer
Cc: kernel, festevam, devicetree, linux-kernel, imx, linux-arm-kernel
From: Chancel Liu <chancel.liu@nxp.com>
Add WM8524 sound card support which connects to SAI1.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx91-9x9-qsb.dts | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
index 4821ac312ab2..e5983bb083ea 100644
--- a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
@@ -110,6 +110,28 @@ linux,cma {
linux,cma-default;
};
};
+
+ sound-wm8524 {
+ compatible = "audio-graph-card2";
+ label = "wm8524-audio";
+ links = <&sai1_port1>;
+ widgets = "Line", "Line Out Jack";
+ routing =
+ "Line Out Jack", "LINEVOUTL",
+ "Line Out Jack", "LINEVOUTR";
+ };
+
+ wm8524: audio-codec {
+ compatible = "wlf,wm8524";
+ #sound-dai-cells = <0>;
+ wlf,mute-gpios = <&pcal6524 2 GPIO_ACTIVE_LOW>;
+
+ port {
+ codec_ep: endpoint {
+ remote-endpoint = <&sai1_ep1>;
+ };
+ };
+ };
};
&adc1 {
@@ -186,6 +208,15 @@ MX91_PAD_SD2_RESET_B__GPIO3_IO7 0x31e
>;
};
+ pinctrl_sai1: sai1grp {
+ fsl,pins = <
+ MX91_PAD_SAI1_TXC__SAI1_TX_BCLK 0x31e
+ MX91_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e
+ MX91_PAD_SAI1_TXD0__SAI1_TX_DATA0 0x31e
+ MX91_PAD_SAI1_RXD0__SAI1_MCLK 0x31e
+ >;
+ };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
MX91_PAD_UART1_RXD__LPUART1_RX 0x31e
@@ -433,6 +464,42 @@ &lpuart1 {
status = "okay";
};
+&sai1 {
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai1>, <&sai1_fun>, <&sai1_enable>;
+ assigned-clocks = <&clk IMX93_CLK_SAI1>;
+ assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
+ assigned-clock-rates = <24576000>;
+ clocks = <&clk IMX93_CLK_SAI1_IPG>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_SAI1_GATE>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_DUMMY>, <&clk IMX93_CLK_AUDIO_PLL>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k";
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sai1_port1: port@1 {
+ reg = <1>;
+ playback-only;
+
+ sai1_ep1: endpoint {
+ dai-format = "i2s";
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+ bitclock-master;
+ frame-master;
+ mclk-fs = <256>;
+ system-clock-direction-out;
+ remote-endpoint = <&codec_ep>;
+ };
+ };
+ };
+};
+
&usbotg1 {
adp-disable;
disable-over-current;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/3] arm64: dts: imx91-9x9-qsb: Add PDM microphone sound card support
2026-07-10 2:42 [PATCH v2 0/3] Add audio support on i.MX91 9x9 QSB Chancel Liu
2026-07-10 2:42 ` [PATCH v2 1/3] arm64: dts: imx91-9x9-qsb: Add audio-related board muxes Chancel Liu
2026-07-10 2:42 ` [PATCH v2 2/3] arm64: dts: imx91-9x9-qsb: Add WM8524 sound card support Chancel Liu
@ 2026-07-10 2:42 ` Chancel Liu
2026-07-10 15:50 ` Frank Li
2 siblings, 1 reply; 5+ messages in thread
From: Chancel Liu @ 2026-07-10 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, Frank.Li, s.hauer
Cc: kernel, festevam, devicetree, linux-kernel, imx, linux-arm-kernel
From: Chancel Liu <chancel.liu@nxp.com>
Add PDM microphone sound card support, configure the pinmux.
This sound card supports recording sound from PDM microphone and
convert the PDM format data to PCM data.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx91-9x9-qsb.dts | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
index e5983bb083ea..2f663b1f7c56 100644
--- a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
@@ -79,6 +79,18 @@ sai1_fun: sai1-grp {
};
};
+ dmic: dmic {
+ compatible = "dmic-codec";
+ #sound-dai-cells = <0>;
+ num-channels = <4>;
+
+ port {
+ dmic_ep: endpoint {
+ remote-endpoint = <&micfil_ep>;
+ };
+ };
+ };
+
reg_vref_1v8: regulator-adc-vref {
compatible = "regulator-fixed";
regulator-name = "vref_1v8";
@@ -111,6 +123,12 @@ linux,cma {
};
};
+ sound-micfil {
+ compatible = "audio-graph-card2";
+ label = "micfil-audio";
+ links = <&micfil_port>;
+ };
+
sound-wm8524 {
compatible = "audio-graph-card2";
label = "wm8524-audio";
@@ -202,6 +220,14 @@ MX91_PAD_CCM_CLKO1__GPIO3_IO26 0x31e
>;
};
+ pinctrl_pdm: pdmgrp {
+ fsl,pins = <
+ MX91_PAD_PDM_CLK__PDM_CLK 0x31e
+ MX91_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM0 0x31e
+ MX91_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM1 0x31e
+ >;
+ };
+
pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
fsl,pins = <
MX91_PAD_SD2_RESET_B__GPIO3_IO7 0x31e
@@ -464,6 +490,24 @@ &lpuart1 {
status = "okay";
};
+&micfil {
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
+ assigned-clocks = <&clk IMX93_CLK_PDM>;
+ assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
+ assigned-clock-rates = <49152000>;
+ status = "okay";
+
+ micfil_port: port {
+ capture-only;
+
+ micfil_ep: endpoint {
+ remote-endpoint = <&dmic_ep>;
+ };
+ };
+};
+
&sai1 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 3/3] arm64: dts: imx91-9x9-qsb: Add PDM microphone sound card support
2026-07-10 2:42 ` [PATCH v2 3/3] arm64: dts: imx91-9x9-qsb: Add PDM microphone " Chancel Liu
@ 2026-07-10 15:50 ` Frank Li
0 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-07-10 15:50 UTC (permalink / raw)
To: Chancel Liu
Cc: robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam,
devicetree, linux-kernel, imx, linux-arm-kernel
On Fri, Jul 10, 2026 at 11:42:04AM +0900, Chancel Liu wrote:
> From: Chancel Liu <chancel.liu@nxp.com>
>
> Add PDM microphone sound card support, configure the pinmux.
>
> This sound card supports recording sound from PDM microphone and
> convert the PDM format data to PCM data.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
> .../boot/dts/freescale/imx91-9x9-qsb.dts | 44 +++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
> index e5983bb083ea..2f663b1f7c56 100644
> --- a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
> +++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
> @@ -79,6 +79,18 @@ sai1_fun: sai1-grp {
> };
> };
>
> + dmic: dmic {
Is it order? look like it is after pinctrl-gpiomux, can you try best to
keep nodename orderred.
Frank
> + compatible = "dmic-codec";
> + #sound-dai-cells = <0>;
> + num-channels = <4>;
> +
> + port {
> + dmic_ep: endpoint {
> + remote-endpoint = <&micfil_ep>;
> + };
> + };
> + };
> +
> reg_vref_1v8: regulator-adc-vref {
> compatible = "regulator-fixed";
> regulator-name = "vref_1v8";
> @@ -111,6 +123,12 @@ linux,cma {
> };
> };
>
> + sound-micfil {
> + compatible = "audio-graph-card2";
> + label = "micfil-audio";
> + links = <&micfil_port>;
> + };
> +
> sound-wm8524 {
> compatible = "audio-graph-card2";
> label = "wm8524-audio";
> @@ -202,6 +220,14 @@ MX91_PAD_CCM_CLKO1__GPIO3_IO26 0x31e
> >;
> };
>
> + pinctrl_pdm: pdmgrp {
> + fsl,pins = <
> + MX91_PAD_PDM_CLK__PDM_CLK 0x31e
> + MX91_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM0 0x31e
> + MX91_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM1 0x31e
> + >;
> + };
> +
> pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
> fsl,pins = <
> MX91_PAD_SD2_RESET_B__GPIO3_IO7 0x31e
> @@ -464,6 +490,24 @@ &lpuart1 {
> status = "okay";
> };
>
> +&micfil {
> + #sound-dai-cells = <0>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
> + assigned-clocks = <&clk IMX93_CLK_PDM>;
> + assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
> + assigned-clock-rates = <49152000>;
> + status = "okay";
> +
> + micfil_port: port {
> + capture-only;
> +
> + micfil_ep: endpoint {
> + remote-endpoint = <&dmic_ep>;
> + };
> + };
> +};
> +
> &sai1 {
> #sound-dai-cells = <0>;
> pinctrl-names = "default";
> --
> 2.50.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread