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,max98396.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices MAX98396 Speaker Amplifier Device Tree Bindings
8
9maintainers:
10  - Ryan Lee <ryans.lee@analog.com>
11
12description:
13  The MAX98396 is a mono Class-DG speaker amplifier with I/V sense.
14  The device provides a PCM interface for audio data and a standard
15  I2C interface for control data communication.
16  The MAX98397 is a variant of MAX98396 with wide input supply range.
17
18properties:
19  compatible:
20    enum:
21      - adi,max98396
22      - adi,max98397
23  reg:
24    maxItems: 1
25    description: I2C address of the device.
26
27  avdd-supply:
28    description: A 1.8V supply that powers up the AVDD pin.
29
30  dvdd-supply:
31    description: A 1.2V supply that powers up the DVDD pin.
32
33  dvddio-supply:
34    description: A 1.2V or 1.8V supply that powers up the VDDIO pin.
35
36  pvdd-supply:
37    description: A 3.0V to 20V supply that powers up the PVDD pin.
38
39  vbat-supply:
40    description: A 3.3V to 5.5V supply that powers up the VBAT pin.
41
42  adi,vmon-slot-no:
43    description: slot number of the voltage sense monitor
44    $ref: "/schemas/types.yaml#/definitions/uint32"
45    minimum: 0
46    maximum: 15
47    default: 0
48
49  adi,imon-slot-no:
50    description: slot number of the current sense monitor
51    $ref: "/schemas/types.yaml#/definitions/uint32"
52    minimum: 0
53    maximum: 15
54    default: 1
55
56  adi,spkfb-slot-no:
57    description: slot number of speaker DSP monitor
58    $ref: "/schemas/types.yaml#/definitions/uint32"
59    minimum: 0
60    maximum: 15
61    default: 2
62
63  adi,bypass-slot-no:
64    description:
65      Selects the PCM data input channel that is routed to the speaker
66      audio processing bypass path.
67    $ref: "/schemas/types.yaml#/definitions/uint32"
68    minimum: 0
69    maximum: 15
70    default: 0
71
72  adi,interleave-mode:
73    description:
74      For cases where a single combined channel for the I/V sense data
75      is not sufficient, the device can also be configured to share
76      a single data output channel on alternating frames.
77      In this configuration, the current and voltage data will be frame
78      interleaved on a single output channel.
79    type: boolean
80
81  reset-gpios:
82    maxItems: 1
83
84required:
85  - compatible
86  - reg
87
88additionalProperties: false
89
90examples:
91  - |
92    #include <dt-bindings/gpio/gpio.h>
93    i2c {
94        #address-cells = <1>;
95        #size-cells = <0>;
96        max98396: amplifier@39 {
97            compatible = "adi,max98396";
98            reg = <0x39>;
99            dvdd-supply = <&regulator_1v2>;
100            dvddio-supply = <&regulator_1v8>;
101            avdd-supply = <&regulator_1v8>;
102            pvdd-supply = <&regulator_pvdd>;
103            adi,vmon-slot-no = <0>;
104            adi,imon-slot-no = <1>;
105            reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
106        };
107    };
108