[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1591085678-22764-2-git-send-email-neal.liu@mediatek.com>
Date: Tue, 2 Jun 2020 16:14:37 +0800
From: Neal Liu <neal.liu@...iatek.com>
To: Matt Mackall <mpm@...enic.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Sean Wang <sean.wang@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Neal Liu <neal.liu@...iatek.com>, <linux-crypto@...r.kernel.org>,
<devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
lkml <linux-kernel@...r.kernel.org>, <wsd_upstream@...iatek.com>,
Crystal Guo <Crystal.Guo@...iatek.com>
Subject: [PATCH v6 1/2] dt-bindings: rng: add bindings for sec-rng
Add bindings for ARM TrustZone based Security Random
Number Generator.
Signed-off-by: Neal Liu <neal.liu@...iatek.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@...iatek.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
Powered by blists - more mailing lists