devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ASoC: tas2781: Add tas2568/2574/5806m/5806md/5830 support
@ 2025-11-14  7:33 Baojun Xu
  2025-11-14  7:33 ` [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support Baojun Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Baojun Xu @ 2025-11-14  7:33 UTC (permalink / raw)
  To: broonie, tiwai
  Cc: andriy.shevchenko, 13916275206, shenghao-ding, baojun.xu,
	linux-sound, linux-kernel, lgirdwood, robh, krzk+dt, conor+dt,
	devicetree, k-yi, henry.lo, robinchen, will-wang, jim.shil,
	toastcheng, chinkaiting

TAS5806M, TAS5806MD, TAS5830 has on-chip DSP without current/voltage
feedback, and in same family with TAS58XX.
TAS2568, TAS2574 is in family with TAS257X.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>

---
v2:
 - Add TAS2574 support.
---
 include/sound/tas2781.h        |  5 +++++
 sound/soc/codecs/tas2781-i2c.c | 29 ++++++++++++++++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index c3b4c43dd2bf..711142cb9918 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -117,15 +117,20 @@ enum audio_device {
 	TAS2120,
 	TAS2320,
 	TAS2563,
+	TAS2568,
 	TAS2570,
 	TAS2572,
+	TAS2574,
 	TAS2781,
 	TAS5802,
+	TAS5806M,
+	TAS5806MD,
 	TAS5815,
 	TAS5822,
 	TAS5825,
 	TAS5827,
 	TAS5828,
+	TAS5830,
 	TAS_OTHERS,
 };
 
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 7bd98ff5a250..0a86964dfcfd 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -105,15 +105,20 @@ static const struct i2c_device_id tasdevice_id[] = {
 	{ "tas2120", TAS2120 },
 	{ "tas2320", TAS2320 },
 	{ "tas2563", TAS2563 },
+	{ "tas2568", TAS2568 },
 	{ "tas2570", TAS2570 },
 	{ "tas2572", TAS2572 },
+	{ "tas2574", TAS2574 },
 	{ "tas2781", TAS2781 },
 	{ "tas5802", TAS5802 },
+	{ "tas5806m", TAS5806M },
+	{ "tas5806md", TAS5806MD },
 	{ "tas5815", TAS5815 },
 	{ "tas5822", TAS5822 },
 	{ "tas5825", TAS5825 },
 	{ "tas5827", TAS5827 },
 	{ "tas5828", TAS5828 },
+	{ "tas5830", TAS5830 },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -125,15 +130,20 @@ static const struct of_device_id tasdevice_of_match[] = {
 	{ .compatible = "ti,tas2120" },
 	{ .compatible = "ti,tas2320" },
 	{ .compatible = "ti,tas2563" },
+	{ .compatible = "ti,tas2568" },
 	{ .compatible = "ti,tas2570" },
 	{ .compatible = "ti,tas2572" },
+	{ .compatible = "ti,tas2574" },
 	{ .compatible = "ti,tas2781" },
 	{ .compatible = "ti,tas5802" },
+	{ .compatible = "ti,tas5806m" },
+	{ .compatible = "ti,tas5806md" },
 	{ .compatible = "ti,tas5815" },
 	{ .compatible = "ti,tas5822" },
 	{ .compatible = "ti,tas5825" },
 	{ .compatible = "ti,tas5827" },
 	{ .compatible = "ti,tas5828" },
+	{ .compatible = "ti,tas5830" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, tasdevice_of_match);
@@ -1643,8 +1653,10 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
 	case TAS2118:
 	case TAS2120:
 	case TAS2320:
+	case TAS2568:
 	case TAS2570:
 	case TAS2572:
+	case TAS2574:
 		goto out;
 	}
 	if (tas_priv->name_prefix)
@@ -1670,9 +1682,7 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
 	}
 	tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
 
-	/* There is no calibration required for
-	 * TAS5802/TAS5815/TAS5822/TAS5825/TAS5827/TAS5828.
-	 */
+	/* There is no calibration required for TAS58XX. */
 	if (tas_priv->chip_id < TAS5802) {
 		ret = tasdevice_create_cali_ctrls(tas_priv);
 		if (ret) {
@@ -1728,11 +1738,14 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
 		case TAS2563:
 		case TAS2781:
 		case TAS5802:
+		case TAS5806M:
+		case TAS5806MD:
 		case TAS5815:
 		case TAS5822:
 		case TAS5825:
 		case TAS5827:
 		case TAS5828:
+		case TAS5830:
 			/* If DSP FW fail, DSP kcontrol won't be created. */
 			tasdevice_dsp_remove(tas_priv);
 		}
@@ -1883,8 +1896,10 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)
 	case TAS2118:
 	case TAS2120:
 	case TAS2320:
+	case TAS2568:
 	case TAS2570:
 	case TAS2572:
+	case TAS2574:
 		p = (struct snd_kcontrol_new *)tas2x20_snd_controls;
 		size = ARRAY_SIZE(tas2x20_snd_controls);
 		tas_priv->dvc_tlv_table = tas2x20_dvc_table;
@@ -1894,11 +1909,14 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)
 		size = ARRAY_SIZE(tas2781_snd_controls);
 		break;
 	case TAS5802:
+	case TAS5806M:
+	case TAS5806MD:
 	case TAS5815:
 	case TAS5822:
 	case TAS5825:
 	case TAS5827:
 	case TAS5828:
+	case TAS5830:
 		p = (struct snd_kcontrol_new *)tas5825_snd_controls;
 		size = ARRAY_SIZE(tas5825_snd_controls);
 		break;
@@ -2072,15 +2090,20 @@ static const struct acpi_device_id tasdevice_acpi_match[] = {
 	{ "TXNW2120", TAS2120 },
 	{ "TXNW2320", TAS2320 },
 	{ "TXNW2563", TAS2563 },
+	{ "TXNW2568", TAS2568 },
 	{ "TXNW2570", TAS2570 },
 	{ "TXNW2572", TAS2572 },
+	{ "TXNW2574", TAS2574 },
 	{ "TXNW2781", TAS2781 },
 	{ "TXNW5802", TAS5802 },
+	{ "TXNW806M", TAS5806M },
+	{ "TXNW806D", TAS5806MD },
 	{ "TXNW5815", TAS5815 },
 	{ "TXNW5822", TAS5822 },
 	{ "TXNW5825", TAS5825 },
 	{ "TXNW5827", TAS5827 },
 	{ "TXNW5828", TAS5828 },
+	{ "TXNW5830", TAS5830 },
 	{},
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support
  2025-11-14  7:33 [PATCH v2 1/2] ASoC: tas2781: Add tas2568/2574/5806m/5806md/5830 support Baojun Xu
@ 2025-11-14  7:33 ` Baojun Xu
  2025-11-14  7:41   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Baojun Xu @ 2025-11-14  7:33 UTC (permalink / raw)
  To: broonie, tiwai
  Cc: andriy.shevchenko, 13916275206, shenghao-ding, baojun.xu,
	linux-sound, linux-kernel, lgirdwood, robh, krzk+dt, conor+dt,
	devicetree, k-yi, henry.lo, robinchen, will-wang, jim.shil,
	toastcheng, chinkaiting

