Mediatek MT8186 with MT6366, RT1019 and RT5682S ASoC sound card driver
Schema identifier ($id): "http://devicetree.org/schemas/sound/mt8186-mt6366-rt1019-rt5682s.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-rt1019-rt5682s-sound", "mediatek,mt8186-mt6366-rt5682s-max98360-sound", "mediatek,mt8186-mt6366-rt5650-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","Headphone","IN1P","IN1N","Line Out","Speakers","Headset Mic","HPOL","HPOR","Speaker","SPOL","SPOR","TX"
mediatek,platform — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
The phandle of MT8186 ASoC platform.
dmic-gpios — not listed as required here #
Maximum number of items (maxItems): 1
dmic-gpios optional prop for switching between two DMICs. Ex, the GPIO can control a MUX HW component to select dmic clk and data form a Front or Rear dmic.
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
Allowed values (enum): "I2S0", "I2S1", "I2S2", "I2S3"
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
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) #
#include <dt-bindings/gpio/gpio.h>
sound: mt8186-sound {
compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
model = "mt8186_rt1019_rt5682s";
pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on",
"aud_gpio_dmic_sec";
pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>;
pinctrl-2 = <&aud_gpio_dmic_sec>;
mediatek,platform = <&afe>;
dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
audio-routing =
"Headphone", "HPOL",
"Headphone", "HPOR",
"IN1P", "Headset Mic",
"Speakers", "Speaker",
"HDMI1", "TX";
hs-playback-dai-link {
link-name = "I2S0";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682s 0>;
};
};
hs-capture-dai-link {
link-name = "I2S1";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682s 0>;
};
};
spk-hdmi-playback-dai-link {
link-name = "I2S3";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&it6505dptx>, <&rt1019p>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 36: Sinks
Line 44: Sources
Line 139: Disallow legacy properties if xxx-dai-link nodes are specified