All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
@ 2016-08-30  4:44 Nayna Jain
       [not found] ` <1472532277-21933-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  2016-09-02 14:51 ` [PATCH] " Rob Herring
  0 siblings, 2 replies; 14+ messages in thread
From: Nayna Jain @ 2016-08-30  4:44 UTC (permalink / raw)
  To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: wsa-z923LK4zBo2bacvFa/9K2g, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	hellerda-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	ltcgcw-r/Jw6+rmf7HQT0dZR+AlfA, gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	Nayna Jain

This is documenting device tree binding for
I2C based TPM, similar concept which being used
for virtual TPM on POWER7 and POWER8 systems running PowerVM.

Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt

diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
new file mode 100644
index 0000000..8fdee14
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
@@ -0,0 +1,29 @@
+Device Tree Bindings for I2C based Trusted Platform Module(TPM)
+---------------------------------------------------------------
+
+This node describes a TPM device connected to Processor on i2c bus.
+
+Required properties:
+
+- compatible : 'manufacturer,model'
+- label : represents device type
+- linux,sml-base : base address of the Event Log. It is a physical address.
+		   sml stands for shared memory log.
+- linux,sml-size : size of the memory allocated for the Event Log.
+
+Optional properties:
+
+- status: indicates whether the device is enabled or disabled. "okay" for
+          enabled and "disabled" for disabled.
+
+Example
+-------
+
+tpm@57 {
+	reg = <0x57>;
+	label = "tpm";
+	compatible = "nuvoton,npct650", "nuvoton,npct601";
+	linux,sml-base = <0x7f 0xfd450000>;
+	linux,sml-size = <0x10000>;
+	status = "okay";
+};
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found] ` <1472532277-21933-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2016-08-30  6:36   ` Jarkko Sakkinen
       [not found]     ` <20160830063631.GA5336-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2016-08-30 20:51   ` Wolfram Sang
  1 sibling, 1 reply; 14+ messages in thread
From: Jarkko Sakkinen @ 2016-08-30  6:36 UTC (permalink / raw)
  To: Nayna Jain
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, wsa-z923LK4zBo2bacvFa/9K2g,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> This is documenting device tree binding for
> I2C based TPM, similar concept which being used
> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> 
> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> new file mode 100644
> index 0000000..8fdee14
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> @@ -0,0 +1,29 @@
> +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> +---------------------------------------------------------------
> +
> +This node describes a TPM device connected to Processor on i2c bus.
> +
> +Required properties:
> +
> +- compatible : 'manufacturer,model'
> +- label : represents device type
> +- linux,sml-base : base address of the Event Log. It is a physical address.
> +		   sml stands for shared memory log.
> +- linux,sml-size : size of the memory allocated for the Event Log.
> +
> +Optional properties:
> +
> +- status: indicates whether the device is enabled or disabled. "okay" for
> +          enabled and "disabled" for disabled.
> +
> +Example
> +-------
> +
> +tpm@57 {
> +	reg = <0x57>;
> +	label = "tpm";
> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
> +	linux,sml-base = <0x7f 0xfd450000>;
> +	linux,sml-size = <0x10000>;
> +	status = "okay";
> +};

I would rather name the fields event-log-base and event-log-size. They
would be much more readable and obvious names.

Also, enabled should be "enabled", not "okay".

/Jarkko

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]     ` <20160830063631.GA5336-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-08-30  6:41       ` Peter Huewe
       [not found]         ` <D8028209-446C-4C50-9AEC-25F6F8C98995-Mmb7MZpHnFY@public.gmane.org>
  2016-09-02 14:52       ` Rob Herring
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Huewe @ 2016-08-30  6:41 UTC (permalink / raw)
  To: Jarkko Sakkinen, Nayna Jain
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ



Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>:
>On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
>> This is documenting device tree binding for
>> I2C based TPM, similar concept which being used
>> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
>> 
>> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> ---
>>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29
>+++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> 
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> new file mode 100644
>> index 0000000..8fdee14
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> @@ -0,0 +1,29 @@
>> +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
>> +---------------------------------------------------------------
>> +
>> +This node describes a TPM device connected to Processor on i2c bus.
>> +
>> +Required properties:
>> +
>> +- compatible : 'manufacturer,model'
>> +- label : represents device type
>> +- linux,sml-base : base address of the Event Log. It is a physical
>address.
>> +		   sml stands for shared memory log.
>> +- linux,sml-size : size of the memory allocated for the Event Log.
>> +
>> +Optional properties:
>> +
>> +- status: indicates whether the device is enabled or disabled.
>"okay" for
>> +          enabled and "disabled" for disabled.
>> +
>> +Example
>> +-------
>> +
>> +tpm@57 {
>> +	reg = <0x57>;
>> +	label = "tpm";
>> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
>> +	linux,sml-base = <0x7f 0xfd450000>;
>> +	linux,sml-size = <0x10000>;
>> +	status = "okay";
>> +};
>
>I would rather name the fields event-log-base and event-log-size. They
>would be much more readable and obvious names.

