2020-06-15 07:26:16

by Tero Kristo

[permalink] [raw]
Subject: [PATCHv4 0/7] crypto: sa2ul support for TI K3 SoCs

Hi,

This is basically just a rebase of v2 to 5.8-rc1, and application of
Rob's Ack on the dt-binding patch. No other changes.

Only driver side + DT binding should be applied via the crypto tree, DTS
patches should be queued separately via ARM SoC tree (I can take care of
that myself assuming the driver side gets applied.)

-Tero


--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2020-06-15 07:26:27

by Tero Kristo

[permalink] [raw]
Subject: [PATCHv4 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

From: Keerthy <[email protected]>

The Security Accelerator Ultra Lite (SA2UL) subsystem provides hardware
cryptographic acceleration for the following use cases:

* Encryption and authentication for secure boot
* Encryption and authentication of content in applications
requiring DRM (digital rights management) and
content/asset protection

SA2UL provides support for number of different cryptographic algorithms
including SHA1, SHA256, SHA512, AES, 3DES, and various combinations of
the previous for AEAD use.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Keerthy <[email protected]>
[[email protected]: converted documentation to yaml]
Signed-off-by: Tero Kristo <[email protected]>
---
.../devicetree/bindings/crypto/ti,sa2ul.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml

diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
new file mode 100644
index 000000000000..85ef69ffebed
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/ti,sa2ul.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: K3 SoC SA2UL crypto module
+
+maintainers:
+ - Tero Kristo <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - ti,j721e-sa2ul
+ - ti,am654-sa2ul
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ dmas:
+ items:
+ - description: TX DMA Channel
+ - description: RX DMA Channel #1
+ - description: RX DMA Channel #2
+
+ dma-names:
+ items:
+ - const: tx
+ - const: rx1
+ - const: rx2
+
+ dma-coherent: true
+
+ "#address-cells":
+ const: 2
+
+ "#size-cells":
+ const: 2
+
+ ranges:
+ description:
+ Address translation for the possible RNG child node for SA2UL
+
+patternProperties:
+ "^rng@[a-f0-9]+$":
+ type: object
+ description:
+ Child RNG node for SA2UL
+
+required:
+ - compatible
+ - reg
+ - power-domains
+ - dmas
+ - dma-names
+ - dma-coherent
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+ main_crypto: crypto@4e00000 {
+ compatible = "ti,j721-sa2ul";
+ reg = <0x0 0x4e00000 0x0 0x1200>;
+ power-domains = <&k3_pds 264 TI_SCI_PD_EXCLUSIVE>;
+ dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>,
+ <&main_udmap 0x4001>;
+ dma-names = "tx", "rx1", "rx2";
+ dma-coherent;
+ };
--
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

2020-06-15 18:21:05

by Eric Biggers

[permalink] [raw]
Subject: Re: [PATCHv4 0/7] crypto: sa2ul support for TI K3 SoCs

On Mon, Jun 15, 2020 at 10:14:45AM +0300, Tero Kristo wrote:
> Hi,
>
> This is basically just a rebase of v2 to 5.8-rc1, and application of
> Rob's Ack on the dt-binding patch. No other changes.
>
> Only driver side + DT binding should be applied via the crypto tree, DTS
> patches should be queued separately via ARM SoC tree (I can take care of
> that myself assuming the driver side gets applied.)
>
> -Tero

Does this driver pass all the crypto self-tests, including with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y?

Please include details about testing in your commits.

2020-06-16 04:25:10

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCHv4 0/7] crypto: sa2ul support for TI K3 SoCs

On 15/06/2020 21:20, Eric Biggers wrote:
> On Mon, Jun 15, 2020 at 10:14:45AM +0300, Tero Kristo wrote:
>> Hi,
>>
>> This is basically just a rebase of v2 to 5.8-rc1, and application of
>> Rob's Ack on the dt-binding patch. No other changes.
>>
>> Only driver side + DT binding should be applied via the crypto tree, DTS
>> patches should be queued separately via ARM SoC tree (I can take care of
>> that myself assuming the driver side gets applied.)
>>
>> -Tero
>
> Does this driver pass all the crypto self-tests, including with
> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y?

Yes, this passes full self test suite with no failures at all, including
the extra tests.

> Please include details about testing in your commits.

I believe I mentioned this on the first iteration of the series.

In addition to self tests I've been testing the driver with tcrypt.ko,
IPSec, and openssl (via cryptodev.)

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki