summaryrefslogtreecommitdiffstats
path: root/src/include/usr/i2c
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2016-11-09 13:56:27 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-02-21 18:05:45 -0500
commit2eaec45e0bf68d45d3e7966ca681a2aced8aba3f (patch)
tree4d46fb67aeec1e29b76bb90719b079c01f802822 /src/include/usr/i2c
parent988d8d537152748d2e105ea323808a1ddb5674fc (diff)
downloadtalos-hostboot-2eaec45e0bf68d45d3e7966ca681a2aced8aba3f.tar.gz
talos-hostboot-2eaec45e0bf68d45d3e7966ca681a2aced8aba3f.zip
Adding interface changes to provide I2C information to HDAT
This is the first of two commits, this includes the I2C information that hostboot is already aware of (EEProm and TPM). There will be a later commit that pulls in the new information from the MRW. Change-Id: I33b0cd7784b242de3b68a3e7b07527604d819c23 RTC:161649 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32437 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: NAGENDRA K. GURRAM <nagendra.g@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/i2c')
-rw-r--r--src/include/usr/i2c/i2cif.H41
1 files changed, 9 insertions, 32 deletions
diff --git a/src/include/usr/i2c/i2cif.H b/src/include/usr/i2c/i2cif.H
index e7f8cfac1..607fb58a1 100644
--- a/src/include/usr/i2c/i2cif.H
+++ b/src/include/usr/i2c/i2cif.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -209,8 +209,6 @@ errlHndl_t i2cEnableSensorCache( TARGETING::Target * i_target );
*/
enum DeviceType_t
{
- //@TODO-RTC:161649-Map these directly to some HDAT constants?
- // Or something from MRW?
DEVTYPE_955x = 0x01,
DEVTYPE_SEEPROM = 0x02,
DEVTYPE_NUVOTON_TPM = 0x03,
@@ -220,39 +218,18 @@ enum DeviceType_t
};
/**
- * Enumeration that defines possible I2C device purposes
- */
-enum DevicePurpose_t
-{
- //@TODO-RTC:161649-Map these directly to some HDAT constants?
- // Or something from MRW?
- PURPOSE_CABLE_CARD_PRES = 0x01,
- PURPOSE_CABLE_CARD_POWER_SENSE = 0x02,
- PURPOSE_CABLE_CARD_POWER_CONTROL = 0x03,
- PURPOSE_TPM = 0x04,
- PURPOSE_MODULE_VPD = 0x05,
- PURPOSE_DOMM_SPD = 0x06,
- PURPOSE_PROC_MODULE_VPD = 0x07,
- PURPOSE_SBE_SEEPROM = 0x08,
- PURPOSE_PLANAR_VPD = 0x09,
- PURPOSE_PCI_HOTPLUG = 0x0A,
- PURPOSE_UNKNOWN = 0xFF,
-};
-
-/**
* Structure to return I2C information in
*/
struct DeviceInfo_t
{
- //@TODO-RTC:161649-Add more details/comments
- TARGETING::Target* masterChip;
- uint8_t engine;
- uint8_t masterPort;
- DeviceType_t deviceType;
- uint8_t addr; //Is this left-shifted or not?
- uint8_t slavePort;
- uint8_t busFreqKhz;
- DevicePurpose_t devicePurpose;
+ TARGETING::Target* masterChip; //< I2C Master Chip
+ uint8_t engine; //< I2C engine (relative to master chip)
+ uint8_t masterPort; //< I2C port (relative to engine)
+ uint8_t deviceType; //< Slave device Type (from enum)
+ uint8_t addr; //< I2C Slave device address (relative to port)
+ uint8_t slavePort; //< I2C Slave Port. 0xFF if N/A
+ uint8_t busFreqKhz; //< Bus speed in KHz
+ uint8_t devicePurpose; //< Slave device purpose (from enum)
};
/**
OpenPOWER on IntegriCloud