diff mbox series

[v3,10/10] ASoC: dt-bindings: mediatek,mt8196-nau8825: add mt8196-nau8825 document

Message ID 20250514081125.24475-11-darren.ye@mediatek.com
State New
Headers show
Series ASoC: mediatek: Add support for MT8196 SoC | expand

Commit Message

Darren Ye (叶飞) May 14, 2025, 8:11 a.m. UTC
From: Darren Ye <darren.ye@mediatek.com>

Add document for mt8196 board with nau8825.

Signed-off-by: Darren Ye <darren.ye@mediatek.com>
---
 .../sound/mediatek,mt8196-nau8825.yaml        | 115 ++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8196-nau8825.yaml

Comments

Krzysztof Kozlowski May 14, 2025, 10:51 a.m. UTC | #1
On 14/05/2025 10:11, Darren.Ye wrote:


A nit, subject: drop second/last, redundant "document". The
"dt-bindings" prefix is already stating that this is a document.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

> +
> +properties:
> +  compatible:
> +    enum:
> +      - mediatek,mt8196-nau8825-sound
> +      - mediatek,mt8196-rt5682s-sound
> +      - mediatek,mt8196-rt5650-sound
> +
> +  audio-routing:
> +    description:
> +      Valid names could be the input or output widgets of audio components,
> +      power supplies, MicBias of codec and the software switch.

Nothing improved. I asked to drop the property. Why do you need it?
> +
> +  mediatek,platform:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: The phandle of MT8188 ASoC platform.
> +
> +  mediatek,adsp:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      The phandle of the MT8188 ADSP platform, which is the optional Audio DSP
> +      hardware that provides additional audio functionalities if present.
> +      The AFE will link to ADSP when the phandle is provided.
> +

...

> +      codec:
> +        description: Holds subnode which indicates codec dai.
> +        type: object
> +        additionalProperties: false
> +        properties:
> +          sound-dai:
> +            minItems: 1
> +            maxItems: 2
> +        required:
> +          - sound-dai
> +
> +      dai-format:
> +        description: audio format.
> +        items:
> +          enum:
> +            - i2s
> +            - right_j
> +            - left_j
> +            - dsp_a
> +            - dsp_b
> +
> +      mediatek,clk-provider:
> +        $ref: /schemas/types.yaml#/definitions/string
> +        description: Indicates dai-link clock master.
> +        items:

Drop items

> +          enum:
> +            - cpu
> +            - codec
> +
> +    additionalProperties: false
> +
> +    required:
> +      - link-name
> +
> +unevaluatedProperties: false

This goes after required: block.

> +
> +required:
> +  - compatible
> +  - mediatek,platform


Best regards,
Krzysztof
Darren Ye (叶飞) May 15, 2025, 3:50 a.m. UTC | #2
On Wed, 2025-05-14 at 12:51 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 14/05/2025 10:11, Darren.Ye wrote:
> 
> 
> A nit, subject: drop second/last, redundant "document". The
> "dt-bindings" prefix is already stating that this is a document.
> See also:
> 
https://urldefense.com/v3/__https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst*L18__;Iw!!CTRNKA9wMg0ARbw!n2tXtMjEajr9rjHgxY8HrobIrVxtB-rr5xjm626EgyDG7NvXrrcPBhoZZwxgdLatAHHuyyUpD9gF0g$
> 
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - mediatek,mt8196-nau8825-sound
> > +      - mediatek,mt8196-rt5682s-sound
> > +      - mediatek,mt8196-rt5650-sound
> > +
> > +  audio-routing:
> > +    description:
> > +      Valid names could be the input or output widgets of audio
> > components,
> > +      power supplies, MicBias of codec and the software switch.
> 
> Nothing improved. I asked to drop the property. Why do you need it?

