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