xref: /freebsd/sys/contrib/device-tree/Bindings/crypto/fsl,sec2.0.yaml (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8ccc0d23SEmmanuel Vadot%YAML 1.2
3*8ccc0d23SEmmanuel Vadot---
4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/crypto/fsl,sec2.0.yaml#
5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8ccc0d23SEmmanuel Vadot
7*8ccc0d23SEmmanuel Vadottitle: Freescale SoC SEC Security Engines versions 1.x-2.x-3.x
8*8ccc0d23SEmmanuel Vadot
9*8ccc0d23SEmmanuel Vadotmaintainers:
10*8ccc0d23SEmmanuel Vadot  - J. Neuschäfer <j.ne@posteo.net>
11*8ccc0d23SEmmanuel Vadot
12*8ccc0d23SEmmanuel Vadotproperties:
13*8ccc0d23SEmmanuel Vadot  compatible:
14*8ccc0d23SEmmanuel Vadot    description:
15*8ccc0d23SEmmanuel Vadot      Should contain entries for this and backward compatible SEC versions,
16*8ccc0d23SEmmanuel Vadot      high to low. Warning - SEC1 and SEC2 are mutually exclusive.
17*8ccc0d23SEmmanuel Vadot    oneOf:
18*8ccc0d23SEmmanuel Vadot      - items:
19*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.3
20*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.1
21*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.0
22*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.4
23*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.2
24*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
25*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
26*8ccc0d23SEmmanuel Vadot      - items:
27*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.1
28*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.0
29*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.4
30*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.2
31*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
32*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
33*8ccc0d23SEmmanuel Vadot      - items:
34*8ccc0d23SEmmanuel Vadot          - const: fsl,sec3.0
35*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.4
36*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.2
37*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
38*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
39*8ccc0d23SEmmanuel Vadot      - items:
40*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.4
41*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.2
42*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
43*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
44*8ccc0d23SEmmanuel Vadot      - items:
45*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.2
46*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
47*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
48*8ccc0d23SEmmanuel Vadot      - items:
49*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.1
50*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
51*8ccc0d23SEmmanuel Vadot      - items:
52*8ccc0d23SEmmanuel Vadot          - const: fsl,sec2.0
53*8ccc0d23SEmmanuel Vadot      - items:
54*8ccc0d23SEmmanuel Vadot          - const: fsl,sec1.2
55*8ccc0d23SEmmanuel Vadot          - const: fsl,sec1.0
56*8ccc0d23SEmmanuel Vadot      - items:
57*8ccc0d23SEmmanuel Vadot          - const: fsl,sec1.0
58*8ccc0d23SEmmanuel Vadot
59*8ccc0d23SEmmanuel Vadot  reg:
60*8ccc0d23SEmmanuel Vadot    maxItems: 1
61*8ccc0d23SEmmanuel Vadot
62*8ccc0d23SEmmanuel Vadot  interrupts:
63*8ccc0d23SEmmanuel Vadot    maxItems: 1
64*8ccc0d23SEmmanuel Vadot
65*8ccc0d23SEmmanuel Vadot  fsl,num-channels:
66*8ccc0d23SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
67*8ccc0d23SEmmanuel Vadot    enum: [ 1, 4 ]
68*8ccc0d23SEmmanuel Vadot    description: An integer representing the number of channels available.
69*8ccc0d23SEmmanuel Vadot
70*8ccc0d23SEmmanuel Vadot  fsl,channel-fifo-len:
71*8ccc0d23SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
72*8ccc0d23SEmmanuel Vadot    maximum: 100
73*8ccc0d23SEmmanuel Vadot    description:
74*8ccc0d23SEmmanuel Vadot      An integer representing the number of descriptor pointers each channel
75*8ccc0d23SEmmanuel Vadot      fetch fifo can hold.
76*8ccc0d23SEmmanuel Vadot
77*8ccc0d23SEmmanuel Vadot  fsl,exec-units-mask:
78*8ccc0d23SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
79*8ccc0d23SEmmanuel Vadot    maximum: 0xfff
80*8ccc0d23SEmmanuel Vadot    description: |
81*8ccc0d23SEmmanuel Vadot      The bitmask representing what execution units (EUs) are available.
82*8ccc0d23SEmmanuel Vadot      EU information should be encoded following the SEC's Descriptor Header
83*8ccc0d23SEmmanuel Vadot      Dword EU_SEL0 field documentation, i.e. as follows:
84*8ccc0d23SEmmanuel Vadot
85*8ccc0d23SEmmanuel Vadot        bit 0  = reserved - should be 0
86*8ccc0d23SEmmanuel Vadot        bit 1  = set if SEC has the ARC4 EU (AFEU)
87*8ccc0d23SEmmanuel Vadot        bit 2  = set if SEC has the DES/3DES EU (DEU)
88*8ccc0d23SEmmanuel Vadot        bit 3  = set if SEC has the message digest EU (MDEU/MDEU-A)
89*8ccc0d23SEmmanuel Vadot        bit 4  = set if SEC has the random number generator EU (RNG)
90*8ccc0d23SEmmanuel Vadot        bit 5  = set if SEC has the public key EU (PKEU)
91*8ccc0d23SEmmanuel Vadot        bit 6  = set if SEC has the AES EU (AESU)
92*8ccc0d23SEmmanuel Vadot        bit 7  = set if SEC has the Kasumi EU (KEU)
93*8ccc0d23SEmmanuel Vadot        bit 8  = set if SEC has the CRC EU (CRCU)
94*8ccc0d23SEmmanuel Vadot        bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B)
95*8ccc0d23SEmmanuel Vadot
96*8ccc0d23SEmmanuel Vadot      remaining bits are reserved for future SEC EUs.
97*8ccc0d23SEmmanuel Vadot
98*8ccc0d23SEmmanuel Vadot  fsl,descriptor-types-mask:
99*8ccc0d23SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
100*8ccc0d23SEmmanuel Vadot    description: |
101*8ccc0d23SEmmanuel Vadot      The bitmask representing what descriptors are available. Descriptor type
102*8ccc0d23SEmmanuel Vadot      information should be encoded following the SEC's Descriptor Header Dword
103*8ccc0d23SEmmanuel Vadot      DESC_TYPE field documentation, i.e. as follows:
104*8ccc0d23SEmmanuel Vadot
105*8ccc0d23SEmmanuel Vadot        bit 0  = SEC supports descriptor type aesu_ctr_nonsnoop
106*8ccc0d23SEmmanuel Vadot        bit 1  = SEC supports descriptor type ipsec_esp
107*8ccc0d23SEmmanuel Vadot        bit 2  = SEC supports descriptor type common_nonsnoop
108*8ccc0d23SEmmanuel Vadot        bit 3  = SEC supports descriptor type 802.11i AES ccmp
109*8ccc0d23SEmmanuel Vadot        bit 4  = SEC supports descriptor type hmac_snoop_no_afeu
110*8ccc0d23SEmmanuel Vadot        bit 5  = SEC supports descriptor type srtp
111*8ccc0d23SEmmanuel Vadot        bit 6  = SEC supports descriptor type non_hmac_snoop_no_afeu
112*8ccc0d23SEmmanuel Vadot        bit 7  = SEC supports descriptor type pkeu_assemble
113*8ccc0d23SEmmanuel Vadot        bit 8  = SEC supports descriptor type aesu_key_expand_output
114*8ccc0d23SEmmanuel Vadot        bit 9  = SEC supports descriptor type pkeu_ptmul
115*8ccc0d23SEmmanuel Vadot        bit 10 = SEC supports descriptor type common_nonsnoop_afeu
116*8ccc0d23SEmmanuel Vadot        bit 11 = SEC supports descriptor type pkeu_ptadd_dbl
117*8ccc0d23SEmmanuel Vadot
118*8ccc0d23SEmmanuel Vadot      ..and so on and so forth.
119*8ccc0d23SEmmanuel Vadot
120*8ccc0d23SEmmanuel Vadotrequired:
121*8ccc0d23SEmmanuel Vadot  - compatible
122*8ccc0d23SEmmanuel Vadot  - reg
123*8ccc0d23SEmmanuel Vadot  - fsl,num-channels
124*8ccc0d23SEmmanuel Vadot  - fsl,channel-fifo-len
125*8ccc0d23SEmmanuel Vadot  - fsl,exec-units-mask
126*8ccc0d23SEmmanuel Vadot  - fsl,descriptor-types-mask
127*8ccc0d23SEmmanuel Vadot
128*8ccc0d23SEmmanuel VadotunevaluatedProperties: false
129*8ccc0d23SEmmanuel Vadot
130*8ccc0d23SEmmanuel Vadotexamples:
131*8ccc0d23SEmmanuel Vadot  - |
132*8ccc0d23SEmmanuel Vadot    /* MPC8548E */
133*8ccc0d23SEmmanuel Vadot    crypto@30000 {
134*8ccc0d23SEmmanuel Vadot        compatible = "fsl,sec2.1", "fsl,sec2.0";
135*8ccc0d23SEmmanuel Vadot        reg = <0x30000 0x10000>;
136*8ccc0d23SEmmanuel Vadot        interrupts = <29 2>;
137*8ccc0d23SEmmanuel Vadot        interrupt-parent = <&mpic>;
138*8ccc0d23SEmmanuel Vadot        fsl,num-channels = <4>;
139*8ccc0d23SEmmanuel Vadot        fsl,channel-fifo-len = <24>;
140*8ccc0d23SEmmanuel Vadot        fsl,exec-units-mask = <0xfe>;
141*8ccc0d23SEmmanuel Vadot        fsl,descriptor-types-mask = <0x12b0ebf>;
142*8ccc0d23SEmmanuel Vadot    };
143*8ccc0d23SEmmanuel Vadot
144*8ccc0d23SEmmanuel Vadot...
145