xref: /freebsd/sys/contrib/device-tree/Bindings/crypto/allwinner,sun8i-ce.yaml (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/crypto/allwinner,sun8i-ce.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner Crypto Engine driver
8
9maintainers:
10  - Corentin Labbe <clabbe.montjoie@gmail.com>
11
12properties:
13  compatible:
14    enum:
15      - allwinner,sun8i-h3-crypto
16      - allwinner,sun8i-r40-crypto
17      - allwinner,sun50i-a64-crypto
18      - allwinner,sun50i-h5-crypto
19      - allwinner,sun50i-h6-crypto
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  clocks:
28    items:
29      - description: Bus clock
30      - description: Module clock
31      - description: MBus clock
32    minItems: 2
33    maxItems: 3
34
35  clock-names:
36    items:
37      - const: bus
38      - const: mod
39      - const: ram
40    minItems: 2
41    maxItems: 3
42
43  resets:
44    maxItems: 1
45
46if:
47  properties:
48    compatible:
49      const: allwinner,sun50i-h6-crypto
50then:
51  properties:
52    clocks:
53      minItems: 3
54    clock-names:
55      minItems: 3
56else:
57  properties:
58    clocks:
59      maxItems: 2
60    clock-names:
61      maxItems: 2
62
63required:
64  - compatible
65  - reg
66  - interrupts
67  - clocks
68  - clock-names
69  - resets
70
71additionalProperties: false
72
73examples:
74  - |
75    #include <dt-bindings/interrupt-controller/arm-gic.h>
76    #include <dt-bindings/clock/sun50i-a64-ccu.h>
77    #include <dt-bindings/reset/sun50i-a64-ccu.h>
78
79    crypto: crypto@1c15000 {
80      compatible = "allwinner,sun8i-h3-crypto";
81      reg = <0x01c15000 0x1000>;
82      interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
83      clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
84      clock-names = "bus", "mod";
85      resets = <&ccu RST_BUS_CE>;
86    };
87
88