Skip to content

Commit

Permalink
Added the I2C MUX attribute and target definitions
Browse files Browse the repository at this point in the history
- Defined the I2C_MUX_INFO attribute
- Defined the i2c_mux target with I2C_MUX_INFO as an attribute
- Defined the i2c_mux target to have parent 'chip'
- Added attribute fields i2cMuxSelector and i2cMuxPath to
  attributes EEPROM_NV_INFO, EEPROM_SBE_BACKUP_INFO,
  EEPROM_SBE_PRIMARY_INFO, EEPROM_VPD_BACKUP_INFO,
  EEPROM_VPD_PRIMARY_INFO, FAPI_I2C_CONTROL_INFO,
  TEMP_SENSOR_I2C_CONFIG and TPM_INFO. All these had I2C info
  in them (i2cMasterPath, port, devAddr, engine, etc).

RTC:196807
CMVC-Prereq:1068716
Change-Id: Iadf4909411329c8b7b961efc2cb0789f5b96a49f
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65540
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: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
velozr authored and dcrowell77 committed Sep 28, 2018
1 parent 5baacd2 commit a92f914
Show file tree
Hide file tree
Showing 6 changed files with 574 additions and 49 deletions.
2 changes: 2 additions & 0 deletions src/usr/targeting/common/entitypath.C
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ const char* EntityPath::pathElementTypeAsString(
return "OCBM_CHIP";
case TYPE_MEM_PORT:
return "MEM_PORT";
case TYPE_I2C_MUX:
return "I2C_MUX";
// case TYPE_FSI_LINK:
// return "FSI-link";
// case TYPE_CFAM:
Expand Down
215 changes: 206 additions & 9 deletions src/usr/targeting/common/xmltohb/attribute_types.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,24 @@
<type>uint64_t</type>
<default>0x05</default>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<persistency>non-volatile</persistency>
<readable/>
Expand Down Expand Up @@ -1033,6 +1051,24 @@
<name>writeCycleTime</name>
<type>uint64_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address the EERPROM slaves</description>
<id>EEPROM_SBE_BACKUP_INFO</id>
Expand Down Expand Up @@ -1109,6 +1145,24 @@
<name>writeCycleTime</name>
<type>uint64_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address the EERPROM slaves</description>
<id>EEPROM_SBE_PRIMARY_INFO</id>
Expand Down Expand Up @@ -1185,6 +1239,24 @@
<name>writeCycleTime</name>
<type>uint64_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address the EERPROM slaves</description>
<id>EEPROM_VPD_BACKUP_INFO</id>
Expand Down Expand Up @@ -1268,6 +1340,24 @@
<name>writeCycleTime</name>
<type>uint64_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address the EEPROM slaves</description>
<id>EEPROM_VPD_PRIMARY_INFO</id>
Expand Down Expand Up @@ -1295,8 +1385,8 @@
</attribute>

<attribute>
<!-- @fixme -->
<id>EFF_DRAM_COLS</id>
<!-- @fixme -->
<description>Number of DRAM columns. Initialized and used by HWPs.</description>
<simpleType>
<uint8_t/>
Expand All @@ -1307,8 +1397,8 @@
</attribute>

<attribute>
<!-- @fixme -->
<id>EFF_DRAM_ROWS</id>
<!-- @fixme -->
<description>Number of DRAM rows. Initialized and used by HWPs.</description>
<simpleType>
<uint8_t/>
Expand Down Expand Up @@ -1455,6 +1545,24 @@
<name>devAddr</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<persistency>non-volatile</persistency>
<readable/>
Expand Down Expand Up @@ -1621,6 +1729,7 @@
<writeable/>
</attribute>

<!-- Required by FSP -->
<attribute>
<id>FREQ_PROC_REFCLOCK</id>
<description>
Expand Down Expand Up @@ -2016,8 +2125,8 @@
<value>0xA</value>
</enumerator>
<enumerator>
<!-- deprecated -->
<name>NVLINK</name>
<!-- deprecated -->
<value>0xB</value>
</enumerator>
<enumerator>
Expand Down Expand Up @@ -2056,13 +2165,13 @@
<value>0x1</value>
</enumerator>
<enumerator>
<!-- deprecated -->
<name>955X</name>
<!-- deprecated -->
<value>0x1</value>
</enumerator>
<enumerator>
<!-- deprecated -->
<name>SEEPROM</name>
<!-- deprecated -->
<value>0x2</value>
</enumerator>
<enumerator>
Expand All @@ -2082,8 +2191,8 @@
<value>0x5</value>
</enumerator>
<enumerator>
<!-- deprecated -->
<name>NVLINK</name>
<!-- deprecated -->
<value>0x6</value>
</enumerator>
<enumerator>
Expand Down Expand Up @@ -2396,6 +2505,51 @@
</simpleType>
</attribute>

<attribute>
<complexType>
<description>Structure to define the addressing for
an I2C mux target. </description>
<!-- Master Target Definition -->
<field>
<!--- NOTE: default physical sys-0 is not a valid entity path,
this must be populated with a valid entity path. -->
<default>physical:sys-0</default>
<description>Entity path to the chip that contains the I2C
master.</description>
<name>i2cMasterPath</name>
<type>EntityPath</type>
</field>
<!-- Port Definition -->
<field>
<default>0x00</default>
<description>Port from the I2C Master device. This is a
6-bit value. </description>
<name>port</name>
<type>uint8_t</type>
</field>
<!-- Device Address Definition -->
<field>
<default>0x00</default>
<description>Device address on the I2C bus. This is a 7-bit
value, but then shifted 1 bit left. </description>
<name>devAddr</name>
<type>uint8_t</type>
</field>
<!-- Engine Definition -->
<field>
<default>0x00</default>
<description>I2C master engine. This is a 2-bit value. </description>
<name>engine</name>
<type>uint8_t</type>
</field>
</complexType>
<description>Information used to control a specific i2c mux device,
to select a particular target bus. </description>
<id>I2C_MUX_INFO</id>
<persistency>non-volatile</persistency>
<readable/>
</attribute>

<attribute>
<complexType>
<description>Structure which defines which I2C access method to use at
Expand Down Expand Up @@ -2774,6 +2928,7 @@
</simpleType>
</attribute>

<!-- End Required by FSP -->
<attribute>
<id>MAX_DMI_PER_PROC</id>
<description>
Expand Down Expand Up @@ -3172,7 +3327,6 @@
</description>
<simpleType>
<uint64_t>
<!-- 4PT -->
<default>0x4000000000000</default>
</uint64_t>
</simpleType>
Expand Down Expand Up @@ -3689,6 +3843,9 @@
<enumerator>
<name>AST2500</name>
</enumerator>
<enumerator>
<name>PCA9847</name>
</enumerator>
<id>MODEL</id>
</enumerationType>

Expand Down Expand Up @@ -6068,8 +6225,8 @@
<simpleType>
<uint16_t/>
</simpleType>
<!-- @fixme -->
<persistency>non-volatile</persistency>
<!-- @fixme -->
<readable/>
<writeable/>
<ignoreEkb/>
Expand Down Expand Up @@ -6979,6 +7136,24 @@
<name>devAddr</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address an I2C slave device</description>
<id>TEMP_SENSOR_I2C_CONFIG</id>
Expand Down Expand Up @@ -7255,6 +7430,24 @@
<name>byteAddrOffset</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Bus Selector Definition -->
<field>
<default>0xFF</default>
<description>Determines which of the N selectable buses the mux
will connect to. OxFF indicates no mux present
or N/A.</description>
<name>i2cMuxBusSelector</name>
<type>uint8_t</type>
</field>
<!-- i2c Mux Path Definition -->
<field>
<!-- NOTE: physical:sys-0 implies that there is no mux in
the bus path for this part. -->
<default>physical:sys-0</default>
<description>Entity path to the I2C mux for this device.</description>
<name>i2cMuxPath</name>
<type>EntityPath</type>
</field>
</complexType>
<description>Information needed to address the TPM slaves</description>
<id>TPM_INFO</id>
Expand Down Expand Up @@ -7624,9 +7817,13 @@
<value>76</value>
</enumerator>
<enumerator>
<name>LAST_IN_RANGE</name>
<name>I2C_MUX</name>
<value>77</value>
</enumerator>
<enumerator>
<name>LAST_IN_RANGE</name>
<value>78</value>
</enumerator>
<id>TYPE</id>
</enumerationType>

Expand Down

0 comments on commit a92f914

Please sign in to comment.