> I am so sorry to lose your advice and make up the next version,
thanks. confirm with you again the remove of audio-routing property.
>
> > +
> > +  mediatek,platform:
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> > +    description: The phandle of MT8188 ASoC platform.
> > +
> > +  mediatek,adsp:
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> > +    description:
> > +      The phandle of the MT8188 ADSP platform, which is the
> > optional Audio DSP
> > +      hardware that provides additional audio functionalities if
> > present.
> > +      The AFE will link to ADSP when the phandle is provided.
> > +
> 
> ...
> remove of mediatek,adsp property.
> 
> > +      codec:
> > +        description: Holds subnode which indicates codec dai.
> > +        type: object
> > +        additionalProperties: false
> > +        properties:
> > +          sound-dai:
> > +            minItems: 1
> > +            maxItems: 2
> > +        required:
> > +          - sound-dai
> > +
> > +      dai-format:
> > +        description: audio format.
> > +        items:
> > +          enum:
> > +            - i2s
> > +            - right_j
> > +            - left_j
> > +            - dsp_a
> > +            - dsp_b
> > +
> > +      mediatek,clk-provider:
> > +        $ref: /schemas/types.yaml#/definitions/string
> > +        description: Indicates dai-link clock master.
> > +        items:
> 
> Drop items
>
> Drop items: line
>
> +          enum:
> > +            - cpu
> > +            - codec
> > +
> > +    additionalProperties: false
> > +
> > +    required:
> > +      - link-name
> > +
> > +unevaluatedProperties: false
> 
> This goes after required: block.
> 
> modify as follows 
> required:
>   - compatible
>   - mediatek,platform
>
> unevaluatedProperties: false
>
> Best regards,
> Darren
>
> > +
> > +required:
> > +  - compatible
> > +  - mediatek,platform
> 
> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8196-nau8825.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8196-nau8825.yaml
new file mode 100644
index 000000000000..8f9aa8b816e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8196-nau8825.yaml
@@ -0,0 +1,115 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8196-nau8825.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT8196 ASoC sound card
+
+maintainers:
+  - Darren Ye <darren.ye@mediatek.com>
+
+allOf:
+  - $ref: sound-card-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8196-nau8825-sound
+      - mediatek,mt8196-rt5682s-sound
+      - mediatek,mt8196-rt5650-sound
+
+  audio-routing:
+    description:
+      Valid names could be the input or output widgets of audio components,
+      power supplies, MicBias of codec and the software switch.
+
+  mediatek,platform:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: The phandle of MT8188 ASoC platform.
+
+  mediatek,adsp:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      The phandle of the MT8188 ADSP platform, which is the optional Audio DSP
+      hardware that provides additional audio functionalities if present.
+      The AFE will link to ADSP when the phandle is provided.
+
+patternProperties:
+  "^dai-link-[0-9]+$":
+    type: object
+    description:
+      Container for dai-link level properties and CODEC sub-nodes.
+
+    properties:
+      link-name:
+        description:
+          This property corresponds to the name of the BE dai-link to which
+          we are going to update parameters in this node.
+        items:
+          enum:
+            - TDM_DPTX_BE
+            - I2SOUT6_BE
+            - I2SIN6_BE
+            - I2SOUT4_BE
+            - I2SOUT3_BE
+
+      codec:
+        description: Holds subnode which indicates codec dai.
+        type: object
+        additionalProperties: false
+        properties:
+          sound-dai:
+            minItems: 1
+            maxItems: 2
+        required:
+          - sound-dai
+
+      dai-format:
+        description: audio format.
+        items:
+          enum:
+            - i2s
+            - right_j
+            - left_j
+            - dsp_a
+            - dsp_b
+
+      mediatek,clk-provider:
+        $ref: /schemas/types.yaml#/definitions/string
+        description: Indicates dai-link clock master.
+        items:
+          enum:
+            - cpu
+            - codec
+
+    additionalProperties: false
+
+    required:
+      - link-name
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - mediatek,platform
+
+examples:
+  - |
+    sound {
+        compatible = "mediatek,mt8196-nau8825-sound";
+        model = "mt8196-nau8825";
+        mediatek,platform = <&afe>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&aud_pins_default>;
+        dai-link-0 {
+            link-name = "I2SOUT6_BE";
+            dai-format = "i2s";
+            mediatek,clk-provider = "cpu";
+            codec {
+                sound-dai = <&nau8825>;
+            };
+        };
+    };
+
+...