Renesas R-Car Sound Driver

Schema identifier ($id): "http://devicetree.org/schemas/sound/renesas,rsnd.yaml#"

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

Maintainers (maintainers): "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "renesas,rcar_sound-r8a7778", "renesas,rcar_sound-r8a7779"

Item 2

Exact value (const): "renesas,rcar_sound-gen1"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "renesas,rcar_sound-r8a7742", "renesas,rcar_sound-r8a7743", "renesas,rcar_sound-r8a7744", "renesas,rcar_sound-r8a7745", "renesas,rcar_sound-r8a77470", "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-r8a7793", "renesas,rcar_sound-r8a7794"

Item 2

Exact value (const): "renesas,rcar_sound-gen2"

Rule 3

Array item rules (items)

Item 1

Allowed values (enum): "renesas,rcar_sound-r8a774a1", "renesas,rcar_sound-r8a774b1", "renesas,rcar_sound-r8a774c0", "renesas,rcar_sound-r8a774e1", "renesas,rcar_sound-r8a7795", "renesas,rcar_sound-r8a7796", "renesas,rcar_sound-r8a77961", "renesas,rcar_sound-r8a77965", "renesas,rcar_sound-r8a77990", "renesas,rcar_sound-r8a77995"

Item 2

Exact value (const): "renesas,rcar_sound-gen3"

Rule 4

Array item rules (items)

Item 1

Allowed values (enum): "renesas,rcar_sound-r8a779g0", "renesas,rcar_sound-r8a779h0"

Item 2

Exact value (const): "renesas,rcar_sound-gen4"

Rule 5

Allowed values (enum): "renesas,rcar_sound-gen1", "renesas,rcar_sound-gen2", "renesas,rcar_sound-gen3", "renesas,rcar_sound-gen4"

reg — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

reg-names — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

#sound-dai-cells — not listed as required here #

it must be 0 if your system is using single DAI it must be 1 if your system is using multi DAIs This is used on simple-audio-card

Allowed values (enum): 0, 1

#clock-cells — not listed as required here #

it must be 0 if your system has audio_clkout it must be 1 if your system has audio_clkout0/1/2/3

Allowed values (enum): 0, 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

clock-frequency — not listed as required here #

for audio_clkout0/1/2/3

clkout-lr-asynchronous — not listed as required here #

audio_clkoutn is asynchronizes with lr-clock.

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

power-domains — not listed as required here #

true — No constraints added by this property rule.

resets — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 11

reset-names — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 11

clocks — required here #

References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 31

clock-names — required here #

List of necessary clock names.

port — not listed as required here #

Shared schema rule ($ref): audio-graph-port.yaml#/definitions/port-base

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

^endpoint(@[0-9a-f]+)? — name matches this regular expression

Shared schema rule ($ref): audio-graph-port.yaml#/definitions/endpoint-base

Properties and child nodes (properties)

playback — not listed as required here

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

capture — not listed as required here

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

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

rcar_sound,dvc — not listed as required here #

DVC subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^dvc-[0-1]$ — 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.

Properties and child nodes (properties)

dmas — required here

Maximum number of items (maxItems): 1

dma-names — required here

Exact value (const): "tx"

Required in this object (required): "dmas", "dma-names"

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

false

Not allowed by this rule.

rcar_sound,mix — not listed as required here #

MIX subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^mix-[0-1]$ — 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.

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

false

Not allowed by this rule.

rcar_sound,ctu — not listed as required here #

CTU subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^ctu-[0-7]$ — 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.

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

false

Not allowed by this rule.

rcar_sound,src — not listed as required here #

SRC subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^src-[0-9]$ — 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.

Properties and child nodes (properties)

interrupts — not listed as required here

Maximum number of items (maxItems): 1

dmas — not listed as required here

Maximum number of items (maxItems): 2

dma-names — not listed as required here

All of these rules must match (allOf)

Rule 1

Array item rules (items)

Allowed values (enum): "tx", "rx"

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

false

Not allowed by this rule.

rcar_sound,ssiu — not listed as required here #

SSIU subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^ssiu-[0-9]+$ — 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.

Properties and child nodes (properties)

dmas — required here

Maximum number of items (maxItems): 2

dma-names — required here

All of these rules must match (allOf)

Rule 1

Array item rules (items)

Allowed values (enum): "tx", "rx"

Required in this object (required): "dmas", "dma-names"

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

false

Not allowed by this rule.

rcar_sound,ssi — not listed as required here #

SSI subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^ssi-[0-9]$ — 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.

Properties and child nodes (properties)

interrupts — required here

Maximum number of items (maxItems): 1

dmas — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

dma-names — not listed as required here

All of these rules must match (allOf)

Rule 1

