diff mbox series

tas2770: add tas2770 smart PA dt bindings

Message ID 1567753564-13699-1-git-send-email-shifu0704@thundersoft.com (mailing list archive)
State New, archived
Headers show
Series tas2770: add tas2770 smart PA dt bindings | expand

Commit Message

shifu0704@thundersoft.com Sept. 6, 2019, 7:06 a.m. UTC
From: Frank Shi <shifu0704@thundersoft.com>

add tas2770 smart PA dt bindings

Signed-off-by: Frank Shi <shifu0704@thundersoft.com>
---
 Documentation/devicetree/bindings/tas2770.txt | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/tas2770.txt

Comments

Mark Brown Sept. 10, 2019, 11:37 a.m. UTC | #1
On Fri, Sep 06, 2019 at 03:06:03PM +0800, shifu0704@thundersoft.com wrote:

> + - ti,left-slot:   - Sets TDM RX left time slots.
> + - ti,right-slot:  - Sets TDM RX right time slots.

This looks like it's duplicating things that are normally done
with the set_tdm_slot() callback.  Otherwise the binding looks
good.
Dan Murphy Sept. 10, 2019, 1:21 p.m. UTC | #2
Shi

On 9/6/19 2:06 AM, shifu0704@thundersoft.com wrote:
> From: Frank Shi <shifu0704@thundersoft.com>

Subject should be

dt-bindings: ASoC: Add tas2770 smart PA dt bindings

Also Please add Rob Herring <robh+dt@kernel.org> for review

> add tas2770 smart PA dt bindings
>
> Signed-off-by: Frank Shi <shifu0704@thundersoft.com>
> ---
>   Documentation/devicetree/bindings/tas2770.txt | 38 +++++++++++++++++++++++++++
>   1 file changed, 38 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/tas2770.txt
>
> diff --git a/Documentation/devicetree/bindings/tas2770.txt b/Documentation/devicetree/bindings/tas2770.txt
> new file mode 100644
> index 0000000..f70b310
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/tas2770.txt
> @@ -0,0 +1,38 @@
> +Texas Instruments TAS2770 Smart PA
> +
> +The TAS2770 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.
> +
> +Required properties:
> +
> + - compatible:	   - Should contain "ti,tas2770".
> + - reg:		       - The i2c address. Should contain <0x4c>, <0x4d>,<0x4e>, or <0x4f>.
s/should/may
> + - #address-cells  - Should be <1>.
> + - #size-cells     - Should be <0>.
> + - ti,asi-format:  - Sets TDM RX capture edge. 0->Rising; 1->Falling.
> + - ti,left-slot:   - Sets TDM RX left time slots.
> + - ti,right-slot:  - Sets TDM RX right time slots.
> + - ti,imon-slot-no:- TDM TX current sense time slot.
> + - ti,vmon-slot-no:- TDM TX voltage sense time slot.
> +
> +Optional properties:
> +
> + - reset-gpio:	Reset GPIO number of left device.
> + - irq-gpio:  IRQ GPIO number of left device.

You might want to use

- interrupt-parent: the phandle to the interrupt controller which provides
                     the interrupt.
- interrupts: interrupt specification for data-ready.

Instead of irq-gpio

> +
> +Examples:
> +
> +    tas2770@4c {
> +                compatible = "ti,tas2770";
> +                reg = <0x4c>;

Missing

#address-cells = <1>;

#size-cells = <0>;

> +                reset-gpio = <&gpio15 1 GPIO_ACTIVE_LOW>;
> +                irq-gpio = <&gpio16 1 GPIO_ACTIVE_LOW>;
> +                ti,asi-format = <0>;
> +                ti,left-slot = <0>;
> +                ti,right-slot = <1>;
> +                ti,imon-slot-no = <0>;
> +                ti,vmon-slot-no = <2>;
> +        };
> +

Suggestion to provide the URL to the data sheet.
Dan Murphy Sept. 10, 2019, 1:47 p.m. UTC | #3
Shi

One other thing

