* [PATCH 0/6] arm64: dts: imx943: Add sound card support
@ 2025-05-15 5:18 Shengjiu Wang
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
Add sound card and related i2c device support
- micfil
- bt-sco
- wm8962
Carlos Song (2):
arm64: dts: imx943-evk: add lpi2c support
arm64: dts: imx943-evk: add i2c io expander support
Shengjiu Wang (4):
arm64: dts: imx94: Add micfil and mqs device nodes
arm64: dts: imx943-evk: add sound-wm8962 support
arm64: dts: imx943-evk: add bt-sco sound card support
arm64: dts: imx943-evk: Add PDM microphone sound card support
arch/arm64/boot/dts/freescale/imx94.dtsi | 30 ++
arch/arm64/boot/dts/freescale/imx943-evk.dts | 432 +++++++++++++++++++
2 files changed, 462 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
@ 2025-05-15 5:18 ` Shengjiu Wang
2025-05-15 10:21 ` Daniel Baluta
2025-05-19 18:42 ` Frank Li
2025-05-15 5:18 ` [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support Shengjiu Wang
` (4 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
Add micfil and mqs device nodes
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx94.dtsi | 30 ++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
index 3661ea48d7d2..77297dde5c95 100644
--- a/arch/arm64/boot/dts/freescale/imx94.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
@@ -108,6 +108,16 @@ scmi_misc: protocol@84 {
};
};
+ mqs1: mqs1 {
+ compatible = "fsl,imx943-aonmix-mqs";
+ status = "disabled";
+ };
+
+ mqs2: mqs2 {
+ compatible = "fsl,imx943-wakeupmix-mqs";
+ status = "disabled";
+ };
+
pmu {
compatible = "arm,cortex-a55-pmu";
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_HIGH)>;
@@ -1045,6 +1055,26 @@ sai1: sai@443b0000 {
status = "disabled";
};
+ micfil: micfil@44520000 {
+ compatible = "fsl,imx943-micfil";
+ reg = <0x44520000 0x10000>;
+ interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSAON>,
+ <&scmi_clk IMX94_CLK_PDM>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2>,
+ <&dummy>;
+ clock-names = "ipg_clk", "ipg_clk_app",
+ "pll8k", "pll11k", "clkext3";
+ dmas = <&edma1 6 0 5>;
+ dma-names = "rx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
adc1: adc@44530000 {
compatible = "nxp,imx94-adc", "nxp,imx93-adc";
reg = <0x44530000 0x10000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
@ 2025-05-15 5:18 ` Shengjiu Wang
2025-05-19 18:44 ` Frank Li
2025-05-15 5:18 ` [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support Shengjiu Wang
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
From: Carlos Song <carlos.song@nxp.com>
Add lpi2c and i2c-mux support for imx943 evk board.
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 132 +++++++++++++++++++
1 file changed, 132 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index cc8f3e6a1789..a566b9d8b813 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -12,6 +12,9 @@ / {
model = "NXP i.MX943 EVK board";
aliases {
+ i2c2 = &lpi2c3;
+ i2c3 = &lpi2c4;
+ i2c5 = &lpi2c6;
mmc0 = &usdhc1;
mmc1 = &usdhc2;
serial0 = &lpuart1;
@@ -53,6 +56,113 @@ memory@80000000 {
};
};
+&lpi2c3 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&pinctrl_lpi2c3>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ pca9548_i2c3: i2c-mux@77 {
+ compatible = "nxp,pca9548";
+ reg = <0x77>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@3 {
+ reg = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@4 {
+ reg = <4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@5 {
+ reg = <5>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@6 {
+ reg = <6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@7 {
+ reg = <7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&lpi2c4 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&pinctrl_lpi2c4>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&lpi2c6 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&pinctrl_lpi2c6>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ pca9544_i2c6: i2c-mux@77 {
+ compatible = "nxp,pca9544";
+ reg = <0x77>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@3 {
+ reg = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
&lpuart1 {
pinctrl-0 = <&pinctrl_uart1>;
pinctrl-names = "default";
@@ -60,6 +170,28 @@ &lpuart1 {
};
&scmi_iomuxc {
+
+ pinctrl_lpi2c3: lpi2c3grp {
+ fsl,pins = <
+ IMX94_PAD_GPIO_IO16__LPI2C3_SDA 0x40000b9e
+ IMX94_PAD_GPIO_IO17__LPI2C3_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_lpi2c4: lpi2c4grp {
+ fsl,pins = <
+ IMX94_PAD_GPIO_IO18__LPI2C4_SDA 0x40000b9e
+ IMX94_PAD_GPIO_IO19__LPI2C4_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_lpi2c6: lpi2c6grp {
+ fsl,pins = <
+ IMX94_PAD_GPIO_IO29__LPI2C6_SDA 0x40000b9e
+ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
+ >;
+ };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
2025-05-15 5:18 ` [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support Shengjiu Wang
@ 2025-05-15 5:18 ` Shengjiu Wang
2025-05-19 18:47 ` Frank Li
2025-05-15 5:18 ` [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support Shengjiu Wang
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
From: Carlos Song <carlos.song@nxp.com>
Add i2c io expander support for imx943 evk board.
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 105 +++++++++++++++++++
1 file changed, 105 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index a566b9d8b813..ff6e9ac5477f 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -62,6 +62,13 @@ &lpi2c3 {
pinctrl-names = "default";
status = "okay";
+ pca9670_i2c3: gpio@23 {
+ compatible = "nxp,pca9670";
+ reg = <0x23>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ };
+
pca9548_i2c3: i2c-mux@77 {
compatible = "nxp,pca9548";
reg = <0x77>;
@@ -102,18 +109,63 @@ i2c@5 {
reg = <5>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6416_i2c3_u46: gpio@20 {
+ compatible = "nxp,pcal6416";
+ reg = <0x20>;
+ #gpio-cells = <2>;
+ gpio-controller;
+
+ sd-card-on-hog {
+ gpios = <13 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-high;
+ };
+ };
+
+ pcal6416_i2c3_u171: gpio@21 {
+ compatible = "nxp,pcal6416";
+ reg = <0x21>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ };
};
i2c@6 {
reg = <6>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6416_i2c3_u48: gpio@20 {
+ compatible = "nxp,pcal6416";
+ reg = <0x20>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&gpio3>;
+ interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ pinctrl-0 = <&pinctrl_ioexpander_int>;
+ pinctrl-names = "default";
+ };
};
i2c@7 {
reg = <7>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6408_i2c3_u172: gpio@20 {
+ compatible = "nxp,pcal6408";
+ reg = <0x20>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&gpio3>;
+ /* shared int pin with u48 */
+ interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ };
};
};
};
@@ -147,18 +199,59 @@ i2c@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6416_i2c6_u50: gpio@21 {
+ compatible = "nxp,pcal6416";
+ reg = <0x21>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ };
};
i2c@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6408_i2c6_u170: gpio@20 {
+ compatible = "nxp,pcal6408";
+ reg = <0x20>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&gpio4>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ pinctrl-0 = <&pinctrl_ioexpander_int2>;
+ pinctrl-names = "default";
+ };
};
i2c@3 {
reg = <3>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pcal6416_i2c6_u44: gpio@20 {
+ compatible = "nxp,pcal6416";
+ reg = <0x20>;
+ #gpio-cells = <2>;
+ gpio-controller;
+
+ /* eMMC IOMUX selection */
+ sd1-sel-hog {
+ gpios = <0 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-high;
+ };
+
+ /* SD card IOMUX selection */
+ sd2-sel-hog {
+ gpios = <1 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-high;
+ };
+ };
};
};
};
@@ -171,6 +264,18 @@ &lpuart1 {
&scmi_iomuxc {
+ pinctrl_ioexpander_int2: ioexpanderint2grp {
+ fsl,pins = <
+ IMX94_PAD_CCM_CLKO4__GPIO4_IO3 0x31e
+ >;
+ };
+
+ pinctrl_ioexpander_int: ioexpanderintgrp {
+ fsl,pins = <
+ IMX94_PAD_GPIO_IO45__GPIO3_IO13 0x31e
+ >;
+ };
+
pinctrl_lpi2c3: lpi2c3grp {
fsl,pins = <
IMX94_PAD_GPIO_IO16__LPI2C3_SDA 0x40000b9e
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
` (2 preceding siblings ...)
2025-05-15 5:18 ` [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support Shengjiu Wang
@ 2025-05-15 5:18 ` Shengjiu Wang
2025-05-19 18:52 ` Frank Li
2025-05-15 5:18 ` [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support Shengjiu Wang
2025-05-15 5:19 ` [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone " Shengjiu Wang
5 siblings, 1 reply; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
Add wm8962 sound card which connects to sai1.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 79 ++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index ff6e9ac5477f..da08aaa95904 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -36,6 +36,15 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
enable-active-high;
};
+ reg_audio_pwr: regulator-wm8962-pwr {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "audio-pwr";
+ gpio = <&pcal6416_i2c3_u171 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
reserved-memory {
ranges;
#address-cells = <2>;
@@ -50,6 +59,21 @@ linux,cma {
};
};
+ sound-wm8962 {
+ compatible = "fsl,imx-audio-wm8962";
+ audio-codec = <&wm8962>;
+ audio-cpu = <&sai1>;
+ audio-routing = "Headphone Jack", "HPOUTL",
+ "Headphone Jack", "HPOUTR",
+ "Ext Spk", "SPKOUTL",
+ "Ext Spk", "SPKOUTR",
+ "AMIC", "MICBIAS",
+ "IN3R", "AMIC",
+ "IN1R", "AMIC";
+ hp-det-gpio = <&pcal6416_i2c3_u48 14 GPIO_ACTIVE_HIGH>;
+ model = "wm8962-audio";
+ };
+
memory@80000000 {
reg = <0x0 0x80000000 0x0 0x80000000>;
device_type = "memory";
@@ -103,6 +127,28 @@ i2c@4 {
reg = <4>;
#address-cells = <1>;
#size-cells = <0>;
+
+ wm8962: codec@1a {
+ compatible = "wlf,wm8962";
+ reg = <0x1a>;
+ clocks = <&scmi_clk IMX94_CLK_SAI1>;
+ AVDD-supply = <®_audio_pwr>;
+ CPVDD-supply = <®_audio_pwr>;
+ DBVDD-supply = <®_audio_pwr>;
+ DCVDD-supply = <®_audio_pwr>;
+ gpio-cfg = <
+ 0x0000 /* 0:Default */
+ 0x0000 /* 1:Default */
+ 0x0000 /* 2:FN_DMICCLK */
+ 0x0000 /* 3:Default */
+ 0x0000 /* 4:FN_DMICCDAT */
+ 0x0000 /* 5:Default */
+ >;
+ MICVDD-supply = <®_audio_pwr>;
+ PLLVDD-supply = <®_audio_pwr>;
+ SPKVDD1-supply = <®_audio_pwr>;
+ SPKVDD2-supply = <®_audio_pwr>;
+ };
};
i2c@5 {
@@ -128,6 +174,12 @@ pcal6416_i2c3_u171: gpio@21 {
reg = <0x21>;
#gpio-cells = <2>;
gpio-controller;
+
+ audio-pwren-hog {
+ gpios = <12 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-high;
+ };
};
};
@@ -262,6 +314,23 @@ &lpuart1 {
status = "okay";
};
+&sai1 {
+ assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2>,
+ <&scmi_clk IMX94_CLK_SAI1>;
+ assigned-clock-parents = <0>, <0>, <0>, <0>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>;
+ assigned-clock-rates = <3932160000>,
+ <3612672000>, <393216000>,
+ <361267200>, <12288000>;
+ pinctrl-0 = <&pinctrl_sai1>;
+ pinctrl-names = "default";
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+};
+
&scmi_iomuxc {
pinctrl_ioexpander_int2: ioexpanderint2grp {
@@ -297,6 +366,16 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
>;
};
+ pinctrl_sai1: sai1grp {
+ fsl,pins = <
+ IMX94_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e
+ IMX94_PAD_SAI1_TXC__SAI1_TX_BCLK 0x31e
+ IMX94_PAD_SAI1_TXD0__SAI1_TX_DATA0 0x31e
+ IMX94_PAD_SAI1_RXD0__SAI1_RX_DATA0 0x31e
+ IMX94_PAD_I2C2_SDA__SAI1_MCLK 0x31e
+ >;
+ };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
` (3 preceding siblings ...)
2025-05-15 5:18 ` [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support Shengjiu Wang
@ 2025-05-15 5:18 ` Shengjiu Wang
2025-05-19 18:54 ` Frank Li
2025-05-15 5:19 ` [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone " Shengjiu Wang
5 siblings, 1 reply; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:18 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
Add bt-sco sound card, which is used by BT HFP case.
It supports wb profile as default.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 56 ++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index da08aaa95904..85cec644dd92 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -20,6 +20,11 @@ aliases {
serial0 = &lpuart1;
};
+ bt_sco_codec: bt-sco-codec {
+ compatible = "linux,bt-sco";
+ #sound-dai-cells = <1>;
+ };
+
chosen {
stdout-path = &lpuart1;
};
@@ -59,6 +64,25 @@ linux,cma {
};
};
+ sound-bt-sco {
+ compatible = "simple-audio-card";
+ simple-audio-card,bitclock-inversion;
+ simple-audio-card,bitclock-master = <&btcpu>;
+ simple-audio-card,format = "dsp_a";
+ simple-audio-card,frame-master = <&btcpu>;
+ simple-audio-card,name = "bt-sco-audio";
+
+ simple-audio-card,codec {
+ sound-dai = <&bt_sco_codec 1>;
+ };
+
+ btcpu: simple-audio-card,cpu {
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <16>;
+ sound-dai = <&sai3>;
+ };
+ };
+
sound-wm8962 {
compatible = "fsl,imx-audio-wm8962";
audio-codec = <&wm8962>;
@@ -290,6 +314,12 @@ pcal6416_i2c6_u44: gpio@20 {
#gpio-cells = <2>;
gpio-controller;
+ sai3-sel-hog {
+ gpios = <11 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-high;
+ };
+
/* eMMC IOMUX selection */
sd1-sel-hog {
gpios = <0 GPIO_ACTIVE_HIGH>;
@@ -331,6 +361,23 @@ &sai1 {
status = "okay";
};
+&sai3 {
+ assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2>,
+ <&scmi_clk IMX94_CLK_SAI3>;
+ assigned-clock-parents = <0>, <0>, <0>, <0>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>;
+ assigned-clock-rates = <3932160000>,
+ <3612672000>, <393216000>,
+ <361267200>, <12288000>;
+ pinctrl-0 = <&pinctrl_sai3>;
+ pinctrl-names = "default";
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+};
+
&scmi_iomuxc {
pinctrl_ioexpander_int2: ioexpanderint2grp {
@@ -376,6 +423,15 @@ IMX94_PAD_I2C2_SDA__SAI1_MCLK 0x31e
>;
};
+ pinctrl_sai3: sai3grp {
+ fsl,pins = <
+ IMX94_PAD_GPIO_IO42__SAI3_TX_BCLK 0x31e
+ IMX94_PAD_GPIO_IO56__SAI3_TX_SYNC 0x31e
+ IMX94_PAD_GPIO_IO46__SAI3_RX_DATA0 0x31e
+ IMX94_PAD_GPIO_IO47__SAI3_TX_DATA0 0x31e
+ >;
+ };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone sound card support
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
` (4 preceding siblings ...)
2025-05-15 5:18 ` [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support Shengjiu Wang
@ 2025-05-15 5:19 ` Shengjiu Wang
2025-05-19 19:09 ` Frank Li
5 siblings, 1 reply; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 5:19 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
Add PDM micphone 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: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx943-evk.dts | 60 ++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index 85cec644dd92..c8c3eff9df1a 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -29,6 +29,11 @@ chosen {
stdout-path = &lpuart1;
};
+ dmic: dmic {
+ compatible = "dmic-codec";
+ #sound-dai-cells = <0>;
+ };
+
reg_usdhc2_vmmc: regulator-usdhc2 {
compatible = "regulator-fixed";
off-on-delay-us = <12000>;
@@ -83,6 +88,24 @@ btcpu: simple-audio-card,cpu {
};
};
+ sound-micfil {
+ compatible = "fsl,imx-audio-card";
+ model = "micfil-audio";
+
+ pri-dai-link {
+ format = "i2s";
+ link-name = "micfil hifi";
+
+ codec {
+ sound-dai = <&dmic>;
+ };
+
+ cpu {
+ sound-dai = <&micfil>;
+ };
+ };
+ };
+
sound-wm8962 {
compatible = "fsl,imx-audio-wm8962";
audio-codec = <&wm8962>;
@@ -204,6 +227,12 @@ audio-pwren-hog {
gpio-hog;
output-high;
};
+
+ mqs-mic-sel-hog {
+ gpios = <11 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ output-low;
+ };
};
};
@@ -314,6 +343,13 @@ 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;
@@ -344,6 +380,22 @@ &lpuart1 {
status = "okay";
};
+&micfil {
+ assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL2>,
+ <&scmi_clk IMX94_CLK_PDM>;
+ assigned-clock-parents = <0>, <0>, <0>, <0>,
+ <&scmi_clk IMX94_CLK_AUDIOPLL1>;
+ assigned-clock-rates = <3932160000>,
+ <3612672000>, <393216000>,
+ <361267200>, <49152000>;
+ pinctrl-0 = <&pinctrl_pdm>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&sai1 {
assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
<&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
@@ -413,6 +465,14 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
>;
};
+ pinctrl_pdm: pdmgrp {
+ fsl,pins = <
+ IMX94_PAD_PDM_CLK__PDM_CLK 0x31e
+ IMX94_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM0 0x31e
+ IMX94_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM1 0x31e
+ >;
+ };
+
pinctrl_sai1: sai1grp {
fsl,pins = <
IMX94_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
@ 2025-05-15 10:21 ` Daniel Baluta
2025-05-15 10:23 ` Shengjiu Wang
2025-05-19 18:42 ` Frank Li
1 sibling, 1 reply; 15+ messages in thread
From: Daniel Baluta @ 2025-05-15 10:21 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 8:21 AM Shengjiu Wang <shengjiu.wang@nxp.com> wrote:
>
> Add micfil and mqs device nodes
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx94.dtsi | 30 ++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
> index 3661ea48d7d2..77297dde5c95 100644
> --- a/arch/arm64/boot/dts/freescale/imx94.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
> @@ -108,6 +108,16 @@ scmi_misc: protocol@84 {
> };
> };
>
> + mqs1: mqs1 {
> + compatible = "fsl,imx943-aonmix-mqs";
> + status = "disabled";
> + };
> +
> + mqs2: mqs2 {
> + compatible = "fsl,imx943-wakeupmix-mqs";
> + status = "disabled";
> + };
Node names should be somehow generic.
So here, we need to have something like:
mqs1: mqs@<ip_addr>
similar for mqs2.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes
2025-05-15 10:21 ` Daniel Baluta
@ 2025-05-15 10:23 ` Shengjiu Wang
0 siblings, 0 replies; 15+ messages in thread
From: Shengjiu Wang @ 2025-05-15 10:23 UTC (permalink / raw)
To: Daniel Baluta
Cc: Shengjiu Wang, robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel,
festevam, devicetree, imx, linux-arm-kernel, linux-kernel,
carlos.song
On Thu, May 15, 2025 at 6:19 PM Daniel Baluta <daniel.baluta@gmail.com> wrote:
>
> On Thu, May 15, 2025 at 8:21 AM Shengjiu Wang <shengjiu.wang@nxp.com> wrote:
> >
> > Add micfil and mqs device nodes
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > arch/arm64/boot/dts/freescale/imx94.dtsi | 30 ++++++++++++++++++++++++
> > 1 file changed, 30 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
> > index 3661ea48d7d2..77297dde5c95 100644
> > --- a/arch/arm64/boot/dts/freescale/imx94.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
> > @@ -108,6 +108,16 @@ scmi_misc: protocol@84 {
> > };
> > };
> >
> > + mqs1: mqs1 {
> > + compatible = "fsl,imx943-aonmix-mqs";
> > + status = "disabled";
> > + };
> > +
> > + mqs2: mqs2 {
> > + compatible = "fsl,imx943-wakeupmix-mqs";
> > + status = "disabled";
> > + };
>
> Node names should be somehow generic.
>
> So here, we need to have something like:
>
> mqs1: mqs@<ip_addr>
>
> similar for mqs2.
There is no ip address for mqs module. The only control register is
in BLK_CTRL.
best regards
Shengjiu Wang
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
2025-05-15 10:21 ` Daniel Baluta
@ 2025-05-19 18:42 ` Frank Li
1 sibling, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 18:42 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:18:55PM +0800, Shengjiu Wang wrote:
> Add micfil and mqs device nodes
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx94.dtsi | 30 ++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
> index 3661ea48d7d2..77297dde5c95 100644
> --- a/arch/arm64/boot/dts/freescale/imx94.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
> @@ -108,6 +108,16 @@ scmi_misc: protocol@84 {
> };
> };
>
> + mqs1: mqs1 {
> + compatible = "fsl,imx943-aonmix-mqs";
> + status = "disabled";
> + };
> +
> + mqs2: mqs2 {
> + compatible = "fsl,imx943-wakeupmix-mqs";
> + status = "disabled";
> + };
> +
> pmu {
> compatible = "arm,cortex-a55-pmu";
> interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_HIGH)>;
> @@ -1045,6 +1055,26 @@ sai1: sai@443b0000 {
> status = "disabled";
> };
>
> + micfil: micfil@44520000 {
> + compatible = "fsl,imx943-micfil";
> + reg = <0x44520000 0x10000>;
> + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&scmi_clk IMX94_CLK_BUSAON>,
> + <&scmi_clk IMX94_CLK_PDM>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2>,
> + <&dummy>;
> + clock-names = "ipg_clk", "ipg_clk_app",
> + "pll8k", "pll11k", "clkext3";
> + dmas = <&edma1 6 0 5>;
there are include/dt-bindings/dma/fsl-edma.h
5 suppose should be
FSL_EDMA_MULTI_FIFO | FSL_EDMA_RX
Frank
> + dma-names = "rx";
> + #sound-dai-cells = <0>;
> + status = "disabled";
> + };
> +
> adc1: adc@44530000 {
> compatible = "nxp,imx94-adc", "nxp,imx93-adc";
> reg = <0x44530000 0x10000>;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support
2025-05-15 5:18 ` [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support Shengjiu Wang
@ 2025-05-19 18:44 ` Frank Li
0 siblings, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 18:44 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:18:56PM +0800, Shengjiu Wang wrote:
> From: Carlos Song <carlos.song@nxp.com>
>
> Add lpi2c and i2c-mux support for imx943 evk board.
>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> arch/arm64/boot/dts/freescale/imx943-evk.dts | 132 +++++++++++++++++++
> 1 file changed, 132 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index cc8f3e6a1789..a566b9d8b813 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -12,6 +12,9 @@ / {
> model = "NXP i.MX943 EVK board";
>
> aliases {
> + i2c2 = &lpi2c3;
> + i2c3 = &lpi2c4;
> + i2c5 = &lpi2c6;
> mmc0 = &usdhc1;
> mmc1 = &usdhc2;
> serial0 = &lpuart1;
> @@ -53,6 +56,113 @@ memory@80000000 {
> };
> };
>
> +&lpi2c3 {
> + clock-frequency = <400000>;
> + pinctrl-0 = <&pinctrl_lpi2c3>;
> + pinctrl-names = "default";
> + status = "okay";
> +
> + pca9548_i2c3: i2c-mux@77 {
> + compatible = "nxp,pca9548";
> + reg = <0x77>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + i2c@0 {
> + reg = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@1 {
> + reg = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@2 {
> + reg = <2>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@3 {
> + reg = <3>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@4 {
> + reg = <4>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@5 {
> + reg = <5>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@6 {
> + reg = <6>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@7 {
> + reg = <7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> + };
> +};
> +
> +&lpi2c4 {
> + clock-frequency = <400000>;
> + pinctrl-0 = <&pinctrl_lpi2c4>;
> + pinctrl-names = "default";
> + status = "okay";
> +};
> +
> +&lpi2c6 {
> + clock-frequency = <400000>;
> + pinctrl-0 = <&pinctrl_lpi2c6>;
> + pinctrl-names = "default";
> + status = "okay";
> +
> + pca9544_i2c6: i2c-mux@77 {
> + compatible = "nxp,pca9544";
> + reg = <0x77>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + i2c@0 {
> + reg = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@1 {
> + reg = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@2 {
> + reg = <2>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + i2c@3 {
> + reg = <3>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> + };
> +};
> +
> &lpuart1 {
> pinctrl-0 = <&pinctrl_uart1>;
> pinctrl-names = "default";
> @@ -60,6 +170,28 @@ &lpuart1 {
> };
>
> &scmi_iomuxc {
> +
> + pinctrl_lpi2c3: lpi2c3grp {
> + fsl,pins = <
> + IMX94_PAD_GPIO_IO16__LPI2C3_SDA 0x40000b9e
> + IMX94_PAD_GPIO_IO17__LPI2C3_SCL 0x40000b9e
> + >;
> + };
> +
> + pinctrl_lpi2c4: lpi2c4grp {
> + fsl,pins = <
> + IMX94_PAD_GPIO_IO18__LPI2C4_SDA 0x40000b9e
> + IMX94_PAD_GPIO_IO19__LPI2C4_SCL 0x40000b9e
> + >;
> + };
> +
> + pinctrl_lpi2c6: lpi2c6grp {
> + fsl,pins = <
> + IMX94_PAD_GPIO_IO29__LPI2C6_SDA 0x40000b9e
> + IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
> + >;
> + };
> +
> pinctrl_uart1: uart1grp {
> fsl,pins = <
> IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support
2025-05-15 5:18 ` [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support Shengjiu Wang
@ 2025-05-19 18:47 ` Frank Li
0 siblings, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 18:47 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:18:57PM +0800, Shengjiu Wang wrote:
> From: Carlos Song <carlos.song@nxp.com>
>
> Add i2c io expander support for imx943 evk board.
>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx943-evk.dts | 105 +++++++++++++++++++
> 1 file changed, 105 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index a566b9d8b813..ff6e9ac5477f 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -62,6 +62,13 @@ &lpi2c3 {
> pinctrl-names = "default";
> status = "okay";
>
> + pca9670_i2c3: gpio@23 {
> + compatible = "nxp,pca9670";
> + reg = <0x23>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + };
> +
> pca9548_i2c3: i2c-mux@77 {
> compatible = "nxp,pca9548";
> reg = <0x77>;
> @@ -102,18 +109,63 @@ i2c@5 {
> reg = <5>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6416_i2c3_u46: gpio@20 {
> + compatible = "nxp,pcal6416";
> + reg = <0x20>;
> + #gpio-cells = <2>;
> + gpio-controller;
> +
> + sd-card-on-hog {
> + gpios = <13 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-high;
> + };
> + };
> +
> + pcal6416_i2c3_u171: gpio@21 {
> + compatible = "nxp,pcal6416";
> + reg = <0x21>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + };
> };
>
> i2c@6 {
> reg = <6>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6416_i2c3_u48: gpio@20 {
> + compatible = "nxp,pcal6416";
> + reg = <0x20>;
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + interrupt-parent = <&gpio3>;
> + interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + pinctrl-0 = <&pinctrl_ioexpander_int>;
> + pinctrl-names = "default";
> + };
> };
>
> i2c@7 {
> reg = <7>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6408_i2c3_u172: gpio@20 {
> + compatible = "nxp,pcal6408";
> + reg = <0x20>;
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + interrupt-parent = <&gpio3>;
> + /* shared int pin with u48 */
> + interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + };
> };
> };
> };
> @@ -147,18 +199,59 @@ i2c@1 {
> reg = <1>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6416_i2c6_u50: gpio@21 {
> + compatible = "nxp,pcal6416";
> + reg = <0x21>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + };
> };
>
> i2c@2 {
> reg = <2>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6408_i2c6_u170: gpio@20 {
> + compatible = "nxp,pcal6408";
> + reg = <0x20>;
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + interrupt-parent = <&gpio4>;
> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + pinctrl-0 = <&pinctrl_ioexpander_int2>;
> + pinctrl-names = "default";
> + };
> };
>
> i2c@3 {
> reg = <3>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + pcal6416_i2c6_u44: gpio@20 {
> + compatible = "nxp,pcal6416";
> + reg = <0x20>;
> + #gpio-cells = <2>;
> + gpio-controller;
> +
> + /* eMMC IOMUX selection */
> + sd1-sel-hog {
> + gpios = <0 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-high;
> + };
> +
> + /* SD card IOMUX selection */
> + sd2-sel-hog {
> + gpios = <1 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-high;
> + };
> + };
> };
> };
> };
> @@ -171,6 +264,18 @@ &lpuart1 {
>
> &scmi_iomuxc {
>
> + pinctrl_ioexpander_int2: ioexpanderint2grp {
> + fsl,pins = <
> + IMX94_PAD_CCM_CLKO4__GPIO4_IO3 0x31e
> + >;
> + };
> +
> + pinctrl_ioexpander_int: ioexpanderintgrp {
> + fsl,pins = <
> + IMX94_PAD_GPIO_IO45__GPIO3_IO13 0x31e
> + >;
> + };
> +
> pinctrl_lpi2c3: lpi2c3grp {
> fsl,pins = <
> IMX94_PAD_GPIO_IO16__LPI2C3_SDA 0x40000b9e
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support
2025-05-15 5:18 ` [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support Shengjiu Wang
@ 2025-05-19 18:52 ` Frank Li
0 siblings, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 18:52 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:18:58PM +0800, Shengjiu Wang wrote:
> Add wm8962 sound card which connects to sai1.
Add WM8962 codec connected to SAI1 interface. Or
Enable WM8962 audio codec via SAI1.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx943-evk.dts | 79 ++++++++++++++++++++
> 1 file changed, 79 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index ff6e9ac5477f..da08aaa95904 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -36,6 +36,15 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
> enable-active-high;
> };
>
> + reg_audio_pwr: regulator-wm8962-pwr {
> + compatible = "regulator-fixed";
> + regulator-max-microvolt = <3300000>;
> + regulator-min-microvolt = <3300000>;
> + regulator-name = "audio-pwr";
> + gpio = <&pcal6416_i2c3_u171 12 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> reserved-memory {
> ranges;
> #address-cells = <2>;
> @@ -50,6 +59,21 @@ linux,cma {
> };
> };
>
> + sound-wm8962 {
> + compatible = "fsl,imx-audio-wm8962";
> + audio-codec = <&wm8962>;
> + audio-cpu = <&sai1>;
> + audio-routing = "Headphone Jack", "HPOUTL",
> + "Headphone Jack", "HPOUTR",
> + "Ext Spk", "SPKOUTL",
> + "Ext Spk", "SPKOUTR",
> + "AMIC", "MICBIAS",
> + "IN3R", "AMIC",
> + "IN1R", "AMIC";
> + hp-det-gpio = <&pcal6416_i2c3_u48 14 GPIO_ACTIVE_HIGH>;
> + model = "wm8962-audio";
> + };
> +
> memory@80000000 {
> reg = <0x0 0x80000000 0x0 0x80000000>;
> device_type = "memory";
> @@ -103,6 +127,28 @@ i2c@4 {
> reg = <4>;
> #address-cells = <1>;
> #size-cells = <0>;
> +
> + wm8962: codec@1a {
> + compatible = "wlf,wm8962";
> + reg = <0x1a>;
> + clocks = <&scmi_clk IMX94_CLK_SAI1>;
> + AVDD-supply = <®_audio_pwr>;
> + CPVDD-supply = <®_audio_pwr>;
> + DBVDD-supply = <®_audio_pwr>;
> + DCVDD-supply = <®_audio_pwr>;
> + gpio-cfg = <
> + 0x0000 /* 0:Default */
> + 0x0000 /* 1:Default */
> + 0x0000 /* 2:FN_DMICCLK */
> + 0x0000 /* 3:Default */
> + 0x0000 /* 4:FN_DMICCDAT */
> + 0x0000 /* 5:Default */
> + >;
> + MICVDD-supply = <®_audio_pwr>;
> + PLLVDD-supply = <®_audio_pwr>;
> + SPKVDD1-supply = <®_audio_pwr>;
> + SPKVDD2-supply = <®_audio_pwr>;
> + };
> };
>
> i2c@5 {
> @@ -128,6 +174,12 @@ pcal6416_i2c3_u171: gpio@21 {
> reg = <0x21>;
> #gpio-cells = <2>;
> gpio-controller;
> +
> + audio-pwren-hog {
> + gpios = <12 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-high;
> + };
> };
> };
>
> @@ -262,6 +314,23 @@ &lpuart1 {
> status = "okay";
> };
>
> +&sai1 {
> + assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2>,
> + <&scmi_clk IMX94_CLK_SAI1>;
> + assigned-clock-parents = <0>, <0>, <0>, <0>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>;
> + assigned-clock-rates = <3932160000>,
> + <3612672000>, <393216000>,
> + <361267200>, <12288000>;
> + pinctrl-0 = <&pinctrl_sai1>;
> + pinctrl-names = "default";
> + fsl,sai-mclk-direction-output;
> + status = "okay";
> +};
> +
> &scmi_iomuxc {
>
> pinctrl_ioexpander_int2: ioexpanderint2grp {
> @@ -297,6 +366,16 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
> >;
> };
>
> + pinctrl_sai1: sai1grp {
> + fsl,pins = <
> + IMX94_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e
> + IMX94_PAD_SAI1_TXC__SAI1_TX_BCLK 0x31e
> + IMX94_PAD_SAI1_TXD0__SAI1_TX_DATA0 0x31e
> + IMX94_PAD_SAI1_RXD0__SAI1_RX_DATA0 0x31e
> + IMX94_PAD_I2C2_SDA__SAI1_MCLK 0x31e
> + >;
> + };
> +
> pinctrl_uart1: uart1grp {
> fsl,pins = <
> IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support
2025-05-15 5:18 ` [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support Shengjiu Wang
@ 2025-05-19 18:54 ` Frank Li
0 siblings, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 18:54 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:18:59PM +0800, Shengjiu Wang wrote:
> Add bt-sco sound card, which is used by BT HFP case.
> It supports wb profile as default.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx943-evk.dts | 56 ++++++++++++++++++++
> 1 file changed, 56 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index da08aaa95904..85cec644dd92 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -20,6 +20,11 @@ aliases {
> serial0 = &lpuart1;
> };
>
> + bt_sco_codec: bt-sco-codec {
> + compatible = "linux,bt-sco";
> + #sound-dai-cells = <1>;
> + };
> +
> chosen {
> stdout-path = &lpuart1;
> };
> @@ -59,6 +64,25 @@ linux,cma {
> };
> };
>
> + sound-bt-sco {
> + compatible = "simple-audio-card";
> + simple-audio-card,bitclock-inversion;
> + simple-audio-card,bitclock-master = <&btcpu>;
> + simple-audio-card,format = "dsp_a";
> + simple-audio-card,frame-master = <&btcpu>;
> + simple-audio-card,name = "bt-sco-audio";
> +
> + simple-audio-card,codec {
> + sound-dai = <&bt_sco_codec 1>;
> + };
> +
> + btcpu: simple-audio-card,cpu {
> + dai-tdm-slot-num = <2>;
> + dai-tdm-slot-width = <16>;
> + sound-dai = <&sai3>;
> + };
> + };
> +
> sound-wm8962 {
> compatible = "fsl,imx-audio-wm8962";
> audio-codec = <&wm8962>;
> @@ -290,6 +314,12 @@ pcal6416_i2c6_u44: gpio@20 {
> #gpio-cells = <2>;
> gpio-controller;
>
> + sai3-sel-hog {
> + gpios = <11 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-high;
> + };
> +
> /* eMMC IOMUX selection */
> sd1-sel-hog {
> gpios = <0 GPIO_ACTIVE_HIGH>;
> @@ -331,6 +361,23 @@ &sai1 {
> status = "okay";
> };
>
> +&sai3 {
> + assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2>,
> + <&scmi_clk IMX94_CLK_SAI3>;
> + assigned-clock-parents = <0>, <0>, <0>, <0>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>;
> + assigned-clock-rates = <3932160000>,
> + <3612672000>, <393216000>,
> + <361267200>, <12288000>;
> + pinctrl-0 = <&pinctrl_sai3>;
> + pinctrl-names = "default";
> + fsl,sai-mclk-direction-output;
> + status = "okay";
> +};
> +
> &scmi_iomuxc {
>
> pinctrl_ioexpander_int2: ioexpanderint2grp {
> @@ -376,6 +423,15 @@ IMX94_PAD_I2C2_SDA__SAI1_MCLK 0x31e
> >;
> };
>
> + pinctrl_sai3: sai3grp {
> + fsl,pins = <
> + IMX94_PAD_GPIO_IO42__SAI3_TX_BCLK 0x31e
> + IMX94_PAD_GPIO_IO56__SAI3_TX_SYNC 0x31e
> + IMX94_PAD_GPIO_IO46__SAI3_RX_DATA0 0x31e
> + IMX94_PAD_GPIO_IO47__SAI3_TX_DATA0 0x31e
> + >;
> + };
> +
> pinctrl_uart1: uart1grp {
> fsl,pins = <
> IMX94_PAD_UART1_TXD__LPUART1_TX 0x31e
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone sound card support
2025-05-15 5:19 ` [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone " Shengjiu Wang
@ 2025-05-19 19:09 ` Frank Li
0 siblings, 0 replies; 15+ messages in thread
From: Frank Li @ 2025-05-19 19:09 UTC (permalink / raw)
To: Shengjiu Wang
Cc: robh, krzk+dt, conor+dt, shawnguo, s.hauer, kernel, festevam,
devicetree, imx, linux-arm-kernel, linux-kernel, shengjiu.wang,
carlos.song
On Thu, May 15, 2025 at 01:19:00PM +0800, Shengjiu Wang wrote:
> Add PDM micphone 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: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx943-evk.dts | 60 ++++++++++++++++++++
> 1 file changed, 60 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index 85cec644dd92..c8c3eff9df1a 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -29,6 +29,11 @@ chosen {
> stdout-path = &lpuart1;
> };
>
> + dmic: dmic {
> + compatible = "dmic-codec";
> + #sound-dai-cells = <0>;
> + };
> +
> reg_usdhc2_vmmc: regulator-usdhc2 {
> compatible = "regulator-fixed";
> off-on-delay-us = <12000>;
> @@ -83,6 +88,24 @@ btcpu: simple-audio-card,cpu {
> };
> };
>
> + sound-micfil {
> + compatible = "fsl,imx-audio-card";
> + model = "micfil-audio";
> +
> + pri-dai-link {
> + format = "i2s";
> + link-name = "micfil hifi";
> +
> + codec {
> + sound-dai = <&dmic>;
> + };
> +
> + cpu {
> + sound-dai = <&micfil>;
> + };
> + };
> + };
> +
> sound-wm8962 {
> compatible = "fsl,imx-audio-wm8962";
> audio-codec = <&wm8962>;
> @@ -204,6 +227,12 @@ audio-pwren-hog {
> gpio-hog;
> output-high;
> };
> +
> + mqs-mic-sel-hog {
> + gpios = <11 GPIO_ACTIVE_HIGH>;
> + gpio-hog;
> + output-low;
> + };
> };
> };
>
> @@ -314,6 +343,13 @@ 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;
> @@ -344,6 +380,22 @@ &lpuart1 {
> status = "okay";
> };
>
> +&micfil {
> + assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL2>,
> + <&scmi_clk IMX94_CLK_PDM>;
> + assigned-clock-parents = <0>, <0>, <0>, <0>,
> + <&scmi_clk IMX94_CLK_AUDIOPLL1>;
> + assigned-clock-rates = <3932160000>,
> + <3612672000>, <393216000>,
> + <361267200>, <49152000>;
> + pinctrl-0 = <&pinctrl_pdm>;
> + pinctrl-names = "default";
> + status = "okay";
> +};
> +
> &sai1 {
> assigned-clocks = <&scmi_clk IMX94_CLK_AUDIOPLL1_VCO>,
> <&scmi_clk IMX94_CLK_AUDIOPLL2_VCO>,
> @@ -413,6 +465,14 @@ IMX94_PAD_GPIO_IO28__LPI2C6_SCL 0x40000b9e
> >;
> };
>
> + pinctrl_pdm: pdmgrp {
> + fsl,pins = <
> + IMX94_PAD_PDM_CLK__PDM_CLK 0x31e
> + IMX94_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM0 0x31e
> + IMX94_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM1 0x31e
> + >;
> + };
> +
> pinctrl_sai1: sai1grp {
> fsl,pins = <
> IMX94_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-05-19 19:56 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 5:18 [PATCH 0/6] arm64: dts: imx943: Add sound card support Shengjiu Wang
2025-05-15 5:18 ` [PATCH 1/6] arm64: dts: imx94: Add micfil and mqs device nodes Shengjiu Wang
2025-05-15 10:21 ` Daniel Baluta
2025-05-15 10:23 ` Shengjiu Wang
2025-05-19 18:42 ` Frank Li
2025-05-15 5:18 ` [PATCH 2/6] arm64: dts: imx943-evk: add lpi2c support Shengjiu Wang
2025-05-19 18:44 ` Frank Li
2025-05-15 5:18 ` [PATCH 3/6] arm64: dts: imx943-evk: add i2c io expander support Shengjiu Wang
2025-05-19 18:47 ` Frank Li
2025-05-15 5:18 ` [PATCH 4/6] arm64: dts: imx943-evk: add sound-wm8962 support Shengjiu Wang
2025-05-19 18:52 ` Frank Li
2025-05-15 5:18 ` [PATCH 5/6] arm64: dts: imx943-evk: add bt-sco sound card support Shengjiu Wang
2025-05-19 18:54 ` Frank Li
2025-05-15 5:19 ` [PATCH 6/6] arm64: dts: imx943-evk: Add PDM microphone " Shengjiu Wang
2025-05-19 19:09 ` Frank Li
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).