All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
@ 2016-09-28  8:30 Nayna Jain
  2016-09-29 11:04 ` Jarkko Sakkinen
       [not found] ` <1475051441-23008-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Nayna Jain @ 2016-09-28  8:30 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: robh-DgEjT+Ai2ygdnm+yROfE0A, wsa-z923LK4zBo2bacvFa/9K2g,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	peterhuewe-Mmb7MZpHnFY, tpmdd-yWjUBOtONefk1uMJSBkQmQ,
	jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA,
	hellerda-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	ltcgcw-r/Jw6+rmf7HQT0dZR+AlfA,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, Nayna Jain

Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
POWERVM, is currently supported by tpm device driver but lacks the
documentation. This patch adds the missing documentation for the existing
support.

Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
Changelog v2:

- New Patch

 .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt

diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
new file mode 100644
index 0000000..d89f999
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
@@ -0,0 +1,41 @@
+* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
+
+Required properties:
+
+- compatible            : property name that conveys the platform architecture
+                          identifiers, as 'IBM,vtpm'
+- device_type           : specifies type of virtual device
+- interrupts            : property specifying the interrupt source number and
+                          sense code associated with this virtual I/O Adapters
+- ibm,my-drc-index      : integer index for the connector between the device
+                          and its parent - present only if Dynamic
+                          Reconfiguration(DR) Connector is enabled
+- ibm,#dma-address-cells: specifies the number of cells that are used to
+                          encode the physical address field of dma-window
+                          properties
+- ibm,#dma-size-cells   : specifies the number of cells that are used to
+                          encode the size field of dma-window properties
+- ibm,my-dma-window     : specifies DMA window associated with this virtual
+                          IOA
+- ibm,loc-code          : specifies the unique and persistent location code
+                          associated with this virtual I/O Adapters
+- linux,sml-base        : 64-bit base address of the reserved memory allocated
+                          for the firmware event log
+- linux,sml-size        : size of the memory allocated for the firmware event log
+
+Example (IBM Virtual Trusted Platform Module)
+---------------------------------------------
+
+                vtpm@30000003 {
+                        ibm,#dma-size-cells = <0x2>;
+                        compatible = "IBM,vtpm";
+                        device_type = "IBM,vtpm";
+                        ibm,my-drc-index = <0x30000003>;
+                        ibm,#dma-address-cells = <0x2>;
+                        linux,sml-base = <0xc60e 0x0>;
+                        interrupts = <0xa0003 0x0>;
+                        ibm,my-dma-window = <0x10000003 0x0 0x0 0x0 0x10000000>;
+                        ibm,loc-code = "U8286.41A.10082DV-V3-C3";
+                        reg = <0x30000003>;
+                        linux,sml-size = <0xbce10200>;
+                };
-- 
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] 10+ messages in thread

