xref: /linux/Documentation/devicetree/bindings/sound/adi,max98396.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
13a2c9a55SRyan Lee# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
23a2c9a55SRyan Lee%YAML 1.2
33a2c9a55SRyan Lee---
43a2c9a55SRyan Lee$id: http://devicetree.org/schemas/sound/adi,max98396.yaml#
53a2c9a55SRyan Lee$schema: http://devicetree.org/meta-schemas/core.yaml#
63a2c9a55SRyan Lee
7dd3cb467SAndrew Lunntitle: Analog Devices MAX98396 Speaker Amplifier
83a2c9a55SRyan Lee
93a2c9a55SRyan Leemaintainers:
103a2c9a55SRyan Lee  - Ryan Lee <ryans.lee@analog.com>
113a2c9a55SRyan Lee
123a2c9a55SRyan Leedescription:
133a2c9a55SRyan Lee  The MAX98396 is a mono Class-DG speaker amplifier with I/V sense.
143a2c9a55SRyan Lee  The device provides a PCM interface for audio data and a standard
153a2c9a55SRyan Lee  I2C interface for control data communication.
163a2c9a55SRyan Lee  The MAX98397 is a variant of MAX98396 with wide input supply range.
173a2c9a55SRyan Lee
183a2c9a55SRyan Leeproperties:
193a2c9a55SRyan Lee  compatible:
203a2c9a55SRyan Lee    enum:
213a2c9a55SRyan Lee      - adi,max98396
223a2c9a55SRyan Lee      - adi,max98397
233a2c9a55SRyan Lee  reg:
243a2c9a55SRyan Lee    maxItems: 1
253a2c9a55SRyan Lee    description: I2C address of the device.
263a2c9a55SRyan Lee
27d9bd3aeaSDaniel Mack  avdd-supply:
28d9bd3aeaSDaniel Mack    description: A 1.8V supply that powers up the AVDD pin.
29d9bd3aeaSDaniel Mack
30d9bd3aeaSDaniel Mack  dvdd-supply:
31d9bd3aeaSDaniel Mack    description: A 1.2V supply that powers up the DVDD pin.
32d9bd3aeaSDaniel Mack
33d9bd3aeaSDaniel Mack  dvddio-supply:
34d9bd3aeaSDaniel Mack    description: A 1.2V or 1.8V supply that powers up the VDDIO pin.
35d9bd3aeaSDaniel Mack
36d9bd3aeaSDaniel Mack  pvdd-supply:
37d9bd3aeaSDaniel Mack    description: A 3.0V to 20V supply that powers up the PVDD pin.
38d9bd3aeaSDaniel Mack
39d9bd3aeaSDaniel Mack  vbat-supply:
40d9bd3aeaSDaniel Mack    description: A 3.3V to 5.5V supply that powers up the VBAT pin.
41d9bd3aeaSDaniel Mack
423a2c9a55SRyan Lee  adi,vmon-slot-no:
433a2c9a55SRyan Lee    description: slot number of the voltage sense monitor
44*d9e909e2SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
453a2c9a55SRyan Lee    minimum: 0
463a2c9a55SRyan Lee    maximum: 15
473a2c9a55SRyan Lee    default: 0
483a2c9a55SRyan Lee
493a2c9a55SRyan Lee  adi,imon-slot-no:
503a2c9a55SRyan Lee    description: slot number of the current sense monitor
51*d9e909e2SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
523a2c9a55SRyan Lee    minimum: 0
533a2c9a55SRyan Lee    maximum: 15
540ce44afdSDaniel Mack    default: 1
553a2c9a55SRyan Lee
563a2c9a55SRyan Lee  adi,spkfb-slot-no:
573a2c9a55SRyan Lee    description: slot number of speaker DSP monitor
58*d9e909e2SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
593a2c9a55SRyan Lee    minimum: 0
603a2c9a55SRyan Lee    maximum: 15
610ce44afdSDaniel Mack    default: 2
620ce44afdSDaniel Mack
630ce44afdSDaniel Mack  adi,bypass-slot-no:
640ce44afdSDaniel Mack    description:
650ce44afdSDaniel Mack      Selects the PCM data input channel that is routed to the speaker
660ce44afdSDaniel Mack      audio processing bypass path.
67*d9e909e2SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
680ce44afdSDaniel Mack    minimum: 0
690ce44afdSDaniel Mack    maximum: 15
703a2c9a55SRyan Lee    default: 0
713a2c9a55SRyan Lee
723a2c9a55SRyan Lee  adi,interleave-mode:
733a2c9a55SRyan Lee    description:
743a2c9a55SRyan Lee      For cases where a single combined channel for the I/V sense data
753a2c9a55SRyan Lee      is not sufficient, the device can also be configured to share
763a2c9a55SRyan Lee      a single data output channel on alternating frames.
773a2c9a55SRyan Lee      In this configuration, the current and voltage data will be frame
783a2c9a55SRyan Lee      interleaved on a single output channel.
793a2c9a55SRyan Lee    type: boolean
803a2c9a55SRyan Lee
81ec2988daSDaniel Mack  adi,dmon-stuck-enable:
82ec2988daSDaniel Mack    description:
83ec2988daSDaniel Mack      Enables the "data monitor stuck" feature. Once the data monitor is
84ec2988daSDaniel Mack      enabled, it actively monitors the selected input data (from DIN) to the
85ec2988daSDaniel Mack      speaker amplifier. Once a data error is detected, the data monitor
86ec2988daSDaniel Mack      automatically places the device into software shutdown.
87ec2988daSDaniel Mack    type: boolean
88ec2988daSDaniel Mack
89ec2988daSDaniel Mack  adi,dmon-stuck-threshold-bits:
90ec2988daSDaniel Mack    description:
91ec2988daSDaniel Mack      Sets the threshold for the "data monitor stuck" feature, in bits.
92ec2988daSDaniel Mack    enum: [9, 11, 13, 15]
93ec2988daSDaniel Mack    default: 15
94ec2988daSDaniel Mack
95ec2988daSDaniel Mack  adi,dmon-magnitude-enable:
96ec2988daSDaniel Mack    description:
97ec2988daSDaniel Mack      Enables the "data monitor magnitude" feature. Once the data monitor is
98ec2988daSDaniel Mack      enabled, it actively monitors the selected input data (from DIN) to the
99ec2988daSDaniel Mack      speaker amplifier. Once a data error is detected, the data monitor
100ec2988daSDaniel Mack      automatically places the device into software shutdown.
101ec2988daSDaniel Mack    type: boolean
102ec2988daSDaniel Mack
103ec2988daSDaniel Mack  adi,dmon-magnitude-threshold-bits:
104ec2988daSDaniel Mack    description:
105ec2988daSDaniel Mack      Sets the threshold for the "data monitor magnitude" feature, in bits.
106ec2988daSDaniel Mack    enum: [2, 3, 4, 5]
107ec2988daSDaniel Mack    default: 5
108ec2988daSDaniel Mack
109ec2988daSDaniel Mack  adi,dmon-duration-ms:
110ec2988daSDaniel Mack    description:
111ec2988daSDaniel Mack      Sets the duration for the "data monitor" feature, in milliseconds.
112ec2988daSDaniel Mack    enum: [64, 256, 1024, 4096]
113ec2988daSDaniel Mack    default: 64
114ec2988daSDaniel Mack
1153a2c9a55SRyan Lee  reset-gpios:
1163a2c9a55SRyan Lee    maxItems: 1
1173a2c9a55SRyan Lee
1183a2c9a55SRyan Leerequired:
1193a2c9a55SRyan Lee  - compatible
1203a2c9a55SRyan Lee  - reg
1213a2c9a55SRyan Lee
1223a2c9a55SRyan LeeadditionalProperties: false
1233a2c9a55SRyan Lee
1243a2c9a55SRyan Leeexamples:
1253a2c9a55SRyan Lee  - |
1263a2c9a55SRyan Lee    #include <dt-bindings/gpio/gpio.h>
1273a2c9a55SRyan Lee    i2c {
1283a2c9a55SRyan Lee        #address-cells = <1>;
1293a2c9a55SRyan Lee        #size-cells = <0>;
1303a2c9a55SRyan Lee        max98396: amplifier@39 {
1313a2c9a55SRyan Lee            compatible = "adi,max98396";
1323a2c9a55SRyan Lee            reg = <0x39>;
133d9bd3aeaSDaniel Mack            dvdd-supply = <&regulator_1v2>;
134d9bd3aeaSDaniel Mack            dvddio-supply = <&regulator_1v8>;
135d9bd3aeaSDaniel Mack            avdd-supply = <&regulator_1v8>;
136d9bd3aeaSDaniel Mack            pvdd-supply = <&regulator_pvdd>;
1373a2c9a55SRyan Lee            adi,vmon-slot-no = <0>;
1383a2c9a55SRyan Lee            adi,imon-slot-no = <1>;
1393a2c9a55SRyan Lee            reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
1403a2c9a55SRyan Lee        };
1413a2c9a55SRyan Lee    };
142