crypto: sun4i-ss: add support for V3s
Subsystems (4)
v2 cover crypto: sun4i-ss: add support for V3s
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(-)
Signature · 1 line
2.17.1
PATCH v2 1/3 dt-bindings: crypto: add new compatible for V3s
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +4 -1
@@ -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:
Signature · 1 line
2.17.1
Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>
The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -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?
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 11 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1reg: 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
Corentin Labbe
maintainerRe: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 27 lines · Maxime Ripard
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -25,6 +25,7 @@ properties: - const: allwinner,sun4i-a10-crypto - items: - const: allwinner,sun8i-a33-crypto + - const: allwinner,sun8i-v3s-cryptoIf it's compatible with the A33, why do we need to introduce a new compatible?
Quoted 1 line
Quoted 12 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 10 lines
reg:
maxItems: 1Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1@@ -59,7 +60,9 @@ if: properties: compatible: contains: - const: allwinner,sun6i-a31-crypto + oneOf: + - const: allwinner,sun6i-a31-crypto + - const: allwinner,sun8i-v3s-cryptoI 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
Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 41 lines · Corentin Labbe
Quoted 27 lines · Maxime Ripard
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -25,6 +25,7 @@ properties: - const: allwinner,sun4i-a10-crypto - items: - const: allwinner,sun8i-a33-crypto + - const: allwinner,sun8i-v3s-cryptoIf it's compatible with the A33, why do we need to introduce a new compatible?
Quoted 1 line
Quoted 12 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 10 lines
reg:
maxItems: 1Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1@@ -59,7 +60,9 @@ if: properties: compatible: contains: - const: allwinner,sun6i-a31-crypto + oneOf: + - const: allwinner,sun6i-a31-crypto + - const: allwinner,sun8i-v3s-cryptoI guess the A33 compatible should be on that list as well?
Quoted 3 lines
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
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Corentin Labbe
maintainerRe: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 42 lines · Maxime Ripard
Quoted 41 lines · Corentin Labbe
Quoted 39 lines · Maxime Ripard
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -25,6 +25,7 @@ properties: - const: allwinner,sun4i-a10-crypto - items: - const: allwinner,sun8i-a33-crypto + - const: allwinner,sun8i-v3s-cryptoIf it's compatible with the A33, why do we need to introduce a new compatible?
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 11 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1reg: 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-cryptoI guess the A33 compatible should be on that list as well?
Quoted 6 lines
Quoted 3 lines
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
Re: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 47 lines · Corentin Labbe
Quoted 46 lines · Maxime Ripard
Quoted 44 lines · Corentin Labbe
Quoted 27 lines · Maxime Ripard
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -25,6 +25,7 @@ properties: - const: allwinner,sun4i-a10-crypto - items: - const: allwinner,sun8i-a33-crypto + - const: allwinner,sun8i-v3s-cryptoIf it's compatible with the A33, why do we need to introduce a new compatible?
Quoted 1 line
Quoted 12 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 10 lines
reg:
maxItems: 1Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1@@ -59,7 +60,9 @@ if: properties: compatible: contains: - const: allwinner,sun6i-a31-crypto + oneOf: + - const: allwinner,sun6i-a31-crypto + - const: allwinner,sun8i-v3s-cryptoI 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.
Quoted 8 lines
Quoted 2 lines
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
Rob Herring
maintainerRe: [PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s
Quoted 55 lines · Martin Cerveny
Quoted 53 lines · Corentin Labbe
Quoted 42 lines · Maxime Ripard
Quoted 41 lines · Corentin Labbe
Quoted 39 lines · Maxime Ripard
Quoted 4 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>The Tested-by tag is for the other developpers. You're very much expected to have tested your patch before contributing it.
Quoted 10 lines
Signed-off-by Martin Cerveny <[email protected]>--- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +0
-0Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml properties: · line 28
Quoted 4 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +1
-0@@ -25,6 +25,7 @@ properties: - const: allwinner,sun4i-a10-crypto - items: - const: allwinner,sun8i-a33-crypto + - const: allwinner,sun8i-v3s-cryptoIf it's compatible with the A33, why do we need to introduce a new compatible?
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml if: · line 65
Quoted 11 lines
Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml +3
-1reg: 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-cryptoI guess the A33 compatible should be on that list as well?
Quoted 6 lines
Quoted 3 lines
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))
Quoted 8 lines
Quoted 2 lines
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
PATCH v2 2/3 ARM: dts: sun8i: v3s: Enable crypto engine
In reply to Martin CervenyV3s contains crypto engine that is compatible with "sun4i-ss".
--- arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun8i-v3s.dtsi +10 -0
@@ -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>;
Signature · 1 line
2.17.1
Re: [PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine
Quoted 13 lines · Martin Cerveny
V3s contains crypto engine that is compatible with "sun4i-ss".
Tested-by Martin Cerveny <[email protected]>Signed-off-by Martin Cerveny <[email protected]>--- arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/boot/dts/sun8i-v3s.dtsi +0
-0
arch/arm/boot/dts/sun8i-v3s.dtsi line 237
Quoted 4 lines
arch/arm/boot/dts/sun8i-v3s.dtsi +1
-0@@ -234,6 +234,16 @@ #size-cells = <0>; }; + crypto: crypto@1c15000 {
Do you really need a label here?
Maxime
PATCH v2 3/3 crypto: sun4i-ss - add the V3s variant of SS
In reply to Martin CervenyLike A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
--- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c +7 -0
@@ -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);
Signature · 1 line
2.17.1
Re: [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS
Quoted 9 lines · Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible.
Tested-by Martin Cerveny <[email protected]>Signed-off-by Martin Cerveny <[email protected]>--- 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:
Regards