TAS5806M, TAS5806MD and TAS5830 is in same family with TAS58XX.
TAS2568, TAS2574 is in family with TAS257X.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>

---
v2:
 - Add TAS2574 support.
 - Re-organize the patch, put compatible in front.
 - Combined some chips as the reg setting is same (0x48-0x4b).
---
 .../devicetree/bindings/sound/ti,tas2781.yaml | 103 ++++++++++++------
 1 file changed, 69 insertions(+), 34 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
index f0bb5faf55c8..224999ed6529 100644
--- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
@@ -34,15 +34,61 @@ description: |
     https://www.ti.com/lit/gpn/tas2320
     https://www.ti.com/lit/gpn/tas2563
     https://www.ti.com/lit/gpn/tas2572
+    https://www.ti.com/lit/gpn/tas2574
     https://www.ti.com/lit/gpn/tas2781
+    https://www.ti.com/lit/gpn/tas5806m
+    https://www.ti.com/lit/gpn/tas5806md
     https://www.ti.com/lit/gpn/tas5815
     https://www.ti.com/lit/gpn/tas5822m
     https://www.ti.com/lit/gpn/tas5825m
     https://www.ti.com/lit/gpn/tas5827
     https://www.ti.com/lit/gpn/tas5828m
+    https://www.ti.com/lit/gpn/tas5830
 
 properties:
   compatible:
