Audio codec controlled by ChromeOS EC

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

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

Maintainers (maintainers): "Cheng-Yi Chiang <cychiang@chromium.org>", "Tzung-Bi Shih <tzungbi@kernel.org>"

Google's ChromeOS EC codec is a digital mic codec provided by the Embedded Controller (EC) and is controlled via a host-command interface. An EC codec node should only be found inside the "codecs" subnode of a cros-ec node. (see Documentation/devicetree/bindings/embedded-controller/google,cros-ec.yaml).

All of these rules must match (allOf) #

Rule 1 #

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

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "google,cros-ec-codec"

#sound-dai-cells — required here #

Exact value (const): 1

reg — not listed as required here #

Array item rules (items) #

Item 1

Physical base address and length of shared memory region from EC. It contains 3 unsigned 32-bit integer. The first 2 integers combine to become an unsigned 64-bit physical address. The last one integer is the length of the shared memory.

memory-region — not listed as required here #

Maximum number of items (maxItems): 1

Shared memory region to EC. A "shared-dma-pool". See ../reserved-memory/reserved-memory.txt for details.

Required in this object (required): "compatible", "#sound-dai-cells"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

reserved_mem: reserved-mem@52800000 {
    compatible = "shared-dma-pool";
    reg = <0x52800000 0x100000>;
    no-map;
};
spi {
    #address-cells = <1>;
    #size-cells = <0>;
    cros-ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;
        interrupts = <93 0>;

        codecs {
            #address-cells = <2>;
            #size-cells = <1>;

            cros_ec_codec: ec-codec@10500000 {
                compatible = "google,cros-ec-codec";
                #sound-dai-cells = <1>;
                reg = <0x0 0x10500000 0x80000>;
                memory-region = <&reserved_mem>;
            };

        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page