I agree - I always get stuck upon the sml thing.
>
>Also, enabled should be "enabled", not "okay".

No!
okay/ok is a dt keyword! (Or at least used in everything else)

It has nothing to do whether the TPM is enabled/disabled/activated whatever
Peter

>
>/Jarkko
>
>------------------------------------------------------------------------------
>_______________________________________________
>tpmdd-devel mailing list
>tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

-- 
Sent from my mobile

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]         ` <D8028209-446C-4C50-9AEC-25F6F8C98995-Mmb7MZpHnFY@public.gmane.org>
@ 2016-08-30  6:46           ` Peter Huewe
  2016-08-30  7:06           ` [tpmdd-devel] " Jarkko Sakkinen
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Huewe @ 2016-08-30  6:46 UTC (permalink / raw)
  To: Peter Huewe
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ

I agree - I always get stuck upon the sml thing.
>
>Also, enabled should be "enabled", not "okay".

No!
okay/ok is a dt keyword! (Or at least used in everything else)

It has nothing to do whether the TPM is enabled/disabled/activated whatever
See http://www.devicetree.org/specifications-pdf table 2.4

Value Description
"okay" Indicates the device is operational
"disabled" Indicates that the device is not presently operational, but it might become operational in the
future (for example, something is not plugged in, or switched off).
Refer to the device binding for details on what disabled means for a given device.
"fail" Indicates that the device is not operational. A serious error was detected in the device, and it
is unlikely to become operational without repair.
"fail-sss" Indicates that the device is not operational. A serious error was detected in the device and it
is unlikely to become operational without repair. The sss portion of the value is specific to
the device and indicates the error condition detected.

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]         ` <D8028209-446C-4C50-9AEC-25F6F8C98995-Mmb7MZpHnFY@public.gmane.org>
  2016-08-30  6:46           ` Peter Huewe
@ 2016-08-30  7:06           ` Jarkko Sakkinen
       [not found]             ` <20160830070649.GA6215-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Jarkko Sakkinen @ 2016-08-30  7:06 UTC (permalink / raw)
  To: Peter Huewe
  Cc: Nayna Jain, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA, pawel.moll-5wv7dgnIgG8,
	wsa-z923LK4zBo2bacvFa/9K2g,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Mon, Aug 29, 2016 at 11:41:51PM -0700, Peter Huewe wrote:
> 
> 
> Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>:
> >On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> >> This is documenting device tree binding for
> >> I2C based TPM, similar concept which being used
> >> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> >> 
> >> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> >> ---
> >>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29
> >+++++++++++++++++++++++
> >>  1 file changed, 29 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> >> 
> >> diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> >b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> >> new file mode 100644
> >> index 0000000..8fdee14
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> >> @@ -0,0 +1,29 @@
> >> +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> >> +---------------------------------------------------------------
> >> +
> >> +This node describes a TPM device connected to Processor on i2c bus.
> >> +
> >> +Required properties:
> >> +
> >> +- compatible : 'manufacturer,model'
> >> +- label : represents device type
> >> +- linux,sml-base : base address of the Event Log. It is a physical
> >address.
> >> +		   sml stands for shared memory log.
> >> +- linux,sml-size : size of the memory allocated for the Event Log.
> >> +
> >> +Optional properties:
> >> +
> >> +- status: indicates whether the device is enabled or disabled.
> >"okay" for
> >> +          enabled and "disabled" for disabled.
> >> +
> >> +Example
> >> +-------
> >> +
> >> +tpm@57 {
> >> +	reg = <0x57>;
> >> +	label = "tpm";
> >> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
> >> +	linux,sml-base = <0x7f 0xfd450000>;
> >> +	linux,sml-size = <0x10000>;
> >> +	status = "okay";
> >> +};
> >
> >I would rather name the fields event-log-base and event-log-size. They
> >would be much more readable and obvious names.
> 
> I agree - I always get stuck upon the sml thing.
> >
> >Also, enabled should be "enabled", not "okay".
> 
> No!
> okay/ok is a dt keyword! (Or at least used in everything else)
> 
> It has nothing to do whether the TPM is enabled/disabled/activated whatever
> Peter

OK, just to educate myself, where can I find these standard keywords?

The granularity is wrong (section 8.7 of TPM 2.0 Structures
specification). There are four different things that you can
enabled/disable.

/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]             ` <20160830070649.GA6215-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-08-30  8:55               ` Peter Huewe
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Huewe @ 2016-08-30  8:55 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ



Am 30. August 2016 00:06:49 GMT-07:00, schrieb Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>:
>On Mon, Aug 29, 2016 at 11:41:51PM -0700, Peter Huewe wrote:
>> 
>> 
>> Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen
><jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>:
>> >On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
>> >> This is documenting device tree binding for
>> >> I2C based TPM, similar concept which being used
>> >> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
>> >> 
>> >> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> >> ---
>> >>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29
>> >+++++++++++++++++++++++
>> >>  1 file changed, 29 insertions(+)
>> >>  create mode 100644
>Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> >> 
>> >> diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> >b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> >> new file mode 100644
>> >> index 0000000..8fdee14
>> >> --- /dev/null
>> >> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
>> >> @@ -0,0 +1,29 @@
>> >> +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
>> >> +---------------------------------------------------------------
>> >> +
>> >> +This node describes a TPM device connected to Processor on i2c
>bus.
>> >> +
>> >> +Required properties:
>> >> +
>> >> +- compatible : 'manufacturer,model'
>> >> +- label : represents device type
>> >> +- linux,sml-base : base address of the Event Log. It is a
>physical
>> >address.
>> >> +		   sml stands for shared memory log.
>> >> +- linux,sml-size : size of the memory allocated for the Event
>Log.
>> >> +
>> >> +Optional properties:
>> >> +
>> >> +- status: indicates whether the device is enabled or disabled.
>> >"okay" for
>> >> +          enabled and "disabled" for disabled.
>> >> +
>> >> +Example
>> >> +-------
>> >> +
>> >> +tpm@57 {
>> >> +	reg = <0x57>;
>> >> +	label = "tpm";
>> >> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
>> >> +	linux,sml-base = <0x7f 0xfd450000>;
>> >> +	linux,sml-size = <0x10000>;
>> >> +	status = "okay";
>> >> +};
>> >
>> >I would rather name the fields event-log-base and event-log-size.
>They
>> >would be much more readable and obvious names.
>> 
>> I agree - I always get stuck upon the sml thing.
>> >
>> >Also, enabled should be "enabled", not "okay".
>> 
>> No!
>> okay/ok is a dt keyword! (Or at least used in everything else)
>> 
>> It has nothing to do whether the TPM is enabled/disabled/activated
>whatever
>> Peter
>
>OK, just to educate myself, where can I find these standard keywords?


See http://www.devicetree.org/specifications-pdf table 2.4
>
>The granularity is wrong (section 8.7 of TPM 2.0 Structures
>specification). There are four different things that you can
>enabled/disable.
>
>/Jarkko

-- 
Sent from my mobile

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Documentation: tpm: Adds the TPM device tree node documentation
       [not found] ` <1472532277-21933-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  2016-08-30  6:36   ` Jarkko Sakkinen
@ 2016-08-30 20:51   ` Wolfram Sang
  1 sibling, 0 replies; 14+ messages in thread
