From: Stephen Boyd <swboyd@chromium.org>
To: Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Andrey Pronin <apronin@chromium.org>,
Douglas Anderson <dianders@chromium.org>
Subject: [PATCH] dt-bindings: tpm: Convert cr50 binding to YAML
Date: Mon, 16 Dec 2019 16:54:24 -0800 [thread overview]
Message-ID: <20191217005424.226858-1-swboyd@chromium.org> (raw)
This allows us to validate the dt binding to the implementation. Add the
interrupt property too, because that's required but nobody noticed when
the non-YAML binding was introduced.
Cc: Andrey Pronin <apronin@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
.../bindings/security/tpm/google,cr50.txt | 19 -------
.../bindings/security/tpm/google,cr50.yaml | 52 +++++++++++++++++++
2 files changed, 52 insertions(+), 19 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/security/tpm/google,cr50.txt
create mode 100644 Documentation/devicetree/bindings/security/tpm/google,cr50.yaml
diff --git a/Documentation/devicetree/bindings/security/tpm/google,cr50.txt b/Documentation/devicetree/bindings/security/tpm/google,cr50.txt
deleted file mode 100644
index cd69c2efdd37..000000000000
--- a/Documentation/devicetree/bindings/security/tpm/google,cr50.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-* H1 Secure Microcontroller with Cr50 Firmware on SPI Bus.
-
-H1 Secure Microcontroller running Cr50 firmware provides several
-functions, including TPM-like functionality. It communicates over
-SPI using the FIFO protocol described in the PTP Spec, section 6.
-
-Required properties:
-- compatible: Should be "google,cr50".
-- spi-max-frequency: Maximum SPI frequency.
-
-Example:
-
-&spi0 {
- tpm@0 {
- compatible = "google,cr50";
- reg = <0>;
- spi-max-frequency = <800000>;
- };
-};
diff --git a/Documentation/devicetree/bindings/security/tpm/google,cr50.yaml b/Documentation/devicetree/bindings/security/tpm/google,cr50.yaml
new file mode 100644
index 000000000000..8bfff0e757af
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/google,cr50.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/google,cr50.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: H1 Secure Microcontroller with Cr50 Firmware on SPI Bus
+
+description:
+ H1 Secure Microcontroller running Cr50 firmware provides several functions,
+ including TPM-like functionality. It communicates over SPI using the FIFO
+ protocol described in the PTP Spec, section 6.
+
+maintainers:
+ - Andrey Pronin <apronin@chromium.org>
+
+properties:
+ compatible:
+ const: google,cr50
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - spi-max-frequency
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ tpm@0 {
+ compatible = "google,cr50";
+ reg = <0>;
+ spi-max-frequency = <800000>;
+ interrupts = <50 IRQ_TYPE_EDGE_RISING>;
+ };
+ };
+
+...
--
Sent by a computer, using git, on the internet
next reply other threads:[~2019-12-17 0:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 0:54 Stephen Boyd [this message]
2019-12-17 17:45 ` [PATCH] dt-bindings: tpm: Convert cr50 binding to YAML Doug Anderson
2019-12-20 23:10 ` Rob Herring
[not found] ` <5e174fec.1c69fb81.f3e14.8354@mx.google.com>
2020-02-01 1:35 ` Stephen Boyd
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=20191217005424.226858-1-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=apronin@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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).