Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
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> --- > 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 000..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. -- ___ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
Am 30. August 2016 00:06:49 GMT-07:00, schrieb Jarkko Sakkinen: >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 > : >> >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 >> >> --- >> >> 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 000..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 0xfd45>; >> >> + linux,sml-size = <0x1>; >> >> + 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 -- ___ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
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. -- ___ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
Re: [tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
Am 29. August 2016 23:36:31 GMT-07:00, schrieb Jarkko Sakkinen: >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 >> --- >> 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 000..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 0xfd45>; >> +linux,sml-size = <0x1>; >> +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@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/tpmdd-devel -- Sent from my mobile -- ___ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
[tpmdd-devel] [PATCH] Documentation: tpm: Adds the TPM device tree node documentation
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--- 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 000..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 0xfd45>; + linux,sml-size = <0x1>; + status = "okay"; +}; -- 2.5.0 -- ___ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel