From: Sam Protsenko <semen.protsenko@linaro.org>
To: "Łukasz Stelmach" <l.stelmach@samsung.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: Olivia Mackall <olivia@selenic.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/7] dt-bindings: rng: Add Exynos850 support to exynos-trng
Date: Mon, 17 Jun 2024 19:37:38 -0500 [thread overview]
Message-ID: <20240618003743.2975-3-semen.protsenko@linaro.org> (raw)
In-Reply-To: <20240618003743.2975-1-semen.protsenko@linaro.org>
The TRNG block in Exynos850 is pretty much the same as in Exynos5250,
but there are two clocks that has to be controlled to make it work:
1. Functional (operating) clock: called ACLK in Exynos850, the same as
"secss" clock in Exynos5250
2. Interface (bus) clock: called PCLK in Exynos850. It has to be
enabled in order to access TRNG registers
Document Exynos850 compatible and the related clock changes, and provide
a corresponding example for Exynos850 TRNG node with ACLK and PCLK
clocks.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
.../bindings/rng/samsung,exynos-trng.yaml | 49 +++++++++++++++++--
1 file changed, 45 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/rng/samsung,exynos-trng.yaml b/Documentation/devicetree/bindings/rng/samsung,exynos-trng.yaml
index 99c382d25c11..e57310fa89c7 100644
--- a/Documentation/devicetree/bindings/rng/samsung,exynos-trng.yaml
+++ b/Documentation/devicetree/bindings/rng/samsung,exynos-trng.yaml
@@ -12,14 +12,17 @@ maintainers:
properties:
compatible:
- const: samsung,exynos5250-trng
+ enum:
+ - samsung,exynos5250-trng
+ - samsung,exynos850-trng
clocks:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
clock-names:
- items:
- - const: secss
+ minItems: 1
+ maxItems: 2
reg:
maxItems: 1
@@ -30,6 +33,35 @@ required:
- clock-names
- reg
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynos850-trng
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: SSS (Security Sub System) operating clock
+ - description: SSS (Security Sub System) bus clock
+
+ clock-names:
+ items:
+ - const: secss
+ - const: pclk
+
+ else:
+ properties:
+ clocks:
+ items:
+ - description: SSS (Security Sub System) operating clock
+
+ clock-names:
+ items:
+ - const: secss
+
additionalProperties: false
examples:
@@ -42,3 +74,12 @@ examples:
clocks = <&clock CLK_SSS>;
clock-names = "secss";
};
+ - |
+ #include <dt-bindings/clock/exynos850.h>
+
+ rng@12081400 {
+ compatible = "samsung,exynos850-trng";
+ reg = <0x12081400 0x100>;
+ clocks = <&cmu_core CLK_GOUT_SSS_ACLK>, <&cmu_core CLK_GOUT_SSS_PCLK>;
+ clock-names = "secss", "pclk";
+ };
--
2.39.2
next prev parent reply other threads:[~2024-06-18 0:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 0:37 [PATCH 0/7] hwrng: exynos: Add support for Exynos850 Sam Protsenko
2024-06-18 0:37 ` [PATCH 1/7] dt-bindings: rng: Rename exynos5250-trng to exynos-trng Sam Protsenko
2024-06-18 6:32 ` Krzysztof Kozlowski
2024-06-18 0:37 ` Sam Protsenko [this message]
2024-06-18 6:33 ` [PATCH 2/7] dt-bindings: rng: Add Exynos850 support " Krzysztof Kozlowski
2024-06-18 0:37 ` [PATCH 3/7] hwrng: exynos: Improve coding style Sam Protsenko
2024-06-18 6:34 ` Krzysztof Kozlowski
2024-06-18 0:37 ` [PATCH 4/7] hwrng: exynos: Implement bus clock control Sam Protsenko
2024-06-18 4:26 ` Anand Moon
2024-06-18 19:26 ` Sam Protsenko
2024-06-18 0:37 ` [PATCH 5/7] hwrng: exynos: Add SMC based TRNG operation Sam Protsenko
2024-06-18 6:37 ` Krzysztof Kozlowski
2024-06-18 0:37 ` [PATCH 6/7] hwrng: exynos: Enable Exynos850 support Sam Protsenko
2024-06-18 6:39 ` Krzysztof Kozlowski
2024-06-18 20:25 ` Sam Protsenko
2024-06-18 0:37 ` [PATCH 7/7] arm64: dts: exynos850: Enable TRNG Sam Protsenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618003743.2975-3-semen.protsenko@linaro.org \
--to=semen.protsenko@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=krzk+dt@kernel.org \
--cc=l.stelmach@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olivia@selenic.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).