[PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers

Nick posted 4 patches 2 months, 2 weeks ago
There is a newer version of this series
[PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Nick 2 months, 2 weeks ago
From: Nick Li <nick.li@foursemi.com>

Add a DT schema for describing FourSemi FS2104/5S
audio amplifiers which support both I2S and I2C interface.

Signed-off-by: Nick Li <nick.li@foursemi.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/sound/foursemi,fs2105s.yaml      | 99 +++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml

diff --git a/Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml b/Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml
new file mode 100644
index 000000000..7391c404a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/foursemi,fs2105s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FourSemi FS2104/5S Digital Audio Amplifier
+
+maintainers:
+  - Nick Li <nick.li@foursemi.com>
+
+description:
+  The FS2104 is a 15W Inductor-Less, Stereo, Closed-Loop,
+  Digital Input Class-D Power Amplifier with Enhanced Signal Processing.
+  The FS2105S is a 30W Inductor-Less, Stereo, Closed-Loop,
+  Digital Input Class-D Power Amplifier with Enhanced Signal Processing.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - foursemi,fs2104
+          - const: foursemi,fs2105s
+      - enum:
+          - foursemi,fs2105s
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: The clock of I2S BCLK
+
+  clock-names:
+    items:
+      - const: bclk
+
+  interrupts:
+    maxItems: 1
+
+  '#sound-dai-cells':
+    const: 0
+
+  pvdd-supply:
+    description:
+      Regulator for power supply(PVDD in datasheet).
+
+  dvdd-supply:
+    description:
+      Regulator for digital supply(DVDD in datasheet).
+
+  reset-gpios:
+    maxItems: 1
+    description:
+      It's the SDZ pin in datasheet, the pin is active low,
+      it will power down and reset the chip to shut down state.
+
+  firmware-name:
+    maxItems: 1
+    description: |
+      The firmware(*.bin) contains:
+      a. Register initialization settings
+      b. DSP effect parameters
+      c. Multi-scene sound effect configurations(optional)
+      It's gernerated by FourSemi's tuning tool.
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+  - reset-gpios
+  - firmware-name
+
+allOf:
+  - $ref: dai-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        audio-codec@68 {
+            compatible = "foursemi,fs2105s";
+            reg = <0x68>;
+            clocks = <&clocks 18>;
+            clock-names = "bclk";
+            #sound-dai-cells = <0>;
+            pvdd-supply = <&pvdd_supply>;
+            dvdd-supply = <&dvdd_supply>;
+            reset-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+            firmware-name = "fs2105s-btl-2p0-0s.bin";
+            pinctrl-names = "default";
+            pinctrl-0 = <&fs210x_pins_default>;
+        };
+    };
-- 
2.39.5
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Krzysztof Kozlowski 2 months, 2 weeks ago
On 21/07/2025 12:38, Nick wrote:
> +  firmware-name:
> +    maxItems: 1
> +    description: |
> +      The firmware(*.bin) contains:
> +      a. Register initialization settings
> +      b. DSP effect parameters
> +      c. Multi-scene sound effect configurations(optional)
> +      It's gernerated by FourSemi's tuning tool.
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#sound-dai-cells'
> +  - reset-gpios
> +  - firmware-name


I do not see how you resolved my comment from v1 or v2. Nothing in the
changelog explains that either.


Best regards,
Krzysztof
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Nick Li 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 12:48:24PM +0200, Krzysztof Kozlowski wrote:
> On 21/07/2025 12:38, Nick wrote:
> > +  firmware-name:
> > +    maxItems: 1
> > +    description: |
> > +      The firmware(*.bin) contains:
> > +      a. Register initialization settings
> > +      b. DSP effect parameters
> > +      c. Multi-scene sound effect configurations(optional)
> > +      It's gernerated by FourSemi's tuning tool.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - '#sound-dai-cells'
> > +  - reset-gpios
> > +  - firmware-name
> 
> 
> I do not see how you resolved my comment from v1 or v2. Nothing in the
> changelog explains that either.

Change logs are in the cover letter:
...
v2 -> v3:
.../foursemi,fs2105s.yaml(patch 0002)
- Drop "schema for " in the patch subject
- Delete the description of the property reg
- Restore the property clocks to v1
- Keep the same order as in list of properties
...
v1 -> v2:
- Adjust the order of patches according to the dependency relationship
- Rename yaml file to foursemi,fs2105s.yaml
- Fix some properties and error definitions in foursemi,fs2105s.yaml:
  sdz-gpios -> reset->gpios
  fs,fwm-name -> firmware-name
  Delete fs,dai-name
- Drop "dt-bindings for" from subject
- Update the driver code according to the update of DT schema
- Fix warnings/errors reported by running checkpatch.pl --strict
- Fix warnings/errors reported by running make dt_bindings_check

Thanks.

Best regards,
Nick

> 
> 
> Best regards,
> Krzysztof
>
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Krzysztof Kozlowski 2 months, 2 weeks ago
On 21/07/2025 14:02, Nick Li wrote:
> On Mon, Jul 21, 2025 at 12:48:24PM +0200, Krzysztof Kozlowski wrote:
>> On 21/07/2025 12:38, Nick wrote:
>>> +  firmware-name:
>>> +    maxItems: 1
>>> +    description: |
>>> +      The firmware(*.bin) contains:
>>> +      a. Register initialization settings
>>> +      b. DSP effect parameters
>>> +      c. Multi-scene sound effect configurations(optional)
>>> +      It's gernerated by FourSemi's tuning tool.
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - '#sound-dai-cells'
>>> +  - reset-gpios
>>> +  - firmware-name
>>
>>
>> I do not see how you resolved my comment from v1 or v2. Nothing in the
>> changelog explains that either.
> 
> Change logs are in the cover letter:


And as I said I do not see resolution of my comment.

If you reject reviewers comment, usually it should be mentioned in the
changelog.

Otherwise you get now the same review as v1 or v2. Devices cannot work
without power.

Best regards,
Krzysztof
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Nick Li 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 02:15:38PM +0200, Krzysztof Kozlowski wrote:
> On 21/07/2025 14:02, Nick Li wrote:
> > On Mon, Jul 21, 2025 at 12:48:24PM +0200, Krzysztof Kozlowski wrote:
> >> On 21/07/2025 12:38, Nick wrote:
> >>> +  firmware-name:
> >>> +    maxItems: 1
> >>> +    description: |
> >>> +      The firmware(*.bin) contains:
> >>> +      a. Register initialization settings
> >>> +      b. DSP effect parameters
> >>> +      c. Multi-scene sound effect configurations(optional)
> >>> +      It's gernerated by FourSemi's tuning tool.
> >>> +
> >>> +required:
> >>> +  - compatible
> >>> +  - reg
> >>> +  - '#sound-dai-cells'
> >>> +  - reset-gpios
> >>> +  - firmware-name
> >>
> >>
> >> I do not see how you resolved my comment from v1 or v2. Nothing in the
> >> changelog explains that either.
> > 
> > Change logs are in the cover letter:
> 
> 
> And as I said I do not see resolution of my comment.
> 
> If you reject reviewers comment, usually it should be mentioned in the
> changelog.

Understood.

> 
> Otherwise you get now the same review as v1 or v2. Devices cannot work
> without power.

OK.
We will add the supplies into section[required] for the solution.

Thanks.

Best regards,
Nick

> 
> Best regards,
> Krzysztof
>
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Nick Li 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 02:15:38PM +0200, Krzysztof Kozlowski wrote:
> On 21/07/2025 14:02, Nick Li wrote:
> > On Mon, Jul 21, 2025 at 12:48:24PM +0200, Krzysztof Kozlowski wrote:
> >> On 21/07/2025 12:38, Nick wrote:
> >>> +  firmware-name:
> >>> +    maxItems: 1
> >>> +    description: |
> >>> +      The firmware(*.bin) contains:
> >>> +      a. Register initialization settings
> >>> +      b. DSP effect parameters
> >>> +      c. Multi-scene sound effect configurations(optional)
> >>> +      It's gernerated by FourSemi's tuning tool.
> >>> +
> >>> +required:
> >>> +  - compatible
> >>> +  - reg
> >>> +  - '#sound-dai-cells'
> >>> +  - reset-gpios
> >>> +  - firmware-name
> >>
> >>
> >> I do not see how you resolved my comment from v1 or v2. Nothing in the
> >> changelog explains that either.
> > 
> > Change logs are in the cover letter:
> 
> 
> And as I said I do not see resolution of my comment.
> 
> If you reject reviewers comment, usually it should be mentioned in the
> changelog.
> 
> Otherwise you get now the same review as v1 or v2. Devices cannot work
> without power.

I explained it in the previous email:
The power may be connected to the baterry/adapter directly,
it may not be under the control of the software,
in this case, the supplies are use as dummy regulators?

And we tested the driver without the supplies in DTS,
so I didn't mark the supplies as the required items.

Best regards,
Nick

> 
> Best regards,
> Krzysztof
>
Re: [PATCH v4 2/4] ASoC: dt-bindings: Add FS2104/5S audio amplifiers
Posted by Krzysztof Kozlowski 2 months, 2 weeks ago
On 21/07/2025 14:40, Nick Li wrote:
> On Mon, Jul 21, 2025 at 02:15:38PM +0200, Krzysztof Kozlowski wrote:
>> On 21/07/2025 14:02, Nick Li wrote:
>>> On Mon, Jul 21, 2025 at 12:48:24PM +0200, Krzysztof Kozlowski wrote:
>>>> On 21/07/2025 12:38, Nick wrote:
>>>>> +  firmware-name:
>>>>> +    maxItems: 1
>>>>> +    description: |
>>>>> +      The firmware(*.bin) contains:
>>>>> +      a. Register initialization settings
>>>>> +      b. DSP effect parameters
>>>>> +      c. Multi-scene sound effect configurations(optional)
>>>>> +      It's gernerated by FourSemi's tuning tool.
>>>>> +
>>>>> +required:
>>>>> +  - compatible
>>>>> +  - reg
>>>>> +  - '#sound-dai-cells'
>>>>> +  - reset-gpios
>>>>> +  - firmware-name
>>>>
>>>>
>>>> I do not see how you resolved my comment from v1 or v2. Nothing in the
>>>> changelog explains that either.
>>>
>>> Change logs are in the cover letter:
>>
>>
>> And as I said I do not see resolution of my comment.
>>
>> If you reject reviewers comment, usually it should be mentioned in the
>> changelog.
>>
>> Otherwise you get now the same review as v1 or v2. Devices cannot work
>> without power.
> 
> I explained it in the previous email:
> The power may be connected to the baterry/adapter directly,
> it may not be under the control of the software,
> in this case, the supplies are use as dummy regulators?

You describe here this device, not the board. Does this device needs
this to be connected to source of power? Battery is such source.

> 
> And we tested the driver without the supplies in DTS,

That's a terrible argument. If I do random changes in my bootloader like
toggle on clocks, does that mean that hardware does not need that thing
(like clocks)?

> so I didn't mark the supplies as the required items.

Changelog also did not say you did not implement the comment.

Best regards,
Krzysztof