MediaTek MT8195 ASoC sound card driver

Schema identifier ($id): "http://devicetree.org/schemas/sound/mt8195-mt6359.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Trevor Wu <trevor.wu@mediatek.com>"

This binding describes the MT8195 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,mt8195_mt6359_rt1019_rt5682", "mediatek,mt8195_mt6359_rt1011_rt5682", "mediatek,mt8195_mt6359_max98390_rt5682", "mediatek,mt8195_mt6359"

model — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

User specified audio sound card name

audio-routing — not listed as required here #

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): "Ext Spk", "Headphone", "IN1P", "Left Spk", "Right Spk", "Headphone L", "Headphone R", "Headset Mic", "HPOL", "HPOR", "Left BE_OUT", "Left SPO", "Right BE_OUT", "Right SPO", "Speaker"

mediatek,platform — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

The phandle of MT8195 ASoC platform.

mediatek,dptx-codec — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

The phandle of MT8195 Display Port Tx codec node.

Deprecated (deprecated): true

mediatek,hdmi-codec — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

The phandle of MT8195 HDMI codec node.

Deprecated (deprecated): true

mediatek,adsp — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

The phandle of MT8195 ADSP platform.

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) #

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): "DL_SRC_BE", "DPTX_BE", "ETDM1_IN_BE", "ETDM2_IN_BE", "ETDM1_OUT_BE", "ETDM2_OUT_BE", "ETDM3_OUT_BE", "PCM1_BE"

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 matched by properties or patternProperties in this schema (additionalProperties) #

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) #

mediatek,dptx-codec — not listed as required here #

false — Not permitted by this property rule.

mediatek,hdmi-codec — not listed as required here #

false — Not permitted by this property rule.

Examples (examples) #


sound: mt8195-sound {
    compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
    model = "mt8195_r1019_5682";
    mediatek,platform = <&afe>;
    pinctrl-names = "default";
    pinctrl-0 = <&aud_pins_default>;

    audio-routing =
            "Headphone", "HPOL",
            "Headphone", "HPOR",
            "IN1P", "Headset Mic",
            "Ext Spk", "Speaker";

    mm-dai-link {
            link-name = "ETDM1_IN_BE";
            mediatek,clk-provider = "cpu";
    };

    hs-playback-dai-link {
            link-name = "ETDM1_OUT_BE";
            mediatek,clk-provider = "cpu";
            codec {
                    sound-dai = <&headset_codec>;
            };
    };

    hs-capture-dai-link {
            link-name = "ETDM2_IN_BE";
            mediatek,clk-provider = "cpu";
            codec {
                    sound-dai = <&headset_codec>;
            };
    };

    spk-playback-dai-link {
            link-name = "ETDM2_OUT_BE";
            mediatek,clk-provider = "cpu";
            codec {
                    sound-dai = <&spk_amplifier>;
            };
    };

    hdmi-dai-link {
            link-name = "ETDM3_OUT_BE";
            codec {
                    sound-dai = <&hdmi_tx>;
            };
    };

    displayport-dai-link {
            link-name = "DPTX_BE";
            codec {
                    sound-dai = <&dp_tx>;
            };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 40: Sinks

Line 47: Sources

Line 132: Disallow legacy properties if xxx-dai-link nodes are specified

Edit this page