From: Wolfram Sang @ 2016-08-30 20:51 UTC (permalink / raw)
  To: Nayna Jain
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	hellerda-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	ltcgcw-r/Jw6+rmf7HQT0dZR+AlfA, gcwilson-r/Jw6+rmf7HQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> This is documenting device tree binding for
> I2C based TPM, similar concept which being used
> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> 
> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++

Is the driver in 'drivers/i2c/*'? No, so the binding shouldn't be in i2c
as well.

> +- compatible : 'manufacturer,model'

You need to specify them here!

> +Optional properties:
> +
> +- status: indicates whether the device is enabled or disabled. "okay" for
> +          enabled and "disabled" for disabled.

Optional? Rather "implicit" I'd say.

This is far from ready. You should really wait for Rob's review. Or
better: Have a look at other bindings.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
  2016-08-30  4:44 [PATCH] Documentation: tpm: Adds the TPM device tree node documentation Nayna Jain
       [not found] ` <1472532277-21933-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2016-09-02 14:51 ` Rob Herring
  2016-09-02 17:06   ` Jason Gunthorpe
  1 sibling, 1 reply; 14+ messages in thread
From: Rob Herring @ 2016-09-02 14:51 UTC (permalink / raw)
  To: Nayna Jain
  Cc: tpmdd-devel, devicetree, wsa, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, hellerda, ltcgcw, gcwilson

On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> This is documenting device tree binding for
> I2C based TPM, similar concept which being used
> for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> 
> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> new file mode 100644
> index 0000000..8fdee14
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> @@ -0,0 +1,29 @@
> +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> +---------------------------------------------------------------
> +
> +This node describes a TPM device connected to Processor on i2c bus.
> +
> +Required properties:
> +
> +- compatible : 'manufacturer,model'

Needs specific compatible strings like your example has.

> +- label : represents device type

Why do you need this? label is human readable things like connectors on 
boards.

> +- linux,sml-base : base address of the Event Log. It is a physical address.
> +		   sml stands for shared memory log.

How is it a physical address on an i2c device? Why 2 cells (which needs 
to be documented also)?

Just 'log' would be more descriptive than sml.

> +- linux,sml-size : size of the memory allocated for the Event Log.
> +
> +Optional properties:
> +
> +- status: indicates whether the device is enabled or disabled. "okay" for
> +          enabled and "disabled" for disabled.

status is always valid, so you don't need to document it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]     ` <20160830063631.GA5336-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2016-08-30  6:41       ` Peter Huewe
@ 2016-09-02 14:52       ` Rob Herring
  2016-09-02 16:00         ` [tpmdd-devel] " Jarkko Sakkinen
  1 sibling, 1 reply; 14+ messages in thread
From: Rob Herring @ 2016-09-02 14:52 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Tue, Aug 30, 2016 at 09:36:31AM +0300, Jarkko Sakkinen wrote:
> On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> > This is documenting device tree binding for
> > I2C based TPM, similar concept which being used
> > for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> > 
> > Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> > ---
> >  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > new file mode 100644
> > index 0000000..8fdee14
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > @@ -0,0 +1,29 @@
> > +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> > +---------------------------------------------------------------
> > +
> > +This node describes a TPM device connected to Processor on i2c bus.
> > +
> > +Required properties:
> > +
> > +- compatible : 'manufacturer,model'
> > +- label : represents device type
> > +- linux,sml-base : base address of the Event Log. It is a physical address.
> > +		   sml stands for shared memory log.
> > +- linux,sml-size : size of the memory allocated for the Event Log.
> > +
> > +Optional properties:
> > +
> > +- status: indicates whether the device is enabled or disabled. "okay" for
> > +          enabled and "disabled" for disabled.
> > +
> > +Example
> > +-------
> > +
> > +tpm@57 {
> > +	reg = <0x57>;
> > +	label = "tpm";
> > +	compatible = "nuvoton,npct650", "nuvoton,npct601";
> > +	linux,sml-base = <0x7f 0xfd450000>;
> > +	linux,sml-size = <0x10000>;
> > +	status = "okay";
> > +};
> 
> I would rather name the fields event-log-base and event-log-size. They
> would be much more readable and obvious names.
> 
> Also, enabled should be "enabled", not "okay".

No, okay is correct. But as I mentioned, don't document it here.

Rob

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
  2016-09-02 14:52       ` Rob Herring
