From ca9007fb2efce09d6bdaf85615e585c524414fab Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Tue, 25 Jun 2019 16:17:46 -0500 Subject: Add Support for new HDAT Slave Device Type for Nuvoton 75x The new HDAT spec added a new 'TCG_i2c_TPM' Slave Device Type for the Host I2C Device Entry Structure. This commit adds the use of it for Nuvoton 75x support. Change-Id: I01f75c919f255786e5b32dcde9b86b2e15d33986 RTC:204133 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79527 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Nicholas E. Bofferding Reviewed-by: Ilya Smirnov Reviewed-by: Daniel M. Crowell --- src/usr/targeting/common/processMrw.pl | 17 +++++++++ .../targeting/common/xmltohb/attribute_types.xml | 40 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) (limited to 'src/usr/targeting/common') diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl index 744eda2ef..24759589c 100755 --- a/src/usr/targeting/common/processMrw.pl +++ b/src/usr/targeting/common/processMrw.pl @@ -2952,6 +2952,23 @@ sub processI2C { $type = "0xFF"; } + # TPM types can vary by MODEL number + elsif ($type_str eq "NUVOTON_TPM") + { + # Model values can be found in tpmddif.H and are kept in + # sync with TPM_MODEL attribute in attribute_types_hb.xml + my $tpm_model = $targetObj->getAttribute($i2c->{DEST_PARENT},"TPM_MODEL"); + if ($tpm_model eq 1) + { + $type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE",$type_str); + } + if ($tpm_model eq 2) + { + # @TODO RTC 212201 use proper enum when .xml supports it + #$type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE","TCG_I2C_TPM"); + $type = 0x15; + } + } else { $type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE",$type_str); diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index cce773a1e..ff9abf83b 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -2269,6 +2269,46 @@ SEEPROM_Atmel28c256 0xB + + THERMAL_SENSOR + 0x0C + + + SEEPROM_Atmel24c04 + 0x0D + + + SEEPROM_Atmel24c412 + 0x0E + + + SEEPROM_Atmel24c32 + 0x0F + + + SEEPROM_Atmel24c64 + 0x10 + + + SEEPROM_Atmel24c16 + 0x11 + + + NVDIA_GPU + 0x12 + + + NXP_LPC_Microcontroller_LPC11U35 + 0x13 + + + 9550 + 0x14 + + + TCG_I2C_TPM + 0x15 + UNKNOWN 0xFF -- cgit v1.2.3