1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/adi,adau7118.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
8title: Analog Devices ADAU7118 8 Channel PDM to I2S/TDM Converter
9
10maintainers:
11  - Nuno Sá <nuno.sa@analog.com>
12
13description: |
14  Analog Devices ADAU7118 8 Channel PDM to I2S/TDM Converter over I2C or HW
15  standalone mode.
16  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU7118.pdf
17
18properties:
19  compatible:
20    enum:
21      - adi,adau7118
22
23  reg:
24    maxItems: 1
25
26  "#sound-dai-cells":
27    const: 0
28
29  iovdd-supply:
30    description: Digital Input/Output Power Supply.
31
32  dvdd-supply:
33    description: Internal Core Digital Power Supply.
34
35  adi,decimation-ratio:
36    description: |
37      This property set's the decimation ratio of PDM to PCM audio data.
38    allOf:
39      - $ref: /schemas/types.yaml#/definitions/uint32
40      - enum: [64, 32, 16]
41        default: 64
42
43  adi,pdm-clk-map:
44    description: |
45      The ADAU7118 has two PDM clocks for the four Inputs. Each input must be
46      assigned to one of these two clocks. This property set's the mapping
47      between the clocks and the inputs.
48    allOf:
49      - $ref: /schemas/types.yaml#/definitions/uint32-array
50      - minItems: 4
51        maxItems: 4
52        items:
53          maximum: 1
54        default: [0, 0, 1, 1]
55
56required:
57  - "#sound-dai-cells"
58  - compatible
59  - iovdd-supply
60  - dvdd-supply
61
62examples:
63  - |
64    i2c {
65        /* example with i2c support */
66        #address-cells = <1>;
67        #size-cells = <0>;
68        adau7118_codec: audio-codec@14 {
69                compatible = "adi,adau7118";
70                reg = <0x14>;
71                #sound-dai-cells = <0>;
72                iovdd-supply = <&supply>;
73                dvdd-supply = <&supply>;
74                adi,pdm-clk-map = <1 1 0 0>;
75                adi,decimation-ratio = <16>;
76        };
77    };
78
79    /* example with hw standalone mode */
80    adau7118_codec_hw: adau7118-codec-hw {
81            compatible = "adi,adau7118";
82            #sound-dai-cells = <0>;
83            iovdd-supply = <&supply>;
84            dvdd-supply = <&supply>;
85    };
86