[PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML

Christian Marangi posted 3 patches 1 week, 3 days ago
[PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML
Posted by Christian Marangi 1 week, 3 days ago
Add documentation for Airoha AN7581 AFE YAML schema.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml

diff --git a/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
new file mode 100644
index 000000000000..ebeda0876280
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AN7581 sound card with WM8960 codec
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+allOf:
+  - $ref: sound-card-common.yaml#
+
+properties:
+  compatible:
+    const: airoha,an7581-wm8960-sound
+
+  platform:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of AN7581 platform.
+        maxItems: 1
+    required:
+      - sound-dai
+
+  codec:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of wm8960 codec.
+        maxItems: 1
+    required:
+      - sound-dai
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - audio-routing
+  - platform
+  - codec
+
+examples:
+  - |
+    sound {
+        compatible = "airoha,an7581-wm8960-sound";
+        model = "an7581-wm8960";
+        audio-routing =
+            "Headphone", "HP_L",
+            "Headphone", "HP_R",
+            "LINPUT1", "AMIC",
+            "RINPUT1", "AMIC";
+
+        platform {
+            sound-dai = <&afe>;
+        };
+
+        codec {
+            sound-dai = <&wm8960>;
+        };
+    };
+
+...
-- 
2.51.0
Re: [PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML
Posted by Krzysztof Kozlowski 1 week, 3 days ago
On Fri, Nov 21, 2025 at 06:45:00AM +0100, Christian Marangi wrote:
> Add documentation for Airoha AN7581 AFE YAML schema.

Drop YAML and YAML schema from subbect and commit description. See also
submitting-patches in DT dir. You cannot add documentation for YAML
schema. It's like adding a Linux driver for C code.

> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
>  .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
>  1 file changed, 67 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> new file mode 100644
> index 000000000000..ebeda0876280
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Airoha AN7581 sound card with WM8960 codec
> +
> +maintainers:
> +  - Christian Marangi <ansuelsmth@gmail.com>
> +
> +allOf:
> +  - $ref: sound-card-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: airoha,an7581-wm8960-sound
> +
> +  platform:
> +    type: object
> +    additionalProperties: false
> +    properties:
> +      sound-dai:
> +        description: The phandle of AN7581 platform.
> +        maxItems: 1
> +    required:
> +      - sound-dai
> +
> +  codec:
> +    type: object
> +    additionalProperties: false
> +    properties:
> +      sound-dai:
> +        description: The phandle of wm8960 codec.
> +        maxItems: 1
> +    required:
> +      - sound-dai
> +
> +unevaluatedProperties: false

Please place it after 'required:' block.

> +
> +required:
> +  - compatible
> +  - audio-routing
> +  - platform
> +  - codec

Best regards,
Krzysztof
Re: [PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML
Posted by Christian Marangi 1 week, 3 days ago
On Fri, Nov 21, 2025 at 09:36:10AM +0100, Krzysztof Kozlowski wrote:
> On Fri, Nov 21, 2025 at 06:45:00AM +0100, Christian Marangi wrote:
> > Add documentation for Airoha AN7581 AFE YAML schema.
> 
> Drop YAML and YAML schema from subbect and commit description. See also
> submitting-patches in DT dir. You cannot add documentation for YAML
> schema. It's like adding a Linux driver for C code.
> 
> > 
> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > ---
> >  .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
> >  1 file changed, 67 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> > new file mode 100644
> > index 000000000000..ebeda0876280
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> > @@ -0,0 +1,67 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Airoha AN7581 sound card with WM8960 codec
> > +
> > +maintainers:
> > +  - Christian Marangi <ansuelsmth@gmail.com>
> > +
> > +allOf:
> > +  - $ref: sound-card-common.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: airoha,an7581-wm8960-sound
> > +
> > +  platform:
> > +    type: object
> > +    additionalProperties: false
> > +    properties:
> > +      sound-dai:
> > +        description: The phandle of AN7581 platform.
> > +        maxItems: 1
> > +    required:
> > +      - sound-dai
> > +
> > +  codec:
> > +    type: object
> > +    additionalProperties: false
> > +    properties:
> > +      sound-dai:
> > +        description: The phandle of wm8960 codec.
> > +        maxItems: 1
> > +    required:
> > +      - sound-dai
> > +
> > +unevaluatedProperties: false
> 
> Please place it after 'required:' block.
>

Thanks for the review. Will do!

> > +
> > +required:
> > +  - compatible
> > +  - audio-routing
> > +  - platform
> > +  - codec
> 
> Best regards,
> Krzysztof
> 

-- 
	Ansuel