Re: [PATCH 1/3] dt-bindings: tpm: Consolidate TCG TIS bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Nov 2023 10:48:41 +0100, Lukas Wunner wrote:
> A significant number of Trusted Platform Modules conform to the "TIS"
> specification published by the Trusted Computing Group ("TCG PC Client
> Specific TPM Interface Specification").  These chips typically use an
> SPI, I²C or LPC bus as transport (via MMIO in the latter case).  Some
> of them even support multiple of those buses (selectable through a
> config strap) or the same chip is available in multiple SKUs, each with
> a different bus interface.
> 
> The devicetree bindings for these TPMs have not been converted to DT
> schema yet and are spread out across 3 generic files and 3 chip-specific
> files.  A few TPM compatible strings were added to trivial-devices.yaml
> even though additional properties are documented in the plaintext
> bindings.
> 
> Consolidate the devicetree bindings into 3 files, one per bus.
> 
> Move common properties to a separate tpm-common.yaml.
> 
> Document compatible strings which are supported by the TPM TIS driver
> but were neglected to be added to the devicetree bindings.
> 
> Document the memory-region property recently introduced by commit
> 1e2714bb83fc ("tpm: Add reserved memory event log").
> 
> Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
> ---
>  .../bindings/security/tpm/google,cr50.txt     |  19 ----
>  .../bindings/security/tpm/st33zp24-i2c.txt    |  34 ------
>  .../bindings/security/tpm/st33zp24-spi.txt    |  32 ------
>  .../bindings/security/tpm/tpm-i2c.txt         |  26 -----
>  .../bindings/security/tpm/tpm_tis_mmio.txt    |  25 ----
>  .../bindings/security/tpm/tpm_tis_spi.txt     |  23 ----
>  .../bindings/tpm/tcg,tpm-tis-i2c.yaml         | 107 ++++++++++++++++++
>  .../bindings/tpm/tcg,tpm-tis-mmio.yaml        |  50 ++++++++
>  .../bindings/tpm/tcg,tpm_tis-spi.yaml         |  88 ++++++++++++++
>  .../devicetree/bindings/tpm/tpm-common.yaml   |  56 +++++++++
>  .../devicetree/bindings/trivial-devices.yaml  |  16 ---
>  11 files changed, 301 insertions(+), 175 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/google,cr50.txt
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/st33zp24-i2c.txt
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/tpm_tis_mmio.txt
>  delete mode 100644 Documentation/devicetree/bindings/security/tpm/tpm_tis_spi.txt
>  create mode 100644 Documentation/devicetree/bindings/tpm/tcg,tpm-tis-i2c.yaml
>  create mode 100644 Documentation/devicetree/bindings/tpm/tcg,tpm-tis-mmio.yaml
>  create mode 100644 Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.yaml
>  create mode 100644 Documentation/devicetree/bindings/tpm/tpm-common.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/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tpm-common.yaml: properties:oneOf: [{'memory-region': {'description': 'reserved memory allocated for firmware event log', 'maxItems': 1}}, {'allOf': [{'linux,sml-base': {'description': 'base address of reserved memory allocated for firmware event log', '$ref': '/schemas/types.yaml#/definitions/uint32-array', 'minItems': 2, 'maxItems': 2}}, {'linux,sml-size': {'description': 'size of reserved memory allocated for firmware event log', '$ref': '/schemas/types.yaml#/definitions/uint32'}}]}] is not of type 'object', 'boolean'
	from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tpm-common.yaml: properties: 'oneOf' should not be valid under {'$ref': '#/definitions/json-schema-prop-names'}
	hint: A json-schema keyword was found instead of a DT property name.
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tpm-common.yaml: properties:oneOf: [{'memory-region': {'description': 'reserved memory allocated for firmware event log', 'maxItems': 1}}, {'allOf': [{'linux,sml-base': {'description': 'base address of reserved memory allocated for firmware event log', '$ref': '/schemas/types.yaml#/definitions/uint32-array', 'minItems': 2, 'maxItems': 2}}, {'linux,sml-size': {'description': 'size of reserved memory allocated for firmware event log', '$ref': '/schemas/types.yaml#/definitions/uint32'}}]}] is not of type 'object', 'boolean'
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tpm-common.yaml: powered-while-suspended: missing type definition
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.example.dtb: tpm@0: compatible:1: 'tcg,tpm-tis-i2c' was expected
	from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.example.dtb: tpm@0: Unevaluated properties are not allowed ('compatible', 'spi-max-frequency' were unexpected)
	from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tcg,tpm_tis-spi.example.dtb: tpm@0: Unevaluated properties are not allowed ('lpcpd-gpios' was unexpected)
	from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tcg,tpm-tis-i2c.example.dtb: tpm@57: Unevaluated properties are not allowed ('linux,sml-base', 'linux,sml-size' were unexpected)
	from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/tpm/tcg,tpm-tis-i2c.example.dtb: tpm@13: Unevaluated properties are not allowed ('lpcpd-gpios' was unexpected)
	from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/e83a43a67c96b4f2614f029666209cb408da8678.1700555862.git.lukas@xxxxxxxxx

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux