[PATCH v6 3/9] ASoC: dt-bindings: qcom,lpass-va-macro: Update bindings for clocks to support ADSP

Prasad Kumpatla posted 9 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH v6 3/9] ASoC: dt-bindings: qcom,lpass-va-macro: Update bindings for clocks to support ADSP
Posted by Prasad Kumpatla 2 months, 3 weeks ago
From: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

Manage clock settings for ADSP solution. On Existing ADSP bypass
solutions, the macro and dcodec GDSCs are enabled using power domains
in lpass-va-macro which is not applicable for ADSP based platform.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
---
 .../bindings/sound/qcom,lpass-va-macro.yaml   | 29 +++++++++++++++----
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
index f41deaa6f4df..aec654e6567e 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
@@ -76,12 +76,29 @@ allOf:
           contains:
             const: qcom,sc7280-lpass-va-macro
     then:
-      properties:
-        clocks:
-          maxItems: 1
-        clock-names:
-          items:
-            - const: mclk
+      if:
+        required:
+          - power-domains
+      then:
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 1
+          clock-names:
+            oneOf:
+              - items:  # for ADSP based platforms
+                  - const: mclk
+      else:
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 3
+          clock-names:
+            oneOf:
+              - items:  # for ADSP bypass based platforms
+                  - const: mclk
+                  - const: macro
+                  - const: dcodec
 
   - if:
       properties:
-- 
2.34.1
Re: [PATCH v6 3/9] ASoC: dt-bindings: qcom,lpass-va-macro: Update bindings for clocks to support ADSP
Posted by Krzysztof Kozlowski 2 months, 3 weeks ago
On Tue, Jul 15, 2025 at 11:30:44PM +0530, Prasad Kumpatla wrote:
> From: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> 
> Manage clock settings for ADSP solution. On Existing ADSP bypass
> solutions, the macro and dcodec GDSCs are enabled using power domains
> in lpass-va-macro which is not applicable for ADSP based platform.
> 
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> ---
>  .../bindings/sound/qcom,lpass-va-macro.yaml   | 29 +++++++++++++++----
>  1 file changed, 23 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> index f41deaa6f4df..aec654e6567e 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
> @@ -76,12 +76,29 @@ allOf:
>            contains:
>              const: qcom,sc7280-lpass-va-macro
>      then:
> -      properties:
> -        clocks:
> -          maxItems: 1
> -        clock-names:
> -          items:
> -            - const: mclk
> +      if:
> +        required:
> +          - power-domains
> +      then:
> +        properties:
> +          clocks:
> +            minItems: 1

Drop minItems

> +            maxItems: 1
> +          clock-names:
> +            oneOf:

Drop oneOf

> +              - items:  # for ADSP based platforms
> +                  - const: mclk
> +      else:
> +        properties:
> +          clocks:
> +            minItems: 1

minItems: 3

> +            maxItems: 3
> +          clock-names:
> +            oneOf:

Drop oneOf

...  or rebase on top of my change and make it only min/maxItems:

lore.kernel.org/r/20250716074957.102402-2-krzysztof.kozlowski@linaro.org

(or whatever gets merged first, I can also rebase my patch later).

> +              - items:  # for ADSP bypass based platforms
> +                  - const: mclk
> +                  - const: macro
> +                  - const: dcodec

Best regards,
Krzysztof
Re: [PATCH v6 3/9] ASoC: dt-bindings: qcom,lpass-va-macro: Update bindings for clocks to support ADSP
Posted by Prasad Kumpatla 2 months, 2 weeks ago

On 7/16/2025 1:21 PM, Krzysztof Kozlowski wrote:
> On Tue, Jul 15, 2025 at 11:30:44PM +0530, Prasad Kumpatla wrote:
>> From: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
>>
>> Manage clock settings for ADSP solution. On Existing ADSP bypass
>> solutions, the macro and dcodec GDSCs are enabled using power domains
>> in lpass-va-macro which is not applicable for ADSP based platform.
>>
>> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
>> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> ---
>>   .../bindings/sound/qcom,lpass-va-macro.yaml   | 29 +++++++++++++++----
>>   1 file changed, 23 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> index f41deaa6f4df..aec654e6567e 100644
>> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> @@ -76,12 +76,29 @@ allOf:
>>             contains:
>>               const: qcom,sc7280-lpass-va-macro
>>       then:
>> -      properties:
>> -        clocks:
>> -          maxItems: 1
>> -        clock-names:
>> -          items:
>> -            - const: mclk
>> +      if:
>> +        required:
>> +          - power-domains
>> +      then:
>> +        properties:
>> +          clocks:
>> +            minItems: 1
> 
> Drop minItems

Ack,

> 
>> +            maxItems: 1
>> +          clock-names:
>> +            oneOf:
> 
> Drop oneOf

Ack,

> 
>> +              - items:  # for ADSP based platforms
>> +                  - const: mclk
>> +      else:
>> +        properties:
>> +          clocks:
>> +            minItems: 1
> 
> minItems: 3
> 
>> +            maxItems: 3
>> +          clock-names:
>> +            oneOf:
> 
> Drop oneOf
> 
> ...  or rebase on top of my change and make it only min/maxItems:
> 
> lore.kernel.org/r/20250716074957.102402-2-krzysztof.kozlowski@linaro.org
> 
> (or whatever gets merged first, I can also rebase my patch later).

ACK, will make the changes and update.
Thanks,
Prasad

> 
>> +              - items:  # for ADSP bypass based platforms
>> +                  - const: mclk
>> +                  - const: macro
>> +                  - const: dcodec
> 
> Best regards,
> Krzysztof
>