@ 2016-09-02 16:00         ` Jarkko Sakkinen
  0 siblings, 0 replies; 14+ messages in thread
From: Jarkko Sakkinen @ 2016-09-02 16:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nayna Jain, tpmdd-devel, devicetree, mark.rutland, pawel.moll,
	ijc+devicetree, wsa, gcwilson, linux-i2c, galak

On Fri, Sep 02, 2016 at 09:52:38AM -0500, Rob Herring wrote:
> On Tue, Aug 30, 2016 at 09:36:31AM +0300, Jarkko Sakkinen wrote:
> > On Tue, Aug 30, 2016 at 12:44:37AM -0400, Nayna Jain wrote:
> > > This is documenting device tree binding for
> > > I2C based TPM, similar concept which being used
> > > for virtual TPM on POWER7 and POWER8 systems running PowerVM.
> > > 
> > > Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 29 +++++++++++++++++++++++
> > >  1 file changed, 29 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > > new file mode 100644
> > > index 0000000..8fdee14
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> > > @@ -0,0 +1,29 @@
> > > +Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> > > +---------------------------------------------------------------
> > > +
> > > +This node describes a TPM device connected to Processor on i2c bus.
> > > +
> > > +Required properties:
> > > +
> > > +- compatible : 'manufacturer,model'
> > > +- label : represents device type
> > > +- linux,sml-base : base address of the Event Log. It is a physical address.
> > > +		   sml stands for shared memory log.
> > > +- linux,sml-size : size of the memory allocated for the Event Log.
> > > +
> > > +Optional properties:
> > > +
> > > +- status: indicates whether the device is enabled or disabled. "okay" for
> > > +          enabled and "disabled" for disabled.
> > > +
> > > +Example
> > > +-------
> > > +
> > > +tpm@57 {
> > > +	reg = <0x57>;
> > > +	label = "tpm";
> > > +	compatible = "nuvoton,npct650", "nuvoton,npct601";
> > > +	linux,sml-base = <0x7f 0xfd450000>;
> > > +	linux,sml-size = <0x10000>;
> > > +	status = "okay";
> > > +};
> > 
> > I would rather name the fields event-log-base and event-log-size. They
> > would be much more readable and obvious names.
> > 
> > Also, enabled should be "enabled", not "okay".
> 
> No, okay is correct. But as I mentioned, don't document it here.

We'll stick to sml-base and sml-size because the existing code binds
already to those names.

/Jakrko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
  2016-09-02 14:51 ` [PATCH] " Rob Herring
@ 2016-09-02 17:06   ` Jason Gunthorpe
  2016-09-02 17:57     ` [tpmdd-devel] " Rob Herring
       [not found]     ` <20160902170613.GA5024-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Jason Gunthorpe @ 2016-09-02 17:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, pawel.moll-5wv7dgnIgG8,
	wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Fri, Sep 02, 2016 at 09:51:21AM -0500, Rob Herring wrote:
> > +- linux,sml-base : base address of the Event Log. It is a physical address.
> > +		   sml stands for shared memory log.
> 
> How is it a physical address on an i2c device? Why 2 cells (which needs 
> to be documented also)?

To be clear, as I understand it, this mechanism is a hand off from the
boot firmware to Linux.

The boot firmware talks i2c to the device, does some stuff, writes it
to memory and then linux reads that stuff. I agree it seems crazy to
include a random physical address like that.

The linux,sml-* names appear to have been used by IBM for a long time
on their enterprise PPC platforms (see drivers/char/tpm/tpm_of.c), so
I've expected we have to keep them?

I asked Nayna to document this stuff IBM is doing so the rest of us
in TPM land can have a hope of maintaining it...

Jason

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
  2016-09-02 17:06   ` Jason Gunthorpe
@ 2016-09-02 17:57     ` Rob Herring
       [not found]       ` <CAL_Jsq+jmAHSGTJPxWZgc_87NTA8uvWZSegx9E7krXKzDcgBmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
       [not found]     ` <20160902170613.GA5024-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Rob Herring @ 2016-09-02 17:57 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Nayna Jain, Mark Rutland, devicetree, Pawel Moll, Ian Campbell,
	wsa, tpmdd-devel, gcwilson, linux-i2c, Kumar Gala

On Fri, Sep 2, 2016 at 12:06 PM, Jason Gunthorpe
<jgunthorpe@obsidianresearch.com> wrote:
> On Fri, Sep 02, 2016 at 09:51:21AM -0500, Rob Herring wrote:
>> > +- linux,sml-base : base address of the Event Log. It is a physical address.
>> > +              sml stands for shared memory log.
>>
>> How is it a physical address on an i2c device? Why 2 cells (which needs
>> to be documented also)?
>
> To be clear, as I understand it, this mechanism is a hand off from the
> boot firmware to Linux.
>
> The boot firmware talks i2c to the device, does some stuff, writes it
> to memory and then linux reads that stuff. I agree it seems crazy to
> include a random physical address like that.

I'd put that in reserved-memory then if designing this from scratch...

Must not be completely random as somehow the kernel doesn't use that memory.

> The linux,sml-* names appear to have been used by IBM for a long time
> on their enterprise PPC platforms (see drivers/char/tpm/tpm_of.c), so
> I've expected we have to keep them?

Yes. I wasn't aware of that.

> I asked Nayna to document this stuff IBM is doing so the rest of us
> in TPM land can have a hope of maintaining it...
>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]       ` <CAL_Jsq+jmAHSGTJPxWZgc_87NTA8uvWZSegx9E7krXKzDcgBmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-28  8:40         ` Nayna
  0 siblings, 0 replies; 14+ messages in thread
From: Nayna @ 2016-09-28  8:40 UTC (permalink / raw)
  To: Rob Herring, Jason Gunthorpe
  Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Pawel Moll,
	Ian Campbell, wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Kumar Gala



On 09/02/2016 11:27 PM, Rob Herring wrote:
> On Fri, Sep 2, 2016 at 12:06 PM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
>> On Fri, Sep 02, 2016 at 09:51:21AM -0500, Rob Herring wrote:
>>>> +- linux,sml-base : base address of the Event Log. It is a physical address.
>>>> +              sml stands for shared memory log.
>>>
>>> How is it a physical address on an i2c device? Why 2 cells (which needs
>>> to be documented also)?
>>
>> To be clear, as I understand it, this mechanism is a hand off from the
>> boot firmware to Linux.
>>
>> The boot firmware talks i2c to the device, does some stuff, writes it
>> to memory and then linux reads that stuff. I agree it seems crazy to
>> include a random physical address like that.
>
> I'd put that in reserved-memory then if designing this from scratch...

Thanks for the review comments.

Yes, it is in reserved-memory. I modified the explanation for 
linux,sml-base property to be more descriptive now in my v2 version of 
the patch, posted just now.
>
> Must not be completely random as somehow the kernel doesn't use that memory.
>
>> The linux,sml-* names appear to have been used by IBM for a long time
>> on their enterprise PPC platforms (see drivers/char/tpm/tpm_of.c), so
>> I've expected we have to keep them?
>
> Yes. I wasn't aware of that.
>
>> I asked Nayna to document this stuff IBM is doing so the rest of us
>> in TPM land can have a hope of maintaining it...
>>
>> Jason
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
       [not found]     ` <20160902170613.GA5024-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-28  8:44       ` Nayna
  0 siblings, 0 replies; 14+ messages in thread
From: Nayna @ 2016-09-28  8:44 UTC (permalink / raw)
  To: Jason Gunthorpe, Rob Herring
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ



On 09/02/2016 10:36 PM, Jason Gunthorpe wrote:
> On Fri, Sep 02, 2016 at 09:51:21AM -0500, Rob Herring wrote:
>>> +- linux,sml-base : base address of the Event Log. It is a physical address.
>>> +		   sml stands for shared memory log.
>>
>> How is it a physical address on an i2c device? Why 2 cells (which needs
>> to be documented also)?
>
> To be clear, as I understand it, this mechanism is a hand off from the
> boot firmware to Linux.
>
> The boot firmware talks i2c to the device, does some stuff, writes it
> to memory and then linux reads that stuff. I agree it seems crazy to
> include a random physical address like that.
>
> The linux,sml-* names appear to have been used by IBM for a long time
> on their enterprise PPC platforms (see drivers/char/tpm/tpm_of.c), so
> I've expected we have to keep them?
>
> I asked Nayna to document this stuff IBM is doing so the rest of us
> in TPM land can have a hope of maintaining it...

Thanks Jason !!

In my v2 version for device tree documentation, I have posted the 
documentation for both vtpm and physical TPM.

>
> Jason
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-09-28  8:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30  4:44 [PATCH] Documentation: tpm: Adds the TPM device tree node documentation Nayna Jain
     [not found] ` <1472532277-21933-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-08-30  6:36   ` Jarkko Sakkinen
     [not found]     ` <20160830063631.GA5336-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-30  6:41       ` Peter Huewe
     [not found]         ` <D8028209-446C-4C50-9AEC-25F6F8C98995-Mmb7MZpHnFY@public.gmane.org>
2016-08-30  6:46           ` Peter Huewe
2016-08-30  7:06           ` [tpmdd-devel] " Jarkko Sakkinen
     [not found]             ` <20160830070649.GA6215-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-30  8:55               ` Peter Huewe
2016-09-02 14:52       ` Rob Herring
2016-09-02 16:00         ` [tpmdd-devel] " Jarkko Sakkinen
2016-08-30 20:51   ` Wolfram Sang
2016-09-02 14:51 ` [PATCH] " Rob Herring
2016-09-02 17:06   ` Jason Gunthorpe
2016-09-02 17:57     ` [tpmdd-devel] " Rob Herring
     [not found]       ` <CAL_Jsq+jmAHSGTJPxWZgc_87NTA8uvWZSegx9E7krXKzDcgBmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-28  8:40         ` Nayna
     [not found]     ` <20160902170613.GA5024-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-28  8:44       ` Nayna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.