On 9/10/19 8:21 AM, Dan Murphy wrote:
> Shi
>
> On 9/6/19 2:06 AM, shifu0704@thundersoft.com wrote:
>> From: Frank Shi <shifu0704@thundersoft.com>
>
> Subject should be
>
> dt-bindings: ASoC: Add tas2770 smart PA dt bindings
>
> Also Please add Rob Herring <robh+dt@kernel.org> for review
>
>> add tas2770 smart PA dt bindings
>>
>> Signed-off-by: Frank Shi <shifu0704@thundersoft.com>
>> ---
>>   Documentation/devicetree/bindings/tas2770.txt | 38 
>> +++++++++++++++++++++++++++
>>   1 file changed, 38 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/tas2770.txt
>>
>> diff --git a/Documentation/devicetree/bindings/tas2770.txt 
>> b/Documentation/devicetree/bindings/tas2770.txt
This binding belongs in Documentation/devicetree/bindings/sound
>> new file mode 100644
>> index 0000000..f70b310
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/tas2770.txt
>> @@ -0,0 +1,38 @@
>> +Texas Instruments TAS2770 Smart PA
>> +
>> +The TAS2770 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.
>> +
>> +Required properties:
>> +
>> + - compatible:       - Should contain "ti,tas2770".
>> + - reg:               - The i2c address. Should contain <0x4c>, 
>> <0x4d>,<0x4e>, or <0x4f>.
> s/should/may
>> + - #address-cells  - Should be <1>.
>> + - #size-cells     - Should be <0>.
>> + - ti,asi-format:  - Sets TDM RX capture edge. 0->Rising; 1->Falling.
>> + - ti,left-slot:   - Sets TDM RX left time slots.
>> + - ti,right-slot:  - Sets TDM RX right time slots.
>> + - ti,imon-slot-no:- TDM TX current sense time slot.
>> + - ti,vmon-slot-no:- TDM TX voltage sense time slot.
>> +
>> +Optional properties:
>> +
>> + - reset-gpio:    Reset GPIO number of left device.
>> + - irq-gpio:  IRQ GPIO number of left device.
>
> You might want to use
>
> - interrupt-parent: the phandle to the interrupt controller which 
> provides
>                     the interrupt.
> - interrupts: interrupt specification for data-ready.
>
> Instead of irq-gpio
>
>> +
>> +Examples:
>> +
>> +    tas2770@4c {
>> +                compatible = "ti,tas2770";
>> +                reg = <0x4c>;
>
> Missing
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
>> +                reset-gpio = <&gpio15 1 GPIO_ACTIVE_LOW>;
>> +                irq-gpio = <&gpio16 1 GPIO_ACTIVE_LOW>;
>> +                ti,asi-format = <0>;
>> +                ti,left-slot = <0>;
>> +                ti,right-slot = <1>;
>> +                ti,imon-slot-no = <0>;
>> +                ti,vmon-slot-no = <2>;
>> +        };
>> +
>
> Suggestion to provide the URL to the data sheet.
>
Mark Brown Sept. 11, 2019, 10:01 a.m. UTC | #4
On Tue, Sep 10, 2019 at 08:21:25AM -0500, Dan Murphy wrote:
> Shi
> 
> On 9/6/19 2:06 AM, shifu0704@thundersoft.com wrote:
> > From: Frank Shi <shifu0704@thundersoft.com>
> 
> Subject should be
> 
> dt-bindings: ASoC: Add tas2770 smart PA dt bindings

I do find it easier to use "ASoC: dt-bindings:", helps avoid
things being missed.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/tas2770.txt b/Documentation/devicetree/bindings/tas2770.txt
new file mode 100644
index 0000000..f70b310
--- /dev/null
+++ b/Documentation/devicetree/bindings/tas2770.txt
@@ -0,0 +1,38 @@ 
+Texas Instruments TAS2770 Smart PA
+
+The TAS2770 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.
+
+Required properties:
+
+ - compatible:	   - Should contain "ti,tas2770".
+ - reg:		       - The i2c address. Should contain <0x4c>, <0x4d>,<0x4e>, or <0x4f>.
+ - #address-cells  - Should be <1>.
+ - #size-cells     - Should be <0>.
+ - ti,asi-format:  - Sets TDM RX capture edge. 0->Rising; 1->Falling.
+ - ti,left-slot:   - Sets TDM RX left time slots.
+ - ti,right-slot:  - Sets TDM RX right time slots.
+ - ti,imon-slot-no:- TDM TX current sense time slot.
+ - ti,vmon-slot-no:- TDM TX voltage sense time slot.
+
+Optional properties:
+
+ - reset-gpio:	Reset GPIO number of left device.
+ - irq-gpio:  IRQ GPIO number of left device.
+
+Examples:
+
+    tas2770@4c {
+                compatible = "ti,tas2770";
+                reg = <0x4c>;
+                reset-gpio = <&gpio15 1 GPIO_ACTIVE_LOW>;
+                irq-gpio = <&gpio16 1 GPIO_ACTIVE_LOW>;
+                ti,asi-format = <0>;
+                ti,left-slot = <0>;
+                ti,right-slot = <1>;
+                ti,imon-slot-no = <0>;
+                ti,vmon-slot-no = <2>;
+        };
+