* [PATCH v2 2/2] Documentation: tpm: add the Physical TPM device tree binding documentation
       [not found] ` <1475051441-23008-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2016-09-28  8:30   ` Nayna Jain
  2016-10-08 21:05     ` Rob Herring
  2016-10-08 21:11   ` [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual " Rob Herring
  1 sibling, 1 reply; 10+ messages in thread
From: Nayna Jain @ 2016-09-28  8:30 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: robh-DgEjT+Ai2ygdnm+yROfE0A, wsa-z923LK4zBo2bacvFa/9K2g,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	peterhuewe-Mmb7MZpHnFY, tpmdd-yWjUBOtONefk1uMJSBkQmQ,
	jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA,
	hellerda-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	ltcgcw-r/Jw6+rmf7HQT0dZR+AlfA,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, Nayna Jain

Newly added support of TPM 2.0 eventlog securityfs pseudo files in tpm
device driver consumes device tree bindings representing I2C based
Physical TPM. This patch adds the documentation for corresponding device
tree bindings of I2C based Physical TPM. These bindings are similar to
vtpm device tree bindings being used on IBM Power7+ and Power8 Systems
running PowerVM.

Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
Changelog v2:

- Include review feedbacks.
  - Move the doc within bindings/security/tpm.
  - Add example for compatible property in description.
  - Delete implicit properties like status, label from description.
  - Redefine linux,sml-base description.

 .../devicetree/bindings/security/tpm/tpm-i2c.txt     | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt

diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
new file mode 100644
index 0000000..16df8bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
@@ -0,0 +1,20 @@
+* Device Tree Bindings for I2C based Trusted Platform Module(TPM)
+
+Required properties:
+
+- compatible     : 'manufacturer,model', eg. nuvoton,npct650
+- linux,sml-base : 64-bit base address of the reserved memory allocated for
+                   the firmware event log
+- linux,sml-size : size of the memory allocated for the firmware event log
+
+Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C)
+----------------------------------------------------------
+
+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] 10+ messages in thread

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
  2016-09-28  8:30 [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation Nayna Jain
@ 2016-09-29 11:04 ` Jarkko Sakkinen
       [not found]   ` <20160929110413.GA14359-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
       [not found] ` <1475051441-23008-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-09-29 11:04 UTC (permalink / raw)
  To: Nayna Jain
  Cc: devicetree, tpmdd-devel, robh, wsa, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, peterhuewe, tpmdd, hellerda,
	ltcgcw, cclaudio, honclo

On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
> Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
> POWERVM, is currently supported by tpm device driver but lacks the
> documentation. This patch adds the missing documentation for the existing
> support.
> 
> Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> ---
> Changelog v2:
> 
> - New Patch
> 
>  .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> 
> diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> new file mode 100644
> index 0000000..d89f999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> @@ -0,0 +1,41 @@
> +* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
> +
> +Required properties:
> +
> +- compatible            : property name that conveys the platform architecture
> +                          identifiers, as 'IBM,vtpm'
> +- device_type           : specifies type of virtual device

A generic device tree question. What is the difference between
these fields? Why the I2C one does have 'device_type'?

/Jarkko

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

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
       [not found]   ` <20160929110413.GA14359-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-10-05 20:14     ` Nayna
       [not found]       ` <57F55F28.1090005-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Nayna @ 2016-10-05 20:14 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, wsa-z923LK4zBo2bacvFa/9K2g,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	robh-DgEjT+Ai2ygdnm+yROfE0A



On 09/29/2016 04:34 PM, Jarkko Sakkinen wrote:
> On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
>> Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
>> POWERVM, is currently supported by tpm device driver but lacks the
>> documentation. This patch adds the missing documentation for the existing
>> support.
>>
>> Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> ---
>> Changelog v2:
>>
>> - New Patch
>>
>>   .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
>>   1 file changed, 41 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>>
>> diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>> new file mode 100644
>> index 0000000..d89f999
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>> @@ -0,0 +1,41 @@
>> +* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
>> +
>> +Required properties:
>> +
>> +- compatible            : property name that conveys the platform architecture
>> +                          identifiers, as 'IBM,vtpm'
>> +- device_type           : specifies type of virtual device
>
> A generic device tree question. What is the difference between
> these fields? Why the I2C one does have 'device_type'?

Please find the details as below:

compatible - Standard property name as per IEEE 1275, specifying the 
interface compatible with this device. This property is consumed by 
linux kernel for selection of device driver.

device_type - Standard property name as per IEEE 1275, specifying the 
device type. This property MAY be used by linux kernel for device driver 
selection. It is used in the case of IBM virtual TPM driver.

/**
  * vio_register_device_node: - Register a new vio device.
  * @of_node:    The OF node for this device.
  *
  * Creates and initializes a vio_dev structure from the data in
  * of_node and adds it to the list of virtual devices.
  * Returns a pointer to the created vio_dev or NULL if node has
  * NULL device_type or compatible fields.
  */
struct vio_dev *vio_register_device_node(struct device_node *of_node)

and vtpm device table being defined as below:

static struct vio_device_id tpm_ibmvtpm_device_table[] = {
         { "IBM,vtpm", "IBM,vtpm"}, 
-----------------------------------> type,compat
         { "", "" }
};

So, vio (virtual) devices uses both device_type and compatible property 
for device registration and driver selection.
In case of physical TPM, it is only compatible property being used for 
device driver selection

Also, please note that device_type property is now deprecated in latest 
Device Tree specs.

Thanks & Regards,
    - Nayna


>
> /Jarkko
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
       [not found]       ` <57F55F28.1090005-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2016-10-08 21:01         ` Rob Herring
  2016-10-17  2:08           ` Nayna
  0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2016-10-08 21:01 UTC (permalink / raw)
  To: Nayna
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, wsa-z923LK4zBo2bacvFa/9K2g,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Thu, Oct 06, 2016 at 01:44:32AM +0530, Nayna wrote:
> 
> 
> On 09/29/2016 04:34 PM, Jarkko Sakkinen wrote:
> >On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
> >>Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
> >>POWERVM, is currently supported by tpm device driver but lacks the
> >>documentation. This patch adds the missing documentation for the existing
> >>support.
> >>
> >>Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> >>Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> >>---
> >>Changelog v2:
> >>
> >>- New Patch
> >>
> >>  .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
> >>  1 file changed, 41 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> >>
> >>diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> >>new file mode 100644
> >>index 0000000..d89f999
> >>--- /dev/null
> >>+++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> >>@@ -0,0 +1,41 @@
> >>+* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
> >>+
> >>+Required properties:
> >>+
> >>+- compatible            : property name that conveys the platform architecture
> >>+                          identifiers, as 'IBM,vtpm'
> >>+- device_type           : specifies type of virtual device
> >
> >A generic device tree question. What is the difference between
> >these fields? Why the I2C one does have 'device_type'?
> 
> Please find the details as below:
> 
> compatible - Standard property name as per IEEE 1275, specifying the
> interface compatible with this device. This property is consumed by linux
> kernel for selection of device driver.
> 
> device_type - Standard property name as per IEEE 1275, specifying the device
> type. This property MAY be used by linux kernel for device driver selection.
> It is used in the case of IBM virtual TPM driver.

AIUI, this should be a standard value such as serial, pci, etc. I don't 
think your use here is correct, but I could be wrong. I'm not certain 
what you do with devices that don't have a standard type.

> 
> /**
>  * vio_register_device_node: - Register a new vio device.
>  * @of_node:    The OF node for this device.
>  *
>  * Creates and initializes a vio_dev structure from the data in
>  * of_node and adds it to the list of virtual devices.
>  * Returns a pointer to the created vio_dev or NULL if node has
>  * NULL device_type or compatible fields.
>  */
> struct vio_dev *vio_register_device_node(struct device_node *of_node)
> 
> and vtpm device table being defined as below:
> 
> static struct vio_device_id tpm_ibmvtpm_device_table[] = {
>         { "IBM,vtpm", "IBM,vtpm"}, ----------------------------------->
> type,compat
>         { "", "" }
> };
> 
> So, vio (virtual) devices uses both device_type and compatible property for
> device registration and driver selection.
> In case of physical TPM, it is only compatible property being used for
> device driver selection
> 
> Also, please note that device_type property is now deprecated in latest
> Device Tree specs.

Deprecated for Flattened DT only. OpenFirmware implementations 
can/should still use this.

Rob

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

* Re: [PATCH v2 2/2] Documentation: tpm: add the Physical TPM device tree binding documentation
  2016-09-28  8:30   ` [PATCH v2 2/2] Documentation: tpm: add the Physical " Nayna Jain
@ 2016-10-08 21:05     ` Rob Herring
  2016-10-17  2:14       ` Nayna
  0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2016-10-08 21:05 UTC (permalink / raw)
  To: Nayna Jain
  Cc: devicetree, tpmdd-devel, wsa, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, peterhuewe, tpmdd,
	jarkko.sakkinen, hellerda, ltcgcw, cclaudio, honclo

On Wed, Sep 28, 2016 at 04:30:41AM -0400, Nayna Jain wrote:
> Newly added support of TPM 2.0 eventlog securityfs pseudo files in tpm
> device driver consumes device tree bindings representing I2C based
> Physical TPM. This patch adds the documentation for corresponding device
> tree bindings of I2C based Physical TPM. These bindings are similar to
> vtpm device tree bindings being used on IBM Power7+ and Power8 Systems
> running PowerVM.
> 
> Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> ---
> Changelog v2:
> 
> - Include review feedbacks.
>   - Move the doc within bindings/security/tpm.
>   - Add example for compatible property in description.
>   - Delete implicit properties like status, label from description.
>   - Redefine linux,sml-base description.
> 
>  .../devicetree/bindings/security/tpm/tpm-i2c.txt     | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
> 
> diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
> new file mode 100644
> index 0000000..16df8bb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
> @@ -0,0 +1,20 @@
> +* Device Tree Bindings for I2C based Trusted Platform Module(TPM)
> +
> +Required properties:
> +
> +- compatible     : 'manufacturer,model', eg. nuvoton,npct650
> +- linux,sml-base : 64-bit base address of the reserved memory allocated for
> +                   the firmware event log
> +- linux,sml-size : size of the memory allocated for the firmware event log
> +
> +Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C)
> +----------------------------------------------------------
> +
> +tpm@57 {
> +	reg = <0x57>;
> +	label = "tpm";

Not documented, but why? label is really only useful when you have 
multiple items that humans need to identify like ports on ethernet 
switch or LEDs.

> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
> +	linux,sml-base = <0x7f 0xfd450000>;
> +	linux,sml-size = <0x10000>;
> +	status = "okay";
> +};
> -- 
> 2.5.0
> 

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

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
       [not found] ` <1475051441-23008-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  2016-09-28  8:30   ` [PATCH v2 2/2] Documentation: tpm: add the Physical " Nayna Jain
