diff mbox series

[v3,6/7] dt-bindings: tpm: Add YAML schema for TPM TIS I2C options

Message ID 20200210162838.173903-7-amirmizi6@gmail.com
State Changes Requested
Headers show
Series add tpm i2c ptp driver | expand

Checks

Context Check Description
robh/dt-meta-schema fail build log
robh/checkpatch success

Commit Message

Amir Mizinski Feb. 10, 2020, 4:28 p.m. UTC
From: Amir Mizinski <amirmizi6@gmail.com>

Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c
 PTP based physical layer.

This patch adds the documentation for corresponding device tree bindings of
 I2C based Physical TPM.
Refer to the 'I2C Interface Definition' section in
 'TCG PC Client PlatformTPMProfile(PTP) Specification' publication
 for specification.

Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
---
 .../bindings/security/tpm/tpm-tis-i2c.yaml         | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml

Comments

Rob Herring Feb. 12, 2020, 1:59 a.m. UTC | #1
On Mon, 10 Feb 2020 18:28:37 +0200, amirmizi6@gmail.com wrote:
> From: Amir Mizinski <amirmizi6@gmail.com>
> 
> Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c
>  PTP based physical layer.
> 
> This patch adds the documentation for corresponding device tree bindings of
>  I2C based Physical TPM.
> Refer to the 'I2C Interface Definition' section in
>  'TCG PC Client PlatformTPMProfile(PTP) Specification' publication
>  for specification.
> 
> Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
> ---
>  .../bindings/security/tpm/tpm-tis-i2c.yaml         | 43 ++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.example.dts:17.12-13 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1235916
Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
new file mode 100644
index 0000000..ca16b59
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/security/tpm/tpm-tis-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: I2C PTP based TPM Device Tree Bindings
+
+maintainers:
+  - Amir Mizinski <amirmizi6@gmail.com>
+
+description:
+  Device Tree Bindings for I2C based Trusted Platform Module(TPM).
+
+properties:
+  compatible:
+    contains:
+      const: tcg,tpm-tis-i2c
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  crc-checksum:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      CRC checksum enable.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+examples:
+  - |
+    tpm-tis-i2c: tpm-tis-i2c@2e {
+       compatible = "tcg,tpm-tis-i2c";
+       reg = <0x2e>;
+       interrupts = <&gpio 24 GPIO_ACTIVE_HIGH>;
+       crc-checksum;
+    };