[v2,4/5] dt-bindings: tpm: Add YAML schema for TPM TIS I2C options
diff mbox series

Message ID 20191202133332.178110-5-amirmizi6@gmail.com
State Changes Requested
Headers show
Series
  • add tpm i2c ptp driver
Related show

Checks

Context Check Description
robh/dt-meta-schema fail build log
robh/checkpatch warning "total: 6 errors, 1 warnings, 38 lines checked"

Commit Message

Amir Mizinski Dec. 2, 2019, 1:33 p.m. UTC
From: Amir Mizinski <amirmizi6@gmail.com>

Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c PTP based physical layer.

Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
---
 .../bindings/security/tpm/tpm-tis-i2c.yaml         | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml

Comments

Rob Herring Dec. 13, 2019, 10:36 p.m. UTC | #1
On Mon, Dec 02, 2019 at 03:33:31PM +0200, amirmizi6@gmail.com wrote:
> From: Amir Mizinski <amirmizi6@gmail.com>
> 
> Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c PTP based physical layer.

Wrap your commmit message. And TPM, TIS?, and I2C should be capitalized.

> 
> Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
> ---
>  .../bindings/security/tpm/tpm-tis-i2c.yaml         | 38 ++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml

Please read my comments on v1 (The first v1 from 11/10, not the 2nd v1 
you sent).

Rob
Amir Mizinski Dec. 16, 2019, 1:53 p.m. UTC | #2
On Sat, Dec 14, 2019 at 12:36 AM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Dec 02, 2019 at 03:33:31PM +0200, amirmizi6@gmail.com wrote:
> > From: Amir Mizinski <amirmizi6@gmail.com>
> >
> > Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c PTP based physical layer.
>
> Wrap your commmit message. And TPM, TIS?, and I2C should be capitalized.

Thanks,  ill fix that.

>
> >
> > Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
> > ---
> >  .../bindings/security/tpm/tpm-tis-i2c.yaml         | 38 ++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
>
> Please read my comments on v1 (The first v1 from 11/10, not the 2nd v1
> you sent).

I sent a follow up comment regarding this:
https://patchwork.kernel.org/patch/11236253/
(2nd v1 was sent by mistake. sorry about that)

>
> Rob

Amir Mizinski
Rob Herring Dec. 16, 2019, 2:17 p.m. UTC | #3
On Mon, Dec 16, 2019 at 7:53 AM Amir Mizinski <amirmizi6@gmail.com> wrote:
>
> On Sat, Dec 14, 2019 at 12:36 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Mon, Dec 02, 2019 at 03:33:31PM +0200, amirmizi6@gmail.com wrote:
> > > From: Amir Mizinski <amirmizi6@gmail.com>
> > >
> > > Added a YAML schema to support tpm tis i2c realted dt-bindings for the I2c PTP based physical layer.
> >
> > Wrap your commmit message. And TPM, TIS?, and I2C should be capitalized.
>
> Thanks,  ill fix that.
>
> >
> > >
> > > Signed-off-by: Amir Mizinski <amirmizi6@gmail.com>
> > > ---
> > >  .../bindings/security/tpm/tpm-tis-i2c.yaml         | 38 ++++++++++++++++++++++
> > >  1 file changed, 38 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
> >
> > Please read my comments on v1 (The first v1 from 11/10, not the 2nd v1
> > you sent).
>
> I sent a follow up comment regarding this:
> https://patchwork.kernel.org/patch/11236253/
> (2nd v1 was sent by mistake. sorry about that)

Sorry I missed your reply. However, you didn't address these comments:

> There's a bigger issue that the h/w here is more than just an I2C
> protocol. The chip may have multiple power supplies, clocks, reset
> lines, etc. HID over I2C seems like a similar case. Does the spec define
> *all* of that? If not, you need chip specific compatibles. You can keep
> this as a fallback though.

To rephrase this, a protocol does not fully describe the h/w and DT
should describe the h/w.

Also, you should include the interrupt whether you use it in the
driver currently or not. Again, it's about describing the h/w, not
what a driver happens to use ATM.

Rob

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
new file mode 100644
index 0000000..bb18917
--- /dev/null
+++ b/Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/security/tpm/tpm-tis-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: I2C PTP based TPM Device Tree Bindings
+
+maintainers:
+  - Amir Mizinski <amirmizi6@gmail.com>
+
+description:
+  The TCG defines hardware protocol, registers and interface (based
+  on the TPM Interface Specification) for accessing TPM devices
+  implemented with an I2C interface.
+  Refer to the 'I2C Interface Definition' section in 'TCG PC Client
+  PlatformTPMProfile(PTP) Specification' publication for specification.
+  Designed for Raspberry Pie 3 Board with Nuvoton's NPCT75X (2.0)
+  
+properties:
+  compatible:
+    contains:
+      const: tcg,tpm-tis-i2c
+      
+  reg:
+    maxItems: 1
+    
+required:
+  - compatible
+  - reg  
+    
+    
+examples:
+  - |
+    tpm-tis-i2c: tpm-tis-i2c@2e {
+       compatible = "tcg,tpm-tis-i2c";
+       reg = <0x2e>;
+    };