@ 2016-10-08 21:11   ` Rob Herring
  2016-10-17  2:11     ` Nayna
  1 sibling, 1 reply; 10+ messages in thread
From: Rob Herring @ 2016-10-08 21:11 UTC (permalink / raw)
  To: Nayna Jain
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
> Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
> POWERVM, is currently supported by tpm device driver but lacks the
> documentation. This patch adds the missing documentation for the existing
> support.
> 
> Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
> Changelog v2:
> 
> - New Patch
> 
>  .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> 
> diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> new file mode 100644
> index 0000000..d89f999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
> @@ -0,0 +1,41 @@
> +* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
> +
> +Required properties:
> +
> +- compatible            : property name that conveys the platform architecture
> +                          identifiers, as 'IBM,vtpm'

You use IBM here, but...

> +- device_type           : specifies type of virtual device
> +- interrupts            : property specifying the interrupt source number and
> +                          sense code associated with this virtual I/O Adapters
> +- ibm,my-drc-index      : integer index for the connector between the device

use ibm here. These should be the same unless there's some history I'm 
not aware of.

> +                          and its parent - present only if Dynamic
> +                          Reconfiguration(DR) Connector is enabled
> +- ibm,#dma-address-cells: specifies the number of cells that are used to
> +                          encode the physical address field of dma-window
> +                          properties
> +- ibm,#dma-size-cells   : specifies the number of cells that are used to
> +                          encode the size field of dma-window properties
> +- ibm,my-dma-window     : specifies DMA window associated with this virtual
> +                          IOA

