1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/crypto/rockchip,rk3288-crypto.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Rockchip Electronics Security Accelerator
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
11*8bab661aSEmmanuel Vadot
12*8bab661aSEmmanuel Vadotproperties:
13*8bab661aSEmmanuel Vadot  compatible:
14*8bab661aSEmmanuel Vadot    enum:
15*8bab661aSEmmanuel Vadot      - rockchip,rk3288-crypto
16*8bab661aSEmmanuel Vadot      - rockchip,rk3328-crypto
17*8bab661aSEmmanuel Vadot      - rockchip,rk3399-crypto
18*8bab661aSEmmanuel Vadot
19*8bab661aSEmmanuel Vadot  reg:
20*8bab661aSEmmanuel Vadot    maxItems: 1
21*8bab661aSEmmanuel Vadot
22*8bab661aSEmmanuel Vadot  interrupts:
23*8bab661aSEmmanuel Vadot    maxItems: 1
24*8bab661aSEmmanuel Vadot
25*8bab661aSEmmanuel Vadot  clocks:
26*8bab661aSEmmanuel Vadot    minItems: 3
27*8bab661aSEmmanuel Vadot    maxItems: 4
28*8bab661aSEmmanuel Vadot
29*8bab661aSEmmanuel Vadot  clock-names:
30*8bab661aSEmmanuel Vadot    minItems: 3
31*8bab661aSEmmanuel Vadot    maxItems: 4
32*8bab661aSEmmanuel Vadot
33*8bab661aSEmmanuel Vadot  resets:
34*8bab661aSEmmanuel Vadot    minItems: 1
35*8bab661aSEmmanuel Vadot    maxItems: 3
36*8bab661aSEmmanuel Vadot
37*8bab661aSEmmanuel Vadot  reset-names:
38*8bab661aSEmmanuel Vadot    minItems: 1
39*8bab661aSEmmanuel Vadot    maxItems: 3
40*8bab661aSEmmanuel Vadot
41*8bab661aSEmmanuel VadotallOf:
42*8bab661aSEmmanuel Vadot  - if:
43*8bab661aSEmmanuel Vadot      properties:
44*8bab661aSEmmanuel Vadot        compatible:
45*8bab661aSEmmanuel Vadot          contains:
46*8bab661aSEmmanuel Vadot            const: rockchip,rk3288-crypto
47*8bab661aSEmmanuel Vadot    then:
48*8bab661aSEmmanuel Vadot      properties:
49*8bab661aSEmmanuel Vadot        clocks:
50*8bab661aSEmmanuel Vadot          minItems: 4
51*8bab661aSEmmanuel Vadot        clock-names:
52*8bab661aSEmmanuel Vadot          items:
53*8bab661aSEmmanuel Vadot            - const: aclk
54*8bab661aSEmmanuel Vadot            - const: hclk
55*8bab661aSEmmanuel Vadot            - const: sclk
56*8bab661aSEmmanuel Vadot            - const: apb_pclk
57*8bab661aSEmmanuel Vadot        resets:
58*8bab661aSEmmanuel Vadot          maxItems: 1
59*8bab661aSEmmanuel Vadot        reset-names:
60*8bab661aSEmmanuel Vadot          items:
61*8bab661aSEmmanuel Vadot            - const: crypto-rst
62*8bab661aSEmmanuel Vadot  - if:
63*8bab661aSEmmanuel Vadot      properties:
64*8bab661aSEmmanuel Vadot        compatible:
65*8bab661aSEmmanuel Vadot          contains:
66*8bab661aSEmmanuel Vadot            const: rockchip,rk3328-crypto
67*8bab661aSEmmanuel Vadot    then:
68*8bab661aSEmmanuel Vadot      properties:
69*8bab661aSEmmanuel Vadot        clocks:
70*8bab661aSEmmanuel Vadot          maxItems: 3
71*8bab661aSEmmanuel Vadot        clock-names:
72*8bab661aSEmmanuel Vadot          items:
73*8bab661aSEmmanuel Vadot            - const: hclk_master
74*8bab661aSEmmanuel Vadot            - const: hclk_slave
75*8bab661aSEmmanuel Vadot            - const: sclk
76*8bab661aSEmmanuel Vadot        resets:
77*8bab661aSEmmanuel Vadot          maxItems: 1
78*8bab661aSEmmanuel Vadot        reset-names:
79*8bab661aSEmmanuel Vadot          items:
80*8bab661aSEmmanuel Vadot            - const: crypto-rst
81*8bab661aSEmmanuel Vadot  - if:
82*8bab661aSEmmanuel Vadot      properties:
83*8bab661aSEmmanuel Vadot        compatible:
84*8bab661aSEmmanuel Vadot          contains:
85*8bab661aSEmmanuel Vadot            const: rockchip,rk3399-crypto
86*8bab661aSEmmanuel Vadot    then:
87*8bab661aSEmmanuel Vadot      properties:
88*8bab661aSEmmanuel Vadot        clocks:
89*8bab661aSEmmanuel Vadot          maxItems: 3
90*8bab661aSEmmanuel Vadot        clock-names:
91*8bab661aSEmmanuel Vadot          items:
92*8bab661aSEmmanuel Vadot            - const: hclk_master
93*8bab661aSEmmanuel Vadot            - const: hclk_slave
94*8bab661aSEmmanuel Vadot            - const: sclk
95*8bab661aSEmmanuel Vadot        resets:
96*8bab661aSEmmanuel Vadot          minItems: 3
97*8bab661aSEmmanuel Vadot        reset-names:
98*8bab661aSEmmanuel Vadot          items:
99*8bab661aSEmmanuel Vadot            - const: master
100*8bab661aSEmmanuel Vadot            - const: slave
101*8bab661aSEmmanuel Vadot            - const: crypto-rst
102*8bab661aSEmmanuel Vadot
103*8bab661aSEmmanuel Vadotrequired:
104*8bab661aSEmmanuel Vadot  - compatible
105*8bab661aSEmmanuel Vadot  - reg
106*8bab661aSEmmanuel Vadot  - interrupts
107*8bab661aSEmmanuel Vadot  - clocks
108*8bab661aSEmmanuel Vadot  - clock-names
109*8bab661aSEmmanuel Vadot  - resets
110*8bab661aSEmmanuel Vadot  - reset-names
111*8bab661aSEmmanuel Vadot
112*8bab661aSEmmanuel VadotadditionalProperties: false
113*8bab661aSEmmanuel Vadot
114*8bab661aSEmmanuel Vadotexamples:
115*8bab661aSEmmanuel Vadot  - |
116*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
117*8bab661aSEmmanuel Vadot    #include <dt-bindings/clock/rk3288-cru.h>
118*8bab661aSEmmanuel Vadot    crypto@ff8a0000 {
119*8bab661aSEmmanuel Vadot      compatible = "rockchip,rk3288-crypto";
120*8bab661aSEmmanuel Vadot      reg = <0xff8a0000 0x4000>;
121*8bab661aSEmmanuel Vadot      interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
122*8bab661aSEmmanuel Vadot      clocks = <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>,
123*8bab661aSEmmanuel Vadot               <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC1>;
124*8bab661aSEmmanuel Vadot      clock-names = "aclk", "hclk", "sclk", "apb_pclk";
125*8bab661aSEmmanuel Vadot      resets = <&cru SRST_CRYPTO>;
126*8bab661aSEmmanuel Vadot      reset-names = "crypto-rst";
127*8bab661aSEmmanuel Vadot    };
128