diff mbox series

[v9,06/14] dt-bindings: qcom-qce: document optional clocks and clock-names properties

Message ID 20230208183755.2907771-7-vladimir.zapolskiy@linaro.org
State New
Headers show
Series crypto: qcom-qce: Add YAML bindings & support for newer SoCs | expand

Commit Message

Vladimir Zapolskiy Feb. 8, 2023, 6:37 p.m. UTC
On newer Qualcomm SoCs the crypto engine clocks are enabled by default
by security firmware. To drop clocks and clock-names from the list of
required properties use 'qcom,sm8150-qce' compatible name.

The change is based on Neil Armstrong's observation and an original change.

Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
 .../devicetree/bindings/crypto/qcom-qce.yaml      | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Feb. 9, 2023, 9:20 a.m. UTC | #1
On 08/02/2023 19:37, Vladimir Zapolskiy wrote:
> On newer Qualcomm SoCs the crypto engine clocks are enabled by default
> by security firmware. To drop clocks and clock-names from the list of
> required properties use 'qcom,sm8150-qce' compatible name.
> 
> The change is based on Neil Armstrong's observation and an original change.
> 
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
>  .../devicetree/bindings/crypto/qcom-qce.yaml      | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> index f6f1759a2f6e..d0f6b830a5dd 100644
> --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> @@ -79,11 +79,22 @@ properties:
>  required:
>    - compatible
>    - reg
> -  - clocks
> -  - clock-names
>    - dmas
>    - dma-names
>  
> +if:

This should be in allOf, like I wrote in last discussion.


Best regards,
Krzysztof
Vladimir Zapolskiy Feb. 10, 2023, 11:17 a.m. UTC | #2
On 2/9/23 11:20, Krzysztof Kozlowski wrote:
> On 08/02/2023 19:37, Vladimir Zapolskiy wrote:
>> On newer Qualcomm SoCs the crypto engine clocks are enabled by default
>> by security firmware. To drop clocks and clock-names from the list of
>> required properties use 'qcom,sm8150-qce' compatible name.
>>
>> The change is based on Neil Armstrong's observation and an original change.
>>
>> Cc: Neil Armstrong <neil.armstrong@linaro.org>
>> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
>> ---
>>   .../devicetree/bindings/crypto/qcom-qce.yaml      | 15 +++++++++++++--
>>   1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>> index f6f1759a2f6e..d0f6b830a5dd 100644
>> --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>> +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>> @@ -79,11 +79,22 @@ properties:
>>   required:
>>     - compatible
>>     - reg
>> -  - clocks
>> -  - clock-names
>>     - dmas
>>     - dma-names
>>   
>> +if:
> 
> This should be in allOf, like I wrote in last discussion.

In the last discussion you shared two options, and I got an impression
that adding a new "non-clock-requiring" compatible is a better option,
in this series it is "qcom,sm8150-qce".

So, do you wish to see an added allOf: on top of a single if: anyway?

--
Best wishes,
Vladimir
Krzysztof Kozlowski Feb. 10, 2023, 11:30 a.m. UTC | #3
On 10/02/2023 12:17, Vladimir Zapolskiy wrote:
> On 2/9/23 11:20, Krzysztof Kozlowski wrote:
>> On 08/02/2023 19:37, Vladimir Zapolskiy wrote:
>>> On newer Qualcomm SoCs the crypto engine clocks are enabled by default
>>> by security firmware. To drop clocks and clock-names from the list of
>>> required properties use 'qcom,sm8150-qce' compatible name.
>>>
>>> The change is based on Neil Armstrong's observation and an original change.
>>>
>>> Cc: Neil Armstrong <neil.armstrong@linaro.org>
>>> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
>>> ---
>>>   .../devicetree/bindings/crypto/qcom-qce.yaml      | 15 +++++++++++++--
>>>   1 file changed, 13 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>>> index f6f1759a2f6e..d0f6b830a5dd 100644
>>> --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>>> +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
>>> @@ -79,11 +79,22 @@ properties:
>>>   required:
>>>     - compatible
>>>     - reg
>>> -  - clocks
>>> -  - clock-names
>>>     - dmas
>>>     - dma-names
>>>   
>>> +if:
>>
>> This should be in allOf, like I wrote in last discussion.
> 
> In the last discussion you shared two options, and I got an impression
> that adding a new "non-clock-requiring" compatible is a better option,
> in this series it is "qcom,sm8150-qce".

It's unrelated topic. What compatibles you use in what setup is one
thing. The syntax is second.

> 
> So, do you wish to see an added allOf: on top of a single if: anyway?

Yes, because it will grow and then you have useless reindent.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index f6f1759a2f6e..d0f6b830a5dd 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -79,11 +79,22 @@  properties:
 required:
   - compatible
   - reg
-  - clocks
-  - clock-names
   - dmas
   - dma-names
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - qcom,crypto-v5.1
+          - qcom,crypto-v5.4
+          - qcom,ipq4019-qce
+then:
+  required:
+    - clocks
+    - clock-names
+
 additionalProperties: false
 
 examples: