diff mbox series

dt-bindings: crypto: Add ST-Ericsson Ux500 CRYP

Message ID 20220721163010.1060062-1-linus.walleij@linaro.org
State New
Headers show
Series dt-bindings: crypto: Add ST-Ericsson Ux500 CRYP | expand

Commit Message

Linus Walleij July 21, 2022, 4:30 p.m. UTC
This adds device tree bindings for the Ux500 CRYP block.

This has been used for ages in the kernel device tree for
Ux500 but was never documented, so fill in the gap.

Cc: devicetree@vger.kernel.org
Cc: Lionel Debieve <lionel.debieve@foss.st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
The relationship to the existing STM32 CRYP block is pretty
obvious when looking at the register map. If preferred, I
can just extend the STM32 bindings with these extra
(generic) properties and compatibles as well.
---
 .../crypto/stericsson,ux500-cryp.yaml         | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/crypto/stericsson,ux500-cryp.yaml

Comments

Rob Herring (Arm) July 25, 2022, 10:38 p.m. UTC | #1
On Thu, 21 Jul 2022 18:30:10 +0200, Linus Walleij wrote:
> This adds device tree bindings for the Ux500 CRYP block.
> 
> This has been used for ages in the kernel device tree for
> Ux500 but was never documented, so fill in the gap.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Lionel Debieve <lionel.debieve@foss.st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> The relationship to the existing STM32 CRYP block is pretty
> obvious when looking at the register map. If preferred, I
> can just extend the STM32 bindings with these extra
> (generic) properties and compatibles as well.
> ---
>  .../crypto/stericsson,ux500-cryp.yaml         | 67 +++++++++++++++++++
>  1 file changed, 67 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/crypto/stericsson,ux500-cryp.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/stericsson,ux500-cryp.yaml b/Documentation/devicetree/bindings/crypto/stericsson,ux500-cryp.yaml
new file mode 100644
index 000000000000..9653776007a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/stericsson,ux500-cryp.yaml
@@ -0,0 +1,67 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/stericsson,ux500-cryp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST Microelectronics and ST-Ericsson Ux500 CRYP bindings
+
+description: The Ux500 CRYP block is identical to the one found in
+  STn8820 introduced in 2007. It seems to also be a related ancestor to the
+  STM32 CRYP block.
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+  compatible:
+    enum:
+      - st,stn8820-cryp
+      - stericsson,ux500-cryp
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  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
+  - clocks
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/reset/stericsson,db8500-prcc-reset.h>
+    #include <dt-bindings/arm/ux500_pm_domains.h>
+    cryp@a03cb000 {
+      compatible = "stericsson,ux500-cryp";
+      reg = <0xa03cb000 0x1000>;
+      interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&prcc_pclk 6 2>;
+      power-domains = <&pm_domains DOMAIN_VAPE>;
+    };