Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / sound / adi,max98388.yaml
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,max98388.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Analog Devices MAX98388 Speaker Amplifier
8
9 maintainers:
10   - Ryan Lee <ryans.lee@analog.com>
11
12 description:
13   The MAX98388 is a mono Class-D speaker amplifier with I/V feedback.
14   The device provides a PCM interface for audio data and a standard
15   I2C interface for control data communication.
16
17 allOf:
18   - $ref: dai-common.yaml#
19
20 properties:
21   compatible:
22     enum:
23       - adi,max98388
24
25   reg:
26     maxItems: 1
27
28   '#sound-dai-cells':
29     const: 0
30
31   adi,vmon-slot-no:
32     description: slot number of the voltage feedback monitor
33     $ref: /schemas/types.yaml#/definitions/uint32
34     minimum: 0
35     maximum: 15
36     default: 0
37
38   adi,imon-slot-no:
39     description: slot number of the current feedback monitor
40     $ref: /schemas/types.yaml#/definitions/uint32
41     minimum: 0
42     maximum: 15
43     default: 1
44
45   adi,interleave-mode:
46     description:
47       For cases where a single combined channel for the I/V feedback data
48       is not sufficient, the device can also be configured to share
49       a single data output channel on alternating frames.
50       In this configuration, the current and voltage data will be frame
51       interleaved on a single output channel.
52     type: boolean
53
54   reset-gpios:
55     maxItems: 1
56
57 required:
58   - compatible
59   - reg
60   - '#sound-dai-cells'
61
62 unevaluatedProperties: false
63
64 examples:
65   - |
66     #include <dt-bindings/gpio/gpio.h>
67     i2c {
68         #address-cells = <1>;
69         #size-cells = <0>;
70         max98388: amplifier@39 {
71             compatible = "adi,max98388";
72             reg = <0x39>;
73             #sound-dai-cells = <0>;
74             adi,vmon-slot-no = <0>;
75             adi,imon-slot-no = <1>;
76             adi,interleave-mode;
77             reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
78         };
79     };