xref: /freebsd/sys/contrib/device-tree/Bindings/crypto/allwinner,sun8i-ce.yaml (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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,sun20i-d1-crypto
18      - allwinner,sun50i-a64-crypto
19      - allwinner,sun50i-h5-crypto
20      - allwinner,sun50i-h6-crypto
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  clocks:
29    items:
30      - description: Bus clock
31      - description: Module clock
32      - description: MBus clock
33      - description: TRNG clock (RC oscillator)
34    minItems: 2
35
36  clock-names:
37    items:
38      - const: bus
39      - const: mod
40      - const: ram
41      - const: trng
42    minItems: 2
43
44  resets:
45    maxItems: 1
46
47if:
48  properties:
49    compatible:
50      enum:
51        - allwinner,sun20i-d1-crypto
52then:
53  properties:
54    clocks:
55      minItems: 4
56    clock-names:
57      minItems: 4
58else:
59  if:
60    properties:
61      compatible:
62        const: allwinner,sun50i-h6-crypto
63  then:
64    properties:
65      clocks:
66        minItems: 3
67        maxItems: 3
68      clock-names:
69        minItems: 3
70        maxItems: 3
71  else:
72    properties:
73      clocks:
74        maxItems: 2
75      clock-names:
76        maxItems: 2
77
78required:
79  - compatible
80  - reg
81  - interrupts
82  - clocks
83  - clock-names
84  - resets
85
86additionalProperties: false
87
88examples:
89  - |
90    #include <dt-bindings/interrupt-controller/arm-gic.h>
91    #include <dt-bindings/clock/sun50i-a64-ccu.h>
92    #include <dt-bindings/reset/sun50i-a64-ccu.h>
93
94    crypto: crypto@1c15000 {
95      compatible = "allwinner,sun8i-h3-crypto";
96      reg = <0x01c15000 0x1000>;
97      interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
98      clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
99      clock-names = "bus", "mod";
100      resets = <&ccu RST_BUS_CE>;
101    };
102