diff mbox

[v2,2/3] TPM2.0: TPM Device Tree Documentation

Message ID 1470771295-15680-3-git-send-email-nayna@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nayna Aug. 9, 2016, 7:34 p.m. UTC
Added device tree binding documentation for I2C base TPM.

Changelog v2:
        * Added documentation in v2.

Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
---
 Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 31 +++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-tpm.txt

Comments

Jason Gunthorpe Aug. 9, 2016, 10:12 p.m. UTC | #1
On Tue, Aug 09, 2016 at 03:34:54PM -0400, Nayna Jain wrote:
> Added device tree binding documentation for I2C base TPM.

You need to review

 Documentation/devicetree/bindings/submitting-patches.txt

And be sure to follow all the requirements, including CC'ing the
right maintainers

Also explain that this is a documenting a historical practice that IBM
has used in systems  X Y Z.

> Changelog v2:
>         * Added documentation in v2.

Do not include these lines in commit messages, put them after the
diff stat.

> +This node describes a TPM device connected to Processor on i2c bus.
> +
> +Required properties:
> +
> +- compatible : 'manufacturer,model'
> +- label : "tpm" indicates master TPM; "tpm-backup" indicates backup TPM.
> +- 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";

> +	phandle = <0x10000017>;
> +	linux,phandle = <0x10000017>;

 What are these?

Jason

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
Jarkko Sakkinen Aug. 10, 2016, 11:28 a.m. UTC | #2
On Tue, Aug 09, 2016 at 03:34:54PM -0400, Nayna Jain wrote:
> Added device tree binding documentation for I2C base TPM.

Where is this binding defined originally? Is it standardized?

/Jarkko

> Changelog v2:
>         * Added documentation in v2.
> 
> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-tpm.txt | 31 +++++++++++++++++++++++
>  1 file changed, 31 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..1df05cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
> @@ -0,0 +1,31 @@
> +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 : "tpm" indicates master TPM; "tpm-backup" indicates backup TPM.
> +- 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";
> +	phandle = <0x10000017>;
> +	linux,phandle = <0x10000017>;
> +};
> -- 
> 2.5.0
> 
> 
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. http://sdm.link/zohodev2dev
> _______________________________________________
> tpmdd-devel mailing list
> tpmdd-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
Nayna Aug. 12, 2016, 12:36 p.m. UTC | #3
Hi Jason,

Thanks for review, My responses inline.

On 08/10/2016 03:42 AM, Jason Gunthorpe wrote:
> On Tue, Aug 09, 2016 at 03:34:54PM -0400, Nayna Jain wrote:
>> Added device tree binding documentation for I2C base TPM.
>
> You need to review
>
>   Documentation/devicetree/bindings/submitting-patches.txt
>
> And be sure to follow all the requirements, including CC'ing the
> right maintainers
Sure, will do. Can you tell me who all should I copy ?

>
> Also explain that this is a documenting a historical practice that IBM
> has used in systems  X Y Z.

Ok.

>
>> Changelog v2:
>>          * Added documentation in v2.
>
> Do not include these lines in commit messages, put them after the
> diff stat.

Actually I have not added Changelog during commit, I have put them in 
patch before posting. However, will add them after diff next time.
>
>> +This node describes a TPM device connected to Processor on i2c bus.
>> +
>> +Required properties:
>> +
>> +- compatible : 'manufacturer,model'
>> +- label : "tpm" indicates master TPM; "tpm-backup" indicates backup TPM.
>> +- 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";
>
>> +	phandle = <0x10000017>;
>> +	linux,phandle = <0x10000017>;
>
>   What are these?

Sorry I didn't get your question here. I have written in the format as 
suggested for device-tree documentation and looking at other 
device-nodes documentation. And so this is an example entry as I saw in 
other docs.

>
> Jason
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
Jason Gunthorpe Aug. 13, 2016, 2:42 a.m. UTC | #4
On Fri, Aug 12, 2016 at 06:06:05PM +0530, Nayna wrote:
> >  Documentation/devicetree/bindings/submitting-patches.txt
> >
> >And be sure to follow all the requirements, including CC'ing the
> >right maintainers

