linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] crypto: sun4i-ss: add support for V3s
@ 2020-08-31  7:30 Martin Cerveny
  2020-08-31  7:30 ` [PATCH v2 1/3] dt-bindings: crypto: add new compatible " Martin Cerveny
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Martin Cerveny @ 2020-08-31  7:30 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Maxime Ripard, Rob Herring

Add support for "sun4i-ss" (crypto engine) for Allwinner V3s.
Simmilar problem like A33.

Changes since v1:
- splited to patch series

Martin Cerveny (3):
  dt-bindings: crypto: add new compatible for V3s
  ARM: dts: sun8i: v3s: Enable crypto engine
  crypto: sun4i-ss - add the V3s variant of SS

 .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml    |  5 ++++-
 arch/arm/boot/dts/sun8i-v3s.dtsi                       | 10 ++++++++++
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c      |  7 +++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-08-31  7:30 [PATCH v2 0/3] crypto: sun4i-ss: add support for V3s Martin Cerveny
@ 2020-08-31  7:30 ` Martin Cerveny
  2020-09-01  9:32   ` Maxime Ripard
  2020-08-31  7:31 ` [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine Martin Cerveny
  2020-08-31  7:31 ` [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS Martin Cerveny
  2 siblings, 1 reply; 12+ messages in thread
From: Martin Cerveny @ 2020-08-31  7:30 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Maxime Ripard, Rob Herring

Like A33 "sun4i-ss" has a difference, it give SHA1 digest
directly in BE. So add new compatible.

Tested-by: Martin Cerveny <m.cerveny@computer.org>
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
 .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
index fc823572b..180efd13a 100644
--- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
+++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
@@ -25,6 +25,7 @@ properties:
           - const: allwinner,sun4i-a10-crypto
       - items:
           - const: allwinner,sun8i-a33-crypto
+      - const: allwinner,sun8i-v3s-crypto
 
   reg:
     maxItems: 1
@@ -59,7 +60,9 @@ if:
   properties:
     compatible:
       contains:
-        const: allwinner,sun6i-a31-crypto
+        oneOf:
+          - const: allwinner,sun6i-a31-crypto
+          - const: allwinner,sun8i-v3s-crypto
 
 then:
   required:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine
  2020-08-31  7:30 [PATCH v2 0/3] crypto: sun4i-ss: add support for V3s Martin Cerveny
  2020-08-31  7:30 ` [PATCH v2 1/3] dt-bindings: crypto: add new compatible " Martin Cerveny
@ 2020-08-31  7:31 ` Martin Cerveny
  2020-09-01  9:33   ` Maxime Ripard
  2020-08-31  7:31 ` [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS Martin Cerveny
  2 siblings, 1 reply; 12+ messages in thread
From: Martin Cerveny @ 2020-08-31  7:31 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Maxime Ripard, Rob Herring

V3s contains crypto engine that is compatible with "sun4i-ss".

Tested-by: Martin Cerveny <m.cerveny@computer.org>
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index e5312869c..4fec84c40 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -234,6 +234,16 @@
 			#size-cells = <0>;
 		};
 
+		crypto: crypto@1c15000 {
+			compatible = "allwinner,sun8i-v3s-crypto";
+			reg = <0x01c15000 0x1000>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
+			clock-names = "ahb", "mod";
+			resets = <&ccu RST_BUS_CE>;
+			reset-names = "ahb";
+		};
+
 		usb_otg: usb@1c19000 {
 			compatible = "allwinner,sun8i-h3-musb";
 			reg = <0x01c19000 0x0400>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS
  2020-08-31  7:30 [PATCH v2 0/3] crypto: sun4i-ss: add support for V3s Martin Cerveny
  2020-08-31  7:30 ` [PATCH v2 1/3] dt-bindings: crypto: add new compatible " Martin Cerveny
  2020-08-31  7:31 ` [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine Martin Cerveny
@ 2020-08-31  7:31 ` Martin Cerveny
  2020-08-31 11:50   ` Corentin Labbe
  2 siblings, 1 reply; 12+ messages in thread
From: Martin Cerveny @ 2020-08-31  7:31 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Maxime Ripard, Rob Herring

Like A33 "sun4i-ss" has a difference, it give SHA1 digest
directly in BE. So add new compatible.

Tested-by: Martin Cerveny <m.cerveny@computer.org>
Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
index a2b67f7f8..d24496cac 100644
--- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
+++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
@@ -31,6 +31,10 @@ static const struct ss_variant ss_a33_variant = {
 	.sha1_in_be = true,
 };
 
+static const struct ss_variant ss_v3s_variant = {
+	.sha1_in_be = true,
+};
+
 static struct sun4i_ss_alg_template ss_algs[] = {
 {       .type = CRYPTO_ALG_TYPE_AHASH,
 	.mode = SS_OP_MD5,
@@ -505,6 +509,9 @@ static const struct of_device_id a20ss_crypto_of_match_table[] = {
 	{ .compatible = "allwinner,sun8i-a33-crypto",
 	  .data = &ss_a33_variant
 	},
+	{ .compatible = "allwinner,sun8i-v3s-crypto",
+	  .data = &ss_v3s_variant
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, a20ss_crypto_of_match_table);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS
  2020-08-31  7:31 ` [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS Martin Cerveny
@ 2020-08-31 11:50   ` Corentin Labbe
  0 siblings, 0 replies; 12+ messages in thread
From: Corentin Labbe @ 2020-08-31 11:50 UTC (permalink / raw)
  To: Martin Cerveny
  Cc: Chen-Yu Tsai, David S. Miller, devicetree, Herbert Xu,
	linux-arm-kernel, linux-crypto, linux-kernel, Maxime Ripard,
	Rob Herring

On Mon, Aug 31, 2020 at 09:31:01AM +0200, Martin Cerveny wrote:
> Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> directly in BE. So add new compatible.
> 
> Tested-by: Martin Cerveny <m.cerveny@computer.org>
> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> ---
>  drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Your commit message is wrong, "sun4i-ss" has no difference, but V3S yes.
Your other patch has the same problem.

Otherwise you could add:
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Regards

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-08-31  7:30 ` [PATCH v2 1/3] dt-bindings: crypto: add new compatible " Martin Cerveny
@ 2020-09-01  9:32   ` Maxime Ripard
  2020-09-01 10:57     ` Corentin Labbe
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2020-09-01  9:32 UTC (permalink / raw)
  To: Martin Cerveny
  Cc: Corentin Labbe, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
> Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> directly in BE. So add new compatible.
> 
> Tested-by: Martin Cerveny <m.cerveny@computer.org>

The Tested-by tag is for the other developpers. You're very much
expected to have tested your patch before contributing it.

> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> ---
>  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> index fc823572b..180efd13a 100644
> --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> @@ -25,6 +25,7 @@ properties:
>            - const: allwinner,sun4i-a10-crypto
>        - items:
>            - const: allwinner,sun8i-a33-crypto
> +      - const: allwinner,sun8i-v3s-crypto

If it's compatible with the A33, why do we need to introduce a new compatible?

>  
>    reg:
>      maxItems: 1
> @@ -59,7 +60,9 @@ if:
>    properties:
>      compatible:
>        contains:
> -        const: allwinner,sun6i-a31-crypto
> +        oneOf:
> +          - const: allwinner,sun6i-a31-crypto
> +          - const: allwinner,sun8i-v3s-crypto

I guess the A33 compatible should be on that list as well?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine
  2020-08-31  7:31 ` [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine Martin Cerveny
@ 2020-09-01  9:33   ` Maxime Ripard
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2020-09-01  9:33 UTC (permalink / raw)
  To: Martin Cerveny
  Cc: Corentin Labbe, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Mon, Aug 31, 2020 at 09:31:00AM +0200, Martin Cerveny wrote:
> V3s contains crypto engine that is compatible with "sun4i-ss".
> 
> Tested-by: Martin Cerveny <m.cerveny@computer.org>
> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> ---
>  arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
> index e5312869c..4fec84c40 100644
> --- a/arch/arm/boot/dts/sun8i-v3s.dtsi
> +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
> @@ -234,6 +234,16 @@
>  			#size-cells = <0>;
>  		};
>  
> +		crypto: crypto@1c15000 {

Do you really need a label here?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-09-01  9:32   ` Maxime Ripard
@ 2020-09-01 10:57     ` Corentin Labbe
  2020-09-01 11:40       ` Maxime Ripard
  0 siblings, 1 reply; 12+ messages in thread
From: Corentin Labbe @ 2020-09-01 10:57 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Rob Herring

On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote:
> On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
> > Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> > directly in BE. So add new compatible.
> > 
> > Tested-by: Martin Cerveny <m.cerveny@computer.org>
> 
> The Tested-by tag is for the other developpers. You're very much
> expected to have tested your patch before contributing it.
> 
> > Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> > ---
> >  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > index fc823572b..180efd13a 100644
> > --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > @@ -25,6 +25,7 @@ properties:
> >            - const: allwinner,sun4i-a10-crypto
> >        - items:
> >            - const: allwinner,sun8i-a33-crypto
> > +      - const: allwinner,sun8i-v3s-crypto
> 
> If it's compatible with the A33, why do we need to introduce a new compatible?
> 
> >  
> >    reg:
> >      maxItems: 1
> > @@ -59,7 +60,9 @@ if:
> >    properties:
> >      compatible:
> >        contains:
> > -        const: allwinner,sun6i-a31-crypto
> > +        oneOf:
> > +          - const: allwinner,sun6i-a31-crypto
> > +          - const: allwinner,sun8i-v3s-crypto
> 
> I guess the A33 compatible should be on that list as well?

This is the list of "need reset".
So we cannot use allwinner,sun8i-a33-crypto
Probably this explanation should be in the commit message.

Regards

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-09-01 10:57     ` Corentin Labbe
@ 2020-09-01 11:40       ` Maxime Ripard
  2020-09-02  6:28         ` Corentin Labbe
  0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2020-09-01 11:40 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Rob Herring

[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]

On Tue, Sep 01, 2020 at 12:57:19PM +0200, Corentin Labbe wrote:
> On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote:
> > On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
> > > Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> > > directly in BE. So add new compatible.
> > > 
> > > Tested-by: Martin Cerveny <m.cerveny@computer.org>
> > 
> > The Tested-by tag is for the other developpers. You're very much
> > expected to have tested your patch before contributing it.
> > 
> > > Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> > > ---
> > >  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > index fc823572b..180efd13a 100644
> > > --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > @@ -25,6 +25,7 @@ properties:
> > >            - const: allwinner,sun4i-a10-crypto
> > >        - items:
> > >            - const: allwinner,sun8i-a33-crypto
> > > +      - const: allwinner,sun8i-v3s-crypto
> > 
> > If it's compatible with the A33, why do we need to introduce a new compatible?
> > 
> > >  
> > >    reg:
> > >      maxItems: 1
> > > @@ -59,7 +60,9 @@ if:
> > >    properties:
> > >      compatible:
> > >        contains:
> > > -        const: allwinner,sun6i-a31-crypto
> > > +        oneOf:
> > > +          - const: allwinner,sun6i-a31-crypto
> > > +          - const: allwinner,sun8i-v3s-crypto
> > 
> > I guess the A33 compatible should be on that list as well?
> 
> This is the list of "need reset".
> So we cannot use allwinner,sun8i-a33-crypto
> Probably this explanation should be in the commit message.

But the A33 has a reset in the DTSI

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-09-01 11:40       ` Maxime Ripard
@ 2020-09-02  6:28         ` Corentin Labbe
  2020-09-05 15:51           ` Martin Cerveny
  0 siblings, 1 reply; 12+ messages in thread
From: Corentin Labbe @ 2020-09-02  6:28 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Martin Cerveny, Chen-Yu Tsai, David S. Miller, devicetree,
	Herbert Xu, linux-arm-kernel, linux-crypto, linux-kernel,
	Rob Herring

On Tue, Sep 01, 2020 at 01:40:15PM +0200, Maxime Ripard wrote:
> On Tue, Sep 01, 2020 at 12:57:19PM +0200, Corentin Labbe wrote:
> > On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote:
> > > On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
> > > > Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> > > > directly in BE. So add new compatible.
> > > > 
> > > > Tested-by: Martin Cerveny <m.cerveny@computer.org>
> > > 
> > > The Tested-by tag is for the other developpers. You're very much
> > > expected to have tested your patch before contributing it.
> > > 
> > > > Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> > > > ---
> > > >  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
> > > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > index fc823572b..180efd13a 100644
> > > > --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > @@ -25,6 +25,7 @@ properties:
> > > >            - const: allwinner,sun4i-a10-crypto
> > > >        - items:
> > > >            - const: allwinner,sun8i-a33-crypto
> > > > +      - const: allwinner,sun8i-v3s-crypto
> > > 
> > > If it's compatible with the A33, why do we need to introduce a new compatible?
> > > 
> > > >  
> > > >    reg:
> > > >      maxItems: 1
> > > > @@ -59,7 +60,9 @@ if:
> > > >    properties:
> > > >      compatible:
> > > >        contains:
> > > > -        const: allwinner,sun6i-a31-crypto
> > > > +        oneOf:
> > > > +          - const: allwinner,sun6i-a31-crypto
> > > > +          - const: allwinner,sun8i-v3s-crypto
> > > 
> > > I guess the A33 compatible should be on that list as well?
> > 
> > This is the list of "need reset".
> > So we cannot use allwinner,sun8i-a33-crypto
> > Probably this explanation should be in the commit message.
> 
> But the A33 has a reset in the DTSI
> 


Oh right so I need to send a fix for that and Martin Cerveny could simply use the "allwinner,sun8i-a33-crypto" (and so keep only patch #1(DTS))

Regards

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-09-02  6:28         ` Corentin Labbe
@ 2020-09-05 15:51           ` Martin Cerveny
  2020-09-14 18:24             ` Rob Herring
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Cerveny @ 2020-09-05 15:51 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Maxime Ripard, Martin Cerveny, Chen-Yu Tsai, David S. Miller,
	devicetree, Herbert Xu, linux-arm-kernel, linux-crypto,
	linux-kernel, Rob Herring


On Wed, 2 Sep 2020, Corentin Labbe wrote:
> On Tue, Sep 01, 2020 at 01:40:15PM +0200, Maxime Ripard wrote:
>> On Tue, Sep 01, 2020 at 12:57:19PM +0200, Corentin Labbe wrote:
>>> On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote:
>>>> On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
>>>>> Like A33 "sun4i-ss" has a difference, it give SHA1 digest
>>>>> directly in BE. So add new compatible.
>>>>>
>>>>> Tested-by: Martin Cerveny <m.cerveny@computer.org>
>>>>
>>>> The Tested-by tag is for the other developpers. You're very much
>>>> expected to have tested your patch before contributing it.
>>>>
>>>>> Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
>>>>> ---
>>>>>  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
>>>>> index fc823572b..180efd13a 100644
>>>>> --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
>>>>> +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
>>>>> @@ -25,6 +25,7 @@ properties:
>>>>>            - const: allwinner,sun4i-a10-crypto
>>>>>        - items:
>>>>>            - const: allwinner,sun8i-a33-crypto
>>>>> +      - const: allwinner,sun8i-v3s-crypto
>>>>
>>>> If it's compatible with the A33, why do we need to introduce a new compatible?
>>>>
>>>>>
>>>>>    reg:
>>>>>      maxItems: 1
>>>>> @@ -59,7 +60,9 @@ if:
>>>>>    properties:
>>>>>      compatible:
>>>>>        contains:
>>>>> -        const: allwinner,sun6i-a31-crypto
>>>>> +        oneOf:
>>>>> +          - const: allwinner,sun6i-a31-crypto
>>>>> +          - const: allwinner,sun8i-v3s-crypto
>>>>
>>>> I guess the A33 compatible should be on that list as well?
>>>
>>> This is the list of "need reset".
>>> So we cannot use allwinner,sun8i-a33-crypto
>>> Probably this explanation should be in the commit message.
>>
>> But the A33 has a reset in the DTSI
>>
>
>
> Oh right so I need to send a fix for that and Martin Cerveny could simply use the "allwinner,sun8i-a33-crypto" (and so keep only patch #1(DTS))
>
> Regards
>

What is "right" solution for DTSI ?
- compatible = "allwinner,sun8i-a33-crypto";
OR
- compatible = "allwinner,sun8i-v3s-crypto", "allwinner,sun8i-a33-crypto";
(but unimplemented "allwinner,sun8i-v3s-crypto")

Regards

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
  2020-09-05 15:51           ` Martin Cerveny
@ 2020-09-14 18:24             ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2020-09-14 18:24 UTC (permalink / raw)
  To: Martin Cerveny
  Cc: Corentin Labbe, Maxime Ripard, Chen-Yu Tsai, David S. Miller,
	devicetree, Herbert Xu, linux-arm-kernel, linux-crypto,
	linux-kernel

On Sat, Sep 05, 2020 at 05:51:48PM +0200, Martin Cerveny wrote:
> 
> On Wed, 2 Sep 2020, Corentin Labbe wrote:
> > On Tue, Sep 01, 2020 at 01:40:15PM +0200, Maxime Ripard wrote:
> > > On Tue, Sep 01, 2020 at 12:57:19PM +0200, Corentin Labbe wrote:
> > > > On Tue, Sep 01, 2020 at 11:32:49AM +0200, Maxime Ripard wrote:
> > > > > On Mon, Aug 31, 2020 at 09:30:59AM +0200, Martin Cerveny wrote:
> > > > > > Like A33 "sun4i-ss" has a difference, it give SHA1 digest
> > > > > > directly in BE. So add new compatible.
> > > > > > 
> > > > > > Tested-by: Martin Cerveny <m.cerveny@computer.org>
> > > > > 
> > > > > The Tested-by tag is for the other developpers. You're very much
> > > > > expected to have tested your patch before contributing it.
> > > > > 
> > > > > > Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
> > > > > > ---
> > > > > >  .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml          | 5 ++++-
> > > > > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > > > index fc823572b..180efd13a 100644
> > > > > > --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > > > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
> > > > > > @@ -25,6 +25,7 @@ properties:
> > > > > >            - const: allwinner,sun4i-a10-crypto
> > > > > >        - items:
> > > > > >            - const: allwinner,sun8i-a33-crypto
> > > > > > +      - const: allwinner,sun8i-v3s-crypto
> > > > > 
> > > > > If it's compatible with the A33, why do we need to introduce a new compatible?
> > > > > 
> > > > > > 
> > > > > >    reg:
> > > > > >      maxItems: 1
> > > > > > @@ -59,7 +60,9 @@ if:
> > > > > >    properties:
> > > > > >      compatible:
> > > > > >        contains:
> > > > > > -        const: allwinner,sun6i-a31-crypto
> > > > > > +        oneOf:
> > > > > > +          - const: allwinner,sun6i-a31-crypto
> > > > > > +          - const: allwinner,sun8i-v3s-crypto
> > > > > 
> > > > > I guess the A33 compatible should be on that list as well?
> > > > 
> > > > This is the list of "need reset".
> > > > So we cannot use allwinner,sun8i-a33-crypto
> > > > Probably this explanation should be in the commit message.
> > > 
> > > But the A33 has a reset in the DTSI
> > > 
> > 
> > 
> > Oh right so I need to send a fix for that and Martin Cerveny could simply use the "allwinner,sun8i-a33-crypto" (and so keep only patch #1(DTS))
> > 
> > Regards
> > 
> 
> What is "right" solution for DTSI ?
> - compatible = "allwinner,sun8i-a33-crypto";
> OR
> - compatible = "allwinner,sun8i-v3s-crypto", "allwinner,sun8i-a33-crypto";
> (but unimplemented "allwinner,sun8i-v3s-crypto")

Generally, this one in case you have differences like bugs or features.

Rob

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-14 18:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31  7:30 [PATCH v2 0/3] crypto: sun4i-ss: add support for V3s Martin Cerveny
2020-08-31  7:30 ` [PATCH v2 1/3] dt-bindings: crypto: add new compatible " Martin Cerveny
2020-09-01  9:32   ` Maxime Ripard
2020-09-01 10:57     ` Corentin Labbe
2020-09-01 11:40       ` Maxime Ripard
2020-09-02  6:28         ` Corentin Labbe
2020-09-05 15:51           ` Martin Cerveny
2020-09-14 18:24             ` Rob Herring
2020-08-31  7:31 ` [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine Martin Cerveny
2020-09-01  9:33   ` Maxime Ripard
2020-08-31  7:31 ` [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS Martin Cerveny
2020-08-31 11:50   ` Corentin Labbe

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).