Skip to content

Commit

Permalink
ASoC: Initial driver for TAS2555 Smart Amplifier
Browse files Browse the repository at this point in the history
The initial version supports playback via ROM mode1 and FW loading..
Features:
- support for 8-192KHz sampling rates
- support for 16/20/24/32 bit samples
- TDM time slot support support (in DSP interface modes)
- ASI1, ASI2 and ASIM can be selected and configured
- Clocking setup:
 MCLK source cen be selected and depending on the frequency the Amp will be
 configured to bypass or use the PLL. The PLL dividers and MDAC divider is
 calculated by the driver based on the MCLK and smapling frequency.
- The driver will try to load the 'tas2555_uCDSP.bin' firmware when it
is loading.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
  • Loading branch information
Peter Ujfalusi authored and ujfalusi committed Sep 11, 2021
1 parent 6234b05 commit efe3a02
Show file tree
Hide file tree
Showing 6 changed files with 1,205 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/sound/ti,tas2555.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Texas Instruments - tas2555 Class-D Mono Audio Amplifier
http://www.ti.com/product/TAS2555

Required properties:
- compatible - "ti,tas2555"
- reg - I2C slave address
- supply-*: Required supply regulators are:
"iovdd" I/O power supply
"avdd" Analog power supply
"dvdd" Digital power supply

Optional properties:
- nreset-gpio - gpio pin to enable/disable the device
- supply-vbat - Battery power supply

tas2555 can receive it's reference clock via several pin: GPIO1-10, GPI1-3.
Three digital audio interface is available for connecting to CPU or other
audio component.

For system integration the dt-bindings/sound/tas2555.h header file provides
defined values to select the pin for MCLK and predefined values for selecting
the DAI to be used.

Example:

tas2555: tas2555@4c {
#sound-dai-cells = <1>;
compatible = "ti,tas2555";
reg = <0x4c>;
nreset-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>;

iovdd-supply = <&boardio_fixed>;
avdd-supply = <&aud18v_fixed>;
dvdd-supply = <&aud18v_fixed>;
};

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "TAS2555 card";
simple-audio-card,widgets =
"Speaker", "Speaker Port";
simple-audio-card,routing =
"Speaker Port", "OUT",
"Speaker Port", "OUT";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;

status = "okay";

sound_master: simple-audio-card,cpu {
sound-dai = <&mcasp0>;
system-clock-frequency = <24000000>;
system-clock-id = <MCASP_CLK_HCLK_AUXCLK>;
};

simple-audio-card,codec {
sound-dai = <&tas2555 TAS2555_DAI_ASI1>;
clocks = <&clkout2_ck>;
};
};
23 changes: 23 additions & 0 deletions include/dt-bindings/sound/tas2555.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef __DT_TAS2555_H
#define __DT_TAS2555_H

#define TAS2555_MCLK_CLKIN_SRC_GPI2 (0) /* Default for MCLK */
#define TAS2555_MCLK_CLKIN_SRC_GPIO1 (1) /* Default for ASI1 BCLK */
#define TAS2555_MCLK_CLKIN_SRC_GPIO2 (2)
#define TAS2555_MCLK_CLKIN_SRC_GPIO3 (3)
#define TAS2555_MCLK_CLKIN_SRC_GPIO4 (4)
#define TAS2555_MCLK_CLKIN_SRC_GPIO5 (5)
#define TAS2555_MCLK_CLKIN_SRC_GPIO6 (6)
#define TAS2555_MCLK_CLKIN_SRC_GPIO7 (7)
#define TAS2555_MCLK_CLKIN_SRC_GPIO8 (8)
#define TAS2555_MCLK_CLKIN_SRC_GPIO9 (9)
#define TAS2555_MCLK_CLKIN_SRC_GPIO10 (10)
#define TAS2555_MCLK_CLKIN_SRC_GPI1 (11)
#define TAS2555_MCLK_CLKIN_SRC_GPI3 (12)

/* Digital audio interfaces */
#define TAS2555_DAI_ASI1 (0)
#define TAS2555_DAI_ASI2 (1)
#define TAS2555_DAI_ASIM (2)

#endif /* __DT_TAS2555_H */
6 changes: 6 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ config SND_SOC_ALL_CODECS
imply SND_SOC_STAC9766
imply SND_SOC_STI_SAS
imply SND_SOC_TAS2552
imply SND_SOC_TAS2555
imply SND_SOC_TAS2562
imply SND_SOC_TAS2764
imply SND_SOC_TAS2770
Expand Down Expand Up @@ -1389,6 +1390,11 @@ config SND_SOC_TAS2552
tristate "Texas Instruments TAS2552 Mono Audio amplifier"
depends on I2C

config SND_SOC_TAS2555
tristate "Texas Instruments TAS2555 High Performance 4W Smart Amplifier"
depends on I2C
select REGMAP_I2C

config SND_SOC_TAS2562
tristate "Texas Instruments TAS2562 Mono Audio amplifier"
depends on I2C
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,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-tas2555-objs := tas2555.o
snd-soc-tas2562-objs := tas2562.o
snd-soc-tas2764-objs := tas2764.o
# Mux
Expand Down Expand Up @@ -550,6 +551,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_TAS2555) += snd-soc-tas2555.o
obj-$(CONFIG_SND_SOC_TAS2562) += snd-soc-tas2562.o
obj-$(CONFIG_SND_SOC_TAS2764) += snd-soc-tas2764.o
obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o
Expand Down

0 comments on commit efe3a02

Please sign in to comment.