Are these "standard" IBM properties? Does dma-ranges not work for you?

> +- ibm,loc-code          : specifies the unique and persistent location code
> +                          associated with this virtual I/O Adapters
> +- linux,sml-base        : 64-bit base address of the reserved memory allocated
> +                          for the firmware event log
> +- linux,sml-size        : size of the memory allocated for the firmware event log
> +
> +Example (IBM Virtual Trusted Platform Module)
> +---------------------------------------------
> +
> +                vtpm@30000003 {
> +                        ibm,#dma-size-cells = <0x2>;
> +                        compatible = "IBM,vtpm";
> +                        device_type = "IBM,vtpm";
> +                        ibm,my-drc-index = <0x30000003>;
> +                        ibm,#dma-address-cells = <0x2>;
> +                        linux,sml-base = <0xc60e 0x0>;
> +                        interrupts = <0xa0003 0x0>;
> +                        ibm,my-dma-window = <0x10000003 0x0 0x0 0x0 0x10000000>;
> +                        ibm,loc-code = "U8286.41A.10082DV-V3-C3";
> +                        reg = <0x30000003>;
> +                        linux,sml-size = <0xbce10200>;
> +                };
> -- 
> 2.5.0
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
  2016-10-08 21:01         ` Rob Herring
@ 2016-10-17  2:08           ` Nayna
  0 siblings, 0 replies; 10+ messages in thread
