[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220421230253.823798-1-ryan.lee.analog@gmail.com>
Date: Thu, 21 Apr 2022 16:02:52 -0700
From: Ryan Lee <ryan.lee.analog@...il.com>
To: lgirdwood@...il.com, broonie@...nel.org, robh+dt@...nel.org,
krzk+dt@...nel.org, perex@...ex.cz, tiwai@...e.com,
srinivas.kandagatla@...aro.org, ckeepax@...nsource.cirrus.com,
tanureal@...nsource.cirrus.com, cy_huang@...htek.com,
pierre-louis.bossart@...ux.intel.com,
drhodes@...nsource.cirrus.com, pbrobinson@...il.com,
hdegoede@...hat.com, lukas.bulwahn@...il.com, stephan@...hold.net,
arnd@...db.de, ryan.lee.analog@...il.com,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, ryans.lee@...log.com
Subject: [PATCH V2 1/2] ASoC: dt-bindings: max98396: add amplifier driver
From: Ryan Lee <ryans.lee@...log.com>
This patch adds dt-bindings information for Analog Devices MAX98396
and MAX98397 Smart Amplifier.
Signed-off-by: Ryan Lee <ryans.lee@...log.com>
---
Changes from v1:
Fixed yamllint/dtschema/dtc warnings and errors
.../bindings/sound/adi,max98396.yaml | 79 +++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/adi,max98396.yaml
diff --git a/Documentation/devicetree/bindings/sound/adi,max98396.yaml b/Documentation/devicetree/bindings/sound/adi,max98396.yaml
new file mode 100644
index 000000000000..ec4c10c2598a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,max98396.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,max98396.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX98396 Speaker Amplifier Device Tree Bindings
+
+maintainers:
+ - Ryan Lee <ryans.lee@...log.com>
+
+description:
+ The MAX98396 is a mono Class-DG speaker amplifier with I/V sense.
+ The device provides a PCM interface for audio data and a standard
+ I2C interface for control data communication.
+ The MAX98397 is a variant of MAX98396 with wide input supply range.
+
+properties:
+ compatible:
+ enum:
+ - adi,max98396
+ - adi,max98397
+ reg:
+ maxItems: 1
+ description: I2C address of the device.
+
+ adi,vmon-slot-no:
+ description: slot number of the voltage sense monitor
+ $ref: "/schemas/types.yaml#/definitions/uint32"
+ minimum: 0
+ maximum: 15
+ default: 0
+
+ adi,imon-slot-no:
+ description: slot number of the current sense monitor
+ $ref: "/schemas/types.yaml#/definitions/uint32"
+ minimum: 0
+ maximum: 15
+ default: 0
+
+ adi,spkfb-slot-no:
+ description: slot number of speaker DSP monitor
+ $ref: "/schemas/types.yaml#/definitions/uint32"
+ minimum: 0
+ maximum: 15
+ default: 0
+
+ adi,interleave-mode:
+ description:
+ For cases where a single combined channel for the I/V sense data
+ is not sufficient, the device can also be configured to share
+ a single data output channel on alternating frames.
+ In this configuration, the current and voltage data will be frame
+ interleaved on a single output channel.
+ type: boolean
+
+ reset-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ max98396: amplifier@39 {
+ compatible = "adi,max98396";
+ reg = <0x39>;
+ adi,vmon-slot-no = <0>;
+ adi,imon-slot-no = <1>;
+ reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+ };
--
2.25.1
Powered by blists - more mailing lists