[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241022-most-politely-e85f571c05a3@spud>
Date: Tue, 22 Oct 2024 18:06:08 +0100
From: Conor Dooley <conor@...nel.org>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Antoine Tenart <atenart@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Richard van Schagen <vschagen@...oud.com>,
linux-crypto@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [RFC PATCH v3 2/3] dt-bindings: crypto: Add Inside Secure
SafeXcel EIP-93 crypto engine
On Mon, Oct 21, 2024 at 04:56:38PM +0200, Christian Marangi wrote:
> Add bindings for the Inside Secure SafeXcel EIP-93 crypto engine.
>
> The IP is present on Airoha SoC and on various Mediatek devices and
> other SoC under different names like mtk-eip93 or PKTE.
>
> Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> ---
> Changes v3:
> - Add SoC compatible with generic one
> Changes v2:
> - Change to better compatible
> - Add description for EIP93 models
>
> .../crypto/inside-secure,safexcel-eip93.yaml | 63 +++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml
>
> diff --git a/Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml
> new file mode 100644
> index 000000000000..13341710ee31
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml
> @@ -0,0 +1,63 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/crypto/inside-secure,safexcel-eip93.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Inside Secure SafeXcel EIP-93 cryptographic engine
> +
> +maintainers:
> + - Christian Marangi <ansuelsmth@...il.com>
> +
> +description: |
> + The Inside Secure SafeXcel EIP-93 is a cryptographic engine IP block
> + integrated in varios devices with very different and generic name from
> + PKTE to simply vendor+EIP93. The real IP under the hood is actually
> + developed by Inside Secure and given to license to vendors.
> +
> + The IP block is sold with different model based on what feature are
> + needed and are identified with the final letter. Each letter correspond
> + to a specific set of feature and multiple letter reflect the sum of the
> + feature set.
> +
> + EIP-93 models:
> + - EIP-93i: (basic) DES/Triple DES, AES, PRNG, IPsec ESP, SRTP, SHA1
> + - EIP-93ie: i + SHA224/256, AES-192/256
> + - EIP-93is: i + SSL/DTLS/DTLS, MD5, ARC4
> + - EIP-93ies: i + e + s
> + - EIP-93iw: i + AES-XCB-MAC, AES-CCM
This implies that you should have a non-trivial set of fallbacks, with
the "i" model as the base for that. eg:
"ie", "i"
"is", "i"
"iw", "i"
"ies", "ie, "is", "i" (I dunno which would be a better order here)
> +
> +properties:
> + compatible:
> + items:
> + - const: airoha,crypto-eip93
> + - enum:
> + - inside-secure,safexcel-eip93i
> + - inside-secure,safexcel-eip93ie
> + - inside-secure,safexcel-eip93is
> + - inside-secure,safexcel-eip93ies
> + - inside-secure,safexcel-eip93iw
I don't really get what's going on here. Why is the first compatible the
generic one? That seems suspect to me, as I doubt the crypto block on a
particular SoC varies? I'd expect to see some soc-specific compatibles
with a fallback to the inside-secure IP version that it integrates.
Cheers,
Conor.
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + crypto@...04000 {
> + compatible = "airoha,crypto-eip93", "inside-secure,safexcel-eip93ies";
> + reg = <0x1fb70000 0x1000>;
> +
> + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
> + };
> --
> 2.45.2
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists