xref: /freebsd/sys/contrib/device-tree/Bindings/sound/adi,adau7118.yaml (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
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    $ref: /schemas/types.yaml#/definitions/uint32
39    enum: [64, 32, 16]
40    default: 64
41
42  adi,pdm-clk-map:
43    description: |
44      The ADAU7118 has two PDM clocks for the four Inputs. Each input must be
45      assigned to one of these two clocks. This property set's the mapping
46      between the clocks and the inputs.
47    $ref: /schemas/types.yaml#/definitions/uint32-array
48    minItems: 4
49    maxItems: 4
50    items:
51      maximum: 1
52    default: [0, 0, 1, 1]
53
54required:
55  - "#sound-dai-cells"
56  - compatible
57  - iovdd-supply
58  - dvdd-supply
59
60additionalProperties: false
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