From: Nayna @ 2016-10-17  2:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, wsa-z923LK4zBo2bacvFa/9K2g,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8



On 10/09/2016 02:31 AM, Rob Herring wrote:
> On Thu, Oct 06, 2016 at 01:44:32AM +0530, Nayna wrote:
>>
>>
>> On 09/29/2016 04:34 PM, Jarkko Sakkinen wrote:
>>> On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
>>>> Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
>>>> POWERVM, is currently supported by tpm device driver but lacks the
>>>> documentation. This patch adds the missing documentation for the existing
>>>> support.
>>>>
>>>> Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>>>> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>>>> ---
>>>> Changelog v2:
>>>>
>>>> - New Patch
>>>>
>>>>   .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
>>>>   1 file changed, 41 insertions(+)
>>>>   create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>>>> new file mode 100644
>>>> index 0000000..d89f999
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>>>> @@ -0,0 +1,41 @@
>>>> +* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
>>>> +
>>>> +Required properties:
>>>> +
>>>> +- compatible            : property name that conveys the platform architecture
>>>> +                          identifiers, as 'IBM,vtpm'
>>>> +- device_type           : specifies type of virtual device
>>>
>>> A generic device tree question. What is the difference between
>>> these fields? Why the I2C one does have 'device_type'?
>>
>> Please find the details as below:
>>
>> compatible - Standard property name as per IEEE 1275, specifying the
>> interface compatible with this device. This property is consumed by linux
>> kernel for selection of device driver.
>>
>> device_type - Standard property name as per IEEE 1275, specifying the device
>> type. This property MAY be used by linux kernel for device driver selection.
>> It is used in the case of IBM virtual TPM driver.
>
> AIUI, this should be a standard value such as serial, pci, etc. I don't
> think your use here is correct, but I could be wrong. I'm not certain
> what you do with devices that don't have a standard type.

Actually, the vtpm node is a unique device and did not have a standard 
type that could be used.  That is why the definition in the PAPR gave it 
the a new value.  The intention was to provide a reasonable type value. 
  The "IBM," portion of the property value is intended to identify it as 
a specific IBM implementation.

Thanks & Regards,
    - Nayna

>
>>
>> /**
>>   * vio_register_device_node: - Register a new vio device.
>>   * @of_node:    The OF node for this device.
>>   *
>>   * Creates and initializes a vio_dev structure from the data in
>>   * of_node and adds it to the list of virtual devices.
>>   * Returns a pointer to the created vio_dev or NULL if node has
>>   * NULL device_type or compatible fields.
>>   */
>> struct vio_dev *vio_register_device_node(struct device_node *of_node)
>>
>> and vtpm device table being defined as below:
>>
>> static struct vio_device_id tpm_ibmvtpm_device_table[] = {
>>          { "IBM,vtpm", "IBM,vtpm"}, ----------------------------------->
>> type,compat
>>          { "", "" }
>> };
>>
>> So, vio (virtual) devices uses both device_type and compatible property for
>> device registration and driver selection.
>> In case of physical TPM, it is only compatible property being used for
>> device driver selection
>>
>> Also, please note that device_type property is now deprecated in latest
>> Device Tree specs.
>
> Deprecated for Flattened DT only. OpenFirmware implementations
> can/should still use this.
>
> Rob
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

