diff mbox series

[12/13] ASoC: dt-bindings: davinic-mcbsp: Add the 'ti,drive-dx' property

Message ID 20240315112745.63230-13-bastien.curutchet@bootlin.com
State New
Headers show
Series ASoC: ti: davinci-i2s: Add features to McBSP driver | expand

Commit Message

Bastien Curutchet March 15, 2024, 11:27 a.m. UTC
McBSP is able to handle capture and playback stream.
The McBSP's DX pins that outputs serial data during playback streams can
be used to output a chosen pattern during capture streams. For instance,
this can be useful to drive an active-low signal during capture streams
(by choosing <0> as pattern)

Add a 'ti,drive-dx' property that can be used to repeatedly output a
chosen pattern on DX pin while capture stream is ON.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
---
 Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring March 17, 2024, 8:10 p.m. UTC | #1
On Fri, 15 Mar 2024 12:27:44 +0100, Bastien Curutchet wrote:
> McBSP is able to handle capture and playback stream.
> The McBSP's DX pins that outputs serial data during playback streams can
> be used to output a chosen pattern during capture streams. For instance,
> this can be useful to drive an active-low signal during capture streams
> (by choosing <0> as pattern)
> 
> Add a 'ti,drive-dx' property that can be used to repeatedly output a
> chosen pattern on DX pin while capture stream is ON.
> 
> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
> ---
>  Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Péter Ujfalusi March 19, 2024, 6:02 p.m. UTC | #2
On 15/03/2024 13:27, Bastien Curutchet wrote:
> McBSP is able to handle capture and playback stream.
> The McBSP's DX pins that outputs serial data during playback streams can
> be used to output a chosen pattern during capture streams. For instance,
> this can be useful to drive an active-low signal during capture streams
> (by choosing <0> as pattern)

or configure the MCBSPx.DX pin as GPO and use it as a GPIO?

Quite novel use of the hardware, no doubt about it. If you don't have
DMA servicing the TX, it will just re-transmit the word from from the
DXR register when the transmitter is pulled out of reset.

Interesting, but I'm not sure if this belongs to DT.

> Add a 'ti,drive-dx' property that can be used to repeatedly output a
> chosen pattern on DX pin while capture stream is ON.
> 
> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
> ---
>  Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
> index d8d4e7ea6e02..f4d1fc6bcd61 100644
> --- a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
> +++ b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
> @@ -80,6 +80,13 @@ properties:
>        Enable synchronisation error detections when an unexpected frame pulse is
>        received. If not present, unexpected frame pulses are ignored.
>  
> +  ti,drive-dx:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      If the property is present, McBSP will repeatedly output the selected
> +      value on DX pin during capture streams. For instance, if set to 0, this
> +      can be used to drive an active-low signal.
> +
>  required:
>    - "#sound-dai-cells"
>    - compatible
Bastien Curutchet March 20, 2024, 7:46 a.m. UTC | #3
Hi Péter,


On 3/19/24 19:02, Péter Ujfalusi wrote:
> 
> 
> On 15/03/2024 13:27, Bastien Curutchet wrote:
>> McBSP is able to handle capture and playback stream.
>> The McBSP's DX pins that outputs serial data during playback streams can
>> be used to output a chosen pattern during capture streams. For instance,
>> this can be useful to drive an active-low signal during capture streams
>> (by choosing <0> as pattern)
> 
> or configure the MCBSPx.DX pin as GPO and use it as a GPIO?

In my use case, DX pin is connected to the ADC chip select pin so I want
the DX pin to toggle the closest possible to capture's start. That's
why I introduced this feature over configuring the pin as GPO.

> 
> Quite novel use of the hardware, no doubt about it. If you don't have
> DMA servicing the TX, it will just re-transmit the word from from the
> DXR register when the transmitter is pulled out of reset.
> 
> Interesting, but I'm not sure if this belongs to DT.
> 
>> Add a 'ti,drive-dx' property that can be used to repeatedly output a
>> chosen pattern on DX pin while capture stream is ON.
>>
>> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
>> ---
>>   Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
>> index d8d4e7ea6e02..f4d1fc6bcd61 100644
>> --- a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
>> +++ b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
>> @@ -80,6 +80,13 @@ properties:
>>         Enable synchronisation error detections when an unexpected frame pulse is
>>         received. If not present, unexpected frame pulses are ignored.
>>   
>> +  ti,drive-dx:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      If the property is present, McBSP will repeatedly output the selected
>> +      value on DX pin during capture streams. For instance, if set to 0, this
>> +      can be used to drive an active-low signal.
>> +
>>   required:
>>     - "#sound-dai-cells"
>>     - compatible
> 

Best regards,
Bastien
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
index d8d4e7ea6e02..f4d1fc6bcd61 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
+++ b/Documentation/devicetree/bindings/sound/davinci-mcbsp.yaml
@@ -80,6 +80,13 @@  properties:
       Enable synchronisation error detections when an unexpected frame pulse is
       received. If not present, unexpected frame pulses are ignored.
 
+  ti,drive-dx:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      If the property is present, McBSP will repeatedly output the selected
+      value on DX pin during capture streams. For instance, if set to 0, this
+      can be used to drive an active-low signal.
+
 required:
   - "#sound-dai-cells"
   - compatible