[PATCH 4/4] ASoC: dt-bindings: qcom,lpass-va-macro: Add sm6115 LPASS VA

Srinivas Kandagatla posted 4 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH 4/4] ASoC: dt-bindings: qcom,lpass-va-macro: Add sm6115 LPASS VA
Posted by Srinivas Kandagatla 3 months, 1 week ago
Add bindings for Qualcomm SM6115 SoC Low Power Audio SubSystem (LPASS)
VA macro codec, which looks like compatible with SM8450, however one of
the clocks macro is available in this SoC. So updated the bindings to
allow min-clocks to be 3 to be able to use SM8450 compatible for
SM6115.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
index 5b450f227b70..1ac3392776ca 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
@@ -26,6 +26,10 @@ properties:
               - qcom,sm8750-lpass-va-macro
               - qcom,x1e80100-lpass-va-macro
           - const: qcom,sm8550-lpass-va-macro
+      - items:
+          - enum:
+              - qcom,sm6115-lpass-va-macro
+          - const: qcom,sm8450-lpass-va-macro
 
   reg:
     maxItems: 1
@@ -44,9 +48,9 @@ properties:
     minItems: 1
     items:
       - const: mclk
-      - const: macro
       - const: dcodec
       - const: npl
+      - const: macro
 
   clock-output-names:
     maxItems: 1
@@ -125,10 +129,10 @@ allOf:
     then:
       properties:
         clocks:
-          minItems: 4
+          minItems: 3
           maxItems: 4
         clock-names:
-          minItems: 4
+          minItems: 3
           maxItems: 4
 
   - if:
-- 
2.51.0
Re: [PATCH 4/4] ASoC: dt-bindings: qcom,lpass-va-macro: Add sm6115 LPASS VA
Posted by Krzysztof Kozlowski 3 months, 1 week ago
On Wed, Oct 29, 2025 at 04:01:01PM +0000, Srinivas Kandagatla wrote:
> Add bindings for Qualcomm SM6115 SoC Low Power Audio SubSystem (LPASS)
> VA macro codec, which looks like compatible with SM8450, however one of
> the clocks macro is available in this SoC. So updated the bindings to

is or is not? Which clock?

> allow min-clocks to be 3 to be able to use SM8450 compatible for
> SM6115.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
>  .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> index 5b450f227b70..1ac3392776ca 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> @@ -26,6 +26,10 @@ properties:
>                - qcom,sm8750-lpass-va-macro
>                - qcom,x1e80100-lpass-va-macro
>            - const: qcom,sm8550-lpass-va-macro
> +      - items:
> +          - enum:
> +              - qcom,sm6115-lpass-va-macro
> +          - const: qcom,sm8450-lpass-va-macro
>  
>    reg:
>      maxItems: 1
> @@ -44,9 +48,9 @@ properties:
>      minItems: 1
>      items:
>        - const: mclk
> -      - const: macro

No, that's ABI break and I know existing code works fine, so there
cannot be justification for exception here.


Best regards,
Krzysztof
Re: [PATCH 4/4] ASoC: dt-bindings: qcom,lpass-va-macro: Add sm6115 LPASS VA
Posted by Srinivas Kandagatla 3 months, 1 week ago

On 10/30/25 6:30 AM, Krzysztof Kozlowski wrote:
> On Wed, Oct 29, 2025 at 04:01:01PM +0000, Srinivas Kandagatla wrote:
>> Add bindings for Qualcomm SM6115 SoC Low Power Audio SubSystem (LPASS)
>> VA macro codec, which looks like compatible with SM8450, however one of
>> the clocks macro is available in this SoC. So updated the bindings to
> 
> is or is not? Which clock?
typo.
macro clock. is not available.
Existing dt-bindings need some cleanup to be able to add a dedicated
entry for sm6115. Will do that in v2.

> 
>> allow min-clocks to be 3 to be able to use SM8450 compatible for
>> SM6115.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>> ---
>>  .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 10 +++++++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> index 5b450f227b70..1ac3392776ca 100644
>> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> @@ -26,6 +26,10 @@ properties:
>>                - qcom,sm8750-lpass-va-macro
>>                - qcom,x1e80100-lpass-va-macro
>>            - const: qcom,sm8550-lpass-va-macro
>> +      - items:
>> +          - enum:
>> +              - qcom,sm6115-lpass-va-macro
>> +          - const: qcom,sm8450-lpass-va-macro
>>  
>>    reg:
>>      maxItems: 1
>> @@ -44,9 +48,9 @@ properties:
>>      minItems: 1
>>      items:
>>        - const: mclk
>> -      - const: macro
> 
> No, that's ABI break and I know existing code works fine, so there
> cannot be justification for exception here.

