Skip to contentSkip to conversation

ASoc: Add Texas Instruments TAS2562 amplifier binding

PATCH In review Dan Murphy 3 participants 5 messages Oct 8, 2019 – Oct 18, 2019

Subsystems (4)
lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH 1/2 ASoc: Add Texas Instruments TAS2562 amplifier binding

Add the DT binding for the TAS2562 amplifier.

---
 .../devicetree/bindings/sound/tas2562.txt     | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/tas2562.txt
Documentation/devicetree/bindings/sound/tas2562.txt new file +34 -0
new file mode 100644
index 000000000000..658e1fb18a99
@@ -0,0 +1,34 @@
+Texas Instruments TAS2562 Smart PA
+
+The TAS2562 is a mono, digital input Class-D audio amplifier optimized for
+efficiently driving high peak power into small loudspeakers.
+Integrated speaker voltage and current sense provides for
+real time monitoring of loudspeaker behavior.
+
+Required properties:
+ - #address-cells  - Should be <1>.
+ - #size-cells     - Should be <0>.
+ - compatible:	   - Should contain "ti,tas2562".
+ - reg:		   - The i2c address. Should be 0x4c, 0x4d, 0x4e or 0x4f.
+ - ti,imon-slot-no:- TDM TX current sense time slot.
+
+Optional properties:
+- interrupt-parent: phandle to the interrupt controller which provides
+                    the interrupt.
+- interrupts: (GPIO) interrupt to which the chip is connected.
+- shut-down: GPIO used to control the state of the device.
+
+Examples:
+tas2562@4c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        compatible = "ti,tas2562";
+        reg = <0x4c>;
+
+        interrupt-parent = <&gpio1>;
+        interrupts = <14>;
+
+	shut-down = <&gpio1 15 0>;
+        ti,imon-slot-no = <0>;
+};
+
Signature · 1 line
2.22.0.214.g8dca754b1e
author
#1 lore raw

PATCH 2/2 ASoC: tas2562: Introduce the TAS2562 amplifier

Introduce the Texas Instruments TAS2562 amplifier driver with I/V sense for loud speaker applications.

http://www.ti.com/lit/gpn/tas2562

---
 sound/soc/codecs/Kconfig   |   5 +
 sound/soc/codecs/Makefile  |   2 +
 sound/soc/codecs/tas2562.c | 590 +++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas2562.h |  85 ++++++
 4 files changed, 682 insertions(+)
 create mode 100644 sound/soc/codecs/tas2562.c
 create mode 100644 sound/soc/codecs/tas2562.h
sound/soc/codecs/Kconfig +5 -0
index 229cc89f8c5a..51b1a7bdf8e8 100644
@@ -179,6 +179,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
 	select SND_SOC_STI_SAS
 	select SND_SOC_TAS2552 if I2C
+	select SND_SOC_TAS2562 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
 	select SND_SOC_TAS5720 if I2C
@@ -1104,6 +1105,10 @@ config SND_SOC_TAS2552
 	tristate "Texas Instruments TAS2552 Mono Audio amplifier"
 	depends on I2C
 
+config SND_SOC_TAS2562
+	tristate "Texas Instruments TAS2562 Mono Audio amplifier"
+	depends on I2C
+
 config SND_SOC_TAS5086
 	tristate "Texas Instruments TAS5086 speaker amplifier"
 	depends on I2C
sound/soc/codecs/Makefile +2 -0
index c498373dcc5f..96ba39c119af 100644
@@ -280,6 +280,7 @@ snd-soc-max98504-objs := max98504.o
 snd-soc-simple-amplifier-objs := simple-amplifier.o
 snd-soc-tpa6130a2-objs := tpa6130a2.o
 snd-soc-tas2552-objs := tas2552.o
+snd-soc-tas2562-objs := tas2562.o
 
 obj-$(CONFIG_SND_SOC_88PM860X)	+= snd-soc-88pm860x.o
 obj-$(CONFIG_SND_SOC_AB8500_CODEC)	+= snd-soc-ab8500-codec.o
@@ -474,6 +475,7 @@ obj-$(CONFIG_SND_SOC_STA529)   += snd-soc-sta529.o
 obj-$(CONFIG_SND_SOC_STAC9766)	+= snd-soc-stac9766.o
 obj-$(CONFIG_SND_SOC_STI_SAS)	+= snd-soc-sti-sas.o
 obj-$(CONFIG_SND_SOC_TAS2552)	+= snd-soc-tas2552.o
+obj-$(CONFIG_SND_SOC_TAS2562)	+= snd-soc-tas2562.o
 obj-$(CONFIG_SND_SOC_TAS5086)	+= snd-soc-tas5086.o
 obj-$(CONFIG_SND_SOC_TAS571X)	+= snd-soc-tas571x.o
 obj-$(CONFIG_SND_SOC_TAS5720)	+= snd-soc-tas5720.o
sound/soc/codecs/tas2562.c new file +590 -0

590 lines not on this page · raw message

sound/soc/codecs/tas2562.h new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
2.22.0.214.g8dca754b1e
#2 lore raw

PATCH 1/1 ASoC: tas2562: Fix misuse of GENMASK macro

Arguments are supposed to be ordered high then low.

Fixes c173dba44c2d ("ASoC: tas2562: Introduce the TAS2562 amplifier")

---
Spotted when trying to introduce compile time checking that the order of the arguments to GENMASK are correct [0]. I have only compile tested the patch.

[0]: https://lore.kernel.org/lkml/[email protected]/

 sound/soc/codecs/tas2562.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tas2562.h +1 -1
index 60f2bb1d198b..62e659ab786d 100644
@@ -62,7 +62,7 @@
 
 #define TAS2562_TDM_CFG2_RIGHT_JUSTIFY	BIT(6)
 
-#define TAS2562_TDM_CFG2_RXLEN_MASK	GENMASK(0, 1)
+#define TAS2562_TDM_CFG2_RXLEN_MASK	GENMASK(1, 0)
 #define TAS2562_TDM_CFG2_RXLEN_16B	0x0
 #define TAS2562_TDM_CFG2_RXLEN_24B	BIT(0)
 #define TAS2562_TDM_CFG2_RXLEN_32B	BIT(1)
Signature · 1 line
2.23.0
maintainer
#3 lore raw

Applied "ASoC: tas2562: Fix misuse of GENMASK macro" to the asoc tree

The patch

ASoC: tas2562: Fix misuse of GENMASK macro

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

From 0e4b8717578e05ec6aa6d51939e6dc746f3198e9 Mon Sep 17 00:00:00 2001
From: Rikard Falkeborn <[email protected]>
Date: Tue, 15 Oct 2019 22:09:00 +0200
Subject: [PATCH] ASoC: tas2562: Fix misuse of GENMASK macro

Arguments are supposed to be ordered high then low.

Fixes c173dba44c2d ("ASoC: tas2562: Introduce the TAS2562 amplifier")
---
 sound/soc/codecs/tas2562.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tas2562.h +1 -1
index 60f2bb1d198b..62e659ab786d 100644
@@ -62,7 +62,7 @@
 
 #define TAS2562_TDM_CFG2_RIGHT_JUSTIFY	BIT(6)
 
-#define TAS2562_TDM_CFG2_RXLEN_MASK	GENMASK(0, 1)
+#define TAS2562_TDM_CFG2_RXLEN_MASK	GENMASK(1, 0)
 #define TAS2562_TDM_CFG2_RXLEN_16B	0x0
 #define TAS2562_TDM_CFG2_RXLEN_24B	BIT(0)
 #define TAS2562_TDM_CFG2_RXLEN_32B	BIT(1)
Signature · 1 line
2.20.1
maintainer
#4 lore raw

Applied "ASoc: Add Texas Instruments TAS2562 amplifier binding" to the asoc tree

In reply to Dan Murphy

The patch

ASoc: Add Texas Instruments TAS2562 amplifier binding

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

From ac84b8b21b8e305b82d2b204999ee3140990d1b5 Mon Sep 17 00:00:00 2001
From: Dan Murphy <[email protected]>
Date: Tue, 8 Oct 2019 13:15:16 -0500
Subject: [PATCH] ASoc: Add Texas Instruments TAS2562 amplifier binding

Add the DT binding for the TAS2562 amplifier.

---
 .../devicetree/bindings/sound/tas2562.txt     | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/tas2562.txt
Documentation/devicetree/bindings/sound/tas2562.txt new file +34 -0
new file mode 100644
index 000000000000..658e1fb18a99
@@ -0,0 +1,34 @@
+Texas Instruments TAS2562 Smart PA
+
+The TAS2562 is a mono, digital input Class-D audio amplifier optimized for
+efficiently driving high peak power into small loudspeakers.
+Integrated speaker voltage and current sense provides for
+real time monitoring of loudspeaker behavior.
+
+Required properties:
+ - #address-cells  - Should be <1>.
+ - #size-cells     - Should be <0>.
+ - compatible:	   - Should contain "ti,tas2562".
+ - reg:		   - The i2c address. Should be 0x4c, 0x4d, 0x4e or 0x4f.
+ - ti,imon-slot-no:- TDM TX current sense time slot.
+
+Optional properties:
+- interrupt-parent: phandle to the interrupt controller which provides
+                    the interrupt.
+- interrupts: (GPIO) interrupt to which the chip is connected.
+- shut-down: GPIO used to control the state of the device.
+
+Examples:
+tas2562@4c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        compatible = "ti,tas2562";
+        reg = <0x4c>;
+
+        interrupt-parent = <&gpio1>;
+        interrupts = <14>;
+
+	shut-down = <&gpio1 15 0>;
+        ti,imon-slot-no = <0>;
+};
+
Signature · 1 line
2.20.1