Skip to contentSkip to conversation

ASoC: tas2781: add TAS2573 register definitions header

PATCH In review Shenghao Ding 2 participants 2 messages Nov 11 – Nov 12

Subsystems (3)
lore
Share & tools
lore

Shenghao Ding

author maintainer
#0 lore raw

PATCH 1/1 ASoC: tas2781: add TAS2573 register definitions header

The TAS2573 register definitions are currently mixed into include/sound/tas2781.h together with the TAS2781 and TAS2563 definitions, which makes it difficult to tell which amplifier a given register belongs to and causes the header to grow with every new device.

---
v1:
- Move the TAS2573 specific registers into a dedicated include/sound/tas2573-reg.h
- Add the registers required by speaker calibration (FCT) and real time speaker protection: TDM detection, coil temperature, excursion and thermal gain, and the A1/A2 output registers.

---
 include/sound/tas2573-reg.h    | 52 ++++++++++++++++++++++++++++++++++
 include/sound/tas2781.h        | 24 ----------------
 sound/soc/codecs/tas2781-i2c.c |  1 +
 3 files changed, 53 insertions(+), 24 deletions(-)
 create mode 100644 include/sound/tas2573-reg.h
include/sound/tas2573-reg.h new file +52 -0
new file mode 100644
index 000000000..02c9a2fcc
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+//
+// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
+//
+// Copyright (C) 2026 Texas Instruments Incorporated
+// https://www.ti.com
+//
+// Register definitions for the TAS2573 Audio Smart Amplifier, used by the
+// speaker calibration (FCT) and real-time speaker protection data.
+//
+// Author: Shenghao Ding <[email protected]>
+//
+
+#ifndef __TAS2573_REG_H__
+#define __TAS2573_REG_H__
+
+#define TAS2573_TDM_DET_REG		TASDEVICE_REG(0x00, 0x00, 0x14)
+#define TAS2573_FCT_INT_LATCH		TASDEVICE_REG(0x00, 0x00, 0x67)
+/* YM57 */
+#define TAS2573_FCT_OUTPUT_R0		TASDEVICE_REG(0x00, 0x65, 0x74)
+/* YM58 */
+#define TAS2573_FCT_OUTPUT_R0_LOW	TASDEVICE_REG(0x00, 0x65, 0x78)
+/* YM59 */
+#define TAS2573_FCT_OUTPUT_INV_R0	TASDEVICE_REG(0x00, 0x65, 0x7C)
+/* YM61 */
+#define TAS2573_FCT_OUTPUT_POWERTOT	TASDEVICE_REG(0x00, 0x66, 0x0C)
+/* YM64 */
+#define TAS2573_FCT_OUTPUT_F0		TASDEVICE_REG(0x00, 0x65, 0x18)
+/* YM147 */
+#define TAS2573_FCT_STATUS_CTRL		TASDEVICE_REG(0x00, 0x68, 0x74)
+/* YM148 */
+#define TAS2573_FCT_STATUS_BINNING	TASDEVICE_REG(0x00, 0x68, 0x78)
+/* YM510 */
+#define TAS2573_SPK_COIL_TEMPERATURE	TASDEVICE_REG(0x00, 0x75, 0x08)
+/* YM664 */
+#define TAS2573_RE_OUT			TASDEVICE_REG(0x00, 0x7A, 0x18)
+/* YM694 */
+#define TAS2573_A1_OUT			TASDEVICE_REG(0x00, 0x7B, 0x18)
+/* YM695 */
+#define TAS2573_A2_OUT			TASDEVICE_REG(0x00, 0x7B, 0x1C)
+/* YM793 */
+#define TAS2573_EXCURSION_GAIN		TASDEVICE_REG(0x00, 0x7E, 0x3C)
+/* YM800 */
+#define TAS2573_THERMAL_GAIN		TASDEVICE_REG(0x00, 0x7E, 0x58)
+/* YM952 */
+#define TAS2573_SILENCE_DETECTED	TASDEVICE_REG(0x00, 0x83, 0x60)
+/* YM954 */
+#define TAS2573_OPEN_CIRCUIT		TASDEVICE_REG(0x00, 0x83, 0x68)
+/* YM955 */
+#define TAS2573_SHORTCKT		TASDEVICE_REG(0x00, 0x83, 0x6C)
+
+#endif
include/sound/tas2781.h +0 -24
index f42752263..8d2621f9d 100644
@@ -98,30 +98,6 @@
 /* prm_TE_1_Beta1 */
 #define TAS2563_TE_DT_REG		TASDEVICE_REG(0x00, 0x0f, 0x70)
 
-#define TAS2573_FCT_INT_LATCH		TASDEVICE_REG(0x00, 0x00, 0x67)
-/* YM57 */
-#define TAS2573_FCT_OUTPUT_R0		TASDEVICE_REG(0x00, 0x65, 0x74)
-/* YM58 */
-#define TAS2573_FCT_OUTPUT_R0_LOW	TASDEVICE_REG(0x00, 0x65, 0x78)
-/* YM59 */
-#define TAS2573_FCT_OUTPUT_INV_R0	TASDEVICE_REG(0x00, 0x65, 0x7C)
-/* YM61 */
-#define TAS2573_FCT_OUTPUT_POWERTOT	TASDEVICE_REG(0x00, 0x66, 0x0C)
-/* YM64 */
-#define TAS2573_FCT_OUTPUT_F0		TASDEVICE_REG(0x00, 0x65, 0x18)
-/* YM147 */
-#define TAS2573_FCT_STATUS_CTRL		TASDEVICE_REG(0x00, 0x68, 0x74)
-/* YM148 */
-#define TAS2573_FCT_STATUS_BINNING	TASDEVICE_REG(0x00, 0x68, 0x78)
-/* YM664 */
-#define TAS2573_RE_OUT			TASDEVICE_REG(0x00, 0x7A, 0x18)
-/* YM952 */
-#define TAS2573_SILENCE_DETECTED	TASDEVICE_REG(0x00, 0x83, 0x60)
-/* YM954 */
-#define TAS2573_OPEN_CIRCUIT		TASDEVICE_REG(0x00, 0x83, 0x68)
-/* YM955 */
-#define TAS2573_SHORTCKT		TASDEVICE_REG(0x00, 0x83, 0x6C)
-
 #define TAS2781_PRM_INT_MASK_REG	TASDEVICE_REG(0x00, 0x00, 0x3b)
 #define TAS2781_PRM_CLK_CFG_REG		TASDEVICE_REG(0x00, 0x00, 0x5c)
 #define TAS2781_PRM_RSVD_REG		TASDEVICE_REG(0x00, 0x01, 0x19)
sound/soc/codecs/tas2781-i2c.c +1 -0
index 995bfd52f..2c8a03bb8 100644
@@ -33,6 +33,7 @@
 #include <sound/tlv.h>
 #include <sound/tas2x20-tlv.h>
 #include <sound/tas2563-tlv.h>
+#include <sound/tas2573-reg.h>
 #include <sound/tas2781-tlv.h>
 #include <sound/tas5825-tlv.h>
 #include <linux/unaligned.h>
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 1 line · Shenghao Ding

ASoC: tas2781: add TAS2573 register definitions header

Applied to

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

Thanks!

[1/1] ASoC: tas2781: add TAS2573 register definitions header

      https://git.kernel.org/broonie/sound/c/ce50ca8992db

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