summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2019-10-16 10:10:34 -0500
committerWilliam G Hoffa <wghoffa@us.ibm.com>2019-11-01 15:41:41 -0500
commit632582f105da7a546708c4f9705761948d7688fa (patch)
treef76238e3071d6d7b39459b17eb83796aca6c95a1 /src/include
parent3f41702fbfd6a5c4f4de9eabedf1d8acb801ae20 (diff)
downloadtalos-hostboot-632582f105da7a546708c4f9705761948d7688fa.tar.gz
talos-hostboot-632582f105da7a546708c4f9705761948d7688fa.zip
Allow dynmic i2c device addresses and set up PMIC targets to do this
Depending on which vendor made a given OCMB the i2c device address of the PMIC targets on the OCMB will be different. To account for this we have added a new DYNAMIC_DEVICE_ADDRESS attribute. This attribute is filled out on the PMIC target by looking at the SPD on parent OCMB chip. This means that we must do presence detection on the OCMB prior to the the PMIC targets. While doing i2c operations if a given target has the DYNAMIC_DEVICE_ADDRESS we will use that over the devAddr in the any complex i2c attribute for that target. Change-Id: I22a185a65c064a1514751dd5828547c57af98df1 RTC: 209714 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85394 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/fapiwrap/fapiWrapif.H12
-rw-r--r--src/include/usr/i2c/eeprom_const.H6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/include/usr/fapiwrap/fapiWrapif.H b/src/include/usr/fapiwrap/fapiWrapif.H
index f37aea26b..e3a50f3b7 100644
--- a/src/include/usr/fapiwrap/fapiWrapif.H
+++ b/src/include/usr/fapiwrap/fapiWrapif.H
@@ -55,6 +55,18 @@ namespace FAPIWRAP
errlHndl_t explorer_getidec( TARGETING::Target * i_ocmbChip,
uint16_t& o_chipId,
uint8_t& o_ec);
+
+ /**
+ * @brief This function wraps around the FAPI2 HWP "get_pmic_i2c_addr" which
+ * takes in a DDIMM's DDR4 SPD data and a PMIC's position relative to
+ * its parent OCMB's chip and returns the device address of that pmic
+ * @param[in] i_spd - Binary blob containing addresses a given OCMB's PMICs
+ * @param[in] i_pmic_id - PMIC's position relative to parent OCMB
+ * @return uint8_t 0 if invalid pmic_id is passed, PMIC's devAddress otherwise
+ */
+ uint8_t get_pmic_dev_addr( const char* i_spd,
+ const uint8_t i_pmic_id);
+
}
#endif \ No newline at end of file
diff --git a/src/include/usr/i2c/eeprom_const.H b/src/include/usr/i2c/eeprom_const.H
index 055aa2172..275388450 100644
--- a/src/include/usr/i2c/eeprom_const.H
+++ b/src/include/usr/i2c/eeprom_const.H
@@ -170,9 +170,9 @@ struct eecacheSectionHeader
*/
struct eeprom_addr_t
{
- uint64_t port;
- uint64_t engine;
- uint64_t devAddr;
+ uint8_t port;
+ uint8_t engine;
+ uint8_t devAddr;
int64_t eepromRole;
uint64_t offset;
eeprom_addr_size_t addrSize;
OpenPOWER on IntegriCloud