xref: /linux/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/rng/st,stm32-rng.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectronics STM32 RNG
8
9description: |
10  The STM32 hardware random number generator is a simple fixed purpose
11  IP and is fully separated from other crypto functions.
12
13maintainers:
14  - Lionel Debieve <lionel.debieve@foss.st.com>
15
16properties:
17  compatible:
18    enum:
19      - st,stm32-rng
20      - st,stm32mp13-rng
21      - st,stm32mp25-rng
22
23  reg:
24    maxItems: 1
25
26  clocks:
27    minItems: 1
28    maxItems: 2
29
30  clock-names:
31    items:
32      - const: core
33      - const: bus
34
35  resets:
36    maxItems: 1
37
38  clock-error-detect:
39    type: boolean
40    description: If set enable the clock detection management
41
42  st,rng-lock-conf:
43    type: boolean
44    description: If set, the RNG configuration in RNG_CR, RNG_HTCR and
45                  RNG_NSCR will be locked.
46
47  access-controllers:
48    minItems: 1
49    maxItems: 2
50
51required:
52  - compatible
53  - reg
54  - clocks
55
56allOf:
57  - if:
58      properties:
59        compatible:
60          contains:
61            enum:
62              - st,stm32-rng
63    then:
64      properties:
65        st,rng-lock-conf: false
66
67  - if:
68      properties:
69        compatible:
70          contains:
71            enum:
72              - st,stm32-rng
73              - st,stm32mp13-rng
74    then:
75      properties:
76        clocks:
77          maxItems: 1
78        clock-names: false
79    else:
80      properties:
81        clocks:
82          minItems: 2
83      required:
84        - clock-names
85
86additionalProperties: false
87
88examples:
89  - |
90    #include <dt-bindings/clock/stm32mp1-clks.h>
91    rng@54003000 {
92      compatible = "st,stm32-rng";
93      reg = <0x54003000 0x400>;
94      clocks = <&rcc RNG1_K>;
95    };
96
97...
98