xref: /freebsd/sys/contrib/device-tree/Bindings/sound/adi,max98396.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/adi,max98396.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Analog Devices MAX98396 Speaker Amplifier
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Ryan Lee <ryans.lee@analog.com>
11d5b0e70fSEmmanuel Vadot
12d5b0e70fSEmmanuel Vadotdescription:
13d5b0e70fSEmmanuel Vadot  The MAX98396 is a mono Class-DG speaker amplifier with I/V sense.
14d5b0e70fSEmmanuel Vadot  The device provides a PCM interface for audio data and a standard
15d5b0e70fSEmmanuel Vadot  I2C interface for control data communication.
16d5b0e70fSEmmanuel Vadot  The MAX98397 is a variant of MAX98396 with wide input supply range.
17d5b0e70fSEmmanuel Vadot
18d5b0e70fSEmmanuel Vadotproperties:
19d5b0e70fSEmmanuel Vadot  compatible:
20d5b0e70fSEmmanuel Vadot    enum:
21d5b0e70fSEmmanuel Vadot      - adi,max98396
22d5b0e70fSEmmanuel Vadot      - adi,max98397
23d5b0e70fSEmmanuel Vadot  reg:
24d5b0e70fSEmmanuel Vadot    maxItems: 1
25d5b0e70fSEmmanuel Vadot    description: I2C address of the device.
26d5b0e70fSEmmanuel Vadot
27b97ee269SEmmanuel Vadot  avdd-supply:
28b97ee269SEmmanuel Vadot    description: A 1.8V supply that powers up the AVDD pin.
29b97ee269SEmmanuel Vadot
30b97ee269SEmmanuel Vadot  dvdd-supply:
31b97ee269SEmmanuel Vadot    description: A 1.2V supply that powers up the DVDD pin.
32b97ee269SEmmanuel Vadot
33b97ee269SEmmanuel Vadot  dvddio-supply:
34b97ee269SEmmanuel Vadot    description: A 1.2V or 1.8V supply that powers up the VDDIO pin.
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot  pvdd-supply:
37b97ee269SEmmanuel Vadot    description: A 3.0V to 20V supply that powers up the PVDD pin.
38b97ee269SEmmanuel Vadot
39b97ee269SEmmanuel Vadot  vbat-supply:
40b97ee269SEmmanuel Vadot    description: A 3.3V to 5.5V supply that powers up the VBAT pin.
41b97ee269SEmmanuel Vadot
42d5b0e70fSEmmanuel Vadot  adi,vmon-slot-no:
43d5b0e70fSEmmanuel Vadot    description: slot number of the voltage sense monitor
44*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
45d5b0e70fSEmmanuel Vadot    minimum: 0
46d5b0e70fSEmmanuel Vadot    maximum: 15
47d5b0e70fSEmmanuel Vadot    default: 0
48d5b0e70fSEmmanuel Vadot
49d5b0e70fSEmmanuel Vadot  adi,imon-slot-no:
50d5b0e70fSEmmanuel Vadot    description: slot number of the current sense monitor
51*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
52d5b0e70fSEmmanuel Vadot    minimum: 0
53d5b0e70fSEmmanuel Vadot    maximum: 15
54b97ee269SEmmanuel Vadot    default: 1
55d5b0e70fSEmmanuel Vadot
56d5b0e70fSEmmanuel Vadot  adi,spkfb-slot-no:
57d5b0e70fSEmmanuel Vadot    description: slot number of speaker DSP monitor
58*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
59d5b0e70fSEmmanuel Vadot    minimum: 0
60d5b0e70fSEmmanuel Vadot    maximum: 15
61b97ee269SEmmanuel Vadot    default: 2
62b97ee269SEmmanuel Vadot
63b97ee269SEmmanuel Vadot  adi,bypass-slot-no:
64b97ee269SEmmanuel Vadot    description:
65b97ee269SEmmanuel Vadot      Selects the PCM data input channel that is routed to the speaker
66b97ee269SEmmanuel Vadot      audio processing bypass path.
67*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
68b97ee269SEmmanuel Vadot    minimum: 0
69b97ee269SEmmanuel Vadot    maximum: 15
70d5b0e70fSEmmanuel Vadot    default: 0
71d5b0e70fSEmmanuel Vadot
72d5b0e70fSEmmanuel Vadot  adi,interleave-mode:
73d5b0e70fSEmmanuel Vadot    description:
74d5b0e70fSEmmanuel Vadot      For cases where a single combined channel for the I/V sense data
75d5b0e70fSEmmanuel Vadot      is not sufficient, the device can also be configured to share
76d5b0e70fSEmmanuel Vadot      a single data output channel on alternating frames.
77d5b0e70fSEmmanuel Vadot      In this configuration, the current and voltage data will be frame
78d5b0e70fSEmmanuel Vadot      interleaved on a single output channel.
79d5b0e70fSEmmanuel Vadot    type: boolean
80d5b0e70fSEmmanuel Vadot
817ef62cebSEmmanuel Vadot  adi,dmon-stuck-enable:
827ef62cebSEmmanuel Vadot    description:
837ef62cebSEmmanuel Vadot      Enables the "data monitor stuck" feature. Once the data monitor is
847ef62cebSEmmanuel Vadot      enabled, it actively monitors the selected input data (from DIN) to the
857ef62cebSEmmanuel Vadot      speaker amplifier. Once a data error is detected, the data monitor
867ef62cebSEmmanuel Vadot      automatically places the device into software shutdown.
877ef62cebSEmmanuel Vadot    type: boolean
887ef62cebSEmmanuel Vadot
897ef62cebSEmmanuel Vadot  adi,dmon-stuck-threshold-bits:
907ef62cebSEmmanuel Vadot    description:
917ef62cebSEmmanuel Vadot      Sets the threshold for the "data monitor stuck" feature, in bits.
927ef62cebSEmmanuel Vadot    enum: [9, 11, 13, 15]
937ef62cebSEmmanuel Vadot    default: 15
947ef62cebSEmmanuel Vadot
957ef62cebSEmmanuel Vadot  adi,dmon-magnitude-enable:
967ef62cebSEmmanuel Vadot    description:
977ef62cebSEmmanuel Vadot      Enables the "data monitor magnitude" feature. Once the data monitor is
987ef62cebSEmmanuel Vadot      enabled, it actively monitors the selected input data (from DIN) to the
997ef62cebSEmmanuel Vadot      speaker amplifier. Once a data error is detected, the data monitor
1007ef62cebSEmmanuel Vadot      automatically places the device into software shutdown.
1017ef62cebSEmmanuel Vadot    type: boolean
1027ef62cebSEmmanuel Vadot
1037ef62cebSEmmanuel Vadot  adi,dmon-magnitude-threshold-bits:
1047ef62cebSEmmanuel Vadot    description:
1057ef62cebSEmmanuel Vadot      Sets the threshold for the "data monitor magnitude" feature, in bits.
1067ef62cebSEmmanuel Vadot    enum: [2, 3, 4, 5]
1077ef62cebSEmmanuel Vadot    default: 5
1087ef62cebSEmmanuel Vadot
1097ef62cebSEmmanuel Vadot  adi,dmon-duration-ms:
1107ef62cebSEmmanuel Vadot    description:
1117ef62cebSEmmanuel Vadot      Sets the duration for the "data monitor" feature, in milliseconds.
1127ef62cebSEmmanuel Vadot    enum: [64, 256, 1024, 4096]
1137ef62cebSEmmanuel Vadot    default: 64
1147ef62cebSEmmanuel Vadot
115d5b0e70fSEmmanuel Vadot  reset-gpios:
116d5b0e70fSEmmanuel Vadot    maxItems: 1
117d5b0e70fSEmmanuel Vadot
118d5b0e70fSEmmanuel Vadotrequired:
119d5b0e70fSEmmanuel Vadot  - compatible
120d5b0e70fSEmmanuel Vadot  - reg
121d5b0e70fSEmmanuel Vadot
122d5b0e70fSEmmanuel VadotadditionalProperties: false
123d5b0e70fSEmmanuel Vadot
124d5b0e70fSEmmanuel Vadotexamples:
125d5b0e70fSEmmanuel Vadot  - |
126d5b0e70fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
127d5b0e70fSEmmanuel Vadot    i2c {
128d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
129d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
130d5b0e70fSEmmanuel Vadot        max98396: amplifier@39 {
131d5b0e70fSEmmanuel Vadot            compatible = "adi,max98396";
132d5b0e70fSEmmanuel Vadot            reg = <0x39>;
133b97ee269SEmmanuel Vadot            dvdd-supply = <&regulator_1v2>;
134b97ee269SEmmanuel Vadot            dvddio-supply = <&regulator_1v8>;
135b97ee269SEmmanuel Vadot            avdd-supply = <&regulator_1v8>;
136b97ee269SEmmanuel Vadot            pvdd-supply = <&regulator_pvdd>;
137d5b0e70fSEmmanuel Vadot            adi,vmon-slot-no = <0>;
138d5b0e70fSEmmanuel Vadot            adi,imon-slot-no = <1>;
139d5b0e70fSEmmanuel Vadot            reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
140d5b0e70fSEmmanuel Vadot        };
141d5b0e70fSEmmanuel Vadot    };
142