tpm_i2c_stm_st33.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * STMicroelectronics TPM I2C Linux driver for TPM ST33ZP24
  3. * Copyright (C) 2009, 2010 STMicroelectronics
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. * STMicroelectronics version 1.2.0, Copyright (C) 2010
  20. * STMicroelectronics comes with ABSOLUTELY NO WARRANTY.
  21. * This is free software, and you are welcome to redistribute it
  22. * under certain conditions.
  23. *
  24. * @Author: Christophe RICARD tpmsupport@st.com
  25. *
  26. * @File: stm_st33_tpm_i2c.h
  27. *
  28. * @Date: 09/15/2010
  29. */
  30. #ifndef __STM_ST33_TPM_I2C_MAIN_H__
  31. #define __STM_ST33_TPM_I2C_MAIN_H__
  32. #define TPM_ACCESS (0x0)
  33. #define TPM_STS (0x18)
  34. #define TPM_HASH_END (0x20)
  35. #define TPM_DATA_FIFO (0x24)
  36. #define TPM_HASH_DATA (0x24)
  37. #define TPM_HASH_START (0x28)
  38. #define TPM_INTF_CAPABILITY (0x14)
  39. #define TPM_INT_STATUS (0x10)
  40. #define TPM_INT_ENABLE (0x08)
  41. #define TPM_DUMMY_BYTE 0xAA
  42. #define TPM_WRITE_DIRECTION 0x80
  43. #define TPM_HEADER_SIZE 10
  44. #define TPM_BUFSIZE 2048
  45. #define LOCALITY0 0
  46. #define TPM_ST33_I2C "st33zp24_i2c"
  47. struct st33zp24_platform_data {
  48. int io_serirq;
  49. int io_lpcpd;
  50. struct i2c_client *client;
  51. u8 *tpm_i2c_buffer[2]; /* 0 Request 1 Response */
  52. struct completion irq_detection;
  53. struct mutex lock;
  54. };
  55. #endif /* __STM_ST33_TPM_I2C_MAIN_H__ */