Skip to contentSkip to conversation

TPM: Nuvoton I2C driver

PATCH In review Rajiv Andrade 2 participants 3 messages Feb 7, 2012 – Feb 13, 2012 TPM device driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 TPM: Nuvoton I2C driver

From: [email protected] <[email protected]>

Below are the additions for WPCT301/NPCT501 Nuvoton Technology TPM with I2C interface device driver. This driver uses Linux I2C bus driver to interface with the I2C bus and Linux TPM driver (tpm.ko), to export the standard Linux TPM interface. This driver requires an I2C bus driver and TPM driver (tpm.ko) to be loaded prior to its loading. This driver tested on Linux kernel version 3.3 on an x86 based platform.

---
 drivers/char/tpm/Kconfig           |    9 +
 drivers/char/tpm/Makefile          |    1 +
 drivers/char/tpm/tpm_nuvoton_i2c.c |  718 ++++++++++++++++++++++++++++++++++++
 3 files changed, 728 insertions(+), 0 deletions(-)
 create mode 100644 drivers/char/tpm/tpm_nuvoton_i2c.c
drivers/char/tpm/Kconfig +9 -0
index a048199..9ebcbe8 100644
@@ -62,4 +62,13 @@ config TCG_INFINEON
 	  Further information on this driver and the supported hardware
 	  can be found at http://www.trust.rub.de/projects/linux-device-driver-infineon-tpm/ 
 
+config TCG_NUVOTON_I2C
+	tristate "Nuvoton Technology Corp. TPM 1.2 I2C Interface"
+	depends on I2C
+	---help---
+	  If you have a TPM security chip with I2C interface from
+	  Nuvoton Technology Corp. say Yes and it will be accessible
+	  from within Linux.  To compile this driver as a module, choose
+	  M here; the module will be called tpm_nuvoton_i2c.
+
 endif # TCG_TPM
drivers/char/tpm/Makefile +1 -0
index ea3a1e0..064669a 100644
@@ -9,3 +9,4 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
 obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
 obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
 obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_NUVOTON_I2C) += tpm_nuvoton_i2c.o
drivers/char/tpm/tpm_nuvoton_i2c.c new file +718 -0

718 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 11 lines · Rajiv Andrade

From: [email protected]<[email protected]>

Below are the additions for WPCT301/NPCT501 Nuvoton Technology TPM with I2C interface device driver. This driver uses Linux I2C bus driver to interface with the I2C bus and Linux TPM driver (tpm.ko), to export the standard Linux TPM interface. This driver requires an I2C bus driver and TPM driver (tpm.ko) to be loaded prior to its loading. This driver tested on Linux kernel version 3.3 on an x86 based platform.

[...]

Quoted 17 lines
drivers/char/tpm/Kconfig +1 -0
+
  endif # TCG_TPM
drivers/char/tpm/Makefile +1 -0
index ea3a1e0..064669a 100644
@@ -9,3 +9,4 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
  obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
  obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
  obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_NUVOTON_I2C) += tpm_nuvoton_i2c.o
drivers/char/tpm/tpm_nuvoton_i2c.c new file +0 -0
new file mode 100644
index 0000000..daf0d49

drivers/char/tpm/tpm_nuvoton_i2c.c line 4

Quoted 4 lines
drivers/char/tpm/tpm_nuvoton_i2c.c new file +4 -0
@@ -0,0 +1,718 @@
+/******************************************************************************
+ * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501,
+ * based on the TCG TPM Interface Spec version 1.2.
+ * Specifications at www.trustedcomputinggroup.org

Since it's implemented following non-proprietary specs, would this driver qualify as the generic tpm_i2c driver or is there anything besides the device-id,vendor-id + firmware work-around in the driver specific to this particular device implementation.

Regards,
Stefan

#2 lore raw
Quoted 40 lines · Stefan Berger
Quoted 11 lines · Rajiv Andrade

From: [email protected]<[email protected]>

Below are the additions for WPCT301/NPCT501 Nuvoton Technology TPM with I2C interface device driver. This driver uses Linux I2C bus driver to interface with the I2C bus and Linux TPM driver (tpm.ko), to export the standard Linux TPM interface. This driver requires an I2C bus driver and TPM driver (tpm.ko) to be loaded prior to its loading. This driver tested on Linux kernel version 3.3 on an x86 based platform.

[...]

Quoted 17 lines
drivers/char/tpm/Kconfig +1 -0
+
  endif # TCG_TPM
drivers/char/tpm/Makefile +1 -0
index ea3a1e0..064669a 100644
@@ -9,3 +9,4 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
  obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
  obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
  obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
+obj-$(CONFIG_TCG_NUVOTON_I2C) += tpm_nuvoton_i2c.o
drivers/char/tpm/tpm_nuvoton_i2c.c new file +0 -0
new file mode 100644
index 0000000..daf0d49

drivers/char/tpm/tpm_nuvoton_i2c.c line 4

Quoted 4 lines
drivers/char/tpm/tpm_nuvoton_i2c.c new file +4 -0
@@ -0,0 +1,718 @@
+/******************************************************************************
+ * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501,
+ * based on the TCG TPM Interface Spec version 1.2.
+ * Specifications at www.trustedcomputinggroup.org

Since it's implemented following non-proprietary specs, would this driver qualify as the generic tpm_i2c driver or is there anything besides the device-id,vendor-id + firmware work-around in the driver specific to this particular device implementation.

Quoted 2 lines

Regards,
Stefan

There isn't. There are other i2c TPMs out there though, but my intention is to keep it all in single tpm_i2c driver in case it's true for them as well.

Rajiv