+    oneOf:
+      - enum:
+          - ti,tas2020
+          - ti,tas2118
+          - ti,tas2120
+          - ti,tas2320
+          - ti,tas2563
+          - ti,tas2568
+          - ti,tas2570
+          - ti,tas2572
+          - ti,tas2574
+          - ti,tas2781
+          - ti,tas5802
+          - ti,tas5806m
+          - ti,tas5806md
+          - ti,tas5815
+          - ti,tas5822
+          - ti,tas5825
+          - ti,tas5827
+          - ti,tas5828
+          - ti,tas5830
+      - items:
+          - enum:
+              - ti,tas2020
+              - ti,tas2118
+              - ti,tas2120
+              - ti,tas2320
+              - ti,tas2563
+              - ti,tas2568
+              - ti,tas2570
+              - ti,tas2572
+              - ti,tas5802
+              - ti,tas5806m
+              - ti,tas5806md
+              - ti,tas5815
+              - ti,tas5822
+              - ti,tas5825
+              - ti,tas5827
+              - ti,tas5828
+              - ti,tas5830
+          - const: ti,tas2781
+
     description: |
       ti,tas2020: 3.2-W Mono Digital Input Class-D Speaker Amp with 5.5V PVDD
       Support.
@@ -58,12 +104,18 @@ properties:
       ti,tas2563: 6.1-W Boosted Class-D Audio Amplifier With Integrated
       DSP and IV Sense, 16/20/24/32bit stereo I2S or multichannel TDM.
 
+      ti,tas2568: 5.3-W Digital Input Smart Amp with I/V Sense and Integrated
+      10.75-V Class-H Boost
+
       ti,tas2570: 5.8-W Digital Input smart amp with I/V sense and integrated
       11-V Class-H Boost
 
       ti,tas2572: 6.6-W Digital Input smart amp with I/V sense and integrated
       13-V Class-H Boost
 
+      ti,tas2574: 8.5-W Digital Input smart amp with I/V sense and integrated
+      15-V Class-H Boost
+
       ti,tas2781: 24-V Class-D Amplifier with Real Time Integrated Speaker
       Protection and Audio Processing, 16/20/24/32bit stereo I2S or
       multichannel TDM.
@@ -72,6 +124,14 @@ properties:
       Audio Amplifier with 96-Khz Extended Processing and Low Idle Power
       Dissipation.
 
+      ti,tas5806m: 23-W, Inductor-Less, Digital Input, Stereo, Closed-Loop
+      Class-D Audio Amplifier with Enhanced Processing and Low Power
+      Dissipation.
+
+      ti,tas5806md: 23-W, Inductor-Less, Digital Input, Stereo, Closed-Loop
+      Class-D Audio Amplifier with Enhanced Processing and DirectPath(TM)
+      HP Driver
+
       ti,tas5815: 30-W, Digital Input, Stereo, Closed-loop Class-D Audio
       Amplifier with 96 kHz Enhanced Processing
 
@@ -86,26 +146,9 @@ properties:
 
       ti,tas5828: 50-W Stereo, Digital Input, High Efficiency Closed-Loop
       Class-D Amplifier with Hybrid-Pro Algorithm
-    oneOf:
-      - items:
-          - enum:
-              - ti,tas2020
-              - ti,tas2118
-              - ti,tas2120
-              - ti,tas2320
-              - ti,tas2563
-              - ti,tas2570
-              - ti,tas2572
-              - ti,tas5802
-              - ti,tas5815
-              - ti,tas5822
-              - ti,tas5825
-              - ti,tas5827
-              - ti,tas5828
-          - const: ti,tas2781
-      - enum:
-          - ti,tas2781
 
+      ti,tas5830: 65-W Stereo, Digital Input, High Efficiency Closed-Loop
+      Class-D Amplifier with Class-H Algorithm
   reg:
     description:
       I2C address, in multiple-AMP case, all the i2c address
@@ -137,6 +180,10 @@ allOf:
               - ti,tas2118
               - ti,tas2120
               - ti,tas2320
+              - ti,tas2568
+              - ti,tas2570
+              - ti,tas2572
+              - ti,tas2574
     then:
       properties:
         reg:
