Message ID | 20210826111908.117278-8-amirmizi6@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add tpm i2c ptp driver | expand |
On Thu, 26 Aug 2021 14:19:08 +0300, amirmizi6@gmail.com wrote: > From: Amir Mizinski <amirmizi6@gmail.com> > > Added a YAML schema to support tpm tis i2c related 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> > Reviewed-by: Rob Herring <robh@kernel.org> > --- > .../bindings/security/tpm/tpm-tis-i2c.yaml | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml: 'additionalProperties' is a required property hint: A schema without a "$ref" to another schema must define all properties and use "additionalProperties" from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml: ignoring, error in schema: warning: no schema found in file: ./Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.example.dt.yaml:0:0: /example-0/i2c/tpm@2e: failed to match any schema with compatible: ['nuvoton,npct75x', 'tcg,tpm-tis-i2c'] Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.example.dt.yaml:0:0: /example-0/i2c/tpm@2e: failed to match any schema with compatible: ['nuvoton,npct75x', 'tcg,tpm-tis-i2c'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/1521079 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On Thu, 2021-08-26 at 14:19 +0300, amirmizi6@gmail.com wrote: > From: Amir Mizinski <amirmizi6@gmail.com> > > Added a YAML schema to support tpm tis i2c related dt-bindings for the I2c ~~~ Add Using imperative form in the current time is better than describing the past. /Jarkko
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..68b13d5 --- /dev/null +++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%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: + items: + - enum: + # Nuvoton's Trusted Platform Module (TPM) (NPCT75x) + - nuvoton,npct75x + - const: tcg,tpm-tis-i2c + + reg: + maxItems: 1 + + interrupt: + maxItems: 1 + + crc-checksum: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag to enable CRC checksum. + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + tpm@2e { + compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c"; + reg = <0x2e>; + crc-checksum; + }; + }; +...