linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Liu <neal.liu@mediatek.com>
To: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sean Wang <sean.wang@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Neal Liu <neal.liu@mediatek.com>, <linux-crypto@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	lkml <linux-kernel@vger.kernel.org>, <wsd_upstream@mediatek.com>,
	Crystal Guo <Crystal.Guo@mediatek.com>
Subject: [PATCH v6 1/2] dt-bindings: rng: add bindings for sec-rng
Date: Tue, 2 Jun 2020 16:14:37 +0800	[thread overview]
Message-ID: <1591085678-22764-2-git-send-email-neal.liu@mediatek.com> (raw)
In-Reply-To: <1591085678-22764-1-git-send-email-neal.liu@mediatek.com>

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

  reply	other threads:[~2020-06-02  8:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02  8:14 Security Random Number Generator support Neal Liu
2020-06-02  8:14 ` Neal Liu [this message]
2020-06-02  8:14 ` [PATCH v6 2/2] hwrng: add sec-rng driver Neal Liu
2020-06-02 10:38   ` Greg Kroah-Hartman
2020-06-02 12:14 ` Security Random Number Generator support Ard Biesheuvel
2020-06-02 13:02   ` Marc Zyngier
2020-06-03  7:29     ` Neal Liu
2020-06-03  7:40       ` Marc Zyngier
2020-06-03  7:54         ` Neal Liu
2020-06-03  9:48           ` Sudeep Holla
2020-06-03 11:12           ` Marc Zyngier
2020-06-18  9:50           ` Marc Zyngier
2020-06-19  1:47             ` Neal Liu
2020-06-03  9:34         ` Russell King - ARM Linux admin
2020-06-05  7:19           ` Neal Liu
2020-06-05  8:09             ` Russell King - ARM Linux admin
2020-06-05  8:59               ` Neal Liu
2020-06-05  9:27                 ` Russell King - ARM Linux admin
2020-06-08  7:49                 ` Sumit Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1591085678-22764-2-git-send-email-neal.liu@mediatek.com \
    --to=neal.liu@mediatek.com \
    --cc=Crystal.Guo@mediatek.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mpm@selenic.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@kernel.org \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).