Commit c173dba4 authored by Dan Murphy's avatar Dan Murphy Committed by Mark Brown

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/tas2562Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20191008181517.5332-2-dmurphy@ti.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a4eff5f8
...@@ -181,6 +181,7 @@ config SND_SOC_ALL_CODECS ...@@ -181,6 +181,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_STAC9766 if SND_SOC_AC97_BUS select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
select SND_SOC_STI_SAS select SND_SOC_STI_SAS
select SND_SOC_TAS2552 if I2C select SND_SOC_TAS2552 if I2C
select SND_SOC_TAS2562 if I2C
select SND_SOC_TAS2770 if I2C select SND_SOC_TAS2770 if I2C
select SND_SOC_TAS5086 if I2C select SND_SOC_TAS5086 if I2C
select SND_SOC_TAS571X if I2C select SND_SOC_TAS571X if I2C
...@@ -1133,6 +1134,10 @@ config SND_SOC_TAS2552 ...@@ -1133,6 +1134,10 @@ config SND_SOC_TAS2552
tristate "Texas Instruments TAS2552 Mono Audio amplifier" tristate "Texas Instruments TAS2552 Mono Audio amplifier"
depends on I2C depends on I2C
config SND_SOC_TAS2562
tristate "Texas Instruments TAS2562 Mono Audio amplifier"
depends on I2C
config SND_SOC_TAS2770 config SND_SOC_TAS2770
tristate "Texas Instruments TAS2770 speaker amplifier" tristate "Texas Instruments TAS2770 speaker amplifier"
depends on I2C depends on I2C
......
...@@ -284,6 +284,7 @@ snd-soc-max98504-objs := max98504.o ...@@ -284,6 +284,7 @@ snd-soc-max98504-objs := max98504.o
snd-soc-simple-amplifier-objs := simple-amplifier.o snd-soc-simple-amplifier-objs := simple-amplifier.o
snd-soc-tpa6130a2-objs := tpa6130a2.o snd-soc-tpa6130a2-objs := tpa6130a2.o
snd-soc-tas2552-objs := tas2552.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_88PM860X) += snd-soc-88pm860x.o
obj-$(CONFIG_SND_SOC_AB8500_CODEC) += snd-soc-ab8500-codec.o obj-$(CONFIG_SND_SOC_AB8500_CODEC) += snd-soc-ab8500-codec.o
...@@ -481,6 +482,7 @@ obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o ...@@ -481,6 +482,7 @@ obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o
obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.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_STI_SAS) += snd-soc-sti-sas.o
obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.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_TAS5086) += snd-soc-tas5086.o
obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o
obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* tas2562.h - ALSA SoC Texas Instruments TAS2562 Mono Audio Amplifier
*
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
*
* Author: Dan Murphy <dmurphy@ti.com>
*/
#ifndef __TAS2562_H__
#define __TAS2562_H__
#define TAS2562_PAGE_CTRL 0x00
#define TAS2562_REG(page, reg) ((page * 128) + reg)
#define TAS2562_SW_RESET TAS2562_REG(0, 0x01)
#define TAS2562_PWR_CTRL TAS2562_REG(0, 0x02)
#define TAS2562_PB_CFG1 TAS2562_REG(0, 0x03)
#define TAS2562_MISC_CFG1 TAS2562_REG(0, 0x04)
#define TAS2562_MISC_CFG2 TAS2562_REG(0, 0x05)
#define TAS2562_TDM_CFG0 TAS2562_REG(0, 0x06)
#define TAS2562_TDM_CFG1 TAS2562_REG(0, 0x07)
#define TAS2562_TDM_CFG2 TAS2562_REG(0, 0x08)
#define TAS2562_TDM_CFG3 TAS2562_REG(0, 0x09)
#define TAS2562_TDM_CFG4 TAS2562_REG(0, 0x0a)
#define TAS2562_TDM_CFG5 TAS2562_REG(0, 0x0b)
#define TAS2562_TDM_CFG6 TAS2562_REG(0, 0x0c)
#define TAS2562_TDM_CFG7 TAS2562_REG(0, 0x0d)
#define TAS2562_TDM_CFG8 TAS2562_REG(0, 0x0e)
#define TAS2562_TDM_CFG9 TAS2562_REG(0, 0x0f)
#define TAS2562_TDM_CFG10 TAS2562_REG(0, 0x10)
#define TAS2562_TDM_DET TAS2562_REG(0, 0x11)
#define TAS2562_REV_ID TAS2562_REG(0, 0x7d)
/* Page 2 */
#define TAS2562_DVC_CFG1 TAS2562_REG(2, 0x01)
#define TAS2562_DVC_CFG2 TAS2562_REG(2, 0x02)
#define TAS2562_RESET BIT(0)
#define TAS2562_MODE_MASK 0x3
#define TAS2562_ACTIVE 0x0
#define TAS2562_MUTE 0x1
#define TAS2562_SHUTDOWN 0x2
#define TAS2562_TDM_CFG1_RX_EDGE_MASK BIT(0)
#define TAS2562_TDM_CFG1_RX_FALLING 1
#define TAS2562_TDM_CFG1_RX_OFFSET_MASK GENMASK(4, 0)
#define TAS2562_TDM_CFG0_RAMPRATE_MASK BIT(5)
#define TAS2562_TDM_CFG0_RAMPRATE_44_1 BIT(5)
#define TAS2562_TDM_CFG0_SAMPRATE_MASK GENMASK(3, 1)
#define TAS2562_TDM_CFG0_SAMPRATE_7305_8KHZ 0x0
#define TAS2562_TDM_CFG0_SAMPRATE_14_7_16KHZ 0x1
#define TAS2562_TDM_CFG0_SAMPRATE_22_05_24KHZ 0x2
#define TAS2562_TDM_CFG0_SAMPRATE_29_4_32KHZ 0x3
#define TAS2562_TDM_CFG0_SAMPRATE_44_1_48KHZ 0x4
#define TAS2562_TDM_CFG0_SAMPRATE_88_2_96KHZ 0x5
#define TAS2562_TDM_CFG0_SAMPRATE_176_4_192KHZ 0x6
#define TAS2562_TDM_CFG2_RIGHT_JUSTIFY BIT(6)
#define TAS2562_TDM_CFG2_RXLEN_MASK GENMASK(0, 1)
#define TAS2562_TDM_CFG2_RXLEN_16B 0x0
#define TAS2562_TDM_CFG2_RXLEN_24B BIT(0)
#define TAS2562_TDM_CFG2_RXLEN_32B BIT(1)
#define TAS2562_TDM_CFG2_RXWLEN_MASK GENMASK(3, 2)
#define TAS2562_TDM_CFG2_RXWLEN_16B 0x0
#define TAS2562_TDM_CFG2_RXWLEN_20B BIT(2)
#define TAS2562_TDM_CFG2_RXWLEN_24B BIT(3)
#define TAS2562_TDM_CFG2_RXWLEN_32B (BIT(2) | BIT(3))
#define TAS2562_VSENSE_POWER_EN BIT(2)
#define TAS2562_ISENSE_POWER_EN BIT(3)
#define TAS2562_TDM_CFG5_VSNS_EN BIT(6)
#define TAS2562_TDM_CFG5_VSNS_SLOT_MASK GENMASK(5, 0)
#define TAS2562_TDM_CFG6_ISNS_EN BIT(6)
#define TAS2562_TDM_CFG6_ISNS_SLOT_MASK GENMASK(5, 0)
#endif /* __TAS2562_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment