Allwinner A10 Codec

Schema identifier ($id): "http://devicetree.org/schemas/sound/allwinner,sun4i-a10-codec.yaml#"

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

Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"

Properties and child nodes (properties) #

#sound-dai-cells — required here #

Exact value (const): 0

compatible — required here #

Allowed values (enum): "allwinner,sun4i-a10-codec", "allwinner,sun6i-a31-codec", "allwinner,sun7i-a20-codec", "allwinner,sun8i-a23-codec", "allwinner,sun8i-h3-codec", "allwinner,sun8i-v3s-codec", "allwinner,sun50i-h616-codec", "allwinner,suniv-f1c100s-codec"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Array item rules (items) #

Item 1

Bus Clock

Item 2

Module Clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "codec"

dmas — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

RX DMA Channel

Item 2

TX DMA Channel

Rule 2

Array item rules (items)

Item 1

TX DMA Channel

dma-names — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Exact value (const): "rx"

Item 2

Exact value (const): "tx"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "tx"

resets — not listed as required here #

Maximum number of items (maxItems): 1

allwinner,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.

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

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 18

Array item rules (items) #

Allowed values (enum): "HP", "HPCOM", "LINEIN", "LINEOUT", "MIC1", "MIC2", "MIC3", "MIC", "HBIAS", "MBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Right FM In", "Left FM In", "Mic", "Speaker"

allwinner,codec-analog-controls — not listed as required here #

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

Phandle to the codec analog controls in the PRCM

allwinner,pa-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO to enable the external amplifier

hp-det-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO for headphone/line-out detection

Required in this object (required): "#sound-dai-cells", "compatible", "reg", "interrupts", "clocks", "clock-names", "dmas", "dma-names"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): dai-common.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun6i-a31-codec", "allwinner,sun8i-a23-codec", "allwinner,sun8i-h3-codec", "allwinner,sun8i-v3s-codec"

When the condition matches (then) #

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "allwinner,sun6i-a31-codec"

When the condition matches (then)

Required in this object (required): "resets", "allwinner,audio-routing"

When the condition does not match (else)

Required in this object (required): "resets", "allwinner,audio-routing", "allwinner,codec-analog-controls"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun6i-a31-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "HP", "HPCOM", "LINEIN", "LINEOUT", "MIC1", "MIC2", "MIC3", "HBIAS", "MBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Mic", "Speaker"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun8i-a23-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "HP", "HPCOM", "LINEIN", "MIC1", "MIC2", "HBIAS", "MBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Mic", "Speaker"

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun8i-h3-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "HP", "HPCOM", "LINEIN", "LINEOUT", "MIC1", "MIC2", "HBIAS", "MBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Mic", "Speaker"

Rule 6 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun8i-v3s-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "HP", "HPCOM", "MIC1", "HBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Mic", "Speaker"

Rule 7 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun50i-h616-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "Headphone", "LINEOUT", "Line Out", "Speaker"

dmas — not listed as required here

Array item rules (items)

Item 1

TX DMA Channel

dma-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "tx"

When the condition does not match (else) #

Properties and child nodes (properties)

dmas — not listed as required here

Array item rules (items)

Item 1

RX DMA Channel

Item 2

TX DMA Channel

dma-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "rx"

Item 2

Exact value (const): "tx"

Rule 8 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,suniv-f1c100s-codec"

When the condition matches (then) #

Properties and child nodes (properties)

allwinner,audio-routing — not listed as required here

Array item rules (items)

Allowed values (enum): "HP", "HPCOM", "LINEIN", "LINEOUT", "MIC", "HBIAS", "MBIAS", "Headphone", "Headset Mic", "Line In", "Line Out", "Right FM In", "Left FM In", "Mic", "Speaker"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

codec@1c22c00 {
    #sound-dai-cells = <0>;
    compatible = "allwinner,sun7i-a20-codec";
    reg = <0x01c22c00 0x40>;
    interrupts = <0 30 4>;
    clocks = <&apb0_gates 0>, <&codec_clk>;
    clock-names = "apb", "codec";
    dmas = <&dma 0 19>, <&dma 0 19>;
    dma-names = "rx", "tx";
};
codec@1c22c00 {
    #sound-dai-cells = <0>;
    compatible = "allwinner,sun6i-a31-codec";
    reg = <0x01c22c00 0x98>;
    interrupts = <0 29 4>;
    clocks = <&ccu 61>, <&ccu 135>;
    clock-names = "apb", "codec";
    resets = <&ccu 42>;
    dmas = <&dma 15>, <&dma 15>;
    dma-names = "rx", "tx";
    allwinner,audio-routing =
        "Headphone", "HP",
        "Speaker", "LINEOUT",
        "LINEIN", "Line In",
        "MIC1", "MBIAS",
        "MIC1", "Mic",
        "MIC2", "HBIAS",
        "MIC2", "Headset Mic";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 73: Audio Pins on the SoC

Line 83: Microphone Biases from the SoC

Line 87: Board Connectors

Edit this page