Google SC7280-Herobrine ASoC sound card driver

Schema identifier ($id): "http://devicetree.org/schemas/sound/google,sc7280-herobrine.yaml#"

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

Maintainers (maintainers): "Judy Hsiao <judyhsiao@chromium.org>"

This binding describes the SC7280 sound card which uses LPASS for audio.

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): "google,sc7280-herobrine"

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

Each subnode represents a dai link. Subnodes of each dai links would be cpu/codec dais.

Value type (type): "object"

Properties and child nodes (properties) #

link-name — required here

Indicates dai-link name and PCM stream name.

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

Maximum number of items (maxItems): 1

reg — required here

Maximum number of items (maxItems): 1

dai link address.

cpu — required here

Holds subnode which indicates cpu dai.

Value type (type): "object"

Properties and child nodes (properties)

sound-dai — required here

true — No constraints added by this property rule.

Required in this object (required): "sound-dai"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

codec — required here

Holds subnode which indicates codec dai.

Value type (type): "object"

Properties and child nodes (properties)

sound-dai — required here

true — No constraints added by this property rule.

Required in this object (required): "sound-dai"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

platform — not listed as required here

Holds subnode which includes the phandle of q6apm platform device.

Value type (type): "object"

Properties and child nodes (properties)

sound-dai — required here

Maximum number of items (maxItems): 1

Required in this object (required): "sound-dai"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Required in this object (required): "link-name", "cpu", "codec", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "#address-cells", "#size-cells"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/sound/qcom,lpass.h>
sound {
    compatible = "google,sc7280-herobrine";
    model = "sc7280-wcd938x-max98360a-4dmic";

    audio-routing =
        "IN1_HPHL", "HPHL_OUT",
        "IN2_HPHR", "HPHR_OUT",
        "AMIC1", "MIC BIAS1",
        "AMIC2", "MIC BIAS2",
        "VA DMIC0", "MIC BIAS3",
        "VA DMIC1", "MIC BIAS3",
        "VA DMIC2", "MIC BIAS4",
        "VA DMIC3", "MIC BIAS4",
        "TX SWR_ADC0", "ADC1_OUTPUT",
        "TX SWR_ADC1", "ADC2_OUTPUT",
        "TX SWR_ADC2", "ADC3_OUTPUT",
        "TX SWR_DMIC0", "DMIC1_OUTPUT",
        "TX SWR_DMIC1", "DMIC2_OUTPUT",
        "TX SWR_DMIC2", "DMIC3_OUTPUT",
        "TX SWR_DMIC3", "DMIC4_OUTPUT";

    #address-cells = <1>;
    #size-cells = <0>;

    dai-link@0 {
        link-name = "WCD Playback";
        reg = <LPASS_CDC_DMA_RX0>;
        cpu {
            sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>;
        };

        codec {
            sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>;
        };
    };
    dai-link@1 {
        link-name = "WCD Capture";
        reg = <LPASS_CDC_DMA_TX3>;
        cpu {
            sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>;
        };

        codec {
            sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>;
        };
    };

    dai-link@2 {
        link-name = "MI2S Playback";
        reg = <MI2S_SECONDARY>;
        cpu {
            sound-dai = <&lpass_cpu MI2S_SECONDARY>;
        };

        codec {
            sound-dai = <&max98360a>;
        };
    };

    dai-link@3 {
        link-name = "DMIC Capture";
        reg = <LPASS_CDC_DMA_VA_TX0>;
        cpu {
            sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>;
        };

        codec {
            sound-dai = <&vamacro 0>;
        };
    };

    dai-link@5 {
        link-name = "DP Playback";
        reg = <LPASS_DP_RX>;
        cpu {
            sound-dai = <&lpass_cpu LPASS_DP_RX>;
        };

        codec {
            sound-dai = <&mdss_dp>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page