[v1,3/3] ASoC: dt-bindings: Add tas2563 into yaml

Message ID 20231209080742.1290-3-shenghao-ding@ti.com
State New
Headers
Series [v1,1/3] ASoC: tas2781: Add tas2563 into header file |

Commit Message

Ding, Shenghao Dec. 9, 2023, 8:07 a.m. UTC
  Support tas2563.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
---
 .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
  

Comments

Krzysztof Kozlowski Dec. 9, 2023, 8:13 a.m. UTC | #1
On 09/12/2023 09:07, Shenghao Ding wrote:
> Support tas2563.
> 
> Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
> ---
>  .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> index a69e6c223308..84e197e15df4 100644
> --- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> @@ -11,11 +11,11 @@ maintainers:
>    - Shenghao Ding <shenghao-ding@ti.com>
>  
>  description:
> -  The TAS2781 is a mono, digital input Class-D audio amplifier
> -  optimized for efficiently driving high peak power into small
> -  loudspeakers. An integrated on-chip DSP supports Texas Instruments
> -  Smart Amp speaker protection algorithm. The integrated speaker
> -  voltage and current sense provides for real time
> +  The TAS2781/TAS2563 is a mono, digital input Class-D audio
> +  amplifier optimized for efficiently driving high peak power into
> +  small loudspeakers. An integrated on-chip DSP supports Texas
> +  Instruments Smart Amp speaker protection algorithm. The
> +  integrated speaker voltage and current sense provides for real time
>    monitoring of loudspeaker behavior.
>  
>  allOf:
> @@ -25,16 +25,19 @@ properties:
>    compatible:
>      enum:
>        - ti,tas2781
> +      - ti,tas2563

Looks like devices are compatible, so express it in the bindings with a
fallback and drop driver patches.

Best regards,
Krzysztof
  
Ding, Shenghao Dec. 9, 2023, 8:30 a.m. UTC | #2
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Saturday, December 9, 2023 4:13 PM
> To: Ding, Shenghao <shenghao-ding@ti.com>; broonie@kernel.org
> Cc: robh+dt@kernel.org; andriy.shevchenko@linux.intel.com;
> lgirdwood@gmail.com; perex@perex.cz; pierre-louis.bossart@linux.intel.com;
> 13916275206@139.com; alsa-devel@alsa-project.org; linux-
> kernel@vger.kernel.org; liam.r.girdwood@intel.com; soyer@irl.hu;
> tiwai@suse.de
> Subject: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into
> yaml
> 
> On 09/12/2023 09:07, Shenghao Ding wrote:
> > Support tas2563.
> >
> > Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
> > ---
> >  .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
> >  1 file changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> > b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> > index a69e6c223308..84e197e15df4 100644
> > --- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> > +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
> > @@ -11,11 +11,11 @@ maintainers:
> >    - Shenghao Ding <shenghao-ding@ti.com>
> >
> >  description:
> > -  The TAS2781 is a mono, digital input Class-D audio amplifier
> > -  optimized for efficiently driving high peak power into small
> > -  loudspeakers. An integrated on-chip DSP supports Texas Instruments
> > -  Smart Amp speaker protection algorithm. The integrated speaker
> > -  voltage and current sense provides for real time
> > +  The TAS2781/TAS2563 is a mono, digital input Class-D audio
> > + amplifier optimized for efficiently driving high peak power into
> > + small loudspeakers. An integrated on-chip DSP supports Texas
> > + Instruments Smart Amp speaker protection algorithm. The  integrated
> > + speaker voltage and current sense provides for real time
> >    monitoring of loudspeaker behavior.
> >
> >  allOf:
> > @@ -25,16 +25,19 @@ properties:
> >    compatible:
> >      enum:
> >        - ti,tas2781
> > +      - ti,tas2563
> 
> Looks like devices are compatible, so express it in the bindings with a fallback
> and drop driver patches.
Exactly. Do you mean combine the three patches into one patch?
> 
> Best regards,
> Krzysztof
  