* Re: [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation
  2016-10-08 21:11   ` [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual " Rob Herring
@ 2016-10-17  2:11     ` Nayna
  0 siblings, 0 replies; 10+ messages in thread
From: Nayna @ 2016-10-17  2:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8



On 10/09/2016 02:41 AM, Rob Herring wrote:
> On Wed, Sep 28, 2016 at 04:30:40AM -0400, Nayna Jain wrote:
>> Virtual TPM, which is being used on IBM POWER7+ and POWER8 systems running
>> POWERVM, is currently supported by tpm device driver but lacks the
>> documentation. This patch adds the missing documentation for the existing
>> support.
>>
>> Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> ---
>> Changelog v2:
>>
>> - New Patch
>>
>>   .../devicetree/bindings/security/tpm/ibmvtpm.txt   | 41 ++++++++++++++++++++++
>>   1 file changed, 41 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>>
>> diff --git a/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>> new file mode 100644
>> index 0000000..d89f999
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt
>> @@ -0,0 +1,41 @@
>> +* Device Tree Bindings for IBM Virtual Trusted Platform Module(vtpm)
>> +
>> +Required properties:
>> +
>> +- compatible            : property name that conveys the platform architecture
>> +                          identifiers, as 'IBM,vtpm'
>
> You use IBM here, but...
>
>> +- device_type           : specifies type of virtual device
>> +- interrupts            : property specifying the interrupt source number and
>> +                          sense code associated with this virtual I/O Adapters
>> +- ibm,my-drc-index      : integer index for the connector between the device
>
> use ibm here. These should be the same unless there's some history I'm
> not aware of.

This is how the property was defined when the change was submitted to 
the PAPR. It was most likely an oversight that the IBM was not changed 
to ibm to be consistent with other property definitions.

>
>> +                          and its parent - present only if Dynamic
>> +                          Reconfiguration(DR) Connector is enabled
>> +- ibm,#dma-address-cells: specifies the number of cells that are used to
>> +                          encode the physical address field of dma-window
>> +                          properties
>> +- ibm,#dma-size-cells   : specifies the number of cells that are used to
>> +                          encode the size field of dma-window properties
>> +- ibm,my-dma-window     : specifies DMA window associated with this virtual
>> +                          IOA
>
> Are these "standard" IBM properties? Does dma-ranges not work for you?


Yes, these are the standard properties as defined in the PAPR.  Again 
the "ibm" prefix indicates that they are specific to IBM system 
implementation. They have been in existence for many years.


Thanks & Regards,
    - Nayna

>
>> +- ibm,loc-code          : specifies the unique and persistent location code
>> +                          associated with this virtual I/O Adapters
>> +- linux,sml-base        : 64-bit base address of the reserved memory allocated
>> +                          for the firmware event log
>> +- linux,sml-size        : size of the memory allocated for the firmware event log
>> +
>> +Example (IBM Virtual Trusted Platform Module)
>> +---------------------------------------------
>> +
>> +                vtpm@30000003 {
>> +                        ibm,#dma-size-cells = <0x2>;
>> +                        compatible = "IBM,vtpm";
>> +                        device_type = "IBM,vtpm";
>> +                        ibm,my-drc-index = <0x30000003>;
>> +                        ibm,#dma-address-cells = <0x2>;
>> +                        linux,sml-base = <0xc60e 0x0>;
>> +                        interrupts = <0xa0003 0x0>;
>> +                        ibm,my-dma-window = <0x10000003 0x0 0x0 0x0 0x10000000>;
>> +                        ibm,loc-code = "U8286.41A.10082DV-V3-C3";
>> +                        reg = <0x30000003>;
>> +                        linux,sml-size = <0xbce10200>;
>> +                };
>> --
>> 2.5.0
>>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

* Re: [PATCH v2 2/2] Documentation: tpm: add the Physical TPM device tree binding documentation
  2016-10-08 21:05     ` Rob Herring
@ 2016-10-17  2:14       ` Nayna
  0 siblings, 0 replies; 10+ messages in thread
From: Nayna @ 2016-10-17  2:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	wsa-z923LK4zBo2bacvFa/9K2g,
	honclo-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	cclaudio-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8



On 10/09/2016 02:35 AM, Rob Herring wrote:
> On Wed, Sep 28, 2016 at 04:30:41AM -0400, Nayna Jain wrote:
>> Newly added support of TPM 2.0 eventlog securityfs pseudo files in tpm
>> device driver consumes device tree bindings representing I2C based
>> Physical TPM. This patch adds the documentation for corresponding device
>> tree bindings of I2C based Physical TPM. These bindings are similar to
>> vtpm device tree bindings being used on IBM Power7+ and Power8 Systems
>> running PowerVM.
>>
>> Suggested-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>> Signed-off-by: Nayna Jain <nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> ---
>> Changelog v2:
>>
>> - Include review feedbacks.
>>    - Move the doc within bindings/security/tpm.
>>    - Add example for compatible property in description.
>>    - Delete implicit properties like status, label from description.
>>    - Redefine linux,sml-base description.
>>
>>   .../devicetree/bindings/security/tpm/tpm-i2c.txt     | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
>>
>> diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
>> new file mode 100644
>> index 0000000..16df8bb
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
>> @@ -0,0 +1,20 @@
>> +* Device Tree Bindings for I2C based Trusted Platform Module(TPM)
>> +
>> +Required properties:
>> +
>> +- compatible     : 'manufacturer,model', eg. nuvoton,npct650
>> +- linux,sml-base : 64-bit base address of the reserved memory allocated for
>> +                   the firmware event log
>> +- linux,sml-size : size of the memory allocated for the firmware event log
>> +
>> +Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C)
>> +----------------------------------------------------------
>> +
>> +tpm@57 {
>> +	reg = <0x57>;
>> +	label = "tpm";
>
> Not documented, but why? label is really only useful when you have
> multiple items that humans need to identify like ports on ethernet
> switch or LEDs.

Sorry, I think I misinterpreted one of the earliar feedback. I will 
document it again.

Thanks & Regards,
    - Nayna

>
>> +	compatible = "nuvoton,npct650", "nuvoton,npct601";
>> +	linux,sml-base = <0x7f 0xfd450000>;
>> +	linux,sml-size = <0x10000>;
>> +	status = "okay";
>> +};
>> --
>> 2.5.0
>>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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

end of thread, other threads:[~2016-10-17  2:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28  8:30 [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual TPM device tree binding documentation Nayna Jain
2016-09-29 11:04 ` Jarkko Sakkinen
     [not found]   ` <20160929110413.GA14359-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-10-05 20:14     ` Nayna
     [not found]       ` <57F55F28.1090005-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-10-08 21:01         ` Rob Herring
2016-10-17  2:08           ` Nayna
     [not found] ` <1475051441-23008-1-git-send-email-nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-09-28  8:30   ` [PATCH v2 2/2] Documentation: tpm: add the Physical " Nayna Jain
2016-10-08 21:05     ` Rob Herring
2016-10-17  2:14       ` Nayna
2016-10-08 21:11   ` [PATCH v2 1/2] Documentation: tpm: add the IBM Virtual " Rob Herring
2016-10-17  2:11     ` 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.