ARM: dts: imx6: update spdif sound card node properties

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>
This commit is contained in:
Elinor Montmasson
2024-08-20 13:28:27 +02:00
committed by Shawn Guo
parent 0353e9809e
commit d469b771af
12 changed files with 104 additions and 28 deletions

View File

@@ -127,12 +127,21 @@
};
};
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>;
};
};

View File

@@ -111,12 +111,21 @@
};
};
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>;
};
};

View File

@@ -90,11 +90,16 @@
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>;
};
};

View File

@@ -197,11 +197,20 @@
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";
};

View File

@@ -121,11 +121,16 @@
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>;
};
};

View File

@@ -142,12 +142,21 @@
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";
};

View File

@@ -100,12 +100,17 @@
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 {

View File

@@ -140,12 +140,17 @@
};
};
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>;
};
};

View File

@@ -143,12 +143,17 @@
"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 {

View File

@@ -26,11 +26,16 @@
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 {

View File

@@ -97,11 +97,16 @@
"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>;
};
};

View File

@@ -183,12 +183,17 @@
};
};
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>;
};
};