I agree, I did not want va macro to divert from other macros which is
why I was trying to accommodate this under sm8450.

We can add a dedicated compatible for sm6115 for va too, and update the
codec driver.

the dt bindings need to be cleaned up similar to what we did for
rx-macro to be able to accommodate the change in clocks for sm6115.
something like this:


--- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
@@ -14,6 +14,7 @@ properties:
     oneOf:
       - enum:
           - qcom,sc7280-lpass-va-macro
+          - qcom,sm6115-lpass-va-macro
           - qcom,sm8250-lpass-va-macro
           - qcom,sm8450-lpass-va-macro
           - qcom,sm8550-lpass-va-macro
@@ -42,11 +43,7 @@ properties:

   clock-names:
     minItems: 1
-    items:
-      - const: mclk
-      - const: macro
-      - const: dcodec
-      - const: npl
+    maxItems: 4

   clock-output-names:
     maxItems: 1
@@ -70,50 +67,55 @@ required:
   - compatible
   - reg
   - "#sound-dai-cells"
-  - clock-names
-  - clocks

 allOf:
   - $ref: dai-common.yaml#
-
   - if:
       properties:
         compatible:
           contains:
@@ -70,50 +67,55 @@ required:
   - compatible
   - reg
   - "#sound-dai-cells"
-  - clock-names
-  - clocks

 allOf:
   - $ref: dai-common.yaml#
-
   - if:
       properties:
         compatible:
           contains:
             const: qcom,sc7280-lpass-va-macro
-
     then:
-      if:
-        required:
-          - power-domains
-      then:
-        properties:
-          clocks:
-            maxItems: 1
-          clock-names:
-            maxItems: 1
-      else:
-        properties:
-          clocks:
-            minItems: 3
-            maxItems: 3
-          clock-names:
-            minItems: 3
-            maxItems: 3
-
+      properties:
+        clock-names:
+          oneOf:
+            - items:   # for ADSP based platforms
+                - const: mclk
+                - const: macro
+                - const: dcodec
+            - items:   # for ADSP bypass based platforms
+                - const: mclk
   - if:
       properties:
         compatible:
           contains:
-            const: qcom,sm8250-lpass-va-macro
+            enum:
+              - qcom,sm6115-lpass-va-macro
     then:
       properties:
         clocks:
           minItems: 3
           maxItems: 3
         clock-names:
+          items:
+            - const: mclk
+            - const: dcodec
+            - const: npl
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,sm8250-lpass-va-macro
+    then:
+      properties:
+        clocks:
           minItems: 3
           maxItems: 3
+        clock-names:
+          items:
+            - const: mclk
+            - const: macro
+            - const: dcodec

   - if:
       properties:
@@ -128,8 +130,11 @@ allOf:
           minItems: 4
           maxItems: 4
         clock-names:
-          minItems: 4
-          maxItems: 4
+          items:
+            - const: mclk
+            - const: macro
+            - const: dcodec
+            - const: npl

   - if:
       properties:
@@ -143,8 +148,10 @@ allOf:
           minItems: 3
           maxItems: 3
         clock-names:
-          minItems: 3
-          maxItems: 3
+          items:
+            - const: mclk
+            - const: macro
+            - const: dcodec

 unevaluatedProperties: false



> 
> 
> Best regards,
> Krzysztof
>
Re: [PATCH 4/4] ASoC: dt-bindings: qcom,lpass-va-macro: Add sm6115 LPASS VA
Posted by Rob Herring (Arm) 3 months, 1 week ago
On Wed, 29 Oct 2025 16:01:01 +0000, Srinivas Kandagatla wrote:
> Add bindings for Qualcomm SM6115 SoC Low Power Audio SubSystem (LPASS)
> VA macro codec, which looks like compatible with SM8450, however one of
> the clocks macro is available in this SoC. So updated the bindings to
> allow min-clocks to be 3 to be able to use SM8450 compatible for
> SM6115.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
>  .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.example.dtb: codec@3370000 (qcom,sm8250-lpass-va-macro): clock-names:1: 'dcodec' was expected
	from schema $id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.example.dtb: codec@3370000 (qcom,sm8250-lpass-va-macro): clock-names:2: 'npl' was expected
	from schema $id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251029160101.423209-5-srinivas.kandagatla@oss.qualcomm.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.