asahi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: dt-bindings: Add adi,ssm3515 amp schema
@ 2023-05-09 16:38 Martin Povišer
  2023-05-09 16:38 ` [PATCH 2/2] ASoC: ssm3515: Add new amp driver Martin Povišer
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Martin Povišer @ 2023-05-09 16:38 UTC (permalink / raw)
  To: Martin Povišer, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
	Lars-Peter Clausen, Nuno Sá
  Cc: asahi, alsa-devel, devicetree, linux-kernel

Add a DT schema for the SSM3515 amp by Analog Devices. It's a simple
mono amplifier with digital input.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
---
 .../bindings/sound/adi,ssm3515.yaml           | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm3515.yaml

diff --git a/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml b/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml
new file mode 100644
index 000000000000..19b7185ae8e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2019-20 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/sound/adi,ssm3515.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Analog Devices SSM3515 Audio Amplifier
+
+maintainers:
+  - Martin Povišer <povik+lin@cutebit.org>
+
+description: |
+  SSM3515 is a mono Class-D audio amplifier with digital input.
+
+  https://www.analog.com/media/en/technical-documentation/data-sheets/SSM3515.pdf
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - adi,ssm3515
+
+  reg:
+    maxItems: 1
+
+  adi,ana-gain:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1, 2, 3]
+    description: |
+      The value to be set in the ANA_GAIN register field on the codec. This determines
+      the full voltage span of the codec's analog output.
+
+      To quote the datasheet on the available options:
+
+        00: 8.4 V Full-Scale Gain Mapping
+        01: 12.6 V Full-Scale Gain Mapping
+        10: 14 V Full-Scale Gain Mapping
+        11: 15 V Full-Scale Gain Mapping
+
+  '#sound-dai-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - adi,ana-gain
+
+additionalProperties: true
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      codec@14 {
+        compatible = "adi,ssm3515";
+        reg = <0x14>;
+        #sound-dai-cells = <0>;
+        adi,ana-gain = <0>;
+        sound-name-prefix = "Left Tweeter";
+      };
+    };
-- 
2.38.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-05-11  1:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 16:38 [PATCH 1/2] ASoC: dt-bindings: Add adi,ssm3515 amp schema Martin Povišer
2023-05-09 16:38 ` [PATCH 2/2] ASoC: ssm3515: Add new amp driver Martin Povišer
2023-05-10  2:16   ` Mark Brown
2023-05-10  6:23     ` Martin Povišer
2023-05-09 18:25 ` [PATCH 1/2] ASoC: dt-bindings: Add adi,ssm3515 amp schema Conor Dooley
2023-05-09 19:38   ` Martin Povišer
2023-05-10  2:10     ` Mark Brown
2023-05-10  7:51   ` Krzysztof Kozlowski
2023-05-11  1:11     ` Mark Brown
2023-05-10  7:51 ` Krzysztof Kozlowski
2023-05-10  8:15   ` Martin Povišer
2023-05-10  8:23     ` Krzysztof Kozlowski
2023-05-10  8:29       ` Martin Povišer
2023-05-10  8:30         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).