From f781bc270191c7ce152ddc55618ea36d992abb31 Mon Sep 17 00:00:00 2001 From: Weicai Yang Date: Mon, 26 Sep 2022 15:39:08 -0700 Subject: [PATCH] [spi_device] Update max_rd_size to 64 bytes Also update the corresponding parameter in TB Signed-off-by: Weicai Yang --- hw/ip/spi_device/data/spi_device.hjson | 2 +- hw/ip/spi_device/dv/env/spi_device_env_pkg.sv | 2 +- hw/ip/spi_device/rtl/spi_device_reg_top.sv | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ip/spi_device/data/spi_device.hjson b/hw/ip/spi_device/data/spi_device.hjson index 07535cd40b48d..6e7bb06867eac 100644 --- a/hw/ip/spi_device/data/spi_device.hjson +++ b/hw/ip/spi_device/data/spi_device.hjson @@ -1089,7 +1089,7 @@ It is not recommended for SW to advertise TPM supporting more than `max_rd_size` to the South Bridge. ''' - resval: "4" + resval: "6" } // f: max_rd_size ] tags: [ diff --git a/hw/ip/spi_device/dv/env/spi_device_env_pkg.sv b/hw/ip/spi_device/dv/env/spi_device_env_pkg.sv index 9d5aec0f0ff58..bbd89f61b4a5a 100644 --- a/hw/ip/spi_device/dv/env/spi_device_env_pkg.sv +++ b/hw/ip/spi_device/dv/env/spi_device_env_pkg.sv @@ -111,7 +111,7 @@ package spi_device_env_pkg; parameter bit[11:0] TPM_HW_INT_CAP_OFFSET = 12'h014; parameter bit[23:0] TPM_BASE_ADDR = 24'hD40000; parameter byte TPM_ACTIVE_LOCALITY_BIT_POS = 5; - parameter byte MAX_SUPPORT_TPM_SIZE = 16; // current version can support up to 16 + parameter byte MAX_SUPPORT_TPM_SIZE = 64; parameter byte MAX_TPM_LOCALITY = 5; parameter uint NUM_INTERNAL_PROCESSED_CMD = 11; // exclude WREN, WRDI, EN4B, EX4B diff --git a/hw/ip/spi_device/rtl/spi_device_reg_top.sv b/hw/ip/spi_device/rtl/spi_device_reg_top.sv index 59e4ef07d29ae..ac20a0733b3c5 100644 --- a/hw/ip/spi_device/rtl/spi_device_reg_top.sv +++ b/hw/ip/spi_device/rtl/spi_device_reg_top.sv @@ -18272,7 +18272,7 @@ module spi_device_reg_top ( prim_subreg #( .DW (3), .SwAccess(prim_subreg_pkg::SwAccessRO), - .RESVAL (3'h4) + .RESVAL (3'h6) ) u_tpm_cap_max_rd_size ( .clk_i (clk_i), .rst_ni (rst_ni),