Array item rules (items)

Allowed values (enum): "tx", "rx", "txu", "rxu"

shared-pin — not listed as required here

shared clock pin

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

pio-transfer — not listed as required here

PIO transfer mode

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

no-busif — not listed as required here

BUSIF is not used when [mem -> SSI] via DMA case

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

Required in this object (required): "interrupts"

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

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

rcar_sound,dai(@[0-9a-f]+)?$ — name matches this regular expression #

DAI subnode.

Value type (type): "object"

Properties matching a name pattern (patternProperties) #

^dai([0-9]+)?$ — 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.

Properties and child nodes (properties)

playback — not listed as required here

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

capture — not listed as required here

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

At least one of these rules must match (anyOf)

Rule 1

Required in this object (required): "playback"

Rule 2

Required in this object (required): "capture"

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

false

Not allowed by this rule.

ports(@[0-9a-f]+)?$ — name matches this regular expression #

Shared schema rule ($ref): audio-graph-port.yaml#/definitions/port-base

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

^port(@[0-9a-f]+)?$ — name matches this regular expression

Shared schema rule ($ref): #/properties/port

Required in this object (required): "compatible", "reg", "reg-names", "clocks", "clock-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

Rule for matching array elements (contains)

Exact value (const): "renesas,rcar_sound-gen1"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Maximum number of items (maxItems): 3

reg-names — not listed as required here

Array item rules (items)

Allowed values (enum): "sru", "ssi", "adg"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "renesas,rcar_sound-gen2", "renesas,rcar_sound-gen3"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 5

reg-names — not listed as required here

Array item rules (items)

Allowed values (enum): "scu", "adg", "ssiu", "ssi", "audmapp"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "renesas,rcar_sound-gen4"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Maximum number of items (maxItems): 4

reg-names — not listed as required here

Array item rules (items)

Allowed values (enum): "adg", "ssiu", "ssi", "sdmc"

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "renesas,rcar_sound-gen4"

When the condition matches (then) #

Properties and child nodes (properties)

clock-names — not listed as required here

Maximum number of items (maxItems): 3

Array item rules (items)

Allowed values (enum): "ssi.0", "ssiu.0", "clkin"

When the condition does not match (else) #

Properties and child nodes (properties)

clock-names — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 31

Array item rules (items)

Exactly one of these rules must match (oneOf)

Rule 1

Exact value (const): "ssi-all"

Rule 2

String pattern (pattern): "^ssi\\.[0-9]$"

Rule 3

String pattern (pattern): "^src\\.[0-9]$"

Rule 4

String pattern (pattern): "^mix\\.[0-1]$"

Rule 5

String pattern (pattern): "^ctu\\.[0-1]$"

Rule 6

String pattern (pattern): "^dvc\\.[0-1]$"

Rule 7

