arm64: dts: imx8mm-beacon: Migrate sound card to simple-audio-card
authorAdam Ford <aford173@gmail.com>
Sun, 8 Oct 2023 14:02:35 +0000 (09:02 -0500)
committerShawn Guo <shawnguo@kernel.org>
Tue, 10 Oct 2023 03:06:01 +0000 (11:06 +0800)
Instead of using a custom glue layer connecting the wm8962 CODEC
to the SAI3 sound-dai, migrate the sound card to simple-audio-card.
This also brings this board in line with the imx8mn-beacon and
imx8mp-beacon.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi

index b10e2a703a44f1fe98de508dbc874a3356f7cb6f..313e93663d6ff117e78665017b5001692cf9e1c3 100644 (file)
                enable-active-high;
        };
 
-       sound {
-               compatible = "fsl,imx-audio-wm8962";
-               model = "wm8962-audio";
-               audio-cpu = <&sai3>;
-               audio-codec = <&wm8962>;
-               audio-routing =
-                       "Headphone Jack", "HPOUTL",
-                       "Headphone Jack", "HPOUTR",
-                       "Ext Spk", "SPKOUTL",
-                       "Ext Spk", "SPKOUTR",
-                       "AMIC", "MICBIAS",
-                       "IN3R", "AMIC";
+       sound-wm8962 {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "wm8962";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,widgets = "Headphone", "Headphones",
+                                           "Microphone", "Headset Mic",
+                                           "Speaker", "Speaker";
+               simple-audio-card,routing = "Headphones", "HPOUTL",
+                                           "Headphones", "HPOUTR",
+                                           "Speaker", "SPKOUTL",
+                                           "Speaker", "SPKOUTR",
+                                           "Headset Mic", "MICBIAS",
+                                           "IN3R", "Headset Mic";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&sai3>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&wm8962>;
+                       clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
+                       frame-master;
+                       bitclock-master;
+               };
        };
 };
 
                        0x0000 /* 4:FN_DMICCDAT */
                        0x0000 /* 5:Default */
                >;
+               #sound-dai-cells = <0>;
        };
 
        pca6416_0: gpio@20 {