* [PATCH v3 01/17] arm64: dts: imx91_93_common: Add clock and sound-dai-cells properties for MQS
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
` (15 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
The "mclk" clock provides the MQS oversampling clock, and #sound-dai-cells
describes the node as an ASoC DAI provider. Both are fixed SoC integration
properties rather than board specific, so add them here in the common dtsi
instead of duplicating them in each board dts.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx91-11x11-frdm-s.dts | 2 --
arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts | 2 --
arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 6 ++++++
arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts | 2 --
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm-s.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm-s.dts
index 62dc1dedfb0e..c6019d76b998 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm-s.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm-s.dts
@@ -672,8 +672,6 @@ &media_blk_ctrl {
};
&mqs1 {
- clocks = <&clk IMX93_CLK_MQS1_GATE>;
- clock-names = "mclk";
pinctrl-0 = <&pinctrl_mqs1>;
pinctrl-names = "default";
status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
index c25561574d3f..6144fa6f3706 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-frdm.dts
@@ -468,8 +468,6 @@ bluetooth {
};
&mqs1 {
- clocks = <&clk IMX93_CLK_MQS1_GATE>;
- clock-names = "mclk";
pinctrl-0 = <&pinctrl_mqs1>;
pinctrl-names = "default";
status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
index a1a7e6a0571b..a68ffd04ee08 100644
--- a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
@@ -100,13 +100,19 @@ gic: interrupt-controller@48000000 {
mqs1: mqs1 {
compatible = "fsl,imx93-mqs";
+ clocks = <&clk IMX93_CLK_MQS1_GATE>;
+ clock-names = "mclk";
gpr = <&aonmix_ns_gpr>;
+ #sound-dai-cells = <0>;
status = "disabled";
};
mqs2: mqs2 {
compatible = "fsl,imx93-mqs";
+ clocks = <&clk IMX93_CLK_MQS2_GATE>;
+ clock-names = "mclk";
gpr = <&wakeupmix_gpr>;
+ #sound-dai-cells = <0>;
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts
index bd14ba28690c..038e5ed23e5f 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-frdm.dts
@@ -400,8 +400,6 @@ bluetooth {
&mqs1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mqs1>;
- clocks = <&clk IMX93_CLK_MQS1_GATE>;
- clock-names = "mclk";
status = "okay";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
2026-08-24 2:20 ` [PATCH v3 01/17] arm64: dts: imx91_93_common: Add clock and sound-dai-cells properties for MQS Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:35 ` sashiko-bot
2026-08-24 2:20 ` [PATCH v3 03/17] arm64: dts: imx91-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
` (14 subsequent siblings)
16 siblings, 1 reply; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
PDM has pin conflict with MQS1. Add GPIO-controlled board muxes to
route shared signals between PDM and MQS1.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx91-11x11-evk.dts | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
index 5716febb5a50..4d1ada6a3942 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
@@ -41,6 +41,25 @@ chosen {
stdout-path = &lpuart1;
};
+ pdm_mqs1_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&adp5585 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ mqs1_fun: mqs1-grp {
+ mux-states = <&pdm_mqs1_mux 1>;
+ };
+
+ pdm_fun: pdm-grp {
+ mux-states = <&pdm_mqs1_mux 0>;
+ };
+ };
+
reg_vref_1v8: regulator-adc-vref {
compatible = "regulator-fixed";
regulator-max-microvolt = <1800000>;
@@ -484,7 +503,7 @@ bluetooth {
&micfil {
pinctrl-names = "default", "sleep";
- pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
pinctrl-1 = <&pinctrl_pdm_sleep>;
assigned-clocks = <&clk IMX93_CLK_PDM>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1
2026-08-24 2:20 ` [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
@ 2026-08-24 2:35 ` sashiko-bot
0 siblings, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-08-24 2:35 UTC (permalink / raw)
To: Chancel Liu; +Cc: devicetree, imx, robh, conor+dt, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but repeated calls to `mux_pinmux_dt_node_to_map` during probe deferral of the consumer cause unbounded memory leaks on the `pinctrl-multiplexer` provider device.
--
--- Patch [2]: [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1 ---
commit defaefa605b7135d708e20b9a9bb866edaa4e6a1
Author: Chancel Liu <chancel.liu@nxp.com>
arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1
This patch adds GPIO-controlled board muxes to route shared signals
between PDM and MQS1, resolving a pin conflict. It introduces the
pdm_mqs1_mux and pinctrl-gpiomux nodes, and updates the micfil pinctrl.
> diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
> index 5716febb5a50f..4d1ada6a3942b 100644
> --- a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
[ ... ]
> @@ -484,7 +503,7 @@ bluetooth {
>
> &micfil {
> pinctrl-names = "default", "sleep";
> - pinctrl-0 = <&pinctrl_pdm>;
> + pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
[Severity: High]
This isn't a bug introduced by this patch, but adding this multiplexer to
the consumer could expose a devres leak in the provider if the consumer
defers probe.
When the micfil consumer evaluates its pinctrl-0 properties, it triggers
mux_pinmux_dt_node_to_map() in drivers/pinctrl/pinctrl-generic-mux.c.
This function allocates resources bound to the provider device rather than
the consumer:
drivers/pinctrl/pinctrl-generic-mux.c:mux_pinmux_dt_node_to_map() {
...
function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
...
group_names = devm_kcalloc(pctldev->dev, 1, sizeof(*group_names), GFP_KERNEL);
...
function->mux_state = devm_mux_state_get_from_np(pctldev->dev, NULL, np_config);
...
}
Because these devm_* allocations are bound to pctldev->dev (the provider
device), they are not freed if the micfil consumer defers probe.
Could this result in an unbounded memory and mux state leak on the provider
device for every probe retry?
> pinctrl-1 = <&pinctrl_pdm_sleep>;
> assigned-clocks = <&clk IMX93_CLK_PDM>;
> assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824022020.2812810-1-chancel.liu@oss.nxp.com?part=2
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v3 03/17] arm64: dts: imx91-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
2026-08-24 2:20 ` [PATCH v3 01/17] arm64: dts: imx91_93_common: Add clock and sound-dai-cells properties for MQS Chancel Liu
2026-08-24 2:20 ` [PATCH v3 02/17] arm64: dts: imx91-11x11-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 04/17] arm64: dts: imx93-11x11-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
` (13 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with PDM and its sound card conflicts with the BT SCO
card. Add the MQS1 pinctrl group and label the conflicting device and
card so the shared imx9-mqs overlay can disable them. The overlay and
its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx91-11x11-evk.dts | 33 +++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
index 4d1ada6a3942..6ccb942786c3 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
@@ -32,6 +32,12 @@ aliases {
serial4 = &lpuart5;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_3p3v>;
+ };
+
bt_sco_codec: bt-sco-codec {
compatible = "linux,bt-sco";
#sound-dai-cells = <1>;
@@ -60,6 +66,13 @@ pdm_fun: pdm-grp {
};
};
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "+V3.3_SW";
+ };
+
reg_vref_1v8: regulator-adc-vref {
compatible = "regulator-fixed";
regulator-max-microvolt = <1800000>;
@@ -145,7 +158,7 @@ sound-wm8962 {
"IN1R", "AMIC";
};
- sound-bt-sco {
+ mqs1_conflict_card: sound-bt-sco {
compatible = "simple-audio-card";
simple-audio-card,name = "bt-sco-audio";
simple-audio-card,format = "dsp_a";
@@ -501,7 +514,7 @@ bluetooth {
};
};
-&micfil {
+mqs1_conflict_dev: &micfil {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
pinctrl-1 = <&pinctrl_pdm_sleep>;
@@ -511,10 +524,19 @@ &micfil {
status = "okay";
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_fun>;
+ pinctrl-names = "default";
+};
+
&sai1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_sai1>;
pinctrl-1 = <&pinctrl_sai1_sleep>;
+ 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";
assigned-clocks = <&clk IMX93_CLK_SAI1>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
assigned-clock-rates = <12288000>;
@@ -720,6 +742,13 @@ MX91_PAD_I2C2_SDA__LPI2C2_SDA 0x40000b9e
>;
};
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ MX91_PAD_PDM_CLK__MQS1_LEFT 0x31e
+ MX91_PAD_PDM_BIT_STREAM0__MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_pdm: pdmgrp {
fsl,pins = <
MX91_PAD_PDM_CLK__PDM_CLK 0x31e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 04/17] arm64: dts: imx93-11x11-evk: Add board muxes to select between PDM and MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (2 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 03/17] arm64: dts: imx91-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 05/17] arm64: dts: imx93-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
` (12 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
PDM has pin conflict with MQS1. Add GPIO-controlled board muxes to
route shared signals between PDM and MQS1.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx93-11x11-evk.dts | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index c6db9c85f2ac..4418fc6a0901 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -16,6 +16,25 @@ aliases {
mmc2 = &usdhc3;
};
+ pdm_mqs1_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&adp5585 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ mqs1_fun: mqs1-grp {
+ mux-states = <&pdm_mqs1_mux 1>;
+ };
+
+ pdm_fun: pdm-grp {
+ mux-states = <&pdm_mqs1_mux 0>;
+ };
+ };
+
reg_m2_pwr: regulator-m2-pwr {
compatible = "regulator-fixed";
regulator-name = "M.2-power";
@@ -88,7 +107,7 @@ cpu {
&micfil {
pinctrl-names = "default", "sleep";
- pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
pinctrl-1 = <&pinctrl_pdm_sleep>;
assigned-clocks = <&clk IMX93_CLK_PDM>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 05/17] arm64: dts: imx93-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (3 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 04/17] arm64: dts: imx93-11x11-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 06/17] arm64: dts: imx93-14x14-evk: Add board muxes to select between FlexCAN1 and MQS1 Chancel Liu
` (11 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with PDM and its sound card conflicts with the BT SCO
card. Add the MQS1 pinctrl group and label the conflicting device and
card so the shared imx9-mqs overlay can disable them. The overlay and
its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx93-11x11-evk.dts | 33 +++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 4418fc6a0901..d3312093f996 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -16,6 +16,12 @@ aliases {
mmc2 = &usdhc3;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_3p3v>;
+ };
+
pdm_mqs1_mux: mux-controller-0 {
compatible = "gpio-mux";
#mux-control-cells = <0>;
@@ -35,6 +41,13 @@ pdm_fun: pdm-grp {
};
};
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "+V3.3_SW";
+ };
+
reg_m2_pwr: regulator-m2-pwr {
compatible = "regulator-fixed";
regulator-name = "M.2-power";
@@ -71,7 +84,7 @@ bt_sco_codec: bt-sco-codec {
#sound-dai-cells = <1>;
};
- sound-bt-sco {
+ mqs1_conflict_card: sound-bt-sco {
compatible = "simple-audio-card";
simple-audio-card,name = "bt-sco-audio";
simple-audio-card,format = "dsp_a";
@@ -105,7 +118,7 @@ cpu {
};
};
-&micfil {
+mqs1_conflict_dev: &micfil {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
pinctrl-1 = <&pinctrl_pdm_sleep>;
@@ -115,6 +128,11 @@ &micfil {
status = "okay";
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_fun>;
+ pinctrl-names = "default";
+};
+
&pcal6524 {
m2-pcm-level-shifter-hog {
gpio-hog;
@@ -127,6 +145,10 @@ &sai1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_sai1>;
pinctrl-1 = <&pinctrl_sai1_sleep>;
+ 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";
assigned-clocks = <&clk IMX93_CLK_SAI1>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
assigned-clock-rates = <12288000>;
@@ -150,6 +172,13 @@ &usdhc3 {
};
&iomuxc {
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ MX93_PAD_PDM_CLK__MQS1_LEFT 0x31e
+ MX93_PAD_PDM_BIT_STREAM0__MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_pdm: pdmgrp {
fsl,pins = <
MX93_PAD_PDM_CLK__PDM_CLK 0x31e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 06/17] arm64: dts: imx93-14x14-evk: Add board muxes to select between FlexCAN1 and MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (4 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 05/17] arm64: dts: imx93-11x11-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 07/17] arm64: dts: imx93-14x14-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
` (10 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
FlexCAN1 has pin conflict with MQS1. Add GPIO-controlled board muxes to
route shared signals between FlexCAN1 and MQS1.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx93-14x14-evk.dts | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
index ec78c03f4788..e35946bc3ddf 100644
--- a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
@@ -37,6 +37,25 @@ chosen {
stdout-path = &lpuart1;
};
+ can1_mqs1_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6524_2 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ can1_fun: can1-grp {
+ mux-states = <&can1_mqs1_mux 0>;
+ };
+
+ mqs1_fun: mqs1-grp {
+ mux-states = <&can1_mqs1_mux 1>;
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -254,7 +273,7 @@ ethphy2: ethernet-phy@2 {
&flexcan1 {
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_flexcan1>;
+ pinctrl-0 = <&pinctrl_flexcan1>, <&can1_fun>;
xceiver-supply = <®_can1_stby>;
status = "okay";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 07/17] arm64: dts: imx93-14x14-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (5 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 06/17] arm64: dts: imx93-14x14-evk: Add board muxes to select between FlexCAN1 and MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 08/17] arm64: dts: imx94: Add clock and sound-dai-cells properties for MQS1 Chancel Liu
` (9 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with FlexCAN1 and its sound card conflicts with the BT
SCO card. Add the MQS1 pinctrl group and label the conflicting device
and card so the shared imx9-mqs overlay can disable them. The overlay
and its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx93-14x14-evk.dts | 34 +++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
index e35946bc3ddf..a025a08130f8 100644
--- a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
@@ -28,6 +28,13 @@ aliases {
serial4 = &lpuart5;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&pcal6524_2 1 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_5v>;
+ };
+
bt_sco_codec: bt-sco-codec {
compatible = "linux,bt-sco";
#sound-dai-cells = <1>;
@@ -101,6 +108,13 @@ vdevbuffer: vdevbuffer@a4020000 {
};
};
+ reg_5v: regulator-5v {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "+V5_SW";
+ };
+
reg_can1_stby: regulator-can1-stby {
compatible = "regulator-fixed";
regulator-name = "can1-stby";
@@ -193,7 +207,7 @@ reg_vref_1v8: regulator-adc-vref {
regulator-max-microvolt = <1800000>;
};
- sound-bt-sco {
+ mqs1_conflict_card: sound-bt-sco {
compatible = "simple-audio-card";
simple-audio-card,name = "bt-sco-audio";
simple-audio-card,format = "dsp_a";
@@ -271,7 +285,7 @@ ethphy2: ethernet-phy@2 {
};
};
-&flexcan1 {
+mqs1_conflict_dev: &flexcan1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1>, <&can1_fun>;
xceiver-supply = <®_can1_stby>;
@@ -431,6 +445,11 @@ bluetooth {
};
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_fun>;
+ pinctrl-names = "default";
+};
+
&mu1 {
status = "okay";
};
@@ -442,6 +461,10 @@ &mu2 {
&sai1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1>;
+ 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";
assigned-clocks = <&clk IMX93_CLK_SAI1>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
assigned-clock-rates = <12288000>;
@@ -559,6 +582,13 @@ MX93_PAD_GPIO_IO29__LPI2C3_SCL 0x40000b9e
>;
};
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ MX93_PAD_PDM_CLK__MQS1_LEFT 0x31e
+ MX93_PAD_PDM_BIT_STREAM0__MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_pcal6524: pcal6524grp {
fsl,pins = <
MX93_PAD_CCM_CLKO2__GPIO3_IO27 0x31e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 08/17] arm64: dts: imx94: Add clock and sound-dai-cells properties for MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (6 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 07/17] arm64: dts: imx93-14x14-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC Chancel Liu
` (8 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 MCLK input is driven from the respective SAI1 MCLK output, and
sound-dai-cells describes the node as an ASoC DAI provider. Both are
fixed SoC integration properties rather than board specific, so add them
here in the common dtsi instead of duplicating them in each board dts.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx94.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
index 34833e62bd79..a0d1922389d6 100644
--- a/arch/arm64/boot/dts/freescale/imx94.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
@@ -131,6 +131,9 @@ scmi_misc: protocol@84 {
mqs1: mqs1 {
compatible = "fsl,imx943-aonmix-mqs";
+ clocks = <&scmi_clk IMX94_CLK_SAI1>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
status = "disabled";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (7 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 08/17] arm64: dts: imx94: Add clock and sound-dai-cells properties for MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:34 ` sashiko-bot
2026-08-24 2:20 ` [PATCH v3 10/17] arm64: dts: imx943-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
` (7 subsequent siblings)
16 siblings, 1 reply; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
CAN1 has pin conflict with PDM, and MQS1 has pin conflict with the
MICFIL function. Replace static gpio-hog settings with GPIO-controlled
board muxes using the pinctrl-multiplexer framework, so that the
conflicting functions can be selected at runtime.
Update the MICFIL node to select MICFIL function via PINCTRL.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 49 ++++++++++++++------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index 64660f94f4e9..07b782ef698a 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -38,6 +38,40 @@ bt_sco_codec: bt-sco-codec {
#sound-dai-cells = <1>;
};
+ can1_pdm_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6416_i2c6_u44 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ mqs1_mic_mux: mux-controller-1 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6416_i2c3_u171 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ can1_fun: can1-grp {
+ mux-states = <&can1_pdm_mux 1>;
+ };
+
+ mic_fun: mic-grp {
+ mux-states = <&mqs1_mic_mux 0>;
+ };
+
+ mqs1_fun: mqs1-grp {
+ mux-states = <&mqs1_mic_mux 1>;
+ };
+
+ pdm_fun: pdm-grp {
+ mux-states = <&can1_pdm_mux 0>;
+ };
+ };
+
flexcan2_phy: can-phy0 {
compatible = "nxp,tjr1443";
#phy-cells = <0>;
@@ -535,12 +569,6 @@ audio-pwren-hog {
gpio-hog;
output-high;
};
-
- mqs-mic-sel-hog {
- gpios = <11 GPIO_ACTIVE_HIGH>;
- gpio-hog;
- output-low;
- };
};
};
@@ -651,13 +679,6 @@ pcal6416_i2c6_u44: gpio@20 {
#gpio-cells = <2>;
gpio-controller;
- /* pdm selection */
- can-pdm-sel-hog {
- gpios = <12 GPIO_ACTIVE_HIGH>;
- gpio-hog;
- output-low;
- };
-
sai3-sel-hog {
gpios = <11 GPIO_ACTIVE_HIGH>;
gpio-hog;
@@ -710,7 +731,7 @@ &micfil {
assigned-clock-rates = <3932160000>,
<3612672000>, <393216000>,
<361267200>, <49152000>;
- pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-0 = <&pinctrl_pdm>, <&mic_fun>, <&pdm_fun>;
pinctrl-names = "default";
status = "okay";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC
2026-08-24 2:20 ` [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC Chancel Liu
@ 2026-08-24 2:34 ` sashiko-bot
0 siblings, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-08-24 2:34 UTC (permalink / raw)
To: Chancel Liu; +Cc: conor+dt, imx, robh, devicetree, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Repeated deferred probing of the `micfil` consumer causes severe devres memory and reference leaks in the `pinctrl-generic-mux` provider.
--
--- Patch [9]: [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC ---
commit 77c9c6202b63305da0b9143118c00d14c3943f7f
Author: Chancel Liu <chancel.liu@nxp.com>
arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC
This commit replaces static gpio-hogs with GPIO-controlled board muxes
using the pinctrl-multiplexer framework. It allows runtime selection between
conflicting functions (CAN1/PDM and MQS1/MICFIL) and updates the MICFIL node
to use this new pinctrl selection.
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index 64660f94f4e9c..07b782ef698ad 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
[ ... ]
> @@ -710,7 +731,7 @@ &micfil {
> assigned-clock-rates = <3932160000>,
> <3612672000>, <393216000>,
> <361267200>, <49152000>;
> - pinctrl-0 = <&pinctrl_pdm>;
> + pinctrl-0 = <&pinctrl_pdm>, <&mic_fun>, <&pdm_fun>;
[Severity: High]
This is a pre-existing issue in the pinctrl-multiplexer driver, but routing
the micfil node to use this provider actively triggers it. Can this lead to
severe devres memory and reference leaks if the micfil consumer defers probe?
Looking at mux_pinmux_dt_node_to_map() in
drivers/pinctrl/pinctrl-generic-mux.c, resources are allocated against the
provider's device (pctldev->dev):
function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
if (!function)
return -ENOMEM;
group_names = devm_kcalloc(pctldev->dev, 1, sizeof(*group_names), GFP_KERNEL);
if (!group_names)
return -ENOMEM;
function->mux_state = devm_mux_state_get_from_np(pctldev->dev, NULL, np_config);
When the micfil device defers probe after obtaining pinctrl handles (or is
unbound and rebound), the pinctrl core frees the consumer's maps. However,
these allocations remain on the provider device's devres list.
On the next probe attempt, mux_pinmux_dt_node_to_map() allocates new
structures and calls pinmux_generic_add_function(). Since the function name
already exists in the radix tree from the previous attempt, the pinctrl
core returns the old selector.
The newly allocated objects and the mux_chip reference acquired by
devm_mux_state_get_from_np() are abandoned on the provider's list. This
compounds the leak on every deferral and prevents the mux_chip from ever
being freed.
Should the pinctrl-generic-mux driver be fixed to tie these allocations to
the map lifecycle before we expose this path via the DTS change?
> pinctrl-names = "default";
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824022020.2812810-1-chancel.liu@oss.nxp.com?part=9
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v3 10/17] arm64: dts: imx943-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (8 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 09/17] arm64: dts: imx943-evk: Add board muxes to select between CAN1/PDM and MQS1/MIC Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 11/17] arm64: dts: imx95: Add clock and sound-dai-cells properties for MQS1 Chancel Liu
` (6 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with PDM and its sound card conflicts with the WM8962
sound card. Add the MQS1 pinctrl group and label the conflicting device
and card so the shared imx9-mqs overlay can disable them. The overlay
and its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 34 ++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index 07b782ef698a..e2856c991e9a 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -33,6 +33,12 @@ aliases {
serial5 = &lpuart6;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_3p3v>;
+ };
+
bt_sco_codec: bt-sco-codec {
compatible = "linux,bt-sco";
#sound-dai-cells = <1>;
@@ -111,6 +117,13 @@ dmic: dmic {
#sound-dai-cells = <0>;
};
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "+V3.3_SW";
+ };
+
reg_m2_pwr: regulator-m2-pwr {
compatible = "regulator-fixed";
regulator-name = "M.2-power";
@@ -341,7 +354,7 @@ cpu {
};
};
- sound-wm8962 {
+ mqs1_conflict_card: sound-wm8962 {
compatible = "fsl,imx-audio-wm8962";
audio-codec = <&wm8962>;
audio-cpu = <&sai1>;
@@ -720,7 +733,7 @@ bluetooth {
};
};
-&micfil {
+mqs1_conflict_dev: &micfil {
assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX94_CLK_AUDIOPLL1>,
@@ -736,6 +749,11 @@ &micfil {
status = "okay";
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_fun>, <&pdm_fun>;
+ pinctrl-names = "default";
+};
+
&mu11 {
status = "okay";
};
@@ -782,6 +800,11 @@ &netc_timer1 {
};
&sai1 {
+ clocks = <&scmi_clk IMX94_CLK_BUSAON>, <&dummy>,
+ <&scmi_clk IMX94_CLK_SAI1>, <&dummy>,
+ <&dummy>, <&scmi_clk IMX94_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX94_CLK_AUDIOPLL1>,
@@ -904,6 +927,13 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
>;
};
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ IMX94_PAD_PDM_CLK__MQS1_LEFT 0x31e
+ IMX94_PAD_PDM_BIT_STREAM0__MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_pcie0: pcie0grp {
fsl,pins = <
IMX94_PAD_GPIO_IO20__PCIE1_CLKREQ_B 0x4000031e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 11/17] arm64: dts: imx95: Add clock and sound-dai-cells properties for MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (9 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 10/17] arm64: dts: imx943-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 12/17] arm64: dts: imx95-15x15-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
` (5 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 MCLK input is driven from the respective SAI1 MCLK output, and
sound-dai-cells describes the node as an ASoC DAI provider. Both are
fixed SoC integration properties rather than board specific, so add them
here in the common dtsi instead of duplicating them in each board dts.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts | 2 --
arch/arm64/boot/dts/freescale/imx95-19x19-frdm-pro.dts | 2 --
arch/arm64/boot/dts/freescale/imx95.dtsi | 3 +++
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
index 0f43e3be7058..0a1646ae5b00 100644
--- a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
@@ -480,8 +480,6 @@ &mu7 {
};
&mqs1 {
- clocks = <&scmi_clk IMX95_CLK_SAI1>;
- clock-names = "mclk";
pinctrl-0 = <&pinctrl_mqs1>;
pinctrl-names = "default";
status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-frdm-pro.dts b/arch/arm64/boot/dts/freescale/imx95-19x19-frdm-pro.dts
index b87a26b0d7fc..1f62d729a5e7 100644
--- a/arch/arm64/boot/dts/freescale/imx95-19x19-frdm-pro.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-19x19-frdm-pro.dts
@@ -450,8 +450,6 @@ &micfil {
};
&mqs1 {
- clocks = <&scmi_clk IMX95_CLK_SAI1>;
- clock-names = "mclk";
pinctrl-0 = <&pinctrl_mqs1>;
pinctrl-names = "default";
status = "okay";
diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
index 38fc47024841..7bc74307d9ae 100644
--- a/arch/arm64/boot/dts/freescale/imx95.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
@@ -439,6 +439,9 @@ hugo_funnel_out_port0: endpoint {
mqs1: mqs-1 {
compatible = "fsl,imx95-aonmix-mqs";
+ clocks = <&scmi_clk IMX95_CLK_SAI1>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
status = "disabled";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 12/17] arm64: dts: imx95-15x15-evk: Add board muxes to select between PDM and MQS1
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (10 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 11/17] arm64: dts: imx95: Add clock and sound-dai-cells properties for MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 13/17] arm64: dts: imx95-15x15-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
` (4 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
PDM has pin conflict with MQS1. Add GPIO-controlled board muxes to
route shared signals between PDM and MQS1.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx95-15x15-evk.dts | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts b/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
index 6aedcbbe915a..aaa2608793bf 100644
--- a/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
@@ -114,6 +114,25 @@ flexcan2_phy: can-phy {
silent-gpios = <&pcal6524 14 GPIO_ACTIVE_HIGH>;
};
+ pdm_mqs1_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6524 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ pdm_fun: pdm-grp {
+ mux-states = <&pdm_mqs1_mux 0>;
+ };
+
+ mqs1_fun: mqs1-grp {
+ mux-states = <&pdm_mqs1_mux 1>;
+ };
+ };
+
reg_m2_pwr: regulator-m2-pwr {
compatible = "regulator-fixed";
regulator-max-microvolt = <3300000>;
@@ -488,7 +507,7 @@ &micfil {
assigned-clock-parents = <0>, <0>, <0>, <0>, <&scmi_clk IMX95_CLK_AUDIOPLL1>;
assigned-clock-rates = <3932160000>, <3612672000>, <393216000>, <361267200>, <49152000>;
#sound-dai-cells = <0>;
- pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>;
pinctrl-names = "default";
status = "okay";
};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 13/17] arm64: dts: imx95-15x15-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (11 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 12/17] arm64: dts: imx95-15x15-evk: Add board muxes to select between PDM and MQS1 Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 14/17] arm64: dts: imx952: Add AONMIX MQS device node Chancel Liu
` (3 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with PDM and its sound card conflicts with the BT SCO
card. Add the MQS1 pinctrl group and label the conflicting device and
card so the shared imx9-mqs overlay can disable them. The overlay and
its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
.../boot/dts/freescale/imx95-15x15-evk.dts | 27 +++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts b/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
index aaa2608793bf..1ca6850a7365 100644
--- a/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts
@@ -48,6 +48,12 @@ aliases {
serial4 = &lpuart5;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_3p3v>;
+ };
+
bt_sco_codec: bt-sco-codec {
compatible = "linux,bt-sco";
#sound-dai-cells = <1>;
@@ -239,7 +245,7 @@ vpu_boot: vpu-boot@a0000000 {
};
};
- sound-bt-sco {
+ mqs1_conflict_card: sound-bt-sco {
compatible = "simple-audio-card";
simple-audio-card,bitclock-inversion;
simple-audio-card,bitclock-master = <&btcpu>;
@@ -498,7 +504,7 @@ bluetooth {
};
};
-&micfil {
+mqs1_conflict_dev: &micfil {
assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX95_CLK_AUDIOPLL1>,
@@ -512,6 +518,11 @@ &micfil {
status = "okay";
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_fun>;
+ pinctrl-names = "default";
+};
+
&mu7 {
status = "okay";
};
@@ -592,6 +603,11 @@ &pcie0_port0 {
};
&sai1 {
+ clocks = <&scmi_clk IMX95_CLK_BUSAON>, <&dummy>,
+ <&scmi_clk IMX95_CLK_SAI1>, <&dummy>,
+ <&dummy>, <&scmi_clk IMX95_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX95_CLK_AUDIOPLL2>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX95_CLK_AUDIOPLL1>,
@@ -670,6 +686,13 @@ IMX95_PAD_GPIO_IO27__CAN2_RX 0x39e
>;
};
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ IMX95_PAD_PDM_CLK__AONMIX_TOP_MQS1_LEFT 0x31e
+ IMX95_PAD_PDM_BIT_STREAM0__AONMIX_TOP_MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_hp: hpgrp {
fsl,pins = <
IMX95_PAD_GPIO_IO21__GPIO2_IO_BIT21 0x31e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 14/17] arm64: dts: imx952: Add AONMIX MQS device node
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (12 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 13/17] arm64: dts: imx95-15x15-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM Chancel Liu
` (2 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
Add DT node for AONMIX MQS (i.e. MQS1).
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx952.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx952.dtsi b/arch/arm64/boot/dts/freescale/imx952.dtsi
index 020de00e8285..54dc793a2f69 100644
--- a/arch/arm64/boot/dts/freescale/imx952.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx952.dtsi
@@ -261,6 +261,14 @@ scmi_misc: protocol@84 {
};
};
+ mqs1: mqs1 {
+ compatible = "fsl,imx95-aonmix-mqs";
+ clocks = <&scmi_clk IMX952_CLK_SAI1>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@48000000 {
compatible = "arm,gic-v3";
reg = <0 0x48000000 0 0x10000>,
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (13 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 14/17] arm64: dts: imx952: Add AONMIX MQS device node Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:40 ` sashiko-bot
2026-08-24 2:20 ` [PATCH v3 16/17] arm64: dts: imx952-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
2026-08-24 2:20 ` [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms Chancel Liu
16 siblings, 1 reply; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
CAN1 has pin conflict with PDM. MQS1 requires an enable signal via a
separate GPIO. Replace static gpio-hog settings with GPIO-controlled
board muxes using the pinctrl-multiplexer framework, so that the
conflicting functions can be selected at runtime.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx952-evk.dts | 50 ++++++++++++++------
1 file changed, 36 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx952-evk.dts b/arch/arm64/boot/dts/freescale/imx952-evk.dts
index 2224b90aafe9..e9d735dc2a51 100644
--- a/arch/arm64/boot/dts/freescale/imx952-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx952-evk.dts
@@ -52,6 +52,40 @@ chosen {
stdout-path = &lpuart1;
};
+ can1_pdm_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6416 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ mqs1_en_mux: mux-controller-1 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ #mux-state-cells = <1>;
+ mux-gpios = <&pcal6416 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ pinctrl-gpiomux {
+ compatible = "pinctrl-multiplexer";
+
+ can1_fun: can1-grp {
+ mux-states = <&can1_pdm_mux 1>;
+ };
+
+ mqs1_disable: mqs1-disable-grp {
+ mux-states = <&mqs1_en_mux 0>;
+ };
+
+ mqs1_enable: mqs1-enable-grp {
+ mux-states = <&mqs1_en_mux 1>;
+ };
+
+ pdm_fun: pdm-grp {
+ mux-states = <&can1_pdm_mux 0>;
+ };
+ };
+
dmic: dmic {
compatible = "dmic-codec";
#sound-dai-cells = <0>;
@@ -284,7 +318,7 @@ &asrc2 {
/* pin conflict with PDM */
&flexcan1 {
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_flexcan1>;
+ pinctrl-0 = <&pinctrl_flexcan1>, <&mqs1_disable>, <&can1_fun>;
phys = <&flexcan1_phy>;
status = "disabled";
};
@@ -387,18 +421,6 @@ pcal6416: gpio@21 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcal6416>;
vcc-supply = <®_3p3v>;
-
- pdm-can-sel-hog {
- gpio-hog;
- gpios = <10 GPIO_ACTIVE_HIGH>;
- output-low;
- };
-
- mqs-en-hog {
- gpio-hog;
- gpios = <15 GPIO_ACTIVE_HIGH>;
- output-low;
- };
};
};
@@ -491,7 +513,7 @@ &micfil {
<&scmi_clk IMX952_CLK_AUDIOPLL1>;
assigned-clock-rates = <3932160000>, <3612672000>,
<393216000>, <361267200>, <49152000>;
- pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-0 = <&pinctrl_pdm>, <&mqs1_disable>, <&pdm_fun>;
pinctrl-1 = <&pinctrl_pdm_sleep>;
pinctrl-names = "default", "sleep";
status = "okay";
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM
2026-08-24 2:20 ` [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM Chancel Liu
@ 2026-08-24 2:40 ` sashiko-bot
0 siblings, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-08-24 2:40 UTC (permalink / raw)
To: Chancel Liu; +Cc: robh, conor+dt, devicetree, imx, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but repeated probe deferrals of devices consuming `pinctrl-multiplexer` states will cause a memory leak in the `pinctrl-generic-mux` driver.
--
--- Patch [15]: [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM ---
commit 8303ed37e9ec3be6828aa6ff3d2b548e65c73826
Author: Chancel Liu <chancel.liu@nxp.com>
arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM
This commit replaces static gpio-hog settings with GPIO-controlled board
muxes. It uses the pinctrl-multiplexer framework so that conflicting
functions between CAN1 and PDM can be selected at runtime.
> diff --git a/arch/arm64/boot/dts/freescale/imx952-evk.dts b/arch/arm64/boot/dts/freescale/imx952-evk.dts
> index 2224b90aafe93..e9d735dc2a51b 100644
> --- a/arch/arm64/boot/dts/freescale/imx952-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx952-evk.dts
> @@ -52,6 +52,40 @@ chosen {
> stdout-path = &lpuart1;
> };
>
> + can1_pdm_mux: mux-controller-0 {
> + compatible = "gpio-mux";
> + #mux-control-cells = <0>;
> + #mux-state-cells = <1>;
> + mux-gpios = <&pcal6416 10 GPIO_ACTIVE_HIGH>;
> + };
> +
> + mqs1_en_mux: mux-controller-1 {
> + compatible = "gpio-mux";
> + #mux-control-cells = <0>;
> + #mux-state-cells = <1>;
> + mux-gpios = <&pcal6416 15 GPIO_ACTIVE_HIGH>;
> + };
> +
> + pinctrl-gpiomux {
> + compatible = "pinctrl-multiplexer";
[Severity: High]
This isn't a bug introduced by this patch, but adding this multiplexer
reveals a pre-existing memory leak in the pinctrl-generic-mux driver.
When a consumer device (e.g., flexcan1) probes, the pinctrl core calls
mux_pinmux_dt_node_to_map() in drivers/pinctrl/pinctrl-generic-mux.c. That
function unconditionally allocates memory using devm_ APIs attached to the
provider's device:
drivers/pinctrl/pinctrl-generic-mux.c:mux_pinmux_dt_node_to_map() {
...
function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
if (!function)
return -ENOMEM;
group_names = devm_kcalloc(pctldev->dev, 1, sizeof(*group_names), GFP_KERNEL);
...
}
If the consumer defers probe, these allocations are orphaned on the
provider's devres list and aren't freed during the consumer's cleanup
path. On subsequent probe attempts, new allocations are made, leaking
memory each time.
Is there a plan to fix this in drivers/pinctrl/pinctrl-generic-mux.c so
that repeated probe deferrals don't cause unbounded memory exhaustion on
the provider device?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824022020.2812810-1-chancel.liu@oss.nxp.com?part=15
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v3 16/17] arm64: dts: imx952-evk: Add MQS1 pinmux, clocks and mark conflicting devices
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (14 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 15/17] arm64: dts: imx952-evk: Add board muxes to select between CAN1/PDM Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:20 ` [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms Chancel Liu
16 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
MQS1 shares pins with PDM and its sound card conflicts with the BT SCO
card. Add the MQS1 pinctrl group and label the conflicting device and
card so the shared imx9-mqs overlay can disable them. The overlay and
its Makefile rule are added in a later patch.
Update SAI1 clock assignments to provide the MQS MCLK source. Also
describe the MQS output amplifier using the simple-audio-amplifier.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/imx952-evk.dts | 27 ++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx952-evk.dts b/arch/arm64/boot/dts/freescale/imx952-evk.dts
index e9d735dc2a51..047dfde20718 100644
--- a/arch/arm64/boot/dts/freescale/imx952-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx952-evk.dts
@@ -43,6 +43,12 @@ aliases {
spi6 = &lpspi7;
};
+ amp_mqs1: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ sound-name-prefix = "MQS AMP";
+ VCC-supply = <®_3p3v>;
+ };
+
bt_sco_codec: audio-codec-bt-sco {
#sound-dai-cells = <1>;
compatible = "linux,bt-sco";
@@ -231,7 +237,7 @@ &mu7 1 1
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>;
};
- sound-bt-sco {
+ mqs1_conflict_card: sound-bt-sco {
compatible = "simple-audio-card";
simple-audio-card,bitclock-inversion;
simple-audio-card,bitclock-master = <&btcpu>;
@@ -503,7 +509,7 @@ &lpspi7 {
status = "okay";
};
-&micfil {
+mqs1_conflict_dev: &micfil {
assigned-clocks = <&scmi_clk IMX952_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX952_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX952_CLK_AUDIOPLL1>,
@@ -519,11 +525,21 @@ &micfil {
status = "okay";
};
+&mqs1 {
+ pinctrl-0 = <&pinctrl_mqs1>, <&mqs1_enable>;
+ pinctrl-names = "default";
+};
+
&mu7 {
status = "okay";
};
&sai1 {
+ clocks = <&scmi_clk IMX952_CLK_BUSAON>, <&clk_dummy>,
+ <&scmi_clk IMX952_CLK_SAI1>, <&clk_dummy>,
+ <&clk_dummy>, <&scmi_clk IMX952_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX952_CLK_AUDIOPLL2>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
assigned-clocks = <&scmi_clk IMX952_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX952_CLK_AUDIOPLL2_VCO>,
<&scmi_clk IMX952_CLK_AUDIOPLL1>,
@@ -704,6 +720,13 @@ IMX952_PAD_GPIO_IO07__WAKEUPMIX_TOP_LPSPI7_SCK 0x39e
>;
};
+ pinctrl_mqs1: mqs1grp {
+ fsl,pins = <
+ IMX952_PAD_PDM_CLK__AONMIX_TOP_MQS1_LEFT 0x31e
+ IMX952_PAD_PDM_BIT_STREAM0__AONMIX_TOP_MQS1_RIGHT 0x31e
+ >;
+ };
+
pinctrl_pcal6416: pcal6416grp {
fsl,pins = <
IMX952_PAD_GPIO_IO10__WAKEUPMIX_TOP_GPIO2_IO_10 0x31e
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms
2026-08-24 2:20 [PATCH v3 00/17] arm64: dts: Add MQS1 sound card support for i.MX9 EVK platforms Chancel Liu
` (15 preceding siblings ...)
2026-08-24 2:20 ` [PATCH v3 16/17] arm64: dts: imx952-evk: Add MQS1 pinmux, clocks and mark conflicting devices Chancel Liu
@ 2026-08-24 2:20 ` Chancel Liu
2026-08-24 2:42 ` sashiko-bot
16 siblings, 1 reply; 23+ messages in thread
From: Chancel Liu @ 2026-08-24 2:20 UTC (permalink / raw)
To: Frank.Li, s.hauer, robh, krzk+dt, conor+dt, imx
Cc: kernel, festevam, linux-arm-kernel, devicetree, linux-kernel
From: Chancel Liu <chancel.liu@nxp.com>
Add a common DT overlay to support MQS sound cards on i.MX9 platforms.
MQS output pins are often shared with other devices, so the overlay
routes SAI1 to MQS1 and disables the conflicting device and sound card.
Attach the board amplifier as an aux device and add the DAPM routing
from the MQS outputs to the amplifier inputs.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
arch/arm64/boot/dts/freescale/Makefile | 12 +++++
arch/arm64/boot/dts/freescale/imx9-mqs.dtso | 57 +++++++++++++++++++++
2 files changed, 69 insertions(+)
create mode 100644 arch/arm64/boot/dts/freescale/imx9-mqs.dtso
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 95ae85ab4adf..6e9e3226a693 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -613,6 +613,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx91-9x9-qsb.dtb
dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-frdm.dtb
dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-frdm-s.dtb
+imx91-11x11-evk-mqs-dtbs += imx91-11x11-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-evk-mqs.dtb
dtb-$(CONFIG_ARCH_MXC) += imx91-phyboard-segin.dtb
imx91-9x9-qsb-can1-dtbs += imx91-9x9-qsb.dtb imx91-9x9-qsb-can1.dtbo
@@ -645,6 +647,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk.dtb
imx93-11x11-evk-dy1212w-4856-dtbs += imx93-11x11-evk.dtb imx93-11x11-evk-dy1212w-4856.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk-dy1212w-4856.dtb
+imx93-11x11-evk-mqs-dtbs += imx93-11x11-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk-mqs.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-frdm.dtb
@@ -652,6 +656,8 @@ imx93-11x11-frdm-pixpaper-dtbs += imx93-11x11-frdm.dtb imx93-11x11-frdm-pixpaper
dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-frdm-pixpaper.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-14x14-evk.dtb
+imx93-14x14-evk-mqs-dtbs += imx93-14x14-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx93-14x14-evk-mqs.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
@@ -703,6 +709,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx943-evk-pcie0-ep.dtb imx943-evk-pcie1-ep.dtb
imx943-evk-sdwifi-dtbs := imx943-evk.dtb imx943-evk-sdwifi.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx943-evk-sdwifi.dtb
+imx943-evk-mqs-dtbs += imx943-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx943-evk-mqs.dtb
dtb-$(CONFIG_ARCH_MXC) += imx95-15x15-ab2.dtb
dtb-$(CONFIG_ARCH_MXC) += imx95-15x15-evk.dtb
@@ -734,6 +742,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx95-15x15-evk-pcie.dtb
imx95-15x15-evk-pcie0-ep-dtbs = imx95-15x15-evk-pcie.dtb imx-pcie0-ep.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx95-15x15-evk-pcie0-ep.dtb
+imx95-15x15-evk-mqs-dtbs += imx95-15x15-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx95-15x15-evk-mqs.dtb
imx95-19x19-evk-pcie0-ep-dtbs += imx95-19x19-evk.dtb imx-pcie0-ep.dtbo
imx95-19x19-evk-pcie1-ep-dtbs += imx95-19x19-evk.dtb imx-pcie1-ep.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-pcie0-ep.dtb imx95-19x19-evk-pcie1-ep.dtb
@@ -742,6 +752,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx95-libra-rdk-fpsc.dtb
dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-verdin-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx952-evk.dtb
+imx952-evk-mqs-dtbs += imx952-evk.dtb imx9-mqs.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx952-evk-mqs.dtb
imx8mm-kontron-dl-dtbs := imx8mm-kontron-bl.dtb imx8mm-kontron-dl.dtbo
imx8mm-kontron-bl-lte-dtbs := imx8mm-kontron-bl.dtb imx8mm-kontron-bl-lte.dtbo
diff --git a/arch/arm64/boot/dts/freescale/imx9-mqs.dtso b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
new file mode 100644
index 000000000000..bdb251299e52
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2026 NXP
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ sound-mqs {
+ compatible = "audio-graph-card2";
+ aux-devs = <&_mqs1>;
+ label = "mqs-audio";
+ links = <&sai1_port1>;
+ routing = "MQS AMP INL", "MQS_L",
+ "MQS AMP INR", "MQS_R";
+ };
+};
+
+&mqs1_conflict_card {
+ status = "disabled";
+};
+
+&mqs1_conflict_dev {
+ status = "disabled";
+};
+
+&mqs1 {
+ status = "okay";
+
+ port {
+ mqs1_endpoint: endpoint {
+ remote-endpoint = <&sai1_endpoint1>;
+ };
+ };
+};
+
+&sai1 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sai1_port1: port@1 {
+ reg = <1>;
+ playback-only;
+
+ sai1_endpoint1: endpoint {
+ dai-format = "left_j";
+ bitclock-master;
+ frame-master;
+ mclk-fs = <512>;
+ system-clock-direction-out;
+ remote-endpoint = <&mqs1_endpoint>;
+ };
+ };
+ };
+};
--
2.50.1
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms
2026-08-24 2:20 ` [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms Chancel Liu
@ 2026-08-24 2:42 ` sashiko-bot
2026-08-25 2:58 ` Chancel Liu
0 siblings, 1 reply; 23+ messages in thread
From: sashiko-bot @ 2026-08-24 2:42 UTC (permalink / raw)
To: Chancel Liu; +Cc: Frank.Li, robh, conor+dt, devicetree, imx
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The device tree overlay defines audio DAPM routing referencing non-existent source widgets `MQS_L` and `MQS_R`, which will cause the sound card probe to fail with `-ENODEV`.
--
--- Patch [17]: [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms ---
commit 16b11b202a8f8c0d5f524ed9bbec5f9b49d2926e
Author: Chancel Liu <chancel.liu@nxp.com>
arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms
This commit adds a common DT overlay to support MQS sound cards on i.MX9
platforms. It routes SAI1 to MQS1, disables conflicting devices, and attaches
a board amplifier via DAPM routing.
> diff --git a/arch/arm64/boot/dts/freescale/imx9-mqs.dtso b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
> new file mode 100644
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
[ ... ]
> +&{/} {
> + sound-mqs {
> + compatible = "audio-graph-card2";
> + aux-devs = <&_mqs1>;
> + label = "mqs-audio";
> + links = <&sai1_port1>;
> + routing = "MQS AMP INL", "MQS_L",
> + "MQS AMP INR", "MQS_R";
[Severity: High]
Will this cause the sound card probe to fail with -ENODEV?
Looking at the MQS codec driver (sound/soc/fsl/fsl_mqs.c), it only registers
a playback DAI with .stream_name = "Playback" and doesn't appear to define
.dapm_widgets exporting "MQS_L" or "MQS_R".
Since the sound-mqs node lacks a widgets property to manually instantiate them
(e.g., widgets = "Line", "MQS_L", ...), won't snd_soc_dapm_add_route() fail
to find these source widgets and abort the initialization of the sound card?
> + };
> +};
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824022020.2812810-1-chancel.liu@oss.nxp.com?part=17
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms
2026-08-24 2:42 ` sashiko-bot
@ 2026-08-25 2:58 ` Chancel Liu
0 siblings, 0 replies; 23+ messages in thread
From: Chancel Liu @ 2026-08-25 2:58 UTC (permalink / raw)
To: sashiko-reviews; +Cc: Frank.Li, robh, conor+dt, devicetree, imx
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] The device tree overlay defines audio DAPM routing referencing non-existent source widgets `MQS_L` and `MQS_R`, which will cause the sound card probe to fail with `-ENODEV`.
> --
>
> --- Patch [17]: [PATCH v3 17/17] arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms ---
> commit 16b11b202a8f8c0d5f524ed9bbec5f9b49d2926e
> Author: Chancel Liu <chancel.liu@nxp.com>
>
> arm64: dts: fsl: Add DT overlay to build MQS1 sound cards on i.MX9 platforms
>
> This commit adds a common DT overlay to support MQS sound cards on i.MX9
> platforms. It routes SAI1 to MQS1, disables conflicting devices, and attaches
> a board amplifier via DAPM routing.
>
>> diff --git a/arch/arm64/boot/dts/freescale/imx9-mqs.dtso b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
>> new file mode 100644
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/freescale/imx9-mqs.dtso
> [ ... ]
>> +&{/} {
>> + sound-mqs {
>> + compatible = "audio-graph-card2";
>> + aux-devs = <&_mqs1>;
>> + label = "mqs-audio";
>> + links = <&sai1_port1>;
>> + routing = "MQS AMP INL", "MQS_L",
>> + "MQS AMP INR", "MQS_R";
>
> [Severity: High]
> Will this cause the sound card probe to fail with -ENODEV?
>
> Looking at the MQS codec driver (sound/soc/fsl/fsl_mqs.c), it only registers
> a playback DAI with .stream_name = "Playback" and doesn't appear to define
> .dapm_widgets exporting "MQS_L" or "MQS_R".
>
> Since the sound-mqs node lacks a widgets property to manually instantiate them
> (e.g., widgets = "Line", "MQS_L", ...), won't snd_soc_dapm_add_route() fail
> to find these source widgets and abort the initialization of the sound card?
As I mentioned in cover letter, this series depends on a patch for MQS
driver:
https://lore.kernel.org/linux-sound/20260820021454.2229094-1-chancel.liu@oss.nxp.com/
In which, MQS_L/MQS_R pins are defined as DAPM output widgets.
Regards,
Chancel Liu
^ permalink raw reply [flat|nested] 23+ messages in thread