devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP
       [not found] <20221125223217.2409659-1-linus.walleij@linaro.org>
@ 2022-11-25 22:32 ` Linus Walleij
  2022-11-27 12:44   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2022-11-25 22:32 UTC (permalink / raw)
  To: linux-crypto, Herbert Xu, David S . Miller
  Cc: phone-devel, Stefan Hansson, Lionel Debieve, Maxime Coquelin,
	Alexandre Torgue, Linus Walleij, devicetree, Rob Herring,
	Krzysztof Kozlowski

This adds device tree bindings for the Ux500 CRYP block
as a compatible in the STM32 CRYP bindings.

The Ux500 CRYP binding has been used for ages in the kernel
device tree for Ux500 but was never documented, so fill in
the gap by making it a sibling of the STM32 CRYP block,
which is what it is.

The relationship to the existing STM32 CRYP block is pretty
obvious when looking at the register map, and I have written
patches to reuse the STM32 CRYP driver on the Ux500.

The two properties added are DMA channels and power domain.
Power domains are a generic SoC feature and the STM32 variant
also has DMA channels.

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Lionel Debieve <lionel.debieve@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Drop the second (new) example.
---
 .../bindings/crypto/st,stm32-cryp.yaml        | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
index ed23bf94a8e0..6759c5bf3e57 100644
--- a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
+++ b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
@@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: STMicroelectronics STM32 CRYP bindings
 
+description: The STM32 CRYP block is built on the CRYP block found in
+  the STn8820 SoC introduced in 2007, and subsequently used in the U8500
+  SoC in 2010.
+
 maintainers:
   - Lionel Debieve <lionel.debieve@foss.st.com>
 
 properties:
   compatible:
     enum:
+      - st,stn8820-cryp
+      - stericsson,ux500-cryp
       - st,stm32f756-cryp
       - st,stm32mp1-cryp
 
@@ -27,6 +33,19 @@ properties:
   resets:
     maxItems: 1
 
+  dmas:
+    items:
+      - description: mem2cryp DMA channel
+      - description: cryp2mem DMA channel
+
+  dma-names:
+    items:
+      - const: mem2cryp
+      - const: cryp2mem
+
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
-- 
2.38.1


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

* Re: [PATCH v2 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP
  2022-11-25 22:32 ` [PATCH v2 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP Linus Walleij
@ 2022-11-27 12:44   ` Krzysztof Kozlowski
  2022-11-27 20:13     ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-27 12:44 UTC (permalink / raw)
  To: Linus Walleij, linux-crypto, Herbert Xu, David S . Miller
  Cc: phone-devel, Stefan Hansson, Lionel Debieve, Maxime Coquelin,
	Alexandre Torgue, devicetree, Rob Herring, Krzysztof Kozlowski

On 25/11/2022 23:32, Linus Walleij wrote:
> This adds device tree bindings for the Ux500 CRYP block
> as a compatible in the STM32 CRYP bindings.
> 
> The Ux500 CRYP binding has been used for ages in the kernel
> device tree for Ux500 but was never documented, so fill in
> the gap by making it a sibling of the STM32 CRYP block,
> which is what it is.
> 
> The relationship to the existing STM32 CRYP block is pretty
> obvious when looking at the register map, and I have written
> patches to reuse the STM32 CRYP driver on the Ux500.
> 
> The two properties added are DMA channels and power domain.
> Power domains are a generic SoC feature and the STM32 variant
> also has DMA channels.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Lionel Debieve <lionel.debieve@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Drop the second (new) example.
> ---
>  .../bindings/crypto/st,stm32-cryp.yaml        | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> index ed23bf94a8e0..6759c5bf3e57 100644
> --- a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> +++ b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> @@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
>  title: STMicroelectronics STM32 CRYP bindings
>  
> +description: The STM32 CRYP block is built on the CRYP block found in
> +  the STn8820 SoC introduced in 2007, and subsequently used in the U8500
> +  SoC in 2010.
> +
>  maintainers:
>    - Lionel Debieve <lionel.debieve@foss.st.com>
>  
>  properties:
>    compatible:
>      enum:
> +      - st,stn8820-cryp
> +      - stericsson,ux500-cryp
>        - st,stm32f756-cryp
>        - st,stm32mp1-cryp
>  
> @@ -27,6 +33,19 @@ properties:
>    resets:
>      maxItems: 1
>  
> +  dmas:
> +    items:
> +      - description: mem2cryp DMA channel
> +      - description: cryp2mem DMA channel
> +
> +  dma-names:
> +    items:
> +      - const: mem2cryp
> +      - const: cryp2mem

Usually these are called rx/tx, but I understand you are documenting
existing usage from DTS or driver? In such case:

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>



Best regards,
Krzysztof


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

* Re: [PATCH v2 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP
  2022-11-27 12:44   ` Krzysztof Kozlowski
@ 2022-11-27 20:13     ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-11-27 20:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-crypto, Herbert Xu, David S . Miller, phone-devel,
	Stefan Hansson, Lionel Debieve, Maxime Coquelin, Alexandre Torgue,
	devicetree, Rob Herring, Krzysztof Kozlowski

On Sun, Nov 27, 2022 at 1:44 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> On 25/11/2022 23:32, Linus Walleij wrote:
> > This adds device tree bindings for the Ux500 CRYP block
> > as a compatible in the STM32 CRYP bindings.
> >
> > The Ux500 CRYP binding has been used for ages in the kernel
> > device tree for Ux500 but was never documented, so fill in
> > the gap by making it a sibling of the STM32 CRYP block,
> > which is what it is.
> >
> > The relationship to the existing STM32 CRYP block is pretty
> > obvious when looking at the register map, and I have written
> > patches to reuse the STM32 CRYP driver on the Ux500.
> >
> > The two properties added are DMA channels and power domain.
> > Power domains are a generic SoC feature and the STM32 variant
> > also has DMA channels.
> >
> > Cc: devicetree@vger.kernel.org
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> > Cc: Lionel Debieve <lionel.debieve@foss.st.com>
> > Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> > Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > ChangeLog v1->v2:
> > - Drop the second (new) example.
> > ---
> >  .../bindings/crypto/st,stm32-cryp.yaml        | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> > index ed23bf94a8e0..6759c5bf3e57 100644
> > --- a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> > +++ b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml
> > @@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> >  title: STMicroelectronics STM32 CRYP bindings
> >
> > +description: The STM32 CRYP block is built on the CRYP block found in
> > +  the STn8820 SoC introduced in 2007, and subsequently used in the U8500
> > +  SoC in 2010.
> > +
> >  maintainers:
> >    - Lionel Debieve <lionel.debieve@foss.st.com>
> >
> >  properties:
> >    compatible:
> >      enum:
> > +      - st,stn8820-cryp
> > +      - stericsson,ux500-cryp
> >        - st,stm32f756-cryp
> >        - st,stm32mp1-cryp
> >
> > @@ -27,6 +33,19 @@ properties:
> >    resets:
> >      maxItems: 1
> >
> > +  dmas:
> > +    items:
> > +      - description: mem2cryp DMA channel
> > +      - description: cryp2mem DMA channel
> > +
> > +  dma-names:
> > +    items:
> > +      - const: mem2cryp
> > +      - const: cryp2mem
>
> Usually these are called rx/tx, but I understand you are documenting
> existing usage from DTS or driver? In such case:

It's in the driver. Dunno how to do it for the future, we could
deprecate these and add rx/tx as preferred in a separate
patch.

> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks!

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-11-27 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20221125223217.2409659-1-linus.walleij@linaro.org>
2022-11-25 22:32 ` [PATCH v2 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP Linus Walleij
2022-11-27 12:44   ` Krzysztof Kozlowski
2022-11-27 20:13     ` Linus Walleij

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