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
62additionalProperties: false
63
64examples:
65  - |
66    i2c {
67        /* example with i2c support */
68        #address-cells = <1>;
69        #size-cells = <0>;
70        adau7118_codec: audio-codec@14 {
71                compatible = "adi,adau7118";
72                reg = <0x14>;
73                #sound-dai-cells = <0>;
74                iovdd-supply = <&supply>;
75                dvdd-supply = <&supply>;
76                adi,pdm-clk-map = <1 1 0 0>;
77                adi,decimation-ratio = <16>;
78        };
79    };
80
81    /* example with hw standalone mode */
82    adau7118_codec_hw: adau7118-codec-hw {
83            compatible = "adi,adau7118";
84            #sound-dai-cells = <0>;
85            iovdd-supply = <&supply>;
86            dvdd-supply = <&supply>;
87    };
88