181aaf680SCorentin Labbe# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
281aaf680SCorentin Labbe%YAML 1.2
381aaf680SCorentin Labbe---
481aaf680SCorentin Labbe$id: http://devicetree.org/schemas/crypto/rockchip,rk3288-crypto.yaml#
581aaf680SCorentin Labbe$schema: http://devicetree.org/meta-schemas/core.yaml#
681aaf680SCorentin Labbe
781aaf680SCorentin Labbetitle: Rockchip Electronics Security Accelerator
881aaf680SCorentin Labbe
981aaf680SCorentin Labbemaintainers:
1081aaf680SCorentin Labbe  - Heiko Stuebner <heiko@sntech.de>
1181aaf680SCorentin Labbe
1281aaf680SCorentin Labbeproperties:
1381aaf680SCorentin Labbe  compatible:
1481aaf680SCorentin Labbe    enum:
1581aaf680SCorentin Labbe      - rockchip,rk3288-crypto
16*d1b57496SCorentin Labbe      - rockchip,rk3328-crypto
17*d1b57496SCorentin Labbe      - rockchip,rk3399-crypto
1881aaf680SCorentin Labbe
1981aaf680SCorentin Labbe  reg:
2081aaf680SCorentin Labbe    maxItems: 1
2181aaf680SCorentin Labbe
2281aaf680SCorentin Labbe  interrupts:
2381aaf680SCorentin Labbe    maxItems: 1
2481aaf680SCorentin Labbe
2581aaf680SCorentin Labbe  clocks:
26*d1b57496SCorentin Labbe    minItems: 3
2781aaf680SCorentin Labbe    maxItems: 4
2881aaf680SCorentin Labbe
2981aaf680SCorentin Labbe  clock-names:
30*d1b57496SCorentin Labbe    minItems: 3
31*d1b57496SCorentin Labbe    maxItems: 4
32*d1b57496SCorentin Labbe
33*d1b57496SCorentin Labbe  resets:
34*d1b57496SCorentin Labbe    minItems: 1
35*d1b57496SCorentin Labbe    maxItems: 3
36*d1b57496SCorentin Labbe
37*d1b57496SCorentin Labbe  reset-names:
38*d1b57496SCorentin Labbe    minItems: 1
39*d1b57496SCorentin Labbe    maxItems: 3
40*d1b57496SCorentin Labbe
41*d1b57496SCorentin LabbeallOf:
42*d1b57496SCorentin Labbe  - if:
43*d1b57496SCorentin Labbe      properties:
44*d1b57496SCorentin Labbe        compatible:
45*d1b57496SCorentin Labbe          contains:
46*d1b57496SCorentin Labbe            const: rockchip,rk3288-crypto
47*d1b57496SCorentin Labbe    then:
48*d1b57496SCorentin Labbe      properties:
49*d1b57496SCorentin Labbe        clocks:
50*d1b57496SCorentin Labbe          minItems: 4
51*d1b57496SCorentin Labbe        clock-names:
5281aaf680SCorentin Labbe          items:
5381aaf680SCorentin Labbe            - const: aclk
5481aaf680SCorentin Labbe            - const: hclk
5581aaf680SCorentin Labbe            - const: sclk
5681aaf680SCorentin Labbe            - const: apb_pclk
5781aaf680SCorentin Labbe        resets:
5881aaf680SCorentin Labbe          maxItems: 1
5981aaf680SCorentin Labbe        reset-names:
6081aaf680SCorentin Labbe          items:
6181aaf680SCorentin Labbe            - const: crypto-rst
62*d1b57496SCorentin Labbe  - if:
63*d1b57496SCorentin Labbe      properties:
64*d1b57496SCorentin Labbe        compatible:
65*d1b57496SCorentin Labbe          contains:
66*d1b57496SCorentin Labbe            const: rockchip,rk3328-crypto
67*d1b57496SCorentin Labbe    then:
68*d1b57496SCorentin Labbe      properties:
69*d1b57496SCorentin Labbe        clocks:
70*d1b57496SCorentin Labbe          maxItems: 3
71*d1b57496SCorentin Labbe        clock-names:
72*d1b57496SCorentin Labbe          items:
73*d1b57496SCorentin Labbe            - const: hclk_master
74*d1b57496SCorentin Labbe            - const: hclk_slave
75*d1b57496SCorentin Labbe            - const: sclk
76*d1b57496SCorentin Labbe        resets:
77*d1b57496SCorentin Labbe          maxItems: 1
78*d1b57496SCorentin Labbe        reset-names:
79*d1b57496SCorentin Labbe          items:
80*d1b57496SCorentin Labbe            - const: crypto-rst
81*d1b57496SCorentin Labbe  - if:
82*d1b57496SCorentin Labbe      properties:
83*d1b57496SCorentin Labbe        compatible:
84*d1b57496SCorentin Labbe          contains:
85*d1b57496SCorentin Labbe            const: rockchip,rk3399-crypto
86*d1b57496SCorentin Labbe    then:
87*d1b57496SCorentin Labbe      properties:
88*d1b57496SCorentin Labbe        clocks:
89*d1b57496SCorentin Labbe          maxItems: 3
90*d1b57496SCorentin Labbe        clock-names:
91*d1b57496SCorentin Labbe          items:
92*d1b57496SCorentin Labbe            - const: hclk_master
93*d1b57496SCorentin Labbe            - const: hclk_slave
94*d1b57496SCorentin Labbe            - const: sclk
95*d1b57496SCorentin Labbe        resets:
96*d1b57496SCorentin Labbe          minItems: 3
97*d1b57496SCorentin Labbe        reset-names:
98*d1b57496SCorentin Labbe          items:
99*d1b57496SCorentin Labbe            - const: master
100*d1b57496SCorentin Labbe            - const: slave
101*d1b57496SCorentin Labbe            - const: crypto-rst
10281aaf680SCorentin Labbe
10381aaf680SCorentin Labberequired:
10481aaf680SCorentin Labbe  - compatible
10581aaf680SCorentin Labbe  - reg
10681aaf680SCorentin Labbe  - interrupts
10781aaf680SCorentin Labbe  - clocks
10881aaf680SCorentin Labbe  - clock-names
10981aaf680SCorentin Labbe  - resets
11081aaf680SCorentin Labbe  - reset-names
11181aaf680SCorentin Labbe
11281aaf680SCorentin LabbeadditionalProperties: false
11381aaf680SCorentin Labbe
11481aaf680SCorentin Labbeexamples:
11581aaf680SCorentin Labbe  - |
11681aaf680SCorentin Labbe    #include <dt-bindings/interrupt-controller/arm-gic.h>
11781aaf680SCorentin Labbe    #include <dt-bindings/clock/rk3288-cru.h>
11881aaf680SCorentin Labbe    crypto@ff8a0000 {
11981aaf680SCorentin Labbe      compatible = "rockchip,rk3288-crypto";
12081aaf680SCorentin Labbe      reg = <0xff8a0000 0x4000>;
12181aaf680SCorentin Labbe      interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
12281aaf680SCorentin Labbe      clocks = <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>,
12381aaf680SCorentin Labbe               <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC1>;
12481aaf680SCorentin Labbe      clock-names = "aclk", "hclk", "sclk", "apb_pclk";
12581aaf680SCorentin Labbe      resets = <&cru SRST_CRYPTO>;
12681aaf680SCorentin Labbe      reset-names = "crypto-rst";
12781aaf680SCorentin Labbe    };
128