Mediatek MT8186 with MT6366, DA7219 and MAX98357 ASoC sound card driver
Schema identifier ($id): "http://devicetree.org/schemas/sound/mt8186-mt6366-da7219-max98357.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Jiaxin Yu <jiaxin.yu@mediatek.com>"
This binding describes the MT8186 sound card.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):sound-card-common.yaml#
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "mediatek,mt8186-mt6366-da7219-max98357-sound"
audio-routing — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/non-unique-string-array
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 the input or output widgets of audio components, power supplies, MicBias of codec and the software switch.
Minimum number of items (minItems): 2
Array item rules (items) #
Allowed values (
enum):"HDMI1","Headphones","Line Out","MIC","Speakers","Headset Mic","HPL","HPR","Speaker","TX"
mediatek,platform — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
The phandle of MT8186 ASoC platform.
headset-codec — not listed as required here #
Value type (type): "object"
Deprecated (deprecated): true
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
sound-dai — required here
Maximum number of items (maxItems): 1
Required in this object (required): "sound-dai"
playback-codecs — not listed as required here #
Value type (type): "object"
Deprecated (deprecated): true
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
sound-dai — required here
Array item rules (items)
Item 1
phandle of dp codec
Item 2
phandle of l channel speaker codec
Item 3
phandle of r channel speaker codec
Minimum number of items (minItems): 2
Required in this object (required): "sound-dai"
mediatek,adsp — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
The phandle of MT8186 ADSP platform.
mediatek,dai-link — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string-array
A list of the desired dai-links in the sound card. Each entry is a name defined in the machine driver.
Properties matching a name pattern (patternProperties) #
.*-dai-link$ — name matches this regular expression #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Container for dai-link level properties and CODEC sub-nodes.
Properties and child nodes (properties) #
link-name — required here
Indicates dai-link name and PCM stream name
Array item rules (items)
codec — not listed as required here
Holds subnode which indicates codec dai.
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties)
false
Not allowed by this rule.
Properties and child nodes (properties)
sound-dai — required here
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
Required in this object (required): "sound-dai"
dai-format — not listed as required here
audio format
Array item rules (items)
Allowed values (
enum):"i2s","right_j","left_j","dsp_a","dsp_b"
mediatek,clk-provider — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
Indicates dai-link clock master.
Allowed values (enum): "cpu", "codec"
Required in this object (required): "link-name"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "mediatek,platform"
Condition (if) #
This rule must not match (
not) #Properties matching a name pattern (
patternProperties) #
.*-dai-link$— name matches this regular expression
false— Not permitted by this property rule.
When the condition matches (then) #
Properties and child nodes (
properties) #
headset-codec— not listed as required here #
false— Not permitted by this property rule.
speaker-codecs— not listed as required here #
false— Not permitted by this property rule.
Examples (examples) #
sound: mt8186-sound {
compatible = "mediatek,mt8186-mt6366-da7219-max98357-sound";
model = "mt8186_da7219_m98357";
pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on";
pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>;
mediatek,platform = <&afe>;
audio-routing =
"Headphones", "HPL",
"Headphones", "HPR",
"MIC", "Headset Mic",
"Speakers", "Speaker",
"HDMI1", "TX";
hs-playback-dai-link {
link-name = "I2S0";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&da7219>;
};
};
hs-capture-dai-link {
link-name = "I2S1";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&da7219>;
};
};
spk-dp-playback-dai-link {
link-name = "I2S3";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&anx_bridge_dp>, <&max98357a>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 34: Sinks
Line 41: Sources
Line 140: Disallow legacy properties if xxx-dai-link nodes are specified