diff mbox series

[1/2] dt-bindings: crypto: qcom,prng: document SM8550

Message ID 20230822-topic-sm8550-rng-v1-1-8e10055165d1@linaro.org
State New
Headers show
Series [1/2] dt-bindings: crypto: qcom,prng: document SM8550 | expand

Commit Message

Neil Armstrong Aug. 22, 2023, 2:11 p.m. UTC
Document SM8550 compatible for Pseudo Random Generator,
like SM8450 doesn't require clocks setup done by the secure
firmware.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Neil Armstrong Aug. 23, 2023, 7:55 a.m. UTC | #1
Hi,

On 23/08/2023 02:10, Om Prakash Singh wrote:
> 
> 
> On 8/22/2023 9:34 PM, Konrad Dybcio wrote:
>> On 22.08.2023 16:54, Om Prakash Singh wrote:
>>> PRNG Block on most of newer target from Qualcomm have some configuration where clock is configured by security firmware.
>>>
>>> Adding separate compatible string for each platform is overhead.
>>>
>>> We need to introduce common compatible string that can be used for all platforms with same configuration.
>>>
>>> I would suggest to use "qcom,rng-ee" for newer platform, dropping "p" also signifies it is not a Pseudo Random Number Generator.
>> Please reply inline and don't top-post.
>>
>>
>> Is this what you're trying to say?
>>
>> 1. sort out the clock requirements for designs where Linux manages it
>>     vs where the FW does so >
>> 2. introduce a new compatible for SoCs implementing a TRNG
>>
>> 3. for SoCs in 2., register the TRNG as a hwrng device
> 
> Yes to all

I can send a proposal, but that means writing a new driver for this compatible in drivers/char/hw_random/ right ?

Neil

> 
>>
>>
>> ?
>>
>> Konrad
> 
> Thanks,
> Om
Om Prakash Singh Aug. 23, 2023, 11:32 p.m. UTC | #2
On 8/23/2023 1:25 PM, Neil Armstrong wrote:
> Hi,
> 
> On 23/08/2023 02:10, Om Prakash Singh wrote:
>>
>>
>> On 8/22/2023 9:34 PM, Konrad Dybcio wrote:
>>> On 22.08.2023 16:54, Om Prakash Singh wrote:
>>>> PRNG Block on most of newer target from Qualcomm have some 
>>>> configuration where clock is configured by security firmware.
>>>>
>>>> Adding separate compatible string for each platform is overhead.
>>>>
>>>> We need to introduce common compatible string that can be used for 
>>>> all platforms with same configuration.
>>>>
>>>> I would suggest to use "qcom,rng-ee" for newer platform, dropping 
>>>> "p" also signifies it is not a Pseudo Random Number Generator.
>>> Please reply inline and don't top-post.
>>>
>>>
>>> Is this what you're trying to say?
>>>
>>> 1. sort out the clock requirements for designs where Linux manages it
>>>     vs where the FW does so >
>>> 2. introduce a new compatible for SoCs implementing a TRNG
>>>
>>> 3. for SoCs in 2., register the TRNG as a hwrng device
>>
>> Yes to all
> 
> I can send a proposal, but that means writing a new driver for this 
> compatible in drivers/char/hw_random/ right ?

We can add hwrng support in same driver like 
drivers/crypto/hisilicon/trng/trng.c

As Krzysztof is suggesting we need to have platform specific compatible 
string, we can go with your change. for hwrng support I will send 
separate patches.

> 
> Neil
> 
>>
>>>
>>>
>>> ?
>>>
>>> Konrad
>>
>> Thanks,
>> Om
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
index 36b0ebd9a44b..60fc9f261b83 100644
--- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
@@ -16,7 +16,9 @@  properties:
           - qcom,prng  # 8916 etc.
           - qcom,prng-ee  # 8996 and later using EE
       - items:
-          - const: qcom,sm8450-prng-ee
+          - enum:
+              - qcom,sm8450-prng-ee
+              - qcom,sm8550-prng-ee
           - const: qcom,prng-ee
 
   reg:
@@ -39,7 +41,9 @@  allOf:
         properties:
           compatible:
             contains:
-              const: qcom,sm8450-prng-ee
+              enum:
+                - qcom,sm8450-prng-ee
+                - qcom,sm8550-prng-ee
     then:
       required:
         - clocks