lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v6 1/2] dt-bindings: rng: add bindings for sec-rng
Date
Add bindings for ARM TrustZone based Security Random
Number Generator.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
---
Documentation/devicetree/bindings/rng/sec-rng.yaml | 53 ++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rng/sec-rng.yaml

diff --git a/Documentation/devicetree/bindings/rng/sec-rng.yaml b/Documentation/devicetree/bindings/rng/sec-rng.yaml
new file mode 100644
index 0000000..7f4ae50
--- /dev/null
+++ b/Documentation/devicetree/bindings/rng/sec-rng.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# # Copyright 2020 MediaTek Inc.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/rng/sec-rng.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Security Random Number Generator
+
+description: |
+ sec-rng is a security random number generator which provides a generic
+ interface to get hardware rnd from Secure state. The Secure state can be
+ Arm Trusted Firmware(ATF), Trusted Execution Environment(TEE), or even
+ EL2 hypervisor.
+
+maintainer:
+ - Neal Liu <neal.liu@mediatek.com>
+
+properties:
+ compatible:
+ enum:
+ - arm,sec-rng
+
+ method:
+ description: The method of calling to Secure state
+ enum:
+ - smc
+ - hvc
+
+ method-fid:
+ description: The function number within the SMC and HVC function identifier
+ maxItems: 1
+
+ quality:
+ description: Estimation of true entropy in RNG's bitstream per 1024 bits
+ maxItems: 1
+
+required:
+ - compatible
+ - methods
+ - method-fid
+ - quality
+
+additionalProperties: false
+
+examples:
+ - |
+ hwrng: hwrng {
+ compatible = "arm,sec-rng";
+ method = "smc";
+ method-fid = /bits/ 16 <0x26a>;
+ quality = /bits/ 16 <900>;
+ };
--
1.7.9.5
\
 
 \ /
  Last update: 2020-06-02 10:16    [W:0.071 / U:9.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site