* [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine
@ 2021-10-28 1:58 Richard van Schagen
2021-11-02 17:37 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Richard van Schagen @ 2021-10-28 1:58 UTC (permalink / raw)
To: herbert, davem, matthias.bgg, robh+dt
Cc: linux-crypto, devicetree, Richard van Schagen
Add bindings for the Mediatek EIP-93 crypto engine.
Signed-off-by: Richard van Schagen <vschagen@icloud.com>
---
Changes since V3:
- Corrected typo
- Removed "interrupt-parent"
Changes since V2:
- Adding 2 missing "static" which got lost in my editing (sorry)
Changes since V1
- Add missing #include to examples
.../bindings/crypto/mediatek,mtk-eip93.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
diff --git a/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
new file mode 100644
index 000000000..76f924719
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/mediatek,mtk-eip93.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek EIP93 crypto engine
+
+maintainers:
+ - Richard van Schagen <vschagen@icloud.com>
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mtk-eip93
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/mips-gic.h>
+
+ crypto: crypto@1e004000 {
+ compatible = "mediatek,mtk-eip93";
+ reg = <0x1e004000 0x1000>;
+ interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
+ };
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine
2021-10-28 1:58 [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine Richard van Schagen
@ 2021-11-02 17:37 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-11-02 17:37 UTC (permalink / raw)
To: Richard van Schagen
Cc: robh+dt, matthias.bgg, herbert, linux-crypto, davem, devicetree
On Thu, 28 Oct 2021 09:58:00 +0800, Richard van Schagen wrote:
> Add bindings for the Mediatek EIP-93 crypto engine.
>
> Signed-off-by: Richard van Schagen <vschagen@icloud.com>
> ---
> Changes since V3:
> - Corrected typo
> - Removed "interrupt-parent"
>
> Changes since V2:
> - Adding 2 missing "static" which got lost in my editing (sorry)
>
> Changes since V1
> - Add missing #include to examples
>
> .../bindings/crypto/mediatek,mtk-eip93.yaml | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 0/2] Enable the Mediatek EIP-93 crypto engine
@ 2021-10-27 9:13 Richard van Schagen
2021-10-27 9:13 ` [PATCH v3 1/2] dt-bindings: crypto: Add " Richard van Schagen
0 siblings, 1 reply; 4+ messages in thread
From: Richard van Schagen @ 2021-10-27 9:13 UTC (permalink / raw)
To: herbert, davem, matthias.bgg, robh+dt; +Cc: linux-crypto, Richard van Schagen
This series enable the Mediatek EIP-93 crypto engine as found in the MT7621
This engine is capable of AES/DES/3DES ciphers in ECB/CBC and CTR modes,
hash and hmac(hash) using MD5, SHA1, SHA224 and SHA256. The engine can do
full authenc(hmac(x), cipher(y)) using mentioned ciphers and hashes.
The engine also has an ANSI X9.31 PRNG.
This driver is fully test and passes all the extra tests when selecting:
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS
For now only simple cipher and authenc are added. In the future I will
add patches for hash/hmac and the PRNG.
Richard van Schagen
Changes since V2:
- Adding 2 missing "static" which got lost in my editing (sorry)
Changes since V1:
- Fix errors found by kernel test robot.
---
.../bindings/crypto/mediatek,mtk-eip93.yaml | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
drivers/crypto/Kconfig | 2 +
drivers/crypto/Makefile | 1 +
drivers/crypto/mtk-eip93/Kconfig | 49 ++
drivers/crypto/mtk-eip93/Makefile | 7 +
drivers/crypto/mtk-eip93/eip93-aead.c | 767 +++++++++++++++++++++++
drivers/crypto/mtk-eip93/eip93-aead.h | 43 ++
drivers/crypto/mtk-eip93/eip93-aes.h | 15 +
drivers/crypto/mtk-eip93/eip93-cipher.c | 399 ++++++++++++
drivers/crypto/mtk-eip93/eip93-cipher.h | 62 ++
drivers/crypto/mtk-eip93/eip93-common.c | 784 ++++++++++++++++++++++++
drivers/crypto/mtk-eip93/eip93-common.h | 34 +
drivers/crypto/mtk-eip93/eip93-des.h | 15 +
drivers/crypto/mtk-eip93/eip93-main.c | 458 ++++++++++++++
drivers/crypto/mtk-eip93/eip93-main.h | 146 +++++
drivers/crypto/mtk-eip93/eip93-regs.h | 382 ++++++++++++
15 files changed, 3164 insertions(+)
create mode 100644 drivers/crypto/mtk-eip93/Kconfig
create mode 100644 drivers/crypto/mtk-eip93/Makefile
create mode 100644 drivers/crypto/mtk-eip93/eip93-aead.c
create mode 100644 drivers/crypto/mtk-eip93/eip93-aead.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-aes.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-cipher.c
create mode 100644 drivers/crypto/mtk-eip93/eip93-cipher.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-common.c
create mode 100644 drivers/crypto/mtk-eip93/eip93-common.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-des.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-main.c
create mode 100644 drivers/crypto/mtk-eip93/eip93-main.h
create mode 100644 drivers/crypto/mtk-eip93/eip93-regs.h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine
2021-10-27 9:13 [PATCH v3 0/2] Enable the " Richard van Schagen
@ 2021-10-27 9:13 ` Richard van Schagen
2021-10-27 13:58 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Richard van Schagen @ 2021-10-27 9:13 UTC (permalink / raw)
To: herbert, davem, matthias.bgg, robh+dt; +Cc: linux-crypto, Richard van Schagen
Add bindings for the Mediatek EIP-93 crypto engine.
Signed-off-by: Richard van Schagen <vschagen@icloud.com>
---
Changes since V2:
- Adding 2 missing "static" which got lost in my editing (sorry)
Changes since V1
- Add missing #include to examples
.../bindings/crypto/mediatek,mtk-eip93.yaml | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
diff --git a/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
new file mode 100644
index 000000000..422870afb
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/mediatek,mtk-eip93.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek EIP93 crypto engine
+
+maintainers:
+ - Richard van Schagen <vschagen@icloud.com>
+
+properties:
+ compatible:
+ enum:
+ - mediatek, mtk-eip93
+
+ reg:
+ maxItems: 1
+
+ interrupts-parent:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupt-parent
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/mips-gic.h>
+
+ crypto: crypto@1e004000 {
+ compatible = "mediatek,mtk-eip93";
+ reg = <0x1e004000 0x1000>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
+ };
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine
2021-10-27 9:13 ` [PATCH v3 1/2] dt-bindings: crypto: Add " Richard van Schagen
@ 2021-10-27 13:58 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-10-27 13:58 UTC (permalink / raw)
To: Richard van Schagen
Cc: Herbert Xu, David Miller, Matthias Brugger,
open list:HARDWARE RANDOM NUMBER GENERATOR CORE
On Wed, Oct 27, 2021 at 4:13 AM Richard van Schagen <vschagen@icloud.com> wrote:
>
> Add bindings for the Mediatek EIP-93 crypto engine.
Please resend to DT list so automated checks run and it is in my review queue.
> Signed-off-by: Richard van Schagen <vschagen@icloud.com>
> ---
> Changes since V2:
> - Adding 2 missing "static" which got lost in my editing (sorry)
>
> Changes since V1
> - Add missing #include to examples
>
> .../bindings/crypto/mediatek,mtk-eip93.yaml | 43 +++++++++++++++++++
> 1 file changed, 43 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
>
> diff --git a/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
> new file mode 100644
> index 000000000..422870afb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/crypto/mediatek,mtk-eip93.yaml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/crypto/mediatek,mtk-eip93.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek EIP93 crypto engine
> +
> +maintainers:
> + - Richard van Schagen <vschagen@icloud.com>
> +
> +properties:
> + compatible:
> + enum:
> + - mediatek, mtk-eip93
Looks like a typo. 'make dt_binding_check' would have pointed this out.
> +
> + reg:
> + maxItems: 1
> +
> + interrupts-parent:
> + maxItems: 1
Drop this. First, it's 'interrupt-parent'. Second, it is valid for
interrupt-parent to be in any parent node as well. So you don't need
to define it here.
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupt-parent
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/mips-gic.h>
> +
> + crypto: crypto@1e004000 {
> + compatible = "mediatek,mtk-eip93";
> + reg = <0x1e004000 0x1000>;
> + interrupt-parent = <&gic>;
> + interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
> + };
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-02 17:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28 1:58 [PATCH v3 1/2] dt-bindings: crypto: Add Mediatek EIP-93 crypto engine Richard van Schagen
2021-11-02 17:37 ` Rob Herring
-- strict thread matches above, loose matches on Subject: below --
2021-10-27 9:13 [PATCH v3 0/2] Enable the " Richard van Schagen
2021-10-27 9:13 ` [PATCH v3 1/2] dt-bindings: crypto: Add " Richard van Schagen
2021-10-27 13:58 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox