]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: dt-bindings: covert mxs-audio-sgtl5000.txt to yaml format
authorFrank Li <Frank.Li@nxp.com>
Wed, 28 May 2025 16:57:54 +0000 (12:57 -0400)
committerMark Brown <broonie@kernel.org>
Sun, 8 Jun 2025 22:34:51 +0000 (23:34 +0100)
Convert mxs-audio-sgtl5000.txt to yaml format.

Additional changes:
- Add compatible string:
    bluegiga,apx4devkit-sgtl5000
    denx,m28evk-sgtl5000
    fsl,imx28-mbmx28lc-sgtl500
- Remove audio-routing from required list.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://patch.msgid.link/20250528165755.692264-1-Frank.Li@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/fsl,mxs-audio-sgtl5000.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/sound/mxs-audio-sgtl5000.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/sound/fsl,mxs-audio-sgtl5000.yaml b/Documentation/devicetree/bindings/sound/fsl,mxs-audio-sgtl5000.yaml
new file mode 100644 (file)
index 0000000..d12774b
--- /dev/null
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,mxs-audio-sgtl5000.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MXS audio complex with SGTL5000 codec
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - bluegiga,apx4devkit-sgtl5000
+          - denx,m28evk-sgtl5000
+          - fsl,imx28-evk-sgtl5000
+          - fsl,imx28-mbmx28lc-sgtl5000
+          - fsl,imx28-tx28-sgtl5000
+      - const: fsl,mxs-audio-sgtl5000
+
+  model:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: The user-visible name of this sound complex
+
+  saif-controllers:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: The phandle list of the MXS SAIF controller
+
+  audio-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: The phandle of the SGTL5000 audio codec
+
+  audio-routing:
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+    description: |
+      A list of the connections between audio components.
+      Each entry is a pair of strings, the first being the
+      connection's sink, the second being the connection's
+      source. Valid names could be power supplies, SGTL5000
+      pins, and the jacks on the board:
+
+      Power supplies:
+        * Mic Bias
+
+      SGTL5000 pins:
+        * MIC_IN
+        * LINE_IN
+        * HP_OUT
+        * LINE_OUT
+
+      Board connectors:
+        * Mic Jack
+        * Line In Jack
+        * Headphone Jack
+        * Line Out Jack
+        * Ext Spk
+
+required:
+  - compatible
+  - saif-controllers
+  - audio-codec
+
+allOf:
+  - $ref: dai-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "fsl,imx28-evk-sgtl5000", "fsl,mxs-audio-sgtl5000";
+        model = "imx28-evk-sgtl5000";
+        saif-controllers = <&saif0 &saif1>;
+        audio-codec = <&sgtl5000>;
+        audio-routing =
+            "MIC_IN", "Mic Jack",
+            "Mic Jack", "Mic Bias",
+            "Headphone Jack", "HP_OUT";
+    };
diff --git a/Documentation/devicetree/bindings/sound/mxs-audio-sgtl5000.txt b/Documentation/devicetree/bindings/sound/mxs-audio-sgtl5000.txt
deleted file mode 100644 (file)
index 4eb980b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-* Freescale MXS audio complex with SGTL5000 codec
-
-Required properties:
-- compatible           : "fsl,mxs-audio-sgtl5000"
-- model                        : The user-visible name of this sound complex
-- saif-controllers     : The phandle list of the MXS SAIF controller
-- audio-codec          : The phandle of the SGTL5000 audio codec
-- audio-routing                : A list of the connections between audio components.
-                         Each entry is a pair of strings, the first being the
-                         connection's sink, the second being the connection's
-                         source. Valid names could be power supplies, SGTL5000
-                         pins, and the jacks on the board:
-
-                         Power supplies:
-                          * Mic Bias
-
-                         SGTL5000 pins:
-                          * MIC_IN
-                          * LINE_IN
-                          * HP_OUT
-                          * LINE_OUT
-
-                         Board connectors:
-                          * Mic Jack
-                          * Line In Jack
-                          * Headphone Jack
-                          * Line Out Jack
-                          * Ext Spk
-
-Example:
-
-sound {
-       compatible = "fsl,imx28-evk-sgtl5000",
-                    "fsl,mxs-audio-sgtl5000";
-       model = "imx28-evk-sgtl5000";
-       saif-controllers = <&saif0 &saif1>;
-       audio-codec = <&sgtl5000>;
-       audio-routing =
-               "MIC_IN", "Mic Jack",
-               "Mic Jack", "Mic Bias",
-               "Headphone Jack", "HP_OUT";
-};