diff mbox series

[v2,1/3] ASoC: dt-bindings: mt6358: Convert to dtschema

Message ID 20240617-mt6358-v2-1-5d9f0e99941e@gmail.com (mailing list archive)
State New
Headers show
Series Mediatek MT6358 dt-binding documentation conversion and fixes | expand

Commit Message

Kartik Agarwala June 17, 2024, 12:28 p.m. UTC
Convert from txt to dtschema
---
 .../devicetree/bindings/sound/mediatek,mt6358.yaml | 51 ++++++++++++++++++++++
 Documentation/devicetree/bindings/sound/mt6358.txt | 26 -----------
 2 files changed, 51 insertions(+), 26 deletions(-)

Comments

AngeloGioacchino Del Regno June 18, 2024, 10:53 a.m. UTC | #1
Il 17/06/24 14:28, Kartik Agarwala ha scritto:
> Convert from txt to dtschema
> ---
>   .../devicetree/bindings/sound/mediatek,mt6358.yaml | 51 ++++++++++++++++++++++
>   Documentation/devicetree/bindings/sound/mt6358.txt | 26 -----------
>   2 files changed, 51 insertions(+), 26 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
> new file mode 100644
> index 000000000..336d2d969
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/mediatek,mt6358.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek MT6358 Audio Codec

title: MediaTek MT6358/MT6366 Audio Codec

> +
> +maintainers:
> +  - Kartik Agarwala <agarwala.kartik@gmail.com>

   - Jiaxin Yu <jiaxin.yu@mediatek.com>


> +
> +description:
> +  The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
> +  For more detail, please visit Mediatek PMIC wrapper documentation.
> +  Must be a child node of PMIC wrapper.
> +

   The communication between MT6358 or MT6366 and SoC happens through
   the MediaTek PMIC Wrapper.
   For more detail, please visit MediaTek PMIC wrapper documentation:
   Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
   Must be a child node of a PMIC.

> +properties:
> +  compatible:
> +    oneOf:
> +      - const: mediatek,mt6358-sound
> +      - const: mediatek,mt6366-sound

This should be an enum.

> +      - items:
> +          - const: mediatek,mt6366-sound
> +          - const: mediatek,mt6358-sound
> +
> +  Avdd-supply:
> +    description: power source of AVDD
> +
> +  mediatek,dmic-mode:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Indicates how many data pins are used to transmit two channels of PDM
> +      signal. 0 means two wires, 1 means one wire. Default value is 0.
> +    default: 0
> +    enum:

enum: [ 0, 1 ]

> +      - 0
> +      - 1
> +

Regards,
Angelo

> +required:
> +  - compatible
> +  - Avdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    audio-codec {
> +        compatible = "mediatek,mt6366-sound";
> +        Avdd-supply = <&mt6358_vaud28_reg>;
> +        mediatek,dmic-mode = <0>;
> +    };
> diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
> deleted file mode 100644
> index fbe9e55c6..000000000
> --- a/Documentation/devicetree/bindings/sound/mt6358.txt
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -Mediatek MT6358 Audio Codec
> -
> -The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
> -For more detail, please visit Mediatek PMIC wrapper documentation.
> -
> -Must be a child node of PMIC wrapper.
> -
> -Required properties:
> -
> -- compatible - "string" - One of:
> -    "mediatek,mt6358-sound"
> -    "mediatek,mt6366-sound"
> -- Avdd-supply : power source of AVDD
> -
> -Optional properties:
> -- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
> -	channels of PDM signal. 0 means two wires, 1 means one wire. Default
> -	value is 0.
> -
> -Example:
> -
> -mt6358_snd {
> -	compatible = "mediatek,mt6358-sound";
> -	Avdd-supply = <&mt6358_vaud28_reg>;
> -	mediatek,dmic-mode = <0>;
> -};
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
new file mode 100644
index 000000000..336d2d969
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt6358.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6358 Audio Codec
+
+maintainers:
+  - Kartik Agarwala <agarwala.kartik@gmail.com>
+
+description:
+  The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
+  For more detail, please visit Mediatek PMIC wrapper documentation.
+  Must be a child node of PMIC wrapper.
+
+properties:
+  compatible:
+    oneOf:
+      - const: mediatek,mt6358-sound
+      - const: mediatek,mt6366-sound
+      - items:
+          - const: mediatek,mt6366-sound
+          - const: mediatek,mt6358-sound
+
+  Avdd-supply:
+    description: power source of AVDD
+
+  mediatek,dmic-mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Indicates how many data pins are used to transmit two channels of PDM
+      signal. 0 means two wires, 1 means one wire. Default value is 0.
+    default: 0
+    enum:
+      - 0
+      - 1
+
+required:
+  - compatible
+  - Avdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    audio-codec {
+        compatible = "mediatek,mt6366-sound";
+        Avdd-supply = <&mt6358_vaud28_reg>;
+        mediatek,dmic-mode = <0>;
+    };
diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
deleted file mode 100644
index fbe9e55c6..000000000
--- a/Documentation/devicetree/bindings/sound/mt6358.txt
+++ /dev/null
@@ -1,26 +0,0 @@ 
-Mediatek MT6358 Audio Codec
-
-The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
-For more detail, please visit Mediatek PMIC wrapper documentation.
-
-Must be a child node of PMIC wrapper.
-
-Required properties:
-
-- compatible - "string" - One of:
-    "mediatek,mt6358-sound"
-    "mediatek,mt6366-sound"
-- Avdd-supply : power source of AVDD
-
-Optional properties:
-- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
-	channels of PDM signal. 0 means two wires, 1 means one wire. Default
-	value is 0.
-
-Example:
-
-mt6358_snd {
-	compatible = "mediatek,mt6358-sound";
-	Avdd-supply = <&mt6358_vaud28_reg>;
-	mediatek,dmic-mode = <0>;
-};