diff mbox series

[3/7] dt-bindings: tpm: Add previously undocumented properties

Message ID 20220930165116.13329-4-Alexander.Steffen@infineon.com
State Changes Requested, archived
Headers show
Series Clean up TPM compatibles | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Alexander Steffen Sept. 30, 2022, 4:51 p.m. UTC
TPM devices may use some more properties than previously allowed by
trivial-devices.yaml. Document those in trivial-tpms.yaml.

Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
---
 .../bindings/security/tpm/trivial-tpms.yaml      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Rob Herring Sept. 30, 2022, 10:20 p.m. UTC | #1
On Fri, Sep 30, 2022 at 12:02 PM Alexander Steffen
<Alexander.Steffen@infineon.com> wrote:
>
> TPM devices may use some more properties than previously allowed by
> trivial-devices.yaml. Document those in trivial-tpms.yaml.
>
> Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
> ---
>  .../bindings/security/tpm/trivial-tpms.yaml      | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Adding these here means we would need to duplicate them for any device
with its own schema file. You need a common TPM property schema which
the specific TPM device schemas can reference.

>
> diff --git a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
> index 2092341c6491..a9e2dd17b1ca 100644
> --- a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
> +++ b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
> @@ -25,6 +25,22 @@ properties:
>
>    spi-max-frequency: true
>
> +  linux,sml-base:
> +    $ref: /schemas/types.yaml#/definitions/uint64
> +    description: |
> +      64-bit base address of the reserved memory allocated for the firmware
> +      event log
> +
> +  linux,sml-size:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: size of the memory allocated for the firmware event log
> +
> +  powered-while-suspended:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: |
> +      Present when the TPM is left powered on between suspend and resume
> +      (makes the suspend/resume callbacks do nothing).
> +
>    compatible:
>      contains:
>        enum:
> --
> 2.25.1
>
Alexander Steffen Oct. 4, 2022, 5:43 p.m. UTC | #2
On 01.10.22 00:20, Rob Herring wrote:
> On Fri, Sep 30, 2022 at 12:02 PM Alexander Steffen
> <Alexander.Steffen@infineon.com> wrote:
>>
>> TPM devices may use some more properties than previously allowed by
>> trivial-devices.yaml. Document those in trivial-tpms.yaml.
>>
>> Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
>> ---
>>   .../bindings/security/tpm/trivial-tpms.yaml      | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
> 
> Adding these here means we would need to duplicate them for any device
> with its own schema file. You need a common TPM property schema which
> the specific TPM device schemas can reference.

Good point, I'll create one.

>>
>> diff --git a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
>> index 2092341c6491..a9e2dd17b1ca 100644
>> --- a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
>> +++ b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
>> @@ -25,6 +25,22 @@ properties:
>>
>>     spi-max-frequency: true
>>
>> +  linux,sml-base:
>> +    $ref: /schemas/types.yaml#/definitions/uint64
>> +    description: |
>> +      64-bit base address of the reserved memory allocated for the firmware
>> +      event log
>> +
>> +  linux,sml-size:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: size of the memory allocated for the firmware event log
>> +
>> +  powered-while-suspended:
>> +    $ref: /schemas/types.yaml#/definitions/flag
>> +    description: |
>> +      Present when the TPM is left powered on between suspend and resume
>> +      (makes the suspend/resume callbacks do nothing).
>> +
>>     compatible:
>>       contains:
>>         enum:
>> --
>> 2.25.1
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
index 2092341c6491..a9e2dd17b1ca 100644
--- a/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
+++ b/Documentation/devicetree/bindings/security/tpm/trivial-tpms.yaml
@@ -25,6 +25,22 @@  properties:
 
   spi-max-frequency: true
 
+  linux,sml-base:
+    $ref: /schemas/types.yaml#/definitions/uint64
+    description: |
+      64-bit base address of the reserved memory allocated for the firmware
+      event log
+
+  linux,sml-size:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: size of the memory allocated for the firmware event log
+
+  powered-while-suspended:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: |
+      Present when the TPM is left powered on between suspend and resume
+      (makes the suspend/resume callbacks do nothing).
+
   compatible:
     contains:
       enum: