]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: imx8dxl-evk: Use audio-graph-card2 for wm8960-2 and wm8960-3
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 17 Mar 2026 05:37:38 +0000 (13:37 +0800)
committerFrank Li <Frank.Li@nxp.com>
Fri, 27 Mar 2026 13:53:22 +0000 (09:53 -0400)
The sound card wm8960-2 and wm8960-3 only support capture mode for the
reason of connection on the EVK board. But fsl-asoc-card don't support
capture_only setting, the sound card creation will fail.

fsl-sai 59060000.sai: Missing dma channel for stream: 0
fsl-sai 59060000.sai: ASoC error (-22): at snd_soc_pcm_component_new() on 59060000.sai
fsl-sai 59070000.sai: Missing dma channel for stream: 0
fsl-sai 59070000.sai: ASoC error (-22): at snd_soc_pcm_component_new() on 59070000.sai

so switch to use audio-graph-card2 which supports 'capture_only'
property for wm8960-2 and wm8960-3 cards.

Fixes: b41c45eb990a ("arm64: dts: imx8dxl-evk: add audio nodes")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
arch/arm64/boot/dts/freescale/imx8dxl-evk.dts

index 5c68d33e19f22ef15348f86d92640a43662403b1..bc62ae5ca812dd3edf60fe4c9c918092f7bbb050 100644 (file)
        };
 
        sound-wm8960-2 {
-               compatible = "fsl,imx-audio-wm8960";
-               model = "wm8960-audio-2";
-               audio-cpu = <&sai2>;
-               audio-codec = <&wm8960_2>;
-               audio-routing = "Headphone Jack", "HP_L",
-                               "Headphone Jack", "HP_R",
-                               "Ext Spk", "SPK_LP",
-                               "Ext Spk", "SPK_LN",
-                               "Ext Spk", "SPK_RP",
-                               "Ext Spk", "SPK_RN",
-                               "LINPUT1", "Mic Jack",
-                               "Mic Jack", "MICB";
+               compatible = "audio-graph-card2";
+               label = "wm8960-audio-2";
+               links = <&sai2_port2>;
+               routing = "Headphones", "HP_L",
+                       "Headphones", "HP_R",
+                       "Ext Spk", "SPK_LP",
+                       "Ext Spk", "SPK_LN",
+                       "Ext Spk", "SPK_RP",
+                       "Ext Spk", "SPK_RN",
+                       "LINPUT1", "Mic Jack",
+                       "Mic Jack", "MICB";
+               widgets = "Headphone", "Headphones",
+                       "Speaker", "Ext Spk",
+                       "Microphone", "Mic Jack";
        };
 
        sound-wm8960-3 {
-               compatible = "fsl,imx-audio-wm8960";
-               model = "wm8960-audio-3";
-               audio-cpu = <&sai3>;
-               audio-codec = <&wm8960_3>;
-               audio-routing = "Headphone Jack", "HP_L",
-                               "Headphone Jack", "HP_R",
-                               "Ext Spk", "SPK_LP",
-                               "Ext Spk", "SPK_LN",
-                               "Ext Spk", "SPK_RP",
-                               "Ext Spk", "SPK_RN",
-                               "LINPUT1", "Mic Jack",
-                               "Mic Jack", "MICB";
+               compatible = "audio-graph-card2";
+               label = "wm8960-audio-3";
+               links = <&sai3_port2>;
+               routing = "Headphones", "HP_L",
+                       "Headphones", "HP_R",
+                       "Ext Spk", "SPK_LP",
+                       "Ext Spk", "SPK_LN",
+                       "Ext Spk", "SPK_RP",
+                       "Ext Spk", "SPK_RN",
+                       "LINPUT1", "Mic Jack",
+                       "Mic Jack", "MICB";
+               widgets = "Headphone", "Headphones",
+                       "Speaker", "Ext Spk",
+                       "Microphone", "Mic Jack";
        };
 };
 
                                DCVDD-supply = <&reg_audio_1v8>;
                                SPKVDD1-supply = <&reg_audio_5v>;
                                SPKVDD2-supply = <&reg_audio_5v>;
+
+                               port {
+                                       capture-only;
+
+                                       wm8960_2_ep: endpoint {
+                                               bitclock-master;
+                                               frame-master;
+                                               remote-endpoint = <&sai2_endpoint2>;
+                                       };
+                               };
                        };
                };
 
                                DCVDD-supply = <&reg_audio_1v8>;
                                SPKVDD1-supply = <&reg_audio_5v>;
                                SPKVDD2-supply = <&reg_audio_5v>;
+
+                               port {
+                                       capture-only;
+
+                                       wm8960_3_ep: endpoint {
+                                               bitclock-master;
+                                               frame-master;
+                                               remote-endpoint = <&sai3_endpoint2>;
+                                       };
+                               };
                        };
                };
 
        pinctrl-0 = <&pinctrl_sai2>;
        fsl,sai-asynchronous;
        status = "okay";
+
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               sai2_port1: port@1 {
+                       reg = <1>;
+                       endpoint { /* not used */ };
+               };
+
+               sai2_port2: port@2 {
+                       reg = <2>;
+                       capture-only;
+
+                       sai2_endpoint2: endpoint {
+                               dai-format = "i2s";
+                               remote-endpoint = <&wm8960_2_ep>;
+                               system-clock-direction-out;
+                       };
+               };
+       };
 };
 
 &sai3 {
        pinctrl-0 = <&pinctrl_sai3>;
        fsl,sai-asynchronous;
        status = "okay";
+
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               sai3_port1: port@1 {
+                       reg = <1>;
+                       endpoint { /* not used */ };
+               };
+
+               sai3_port2: port@2 {
+                       reg = <2>;
+                       capture-only;
+
+                       sai3_endpoint2: endpoint {
+                               dai-format = "i2s";
+                               remote-endpoint = <&wm8960_3_ep>;
+                               system-clock-direction-out;
+                       };
+               };
+       };
 };
 
 &thermal_zones {