diff mbox series

[v1,1/2] ASoC: dt-bindings: Add support for master clock frequency

Message ID 20241216110341.3707-2-quic_pkumpatl@quicinc.com (mailing list archive)
State New
Headers show
Series ASoC: sgtl5000: Introduce "mclk-rate" Property for Device Tree Configuration | expand

Commit Message

Prasad Kumpatla Dec. 16, 2024, 11:03 a.m. UTC
Introduce a property specifies the frequency of the master clock
provided to the codec slave. The slave has the capability to adjust
the frequency according to user needs in the defined range.

Also fixed yamllint check errors.

Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
---
 .../devicetree/bindings/sound/fsl,sgtl5000.yaml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

Comments

Fabio Estevam Dec. 16, 2024, 11:17 a.m. UTC | #1
On Mon, Dec 16, 2024 at 8:04 AM Prasad Kumpatla
<quic_pkumpatl@quicinc.com> wrote:
>
> Introduce a property specifies the frequency of the master clock

"a property that specifies"

> -    enum: [ 0, 2, 4, 8 ]
> +    enum: [0, 2, 4, 8]
>
>    micbias-voltage-m-volts:
>      description: The bias voltage to be used in mVolts. The voltage can take
>        values from 1.25V to 3V by 250mV steps. If this node is not mentioned
>        or the value is unknown, then the value is set to 1.25V.
>      $ref: /schemas/types.yaml#/definitions/uint32
> -    enum: [ 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000 ]
> +    enum: [1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000]
>
>    lrclk-strength:
>      description: |
> @@ -64,7 +64,7 @@ properties:
>          2 =            3.33 mA         5.74 mA         8.03  mA
>          3 =            4.99 mA         8.61 mA         12.05 mA
>      $ref: /schemas/types.yaml#/definitions/uint32
> -    enum: [ 0, 1, 2, 3 ]
> +    enum: [0, 1, 2, 3]
>
>    sclk-strength:
>      description: |
> @@ -77,12 +77,20 @@ properties:
>          2 =            3.33 mA         5.74 mA         8.03  mA
>          3 =            4.99 mA         8.61 mA         12.05 mA
>      $ref: /schemas/types.yaml#/definitions/uint32
> -    enum: [ 0, 1, 2, 3 ]
> +    enum: [0, 1, 2, 3]

All these enum changes are unrelated.
Krzysztof Kozlowski Dec. 16, 2024, 11:20 a.m. UTC | #2
On 16/12/2024 12:03, Prasad Kumpatla wrote:
> Introduce a property specifies the frequency of the master clock
> provided to the codec slave. The slave has the capability to adjust
> the frequency according to user needs in the defined range.


You are duplicating existing assigned-clocks properties.

> 
> Also fixed yamllint check errors.

Which ones?

Best regards,
Krzysztof
Rob Herring Dec. 17, 2024, 3:36 p.m. UTC | #3
On Mon, Dec 16, 2024 at 04:33:40PM +0530, Prasad Kumpatla wrote:
> Introduce a property specifies the frequency of the master clock
> provided to the codec slave. The slave has the capability to adjust
> the frequency according to user needs in the defined range.
> 
> Also fixed yamllint check errors.

'Also' is the red flag for something that should be a separate commit.

If you see errors with these, you are not using the right config which 
is in Documentation/devicetree/bindings/.yamllint.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml b/Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml
index c6ab1ca16763..2512cad10961 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml
@@ -44,14 +44,14 @@  properties:
       values of 2k, 4k or 8k. If set to 0 it will be off. If this node is not
       mentioned or if the value is unknown, then micbias resistor is set to
       4k.
-    enum: [ 0, 2, 4, 8 ]
+    enum: [0, 2, 4, 8]
 
   micbias-voltage-m-volts:
     description: The bias voltage to be used in mVolts. The voltage can take
       values from 1.25V to 3V by 250mV steps. If this node is not mentioned
       or the value is unknown, then the value is set to 1.25V.
     $ref: /schemas/types.yaml#/definitions/uint32
-    enum: [ 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000 ]
+    enum: [1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000]
 
   lrclk-strength:
     description: |
@@ -64,7 +64,7 @@  properties:
         2 =		3.33 mA		5.74 mA		8.03  mA
         3 =		4.99 mA		8.61 mA		12.05 mA
     $ref: /schemas/types.yaml#/definitions/uint32
-    enum: [ 0, 1, 2, 3 ]
+    enum: [0, 1, 2, 3]
 
   sclk-strength:
     description: |
@@ -77,12 +77,20 @@  properties:
         2 =		3.33 mA		5.74 mA		8.03  mA
         3 =		4.99 mA		8.61 mA		12.05 mA
     $ref: /schemas/types.yaml#/definitions/uint32
-    enum: [ 0, 1, 2, 3 ]
+    enum: [0, 1, 2, 3]
 
   port:
     $ref: audio-graph-port.yaml#
     unevaluatedProperties: false
 
+  mclk-rate:
+    description: |
+      Master clock rate in Hz. This property specifies the frequency
+      of the master clock provided to the codec slave.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 8000000
+    maximum: 27000000
+
 required:
   - compatible
   - reg
@@ -108,6 +116,7 @@  examples:
             micbias-voltage-m-volts = <2250>;
             VDDA-supply = <&reg_3p3v>;
             VDDIO-supply = <&reg_3p3v>;
+            mclk-rate = <12288000>;
         };
     };
 ...