arm64: dts: qcom: sm8550: add TRNG node
[linux-modified.git] / Documentation / devicetree / bindings / crypto / allwinner,sun8i-ce.yaml
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
7 title: Allwinner Crypto Engine driver
8
9 maintainers:
10   - Corentin Labbe <clabbe.montjoie@gmail.com>
11
12 properties:
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
47 if:
48   properties:
49     compatible:
50       enum:
51         - allwinner,sun20i-d1-crypto
52 then:
53   properties:
54     clocks:
55       minItems: 4
56     clock-names:
57       minItems: 4
58 else:
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
78 required:
79   - compatible
80   - reg
81   - interrupts
82   - clocks
83   - clock-names
84   - resets
85
86 additionalProperties: false
87
88 examples:
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     };