]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: dts: imx6: update spdif sound card node properties
authorElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Tue, 20 Aug 2024 11:28:27 +0000 (13:28 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sun, 1 Sep 2024 01:15:50 +0000 (09:15 +0800)
The merge of imx-spdif driver into fsl-asoc-card brought
new DT properties that can be used with the "fsl,imx-audio-spdif"
compatible:
* The "spdif-controller" property from imx-spdif is named "audio-cpu"
  in fsl-asoc-card.
* fsl-asoc-card uses codecs explicitly declared in DT
  with "audio-codec".
  With an S/PDIF, codec drivers spdif_transmitter and
  spdif_receiver should be used.
  Driver imx-spdif used instead the dummy codec and a pair of
  boolean properties, "spdif-in" and "spdif-out".

While backward compatibility is kept to support properties
"spdif-controller", "spdif-in" and "spdif-out", using new properties has
several benefits:
* "audio-cpu" and "audio-codec" are more generic names reflecting
  that the fsl-asoc-card driver supports multiple hardware.
  They are properties already used by devices using the
  fsl-asoc-card driver.
  They are also similar to properties of simple-card: "cpu" and "codec".
* "spdif-in" and "spdif-out" imply the use of the dummy codec in the
  driver. However, there are already two codec drivers for the S/PDIF,
  spdif_transmitter and spdif_receiver.
  It is better to declare S/PDIF Tx and Rx devices in a DT, and then
  reference them with "audio-codec" than using the dummy codec.

For those reasons, this commit updates in-tree DTs to use the new
properties:
* Rename "spdif-controller" property to "audio-cpu".
* Declare S/PDIF transmitter and/or receiver devices, and use them with
  the "audio-codec" property instead of "spdif-out" and/or "spdif-in".

These modifications were tested only on an imx8mn-evk board.

Note that out-of-tree and old DTs are still supported.

Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
12 files changed:
arch/arm/boot/dts/nxp/imx/imx6q-cm-fx6.dts
arch/arm/boot/dts/nxp/imx/imx6q-prti6q.dts
arch/arm/boot/dts/nxp/imx/imx6q-tbs2910.dts
arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-apf6dev.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-colibri.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-cubox-i.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-wandboard.dtsi
arch/arm/boot/dts/nxp/imx/imx6sx-sabreauto.dts
arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi

index 95b49fc83f7be9ad359a9f6d5f07ec3185c630ab..299106fbe51c4ac1e9e0a70a4ec12e16b8110497 100644 (file)
                };
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-out;
-               spdif-in;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>, <&spdif_in>;
        };
 };
 
index a7d5693c5ab75257ed916578a52036b82739a3d6..8d2b608e0b90fcc8e75c19575da972fa6232114c 100644 (file)
                };
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-in;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>, <&spdif_in>;
        };
 };
 
index 7c298d9aa21e10f4ae445a0f701630dc0192b5f8..5353a0c24420504470b8b095eb7506e7713319c2 100644 (file)
                ssi-controller = <&ssi1>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "On-board SPDIF";
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 };
 
index ea40623d12e5fddc11b2af150ca6a80af93510a3..edf55760a5c1a20919d0d85eed5ec861f2eb0884 100644 (file)
                ssi-controller = <&ssi1>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        sound_spdif: sound-spdif {
                compatible = "fsl,imx-audio-spdif";
-               spdif-controller = <&spdif>;
-               spdif-in;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>, <&spdif_in>;
                model = "imx-spdif";
                status = "disabled";
        };
index 3a46ade3b6bd93ba9cc54861d88791eef9e2ae76..9e97ef5e43f2736ade8c3380d2bebe14fb8acc30 100644 (file)
                mux-ext-port = <3>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 };
 
index d3a7a6eeb8e09edff6963de86527e13899e3c956..b01670cdd52c389b37c23a9d25079d001e8c021f 100644 (file)
                ssi-controller = <&ssi1>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        /* Optional S/PDIF in on SODIMM 88 and out on SODIMM 90, 137 or 168 */
        sound_spdif: sound-spdif {
                compatible = "fsl,imx-audio-spdif";
-               spdif-controller = <&spdif>;
-               spdif-in;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>, <&spdif_in>;
                model = "imx-spdif";
                status = "disabled";
        };
index 761566ae3cf5c0360db9bbc0a790ebe64b9f318d..bd66430c1d78d0731bf5221701642aec7762e8a9 100644 (file)
                vin-supply = <&v_5v0>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "Integrated SPDIF";
                /* IMX6 doesn't implement this yet */
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 
        gpio-keys {
index a955c77cd4998a56d6ee5e94eb0de7835b974291..d1ad65ab6b72ed464712e77b77c67ad95ca5759b 100644 (file)
                };
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "On-board SPDIF";
                /* IMX6 doesn't implement this yet */
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 };
 
index 0a3deaf92eeab9f69e17dc4221b49f57bd8db4d0..55fb7b90422096b33682189bda4121c485afd869 100644 (file)
                        "AIN2R", "Line In Jack";
        };
 
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-sabreauto-spdif",
                             "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-in;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_in>;
        };
 
        backlight {
index 38abb6b50f6cbc9ed76ccddfeeb682c22a2e3b55..7130b9c3b3aa052944b2e25ba15fdcb1add57901 100644 (file)
                mux-ext-port = <3>;
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 
        reg_1p5v: regulator-1p5v {
index b0c27b9b02446b400c7eebe69fb0b6350d61d84b..dfbfb8119bf3b6e802f63415d7105adb8f9b3e97 100644 (file)
                        "AIN2R", "Line In Jack";
        };
 
+       spdif_in: spdif-in {
+               compatible = "linux,spdif-dir";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-in;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_in>;
        };
 };
 
index 7d4170c2773284d09ca29fa162f447844e06fef0..277a6e039045b5750d23e35f0896d5eefa85e43b 100644 (file)
                };
        };
 
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        sound-spdif {
                compatible = "fsl,imx6sx-sdb-spdif",
                             "fsl,imx-audio-spdif";
                model = "imx-spdif";
-               spdif-controller = <&spdif>;
-               spdif-out;
+               audio-cpu = <&spdif>;
+               audio-codec = <&spdif_out>;
        };
 
 };