Krzysztof Kozlowski Dec. 9, 2023, 10:30 a.m. UTC | #3
On 09/12/2023 09:30, Ding, Shenghao wrote:
> 
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: Saturday, December 9, 2023 4:13 PM
>> To: Ding, Shenghao <shenghao-ding@ti.com>; broonie@kernel.org
>> Cc: robh+dt@kernel.org; andriy.shevchenko@linux.intel.com;
>> lgirdwood@gmail.com; perex@perex.cz; pierre-louis.bossart@linux.intel.com;
>> 13916275206@139.com; alsa-devel@alsa-project.org; linux-
>> kernel@vger.kernel.org; liam.r.girdwood@intel.com; soyer@irl.hu;
>> tiwai@suse.de
>> Subject: [EXTERNAL] Re: [PATCH v1 3/3] ASoC: dt-bindings: Add tas2563 into
>> yaml
>>
>> On 09/12/2023 09:07, Shenghao Ding wrote:
>>> Support tas2563.
>>>
>>> Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
>>> ---
>>>  .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
>>>  1 file changed, 10 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
>>> b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
>>> index a69e6c223308..84e197e15df4 100644
>>> --- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
>>> +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
>>> @@ -11,11 +11,11 @@ maintainers:
>>>    - Shenghao Ding <shenghao-ding@ti.com>
>>>
>>>  description:
>>> -  The TAS2781 is a mono, digital input Class-D audio amplifier
>>> -  optimized for efficiently driving high peak power into small
>>> -  loudspeakers. An integrated on-chip DSP supports Texas Instruments
>>> -  Smart Amp speaker protection algorithm. The integrated speaker
>>> -  voltage and current sense provides for real time
>>> +  The TAS2781/TAS2563 is a mono, digital input Class-D audio
>>> + amplifier optimized for efficiently driving high peak power into
>>> + small loudspeakers. An integrated on-chip DSP supports Texas
>>> + Instruments Smart Amp speaker protection algorithm. The  integrated
>>> + speaker voltage and current sense provides for real time
>>>    monitoring of loudspeaker behavior.
>>>
>>>  allOf:
>>> @@ -25,16 +25,19 @@ properties:
>>>    compatible:
>>>      enum:
>>>        - ti,tas2781
>>> +      - ti,tas2563
>>
>> Looks like devices are compatible, so express it in the bindings with a fallback
>> and drop driver patches.
> Exactly. Do you mean combine the three patches into one patch?

No, driver changes should be dropped - I do not see their value.
Compatibility should be expressed in the bindings. Look at
example-schema (and hundreds of other bindings).

Best regards,
Krzysztof
  
Krzysztof Kozlowski Dec. 9, 2023, 1:52 p.m. UTC | #4
On 09/12/2023 09:07, Shenghao Ding wrote:
> Support tas2563.
> 
> Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
> ---
>  .../devicetree/bindings/sound/ti,tas2781.yaml   | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

Best regards,
Krzysztof
  

Patch

diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
index a69e6c223308..84e197e15df4 100644
--- a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml
@@ -11,11 +11,11 @@  maintainers:
   - Shenghao Ding <shenghao-ding@ti.com>
 
 description:
-  The TAS2781 is a mono, digital input Class-D audio amplifier
-  optimized for efficiently driving high peak power into small
-  loudspeakers. An integrated on-chip DSP supports Texas Instruments
-  Smart Amp speaker protection algorithm. The integrated speaker
-  voltage and current sense provides for real time
+  The TAS2781/TAS2563 is a mono, digital input Class-D audio
+  amplifier optimized for efficiently driving high peak power into
+  small loudspeakers. An integrated on-chip DSP supports Texas
+  Instruments Smart Amp speaker protection algorithm. The
+  integrated speaker voltage and current sense provides for real time
   monitoring of loudspeaker behavior.
 
 allOf:
@@ -25,16 +25,19 @@  properties:
   compatible:
     enum:
       - ti,tas2781
+      - ti,tas2563
 
   reg:
     description:
-      I2C address, in multiple tas2781s case, all the i2c address
+      I2C address, in multiple AMP case, all the i2c address
       aggregate as one Audio Device to support multiple audio slots.
+      For tas2781, i2c address is from 0x38 to 0x3f; For tas2563,
+      i2c address is from 0x4e to 0x4f.
     maxItems: 8
     minItems: 1
     items:
       minimum: 0x38
-      maximum: 0x3f
+      maximum: 0x4f
 
   reset-gpios:
     maxItems: 1