add tas2780
PATCH v4 1/2 add tas2780
1.update Kconfig and Makefile 2.add tas2780.c and tas2780.h
--- sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/tas2780.c | 663 +++++++++++++++++++++++++++++++++++++ sound/soc/codecs/tas2780.h | 101 ++++++ 4 files changed, 774 insertions(+) create mode 100644 sound/soc/codecs/tas2780.c create mode 100644 sound/soc/codecs/tas2780.h
sound/soc/codecs/Kconfig +8 -0
@@ -219,6 +219,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_TAS2562 imply SND_SOC_TAS2764 imply SND_SOC_TAS2770 + imply SND_SOC_TAS2780 imply SND_SOC_TAS5086 imply SND_SOC_TAS571X imply SND_SOC_TAS5720
@@ -1524,6 +1525,13 @@ config SND_SOC_TAS2770 tristate "Texas Instruments TAS2770 speaker amplifier" depends on I2C +config SND_SOC_TAS2780 + tristate "Texas Instruments TAS2780 Mono Audio amplifier" + depends on I2C + help + Enable support for Texas Instruments TAS2780 high-efficiency + digital input mono Class-D audio power amplifiers. + config SND_SOC_TAS5086 tristate "Texas Instruments TAS5086 speaker amplifier" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -346,6 +346,7 @@ snd-soc-tpa6130a2-objs := tpa6130a2.o snd-soc-tas2552-objs := tas2552.o snd-soc-tas2562-objs := tas2562.o snd-soc-tas2764-objs := tas2764.o +snd-soc-tas2780-objs := tas2780.o # Mux snd-soc-simple-mux-objs := simple-mux.o
@@ -589,6 +590,7 @@ 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_TAS2764) += snd-soc-tas2764.o +obj-$(CONFIG_SND_SOC_TAS2780) += snd-soc-tas2780.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/tas2780.c new file +663 -0
663 lines not on this page · raw message
sound/soc/codecs/tas2780.h new file +101 -0
101 lines not on this page · raw message
Signature · 1 line
2.35.1
PATCH v4 2/2 add tas2780
add tas2780.yaml
--- .../devicetree/bindings/sound/tas2780.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tas2780.yaml
Documentation/devicetree/bindings/sound/tas2780.yaml new file +72 -0
@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020-2022 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/sound/tas2780.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Texas Instruments TAS2780 Smart PA + +maintainers: + - Raphael Xu <[email protected]> + +description: | + The TAS2780 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. + +properties: + compatible: + enum: + - ti,tas2780 + + reg: + maxItems: 1 + description: | + I2C address of the device can be between 0x38 to 0x45. + + reset-gpios: + maxItems: 1 + description: GPIO used to reset the device. + + interrupts: + maxItems: 1 + + ti,imon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX current sense time slot. + + ti,vmon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX voltage sense time slot. + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + codec: codec@38 { + compatible = "ti,tas2780"; + reg = <0x38>; + #sound-dai-cells = <1>; + interrupt-parent = <&gpio1>; + interrupts = <14>; + reset-gpios = <&gpio1 15 0>; + shutdown-gpios = <&gpio1 15 0>; + ti,imon-slot-no = <0>; + ti,vmon-slot-no = <2>; + }; + }; + +...
Signature · 1 line
2.35.1
Rob Herring
maintainerQuoted 1 line · Raphael-Xu
add
tas2780.yaml
I see this is already in linux-next, and it has a warning:
Documentation/devicetree/bindings/sound/tas2780.example.dtb: codec@38: 'shutdown-gpios' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/sound/tas2780.yaml
Please send a fix for this and the comments below.
No checks ran and no review happened because the DT list was not Cc'ed. Please use get_maintainers.pl for where to send patches.
Also the subjects need some work. Use 'git log --oneline <path>' for a idea of what the subject should start with. I imagine Mark fixed it for you.
Quoted 30 lines
Signed-off-by Raphael-Xu <[email protected]>--- .../devicetree/bindings/sound/tas2780.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tas2780.yamlDocumentation/devicetree/bindings/sound/tas2780.yaml new file +17
-0@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020-2022 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/sound/tas2780.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Texas Instruments TAS2780 Smart PA + +maintainers: + - Raphael Xu <[email protected]> + +description: | + The TAS2780 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.
Documentation/devicetree/bindings/sound/tas2780.yaml line 27
Quoted 10 lines
Documentation/devicetree/bindings/sound/tas2780.yaml new file +10
-0+ +properties: + compatible: + enum: + - ti,tas2780 + + reg: + maxItems: 1 + description: | + I2C address of the device can be between 0x38 to 0x45.
Can be constraints instead:
items:
- items:
- minimum: 0x38
maximum: 0x45
Documentation/devicetree/bindings/sound/tas2780.yaml line 38
Quoted 11 lines
Documentation/devicetree/bindings/sound/tas2780.yaml new file +11
-0+ + reset-gpios: + maxItems: 1 + description: GPIO used to reset the device. + + interrupts: + maxItems: 1 + + ti,imon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX current sense time slot.
constraints? 0 - 2^32 is valid?
Quoted 39 lines
Documentation/devicetree/bindings/sound/tas2780.yaml new file +34
-0+ + ti,vmon-slot-no: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TDM TX voltage sense time slot. + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + codec: codec@38 { + compatible = "ti,tas2780"; + reg = <0x38>; + #sound-dai-cells = <1>; + interrupt-parent = <&gpio1>; + interrupts = <14>; + reset-gpios = <&gpio1 15 0>; + shutdown-gpios = <&gpio1 15 0>; + ti,imon-slot-no = <0>; + ti,vmon-slot-no = <2>; + }; + }; + +...Signature · 1 line
2.35.1
Mark Brown
maintainerQuoted 3 lines · Raphael-Xu
1.update
KconfigandMakefile2.addtas2780.candtas2780.h
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] add tas2780
commit: eae9f9ce181be4f47dcba1ee93185b71cac3f312
[2/2] add tas2780
commit: a6426e7189e09bdf8decffd8a539f3727b672d3eAll 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