String pattern (pattern): "^clk_(a|b|c|i)$"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7790-sysc.h>
rcar_sound: sound@ec500000 {
    #sound-dai-cells = <1>;
    compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2";
    reg = <0xec500000 0x1000>, /* SCU  */
          <0xec5a0000 0x100>,  /* ADG  */
          <0xec540000 0x1000>, /* SSIU */
          <0xec541000 0x280>,  /* SSI  */
          <0xec740000 0x200>;  /* Audio DMAC peri peri*/
    reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";

    clocks = <&cpg CPG_MOD 1005>,                      /* SSI-ALL    */
             <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, /* SSI9, SSI8 */
             <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, /* SSI7, SSI6 */
             <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, /* SSI5, SSI4 */
             <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, /* SSI3, SSI2 */
             <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, /* SSI1, SSI0 */
             <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, /* SRC9, SRC8 */
             <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, /* SRC7, SRC6 */
             <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, /* SRC5, SRC4 */
             <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, /* SRC3, SRC2 */
             <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, /* SRC1, SRC0 */
             <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, /* MIX1, MIX0 */
             <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, /* CTU1, CTU0 */
             <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, /* DVC0, DVC1 */
             <&audio_clk_a>, <&audio_clk_b>,           /* CLKA, CLKB */
             <&audio_clk_c>, <&audio_clk_i>;           /* CLKC, CLKI */

    clock-names = "ssi-all",
                  "ssi.9", "ssi.8",
                  "ssi.7", "ssi.6",
                  "ssi.5", "ssi.4",
                  "ssi.3", "ssi.2",
                  "ssi.1", "ssi.0",
                  "src.9", "src.8",
                  "src.7", "src.6",
                  "src.5", "src.4",
                  "src.3", "src.2",
                  "src.1", "src.0",
                  "mix.1", "mix.0",
                  "ctu.1", "ctu.0",
                  "dvc.0", "dvc.1",
                  "clk_a", "clk_b",
                  "clk_c", "clk_i";

    power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;

    resets = <&cpg 1005>,
             <&cpg 1006>, <&cpg 1007>, <&cpg 1008>, <&cpg 1009>,
             <&cpg 1010>, <&cpg 1011>, <&cpg 1012>, <&cpg 1013>,
             <&cpg 1014>, <&cpg 1015>;
    reset-names = "ssi-all",
                  "ssi.9", "ssi.8", "ssi.7", "ssi.6",
                  "ssi.5", "ssi.4", "ssi.3", "ssi.2",
                  "ssi.1", "ssi.0";

    rcar_sound,dvc {
           dvc0: dvc-0 {
                dmas = <&audma0 0xbc>;
                dma-names = "tx";
           };
           dvc1: dvc-1 {
                dmas = <&audma0 0xbe>;
                dma-names = "tx";
           };
    };

    rcar_sound,mix {
        mix0: mix-0 { };
        mix1: mix-1 { };
    };

    rcar_sound,ctu {
        ctu00: ctu-0 { };
        ctu01: ctu-1 { };
        ctu02: ctu-2 { };
        ctu03: ctu-3 { };
        ctu10: ctu-4 { };
        ctu11: ctu-5 { };
        ctu12: ctu-6 { };
        ctu13: ctu-7 { };
    };

    rcar_sound,src {
        src0: src-0 {
            status = "disabled";
        };
        src1: src-1 {
            interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
            dmas = <&audma0 0x87>, <&audma1 0x9c>;
            dma-names = "rx", "tx";
        };
        /* skip after src-2 */
    };

    rcar_sound,ssiu {
        ssiu00: ssiu-0 {
            dmas = <&audma0 0x15>, <&audma1 0x16>;
            dma-names = "rx", "tx";
        };
        ssiu01: ssiu-1 {
            dmas = <&audma0 0x35>, <&audma1 0x36>;
            dma-names = "rx", "tx";
        };
        /* skip after ssiu-2 */
    };

    rcar_sound,ssi {
        ssi0: ssi-0 {
            interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
            dmas = <&audma0 0x01>, <&audma1 0x02>;
            dma-names = "rx", "tx";
        };
        ssi1: ssi-1 {
            interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
            dmas = <&audma0 0x03>, <&audma1 0x04>;
            dma-names = "rx", "tx";
        };
        /* skip other ssi-2 */
    };

    /* DAI base */
    rcar_sound,dai {
        dai0 {
            playback = <&ssi5>, <&src5>;
            capture = <&ssi6>;
        };
        dai1 {
            playback = <&ssi3>;
        };
        dai2 {
            capture = <&ssi4>;
        };
        dai3 {
            playback = <&ssi7>;
        };
        dai4 {
            capture = <&ssi8>;
        };
    };

    /* assume audio-graph */
    port {
        rsnd_endpoint: endpoint {
            remote-endpoint = <&codec_endpoint>;

            dai-format = "left_j";
            bitclock-master = <&rsnd_endpoint0>;
            frame-master = <&rsnd_endpoint0>;

            playback = <&ssi0>, <&src0>, <&dvc0>;
            capture = <&ssi1>, <&src1>, <&dvc1>;
        };
    };
};

/* assume audio-graph */
codec {
    port {
        codec_endpoint: endpoint {
            remote-endpoint = <&rsnd_endpoint>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 16: for Gen1 SoC

Line 19: R-Car M1A

Line 20: R-Car H1

Line 22: for Gen2 SoC

Line 25: RZ/G1H

Line 26: RZ/G1M

Line 27: RZ/G1N

Line 28: RZ/G1E

Line 29: RZ/G1C

Line 30: R-Car H2

Line 31: R-Car M2-W

Line 32: R-Car M2-N

Line 33: R-Car E2

Line 35: for Gen3 SoC

Line 38: RZ/G2M

Line 39: RZ/G2N

Line 40: RZ/G2E

Line 41: RZ/G2H

Line 42: R-Car H3

Line 43: R-Car M3-W

Line 44: R-Car M3-W+

Line 45: R-Car M3-N

Line 46: R-Car E3

Line 47: R-Car D3

Line 49: for Gen4 SoC

Line 52: R-Car V4H

Line 53: R-Car V4M

Line 55: for Generic

Line 113: details are defined below

Line 115: ports is below

Line 228: if no ssiu node

Line 229: if no ssiu node

Line 245: For DAI base

Line 283: --------------------

Line 284: reg/reg-names

Line 285: --------------------

Line 286: for Gen1

Line 302: for Gen2/Gen3

Line 322: for Gen4

Line 340: --------------------

Line 341: clock-names

Line 342: --------------------

Edit this page