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 33 #define TPM_ACCESS (0x0) 34 #define TPM_STS (0x18) 35 #define TPM_HASH_END (0x20) 36 #define TPM_DATA_FIFO (0x24) 37 #define TPM_HASH_DATA (0x24) 38 #define TPM_HASH_START (0x28) 39 #define TPM_INTF_CAPABILITY (0x14) 40 #define TPM_INT_STATUS (0x10) 41 #define TPM_INT_ENABLE (0x08) 42 43 #define TPM_DUMMY_BYTE 0xAA 44 #define TPM_WRITE_DIRECTION 0x80 45 #define TPM_HEADER_SIZE 10 46 #define TPM_BUFSIZE 2048 47 48 #define LOCALITY0 0 49 50 #define TPM_ST33_I2C "st33zp24_i2c" 51 52 struct st33zp24_platform_data { 53 int io_serirq; 54 int io_lpcpd; 55 struct i2c_client *client; 56 u8 *tpm_i2c_buffer[2]; /* 0 Request 1 Response */ 57 struct completion irq_detection; 58 struct mutex lock; 59 }; 60 61 #endif /* __STM_ST33_TPM_I2C_MAIN_H__ */ 62