xref: /freebsd/sys/contrib/device-tree/Bindings/sound/adi,max98388.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*f126890aSEmmanuel Vadot%YAML 1.2
3*f126890aSEmmanuel Vadot---
4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/adi,max98388.yaml#
5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadottitle: Analog Devices MAX98388 Speaker Amplifier
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadotmaintainers:
10*f126890aSEmmanuel Vadot  - Ryan Lee <ryans.lee@analog.com>
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadotdescription:
13*f126890aSEmmanuel Vadot  The MAX98388 is a mono Class-D speaker amplifier with I/V feedback.
14*f126890aSEmmanuel Vadot  The device provides a PCM interface for audio data and a standard
15*f126890aSEmmanuel Vadot  I2C interface for control data communication.
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel VadotallOf:
18*f126890aSEmmanuel Vadot  - $ref: dai-common.yaml#
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadotproperties:
21*f126890aSEmmanuel Vadot  compatible:
22*f126890aSEmmanuel Vadot    enum:
23*f126890aSEmmanuel Vadot      - adi,max98388
24*f126890aSEmmanuel Vadot
25*f126890aSEmmanuel Vadot  reg:
26*f126890aSEmmanuel Vadot    maxItems: 1
27*f126890aSEmmanuel Vadot
28*f126890aSEmmanuel Vadot  '#sound-dai-cells':
29*f126890aSEmmanuel Vadot    const: 0
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot  adi,vmon-slot-no:
32*f126890aSEmmanuel Vadot    description: slot number of the voltage feedback monitor
33*f126890aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
34*f126890aSEmmanuel Vadot    minimum: 0
35*f126890aSEmmanuel Vadot    maximum: 15
36*f126890aSEmmanuel Vadot    default: 0
37*f126890aSEmmanuel Vadot
38*f126890aSEmmanuel Vadot  adi,imon-slot-no:
39*f126890aSEmmanuel Vadot    description: slot number of the current feedback monitor
40*f126890aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
41*f126890aSEmmanuel Vadot    minimum: 0
42*f126890aSEmmanuel Vadot    maximum: 15
43*f126890aSEmmanuel Vadot    default: 1
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot  adi,interleave-mode:
46*f126890aSEmmanuel Vadot    description:
47*f126890aSEmmanuel Vadot      For cases where a single combined channel for the I/V feedback data
48*f126890aSEmmanuel Vadot      is not sufficient, the device can also be configured to share
49*f126890aSEmmanuel Vadot      a single data output channel on alternating frames.
50*f126890aSEmmanuel Vadot      In this configuration, the current and voltage data will be frame
51*f126890aSEmmanuel Vadot      interleaved on a single output channel.
52*f126890aSEmmanuel Vadot    type: boolean
53*f126890aSEmmanuel Vadot
54*f126890aSEmmanuel Vadot  reset-gpios:
55*f126890aSEmmanuel Vadot    maxItems: 1
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadotrequired:
58*f126890aSEmmanuel Vadot  - compatible
59*f126890aSEmmanuel Vadot  - reg
60*f126890aSEmmanuel Vadot  - '#sound-dai-cells'
61*f126890aSEmmanuel Vadot
62*f126890aSEmmanuel VadotunevaluatedProperties: false
63*f126890aSEmmanuel Vadot
64*f126890aSEmmanuel Vadotexamples:
65*f126890aSEmmanuel Vadot  - |
66*f126890aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
67*f126890aSEmmanuel Vadot    i2c {
68*f126890aSEmmanuel Vadot        #address-cells = <1>;
69*f126890aSEmmanuel Vadot        #size-cells = <0>;
70*f126890aSEmmanuel Vadot        max98388: amplifier@39 {
71*f126890aSEmmanuel Vadot            compatible = "adi,max98388";
72*f126890aSEmmanuel Vadot            reg = <0x39>;
73*f126890aSEmmanuel Vadot            #sound-dai-cells = <0>;
74*f126890aSEmmanuel Vadot            adi,vmon-slot-no = <0>;
75*f126890aSEmmanuel Vadot            adi,imon-slot-no = <1>;
76*f126890aSEmmanuel Vadot            adi,interleave-mode;
77*f126890aSEmmanuel Vadot            reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
78*f126890aSEmmanuel Vadot        };
79*f126890aSEmmanuel Vadot    };
80