> Sure, will do. Can you tell me who all should I copy ?

That information is in the file

> >>Changelog v2:
> >>         * Added documentation in v2.
> >
> >Do not include these lines in commit messages, put them after the
> >diff stat.
> 
> Actually I have not added Changelog during commit, I have put them in patch
> before posting. However, will add them after diff next time.

No diff, after the diffstat, before the deiff.

> >>+	phandle = <0x10000017>;
> >>+	linux,phandle = <0x10000017>;
> >
> >  What are these?
> 
> Sorry I didn't get your question here. I have written in the format as
> suggested for device-tree documentation and looking at other device-nodes
> documentation. And so this is an example entry as I saw in other docs.

I mean the two phandle things

Jason

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
Nayna Aug. 16, 2016, 6 p.m. UTC | #5
Hi Jason,

Thanks for the review. Please find my responses inline.

On 08/13/2016 08:12 AM, Jason Gunthorpe wrote:
> On Fri, Aug 12, 2016 at 06:06:05PM +0530, Nayna wrote:
>>>   Documentation/devicetree/bindings/submitting-patches.txt
>>>
>>> And be sure to follow all the requirements, including CC'ing the
>>> right maintainers
>
>> Sure, will do. Can you tell me who all should I copy ?
>
> That information is in the file

Sure..

>
>>>> Changelog v2:
>>>>          * Added documentation in v2.
>>>
>>> Do not include these lines in commit messages, put them after the
>>> diff stat.
Ok

>>
>> Actually I have not added Changelog during commit, I have put them in patch
>> before posting. However, will add them after diff next time.
>
> No diff, after the diffstat, before the deiff.

Ok.
>
>>>> +	phandle = <0x10000017>;
>>>> +	linux,phandle = <0x10000017>;
>>>
>>>   What are these?
>>
>> Sorry I didn't get your question here. I have written in the format as
>> suggested for device-tree documentation and looking at other device-nodes
>> documentation. And so this is an example entry as I saw in other docs.
>
> I mean the two phandle things

Here is the description:

phandle property:

The phandle property specifies a numerical identifier for a node that is 
unique within the device tree. The phandle property value is used by 
other nodes that need to refer to the node associated with the property.

linux,phandle property:

Older versions of device trees may be encountered that contain a 
deprecated form of this property called linux,phandle. For 
compatibility, a client program might want to support linux,phandle if a 
phandle property is not present. The meaning and use of the two 
properties is identical.

>
> Jason
>


------------------------------------------------------------------------------
Jason Gunthorpe Aug. 18, 2016, 8:06 p.m. UTC | #6
On Tue, Aug 16, 2016 at 11:30:40PM +0530, Nayna wrote:
> Here is the description:
> 
> phandle property:

IIRC these are automatically generated by the dt compiler and are not
part of the binding. Please confirm if you need them in the binding
document.

Jason

------------------------------------------------------------------------------
Nayna Aug. 30, 2016, 4:56 a.m. UTC | #7
On 08/19/2016 01:36 AM, Jason Gunthorpe wrote:
> On Tue, Aug 16, 2016 at 11:30:40PM +0530, Nayna wrote:
>> Here is the description:
>>
>> phandle property:
>
> IIRC these are automatically generated by the dt compiler and are not
> part of the binding. Please confirm if you need them in the binding
> document.
>
> Jason

Yeah Jason, these were not needed, have removed them in my new patch of 
Device Tree Documentation, posted just now.

Thanks & Regards,
Nayna

>


------------------------------------------------------------------------------
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-tpm.txt b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
new file mode 100644
index 0000000..1df05cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-tpm.txt
@@ -0,0 +1,31 @@ 
+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 : "tpm" indicates master TPM; "tpm-backup" indicates backup TPM.
+- 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";
+	phandle = <0x10000017>;
+	linux,phandle = <0x10000017>;
+};