From: Darren Ye <darren.ye@mediatek.com>
Add document for mt8196 board with mt6681.
Signed-off-by: Darren Ye <darren.ye@mediatek.com>
---
.../sound/mediatek,mt8196-mt6681.yaml | 114 ++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8196-mt6681.yaml
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8196-mt6681.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8196-mt6681.yaml
new file mode 100644
index 000000000000..2c1b0df05c27
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8196-mt6681.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8196-mt6681.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:
+ oneOf:
+ - enum:
+ - mediatek,mt8196-mt6681-sound
+ - 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-mt6681-sound";
+ model = "mt8196-mt6681";
+ mediatek,platform = <&afe>;
+ dai-link-0 {
+ link-name = "I2SOUT6_BE";
+ dai-format = "i2s";
+ mediatek,clk-provider = "cpu";
+ codec {
+ sound-dai = <&nau8825>;
+ };
+ };
+ };
+
--
2.45.2
On 07/04/2025 14:06, Darren.Ye wrote:
> +
> +allOf:
> + - $ref: sound-card-common.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
Drop
> + - enum:
> + - mediatek,mt8196-mt6681-sound
> + - 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.
> +
Everything looks here exactly the same as mt8188-mt6359, except accdet.
Are you sure, really, really sure these are different and you do not
have accdet?
> + 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-mt6681-sound";
> + model = "mt8196-mt6681";
> + mediatek,platform = <&afe>;
Make the example complete.
Best regards,
Krzysztof
On Mon, 2025-04-07 at 15:12 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 07/04/2025 14:06, Darren.Ye wrote:
> > +
> > +allOf:
> > + - $ref: sound-card-common.yaml#
> > +
> > +properties:
> > + compatible:
> > + oneOf:
>
> Drop
Drop oneOf ?
>
> > + - enum:
> > + - mediatek,mt8196-mt6681-sound
> > + - 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.
> > +
>
> Everything looks here exactly the same as mt8188-mt6359, except
> accdet.
> Are you sure, really, really sure these are different and you do not
> have accdet?
yes, it's the same as mt8188-mt6359, but mt8196 platform don't support
pmic codec, so do not have accdet.
>
> > + 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-mt6681-sound";
> > + model = "mt8196-mt6681";
> > + mediatek,platform = <&afe>;
>
> Make the example complete.
mt8196 pinctrl in mt8196-afe, does it have to be set in the machine
driver?
>
>
>
> Best regards,
> Krzysztof
On 14/04/2025 09:08, Darren Ye (叶飞) wrote:
> On Mon, 2025-04-07 at 15:12 +0200, Krzysztof Kozlowski wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>>
>> On 07/04/2025 14:06, Darren.Ye wrote:
>>> +
>>> +allOf:
>>> + - $ref: sound-card-common.yaml#
>>> +
>>> +properties:
>>> + compatible:
>>> + oneOf:
>>
>> Drop
>
> Drop oneOf ?
Yes
>>> +
>>> +examples:
>>> + - |
>>> + sound {
>>> + compatible = "mediatek,mt8196-mt6681-sound";
>>> + model = "mt8196-mt6681";
>>> + mediatek,platform = <&afe>;
>>
>> Make the example complete.
> mt8196 pinctrl in mt8196-afe, does it have to be set in the machine
> driver?
I don't understand what do you ask me. Machine driver is not relevant to
this and I did not mention it. You have in the binding few properties
which are not present in DTS example. Why?
Best regards,
Krzysztof
© 2016 - 2026 Red Hat, Inc.