2023-08-11 21:10:09

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH 0/3] Introduce PRNG on SM8450

SM8450's PRNG seems to be the same good ol' IP, except without a core
clock.

For a lack of a better idea on how to test it, /proc/crypto reports that
the selftest has gone through..

Signed-off-by: Konrad Dybcio <[email protected]>
---
Konrad Dybcio (3):
dt-bindings: crypto: qcom,prng: Add SM8450
crypto: qcom-rng: Make the core clock optional regardless of ACPI presence
arm64: dts: qcom: sm8450: Add PRNG

.../devicetree/bindings/crypto/qcom,prng.yaml | 24 +++++++++++++++++-----
arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +++++
drivers/crypto/qcom-rng.c | 10 +++------
3 files changed, 27 insertions(+), 12 deletions(-)
---
base-commit: 21ef7b1e17d039053edaeaf41142423810572741
change-id: 20230811-topic-8450_prng-6af00873db4d

Best regards,
--
Konrad Dybcio <[email protected]>



2023-08-11 21:16:12

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: crypto: qcom,prng: Add SM8450

SM8450's PRNG does not require a core clock reference. Add a new
compatible with a qcom,prng-ee fallback and handle that.

Signed-off-by: Konrad Dybcio <[email protected]>
---
.../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..36b0ebd9a44b 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-prng-ee
+ - const: qcom,prng-ee

reg:
maxItems: 1
@@ -28,8 +32,18 @@ properties:
required:
- compatible
- reg
- - clocks
- - clock-names
+
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: qcom,sm8450-prng-ee
+ then:
+ required:
+ - clocks
+ - clock-names

additionalProperties: false


--
2.41.0


2023-08-14 05:34:21

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] Introduce PRNG on SM8450


On Fri, 11 Aug 2023 22:50:55 +0200, Konrad Dybcio wrote:
> SM8450's PRNG seems to be the same good ol' IP, except without a core
> clock.
>
> For a lack of a better idea on how to test it, /proc/crypto reports that
> the selftest has gone through..
>
>
> [...]

Applied, thanks!

[3/3] arm64: dts: qcom: sm8450: Add PRNG
commit: 76a6dd7bfcbb91217e4429d73c14ee67b441137d

Best regards,
--
Bjorn Andersson <[email protected]>

2023-08-20 03:53:57

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 0/3] Introduce PRNG on SM8450

On Fri, Aug 11, 2023 at 10:50:55PM +0200, Konrad Dybcio wrote:
> SM8450's PRNG seems to be the same good ol' IP, except without a core
> clock.
>
> For a lack of a better idea on how to test it, /proc/crypto reports that
> the selftest has gone through..
>
> Signed-off-by: Konrad Dybcio <[email protected]>
> ---
> Konrad Dybcio (3):
> dt-bindings: crypto: qcom,prng: Add SM8450
> crypto: qcom-rng: Make the core clock optional regardless of ACPI presence
> arm64: dts: qcom: sm8450: Add PRNG
>
> .../devicetree/bindings/crypto/qcom,prng.yaml | 24 +++++++++++++++++-----
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +++++
> drivers/crypto/qcom-rng.c | 10 +++------
> 3 files changed, 27 insertions(+), 12 deletions(-)
> ---
> base-commit: 21ef7b1e17d039053edaeaf41142423810572741
> change-id: 20230811-topic-8450_prng-6af00873db4d

Patches 1-2 applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt