diff mbox series

[v4,2/8] ASoC: dt-bindings: qcom: Manage clock settings for ADSP solution

Message ID 20250527111227.2318021-3-quic_pkumpatl@quicinc.com
State New
Headers show
Series Enable audio on qcs6490-RB3Gen2 and qcm6490-idp boards | expand

Commit Message

Prasad Kumpatla May 27, 2025, 11:12 a.m. UTC
From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>

Manage clock settings for ADSP solution and document the clock properties
on sc7280 lpass pincontrol node which is required for ADSP based
solution.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
---
 .../qcom,sc7280-lpass-lpi-pinctrl.yaml        | 10 ++++++++
 .../bindings/sound/qcom,lpass-va-macro.yaml   | 12 +++++++---
 .../bindings/sound/qcom,lpass-wsa-macro.yaml  | 24 ++++++++++++++++---
 3 files changed, 40 insertions(+), 6 deletions(-)

Comments

Prasad Kumpatla June 1, 2025, 12:45 p.m. UTC | #1
On 5/27/2025 5:28 PM, Krzysztof Kozlowski wrote:
> On 27/05/2025 13:12, Prasad Kumpatla wrote:
>> From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>>
>> Manage clock settings for ADSP solution and document the clock properties
>> on sc7280 lpass pincontrol node which is required for ADSP based
>> solution.
>>
>> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> ---
> 
> Nothing in cover letter explained what was happening with this patch.
> Provide changelog under --- in such case.

Ack, Will provide more info on commit text.

> 
>>   .../qcom,sc7280-lpass-lpi-pinctrl.yaml        | 10 ++++++++
>>   .../bindings/sound/qcom,lpass-va-macro.yaml   | 12 +++++++---
>>   .../bindings/sound/qcom,lpass-wsa-macro.yaml  | 24 ++++++++++++++++---
> 
> Split patches per subsystem. Pinctrl is not ASoC.

Ack

> 
>>   3 files changed, 40 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
>> index 08801cc4e476..b1270124bfe3 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
>> @@ -20,6 +20,16 @@ properties:
>>     reg:
>>       maxItems: 2
>>   
>> +  clocks:
>> +    items:
>> +      - description: LPASS Core voting clock
>> +      - description: LPASS Audio voting clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: core
>> +      - const: audio
>> +
>>   patternProperties:
>>     "-state$":
>>       oneOf:
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> index f41deaa6f4df..92b97c214060 100644
>> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
>> @@ -78,10 +78,16 @@ allOf:
>>       then:
>>         properties:
>>           clocks:
>> -          maxItems: 1
>> +          minItems: 1
>> +          maxItems: 3
>>           clock-names:
>> -          items:
>> -            - const: mclk
>> +          oneOf:
>> +            - items:   # for ADSP based platforms
>> +                - const: mclk
>> +                - const: macro
>> +                - const: dcodec
>> +            - items:   # for ADSP bypass based platforms
>> +                - const: mclk
> 
> This device always receives same amount of clocks. Hardware is not
> different if you decide to not use ADSP.
for sc7280 clock handling only supports non-DSP based solution, macro
and dcodec votes are placed using CPU-Powerdomains. Which are not under
clocking properties. In ADSP based platforms macro and dcodec votes 
should be placed from ADSP.>
>>   
>>     - if:
>>         properties:
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
>> index 9082e363c709..6a999ed484e7 100644
>> --- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
>> +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
>> @@ -35,11 +35,11 @@ properties:
>>       const: 0
>>   
>>     clocks:
>> -    minItems: 4
>> +    minItems: 3
>>       maxItems: 6
>>   
>>     clock-names:
>> -    minItems: 4
>> +    minItems: 3
>>       maxItems: 6
>>   
>>     clock-output-names:
>> @@ -59,12 +59,30 @@ required:
>>   
>>   allOf:
>>     - $ref: dai-common.yaml#
>> -
>>     - if:
>>         properties:
>>           compatible:
>>             enum:
>>               - qcom,sc7280-lpass-wsa-macro
>> +    then:
>> +      properties:
>> +        clock-names:
>> +          oneOf:
>> +            - items:   # for ADSP based platforms
>> +                - const: mclk
>> +                - const: npl
>> +                - const: macro
>> +                - const: dcodec
>> +                - const: fsgen
>> +            - items:   # for ADSP bypass based platforms
>> +                - const: mclk
>> +                - const: npl
>> +                - const: fsgen
> 
> This silently breaks ABI. Third clock is macro.

Ack, will check and update.

Thanks,
Prasad>
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski June 1, 2025, 2:50 p.m. UTC | #2
On 01/06/2025 14:45, Prasad Kumpatla wrote:
>>>         properties:
>>>           clocks:
>>> -          maxItems: 1
>>> +          minItems: 1
>>> +          maxItems: 3
>>>           clock-names:
>>> -          items:
>>> -            - const: mclk
>>> +          oneOf:
>>> +            - items:   # for ADSP based platforms
>>> +                - const: mclk
>>> +                - const: macro
>>> +                - const: dcodec
>>> +            - items:   # for ADSP bypass based platforms
>>> +                - const: mclk
>>
>> This device always receives same amount of clocks. Hardware is not
>> different if you decide to not use ADSP.
> for sc7280 clock handling only supports non-DSP based solution, macro

ONLY?

> and dcodec votes are placed using CPU-Powerdomains. Which are not under
> clocking properties. In ADSP based platforms macro and dcodec votes 
> should be placed from ADSP.>

I don't understand this, that's barely a sentence. Anyway if that's
ONLY, then seems pretty fixed and I don't get why you make it flexible.

Expressing clocks as CPU powerdomains is not really correct.



Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
index 08801cc4e476..b1270124bfe3 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
@@ -20,6 +20,16 @@  properties:
   reg:
     maxItems: 2
 
+  clocks:
+    items:
+      - description: LPASS Core voting clock
+      - description: LPASS Audio voting clock
+
+  clock-names:
+    items:
+      - const: core
+      - const: audio
+
 patternProperties:
   "-state$":
     oneOf:
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
index f41deaa6f4df..92b97c214060 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
@@ -78,10 +78,16 @@  allOf:
     then:
       properties:
         clocks:
-          maxItems: 1
+          minItems: 1
+          maxItems: 3
         clock-names:
-          items:
-            - const: mclk
+          oneOf:
+            - items:   # for ADSP based platforms
+                - const: mclk
+                - const: macro
+                - const: dcodec
+            - items:   # for ADSP bypass based platforms
+                - const: mclk
 
   - if:
       properties:
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
index 9082e363c709..6a999ed484e7 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
@@ -35,11 +35,11 @@  properties:
     const: 0
 
   clocks:
-    minItems: 4
+    minItems: 3
     maxItems: 6
 
   clock-names:
-    minItems: 4
+    minItems: 3
     maxItems: 6
 
   clock-output-names:
@@ -59,12 +59,30 @@  required:
 
 allOf:
   - $ref: dai-common.yaml#
-
   - if:
       properties:
         compatible:
           enum:
             - qcom,sc7280-lpass-wsa-macro
+    then:
+      properties:
+        clock-names:
+          oneOf:
+            - items:   # for ADSP based platforms
+                - const: mclk
+                - const: npl
+                - const: macro
+                - const: dcodec
+                - const: fsgen
+            - items:   # for ADSP bypass based platforms
+                - const: mclk
+                - const: npl
+                - const: fsgen
+
+  - if:
+      properties:
+        compatible:
+          enum:
             - qcom,sm8250-lpass-wsa-macro
             - qcom,sm8450-lpass-wsa-macro
             - qcom,sc8280xp-lpass-wsa-macro