xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/sound/google,cros-ec-codec.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Audio codec controlled by ChromeOS EC
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Cheng-Yi Chiang <cychiang@chromium.org>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |
13*4882a593Smuzhiyun  Google's ChromeOS EC codec is a digital mic codec provided by the
14*4882a593Smuzhiyun  Embedded Controller (EC) and is controlled via a host-command
15*4882a593Smuzhiyun  interface.  An EC codec node should only be found inside the "codecs"
16*4882a593Smuzhiyun  subnode of a cros-ec node.
17*4882a593Smuzhiyun  (see Documentation/devicetree/bindings/mfd/google,cros-ec.yaml).
18*4882a593Smuzhiyun
19*4882a593Smuzhiyunproperties:
20*4882a593Smuzhiyun  compatible:
21*4882a593Smuzhiyun    const: google,cros-ec-codec
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  "#sound-dai-cells":
24*4882a593Smuzhiyun    const: 1
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  reg:
27*4882a593Smuzhiyun    items:
28*4882a593Smuzhiyun      - description: |
29*4882a593Smuzhiyun          Physical base address and length of shared memory region from EC.
30*4882a593Smuzhiyun          It contains 3 unsigned 32-bit integer. The first 2 integers
31*4882a593Smuzhiyun          combine to become an unsigned 64-bit physical address.
32*4882a593Smuzhiyun          The last one integer is the length of the shared memory.
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun  memory-region:
35*4882a593Smuzhiyun    $ref: '/schemas/types.yaml#/definitions/phandle'
36*4882a593Smuzhiyun    description: |
37*4882a593Smuzhiyun      Shared memory region to EC.  A "shared-dma-pool".
38*4882a593Smuzhiyun      See ../reserved-memory/reserved-memory.txt for details.
39*4882a593Smuzhiyun
40*4882a593Smuzhiyunrequired:
41*4882a593Smuzhiyun  - compatible
42*4882a593Smuzhiyun  - '#sound-dai-cells'
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunadditionalProperties: false
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunexamples:
47*4882a593Smuzhiyun  - |
48*4882a593Smuzhiyun    reserved_mem: reserved-mem@52800000 {
49*4882a593Smuzhiyun        compatible = "shared-dma-pool";
50*4882a593Smuzhiyun        reg = <0x52800000 0x100000>;
51*4882a593Smuzhiyun        no-map;
52*4882a593Smuzhiyun    };
53*4882a593Smuzhiyun    spi {
54*4882a593Smuzhiyun        #address-cells = <1>;
55*4882a593Smuzhiyun        #size-cells = <0>;
56*4882a593Smuzhiyun        cros-ec@0 {
57*4882a593Smuzhiyun            compatible = "google,cros-ec-spi";
58*4882a593Smuzhiyun            reg = <0>;
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun            codecs {
61*4882a593Smuzhiyun                #address-cells = <2>;
62*4882a593Smuzhiyun                #size-cells = <1>;
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun                cros_ec_codec: ec-codec@10500000 {
65*4882a593Smuzhiyun                    compatible = "google,cros-ec-codec";
66*4882a593Smuzhiyun                    #sound-dai-cells = <1>;
67*4882a593Smuzhiyun                    reg = <0x0 0x10500000 0x80000>;
68*4882a593Smuzhiyun                    memory-region = <&reserved_mem>;
69*4882a593Smuzhiyun                };
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun            };
72*4882a593Smuzhiyun        };
73*4882a593Smuzhiyun    };
74