Skip to content

Linux Kernel Driver for Atmel's AT97SC3204T I2C TPM (for Beaglebone)

Notifications You must be signed in to change notification settings

theopolis/tpm-i2c-atmel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATMEL's AT97SC3204T I2C TPM

NOTE: Support exists in mainline Linux now.

Instructions (Kernel):

The following few steps will add the I2C TPM as a tristate in drivers/char/tpm. You will need to configure your board to include the TPM on the correct I2C bus. Atmel's I2C TPM has an address of 0x29. You can add:

{ I2C_BOARD_INFO("tpm_i2c_atmel", 0x29), }

to the i2c_board_info struct used by the I2C bus.

  1. Patch your system board to include tpm_i2c_atmel with the I2C bus and address of the TPM.
  2. Insert support for the TPM: [tpm-i2c-atmel] $ bash ./patch_kernel.sh /kernel/source This moves the source into drivers/char/tpm, and adds support to Kconfig & Makefile.
  3. Add your preference for CONFIG_TCG_TIS_I2C_ATMEL.
  4. Compile your kernel.

Beaglebone (A5+) (Kernel):

For a BeagleBone, in addition to the above steps, there are two included patches to (1) enable the I2C-2 bus, and (2) add the I2C TPM at address 0x29 on I2C-2.

  1. Follow the above
  2. Apply patches: (for Linux 3.7, only patch bb-ra5-add-tpm-i2c-atmel-3.7.patch)
[kernel-dir] $ patch -p0 < /tpm-i2c-atmel/patches/bb-ra5-add-i2c1.patch
[kernel-dir] $ patch -p0 < /tpm-i2c-atmel/patches/bb-ra5-add-tpm-i2c-atmel.patch

Beaglebone (A5+) (Module):

If you would like the Atmel I2C TPM driver as a module built outside of the kernel you can checkout the beaglebone branch and modify tpm_i2c_atmel.c to specify the I2C bus and address (though should not change).

  1. (Optional) Patch your board-am335xevm.c using patches/bb-ra5-add-i2c1.patch. [kernel-dir] $ patch -p0 < /tpm-i2c-atmel/bb-ra5-add-i2c1.patch This will enable the I2C-2 bus. The BeagleBone SRM identifies I2C-2 for use with peripherals.
  2. git checkout -b beaglebone beaglebone
  3. KERNEL_DIR=/location CROSS_COMPILER=/location/bin/arm-linux- make
  4. Copy the .ko to the BeagleBone: insmod ./tpm_i2c_atmel.ko

Other:

The TPM will need initialization; TrouSerS's tpm_tools can do this from userspace.

  1. git clone git://trousers.git.sourceforge.net/gitroot/trousers/trousers
  2. git clone git://trousers.git.sourceforge.net/gitroot/trousers/tpm-tools
  3. Follow the directions for both, tpm-tools depends on TrouSerS.
  4. ./tpm-tools/src/tpm_mgmt/tpm_startup

Note: newer versions of the Linux Kernel support TPM initialization and self test. We expect U-boot to have issued a startup and self test, similar to platforms implementing TPM in BIOS.

About

Linux Kernel Driver for Atmel's AT97SC3204T I2C TPM (for Beaglebone)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published