mbox series

[v3,0/6] arm64: qcom: sm8550: enable RNG

Message ID 20230828-topic-sm8550-rng-v3-0-7a0678ca7988@linaro.org
Headers show
Series arm64: qcom: sm8550: enable RNG | expand

Message

Neil Armstrong Aug. 28, 2023, 8:04 a.m. UTC
Enable RNG on SM8550 by reverting the PRNG bindings & DT
for SM8450 and correctly document it as a True Random Number Generator.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v3:
- Removed invalid character in commit msg
- Added review tags
- Removed applied patch 1
- Link to v2: https://lore.kernel.org/r/20230824-topic-sm8550-rng-v2-0-dfcafbb16a3e@linaro.org

Changes in v2:
- Revert SM8450 DT & bindings
- Add new qcom,trng compatible and use it for SM8450 & SM8550
- Explicitly didn't collect the Reviewed-by tags due to the compatible change
- Link to v1: https://lore.kernel.org/r/20230822-topic-sm8550-rng-v1-0-8e10055165d1@linaro.org

---
Neil Armstrong (6):
      Revert "arm64: dts: qcom: sm8450: Add PRNG"
      dt-bindings: crypto: qcom,prng: document that RNG on SM8450 is a TRNG
      crypto: qcom-rng - Add support for trng
      dt-bindings: crypto: qcom,prng: document SM8550
      arm64: dts: qcom: sm8550: add TRNG node
      arm64: dts: qcom: sm8450: add TRNG node

 .../devicetree/bindings/crypto/qcom,prng.yaml      | 26 +++++++++++++++++-----
 arch/arm64/boot/dts/qcom/sm8450.dtsi               |  2 +-
 arch/arm64/boot/dts/qcom/sm8550.dtsi               |  5 +++++
 drivers/crypto/qcom-rng.c                          |  1 +
 4 files changed, 28 insertions(+), 6 deletions(-)
---
base-commit: 2ee82481c392eec06a7ef28df61b7f0d8e45be2e
change-id: 20230822-topic-sm8550-rng-c83142783e20

Best regards,

Comments

Rob Herring Aug. 28, 2023, 9:36 p.m. UTC | #1
On Mon, Aug 28, 2023 at 10:04:39AM +0200, Neil Armstrong wrote:
> Document SM8550 compatible for the True Random Number Generator.
> 
> Reviewed-by: Om Prakash Singh <quic_omprsing@quicinc.com>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

Where's Krzysztof's tag?

> ---
>  Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
> index 4245c9e424a3..633993f801c6 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-trng
> +          - enum:
> +              - qcom,sm8450-trng
> +              - qcom,sm8550-trng
>            - const: qcom,trng
>  
>    reg:
> 
> -- 
> 2.34.1
>
Krzysztof Kozlowski Aug. 29, 2023, 6:37 a.m. UTC | #2
On 28/08/2023 10:04, Neil Armstrong wrote:
> It has been reported at [1] the RNG HW on SM8450 is in fact a True Random
> Number Generator and no more Pseudo, document this by adding
> a new qcom,trng and the corresponding SoC specific sm8450 compatible.
> 
> [1] https://lore.kernel.org/all/20230818161720.3644424-1-quic_omprsing@quicinc.com/
> 
> Suggested-by: Om Prakash Singh <quic_omprsing@quicinc.com>
> Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Reviewed-by: Om Prakash Singh <quic_omprsing@quicinc.com>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../devicetree/bindings/crypto/qcom,prng.yaml      | 24 +++++++++++++++++-----
>  1 file changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
> index bb42f4588b40..4245c9e424a3 100644
> --- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
> +++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
> @@ -11,9 +11,13 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,prng  # 8916 etc.
> -      - qcom,prng-ee  # 8996 and later using EE
> +    oneOf:
> +      - enum:
> +          - qcom,prng  # 8916 etc.
> +          - qcom,prng-ee  # 8996 and later using EE
> +      - items:
> +          - const: qcom,sm8450-trng

Make it already an enum, so you won't have to change same lines twice.


Best regards,
Krzysztof
Krzysztof Kozlowski Aug. 29, 2023, 6:38 a.m. UTC | #3
On 28/08/2023 23:36, Rob Herring wrote:
> On Mon, Aug 28, 2023 at 10:04:39AM +0200, Neil Armstrong wrote:
>> Document SM8550 compatible for the True Random Number Generator.
>>
>> Reviewed-by: Om Prakash Singh <quic_omprsing@quicinc.com>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> 
> Where's Krzysztof's tag?
> 

The patch evolved and Neil mentioned in cover letter changelog that he
did not collect Reviews because of that. Seems ok for me.

For the patch:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Rob Herring Aug. 29, 2023, 4:22 p.m. UTC | #4
On Tue, Aug 29, 2023 at 08:38:48AM +0200, Krzysztof Kozlowski wrote:
> On 28/08/2023 23:36, Rob Herring wrote:
> > On Mon, Aug 28, 2023 at 10:04:39AM +0200, Neil Armstrong wrote:
> >> Document SM8550 compatible for the True Random Number Generator.
> >>
> >> Reviewed-by: Om Prakash Singh <quic_omprsing@quicinc.com>
> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> > 
> > Where's Krzysztof's tag?
> > 
> 
> The patch evolved and Neil mentioned in cover letter changelog that he
> did not collect Reviews because of that. Seems ok for me.

I did go look there and just saw 'Added review tags'. Not too helpful.  
That's why changelogs for a patch belong in the patch.

Rob