@@ -164,21 +211,6 @@ allOf:
             minimum: 0x4c
             maximum: 0x4f
 
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - ti,tas2570
-              - ti,tas2572
-    then:
-      properties:
-        reg:
-          maxItems: 4
-          items:
-            minimum: 0x48
-            maximum: 0x4b
-
   - if:
       properties:
         compatible:
@@ -217,6 +249,8 @@ allOf:
         compatible:
           contains:
             enum:
+              - ti,tas5806m
+              - ti,tas5806md
               - ti,tas5822
     then:
       properties:
@@ -233,6 +267,7 @@ allOf:
             enum:
               - ti,tas5827
               - ti,tas5828
+              - ti,tas5830
     then:
       properties:
         reg:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support
  2025-11-14  7:33 ` [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support Baojun Xu
@ 2025-11-14  7:41   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-14  7:41 UTC (permalink / raw)
  To: Baojun Xu, broonie, tiwai
  Cc: andriy.shevchenko, 13916275206, shenghao-ding, linux-sound,
	linux-kernel, lgirdwood, robh, krzk+dt, conor+dt, devicetree,
	k-yi, henry.lo, robinchen, will-wang, jim.shil, toastcheng,
	chinkaiting

On 14/11/2025 08:33, Baojun Xu wrote:
> TAS5806M, TAS5806MD and TAS5830 is in same family with TAS58XX.
> TAS2568, TAS2574 is in family with TAS257X.
> 
> Signed-off-by: Baojun Xu <baojun.xu@ti.com>
> 
> ---
> v2:
>  - Add TAS2574 support.
>  - Re-organize the patch, put compatible in front.
>  - Combined some chips as the reg setting is same (0x48-0x4b).

You need to provide reasons for dropping tags.

> ---
>  .../devicetree/bindings/sound/ti,tas2781.yaml | 103 ++++++++++++------
>  1 file changed, 69 insertions(+), 34 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> index f0bb5faf55c8..224999ed6529 100644
> --- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> @@ -34,15 +34,61 @@ description: |
>      https://www.ti.com/lit/gpn/tas2320
>      https://www.ti.com/lit/gpn/tas2563
>      https://www.ti.com/lit/gpn/tas2572
> +    https://www.ti.com/lit/gpn/tas2574
>      https://www.ti.com/lit/gpn/tas2781
> +    https://www.ti.com/lit/gpn/tas5806m
> +    https://www.ti.com/lit/gpn/tas5806md
>      https://www.ti.com/lit/gpn/tas5815
>      https://www.ti.com/lit/gpn/tas5822m
>      https://www.ti.com/lit/gpn/tas5825m
>      https://www.ti.com/lit/gpn/tas5827
>      https://www.ti.com/lit/gpn/tas5828m
> +    https://www.ti.com/lit/gpn/tas5830
>  
>  properties:
>    compatible:
> +    oneOf:
> +      - enum:
> +          - ti,tas2020
> +          - ti,tas2118
> +          - ti,tas2120
> +          - ti,tas2320
> +          - ti,tas2563
> +          - ti,tas2568
> +          - ti,tas2570
> +          - ti,tas2572
> +          - ti,tas2574
> +          - ti,tas2781
> +          - ti,tas5802
> +          - ti,tas5806m
> +          - ti,tas5806md
> +          - ti,tas5815
> +          - ti,tas5822
> +          - ti,tas5825
> +          - ti,tas5827
> +          - ti,tas5828
> +          - ti,tas5830
> +      - items:
> +          - enum:
> +              - ti,tas2020

No, this makes no sense. Device is not both - compatible and not
compatible - at the same time.

Also, rest of my comments were not implemented.

Go back to previous version and read the feedback again. You can reach
to more experienced colleagues in TI who should explain you basics of
upstreaming process. Or listen to one of many speeches/presentations on
upstreaming from conferences or trainings. Or read Linaro's guide on
their blog. It is your homework.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-14  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14  7:33 [PATCH v2 1/2] ASoC: tas2781: Add tas2568/2574/5806m/5806md/5830 support Baojun Xu
2025-11-14  7:33 ` [PATCH v2 2/2] ASoC: dt-bindings: ti,tas2781: Add TAS2568/2574/5806M/5806MD/5830 support Baojun Xu
2025-11-14  7:41   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).