diff mbox series

[v2,1/3] dt-bindings: crypto: add new compatible for V3s

Message ID 20200831073101.3608-2-m.cerveny@computer.org
State Changes Requested, archived
Headers show
Series crypto: sun4i-ss: add support for V3s | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success

Commit Message

Martin Cerveny Aug. 31, 2020, 7:30 a.m. UTC
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(-)

Comments

Maxime Ripard Sept. 1, 2020, 9:32 a.m. UTC | #1
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
Corentin Labbe Sept. 1, 2020, 10:57 a.m. UTC | #2
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
Maxime Ripard Sept. 1, 2020, 11:40 a.m. UTC | #3
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
Corentin Labbe Sept. 2, 2020, 6:28 a.m. UTC | #4
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
Martin Cerveny Sept. 5, 2020, 3:51 p.m. UTC | #5
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
Rob Herring (Arm) Sept. 14, 2020, 6:24 p.m. UTC | #6
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
diff mbox series

Patch

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: