* [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema
@ 2023-11-16 18:06 Rafał Miłecki
2023-11-17 11:19 ` Krzysztof Kozlowski
2023-11-24 10:16 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Rafał Miłecki @ 2023-11-16 18:06 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Antoine Tenart, linux-crypto, devicetree, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This helps validating DTS files.
Cc: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Rename file to inside-secure,safexcel.yaml
Drop minItems from interrupts
Move additionalProperties down
Improve condition in allOf
Sorry for those issues in V1. I hope I didn't miss anything this time.
.../crypto/inside-secure,safexcel.yaml | 86 +++++++++++++++++++
.../crypto/inside-secure-safexcel.txt | 40 ---------
2 files changed, 86 insertions(+), 40 deletions(-)
create mode 100644 Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
delete mode 100644 Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt
diff --git a/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
new file mode 100644
index 000000000000..ef07258d16c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Inside Secure SafeXcel cryptographic engine
+
+maintainers:
+ - Antoine Tenart <atenart@kernel.org>
+
+properties:
+ compatible:
+ oneOf:
+ - const: inside-secure,safexcel-eip197b
+ - const: inside-secure,safexcel-eip197d
+ - const: inside-secure,safexcel-eip97ies
+ - const: inside-secure,safexcel-eip197
+ description: Equivalent of inside-secure,safexcel-eip197b
+ deprecated: true
+ - const: inside-secure,safexcel-eip97
+ description: Equivalent of inside-secure,safexcel-eip97ies
+ deprecated: true
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 6
+
+ interrupt-names:
+ items:
+ - const: ring0
+ - const: ring1
+ - const: ring2
+ - const: ring3
+ - const: eip
+ - const: mem
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: core
+ - const: reg
+
+required:
+ - reg
+ - interrupts
+ - interrupt-names
+
+allOf:
+ - if:
+ properties:
+ clocks:
+ minItems: 2
+ then:
+ properties:
+ clock-names:
+ minItems: 2
+ required:
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ crypto@800000 {
+ compatible = "inside-secure,safexcel-eip197b";
+ reg = <0x800000 0x200000>;
+ interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "ring0", "ring1", "ring2", "ring3", "eip", "mem";
+ clocks = <&cpm_syscon0 1 26>;
+ clock-names = "core";
+ };
diff --git a/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt b/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt
deleted file mode 100644
index 3bbf144c9988..000000000000
--- a/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Inside Secure SafeXcel cryptographic engine
-
-Required properties:
-- compatible: Should be "inside-secure,safexcel-eip197b",
- "inside-secure,safexcel-eip197d" or
- "inside-secure,safexcel-eip97ies".
-- reg: Base physical address of the engine and length of memory mapped region.
-- interrupts: Interrupt numbers for the rings and engine.
-- interrupt-names: Should be "ring0", "ring1", "ring2", "ring3", "eip", "mem".
-
-Optional properties:
-- clocks: Reference to the crypto engine clocks, the second clock is
- needed for the Armada 7K/8K SoCs.
-- clock-names: mandatory if there is a second clock, in this case the
- name must be "core" for the first clock and "reg" for
- the second one.
-
-Backward compatibility:
-Two compatibles are kept for backward compatibility, but shouldn't be used for
-new submissions:
-- "inside-secure,safexcel-eip197" is equivalent to
- "inside-secure,safexcel-eip197b".
-- "inside-secure,safexcel-eip97" is equivalent to
- "inside-secure,safexcel-eip97ies".
-
-Example:
-
- crypto: crypto@800000 {
- compatible = "inside-secure,safexcel-eip197b";
- reg = <0x800000 0x200000>;
- interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3",
- "eip";
- clocks = <&cpm_syscon0 1 26>;
- };
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema
2023-11-16 18:06 [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema Rafał Miłecki
@ 2023-11-17 11:19 ` Krzysztof Kozlowski
2023-11-24 10:16 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-17 11:19 UTC (permalink / raw)
To: Rafał Miłecki, Herbert Xu, David S . Miller,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Antoine Tenart, linux-crypto, devicetree, Rafał Miłecki
On 16/11/2023 19:06, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> Cc: Antoine Tenart <atenart@kernel.org>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Rename file to inside-secure,safexcel.yaml
> Drop minItems from interrupts
> Move additionalProperties down
> Improve condition in allOf
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema
2023-11-16 18:06 [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema Rafał Miłecki
2023-11-17 11:19 ` Krzysztof Kozlowski
@ 2023-11-24 10:16 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2023-11-24 10:16 UTC (permalink / raw)
To: Rafał Miłecki
Cc: David S . Miller, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Antoine Tenart, linux-crypto, devicetree, Rafał Miłecki
On Thu, Nov 16, 2023 at 07:06:41PM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> Cc: Antoine Tenart <atenart@kernel.org>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Rename file to inside-secure,safexcel.yaml
> Drop minItems from interrupts
> Move additionalProperties down
> Improve condition in allOf
>
> Sorry for those issues in V1. I hope I didn't miss anything this time.
>
> .../crypto/inside-secure,safexcel.yaml | 86 +++++++++++++++++++
> .../crypto/inside-secure-safexcel.txt | 40 ---------
> 2 files changed, 86 insertions(+), 40 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
> delete mode 100644 Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-24 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-16 18:06 [PATCH V2] dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema Rafał Miłecki
2023-11-17 11:19 ` Krzysztof Kozlowski
2023-11-24 10:16 ` Herbert Xu
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).