Hardware Interfaces

Referring to the Comportable guideline for peripheral device functionality, the module spi_device has the following hardware interfaces defined

  • Primary Clock: clk_i
  • Other Clocks: scan_clk_i
  • Bus Device Interfaces (TL-UL): tl
  • Bus Host Interfaces (TL-UL): none

Peripheral Pins for Chip IO

Pin nameDirectionDescription
sckinputSPI Clock
csbinputChip Select#
tpm_csbinputTPM Chip Select#
sd[3:0]inoutSPI IO, IO2/IO3 has multi-purpose (/WP, /HOLD)

Inter-Module Signals

Port NamePackage::StructTypeActWidthDescription
ram_cfgprim_ram_2p_pkg::ram_2p_cfgunircv1
passthroughspi_device_pkg::passthroughreq_rspreq1
mbist_enlogicunircv1
sck_monitorlogicunireq1
tltlul_pkg::tlreq_rsprsp1

Interrupts

Interrupt NameTypeDescription
generic_rx_fullEventRX SRAM FIFO Full
generic_rx_watermarkEventRX SRAM FIFO is above the level
generic_tx_watermarkEventTX SRAM FIFO is under the level
generic_rx_errorEventSDI in FwMode has error
generic_rx_overflowEventRX Async FIFO overflow
generic_tx_underflowEventTX Async FIFO underflow
upload_cmdfifo_not_emptyEventUpload Command FIFO is not empty
upload_payload_not_emptyEventUpload payload is not empty. The event occurs after SPI transaction completed
upload_payload_overflowEventUpload payload overflow event. When a SPI Host system issues a command with payload more than 256B, this event is reported. When it happens, SW should read the last written payload index CSR to figure out the starting address of the last 256B.
readbuf_watermarkEventRead Buffer Threshold event. The host system accesses greater than or equal to the threshold of a buffer.
readbuf_flipEventRead buffer flipped event. The host system accesses other side of buffer.
tpm_header_not_emptyStatusTPM Header(Command/Address) buffer available

Security Alerts

Alert NameDescription
fatal_faultThis fatal alert is triggered when a fatal TL-UL bus integrity fault is detected.

Security Countermeasures

Countermeasure IDDescription
SPI_DEVICE.BUS.INTEGRITYEnd-to-end bus integrity scheme.

Registers

Summary

NameOffsetLengthDescription
spi_device.INTR_STATE0x04Interrupt State Register
spi_device.INTR_ENABLE0x44Interrupt Enable Register
spi_device.INTR_TEST0x84Interrupt Test Register
spi_device.ALERT_TEST0xc4Alert Test Register
spi_device.CONTROL0x104Control register
spi_device.CFG0x144Configuration Register
spi_device.FIFO_LEVEL0x184RX/ TX FIFO levels.
spi_device.ASYNC_FIFO_LEVEL0x1c4RX/ TX Async FIFO levels between main clk and spi clock
spi_device.STATUS0x204SPI Device status register
spi_device.RXF_PTR0x244Receiver FIFO (SRAM) pointers
spi_device.TXF_PTR0x284Transmitter FIFO (SRAM) pointers
spi_device.RXF_ADDR0x2c4Receiver FIFO (SRAM) Addresses
spi_device.TXF_ADDR0x304Transmitter FIFO (SRAM) Addresses
spi_device.INTERCEPT_EN0x344Intercept Passthrough datapath.
spi_device.LAST_READ_ADDR0x384Last Read Address
spi_device.FLASH_STATUS0x3c4SPI Flash Status register.
spi_device.JEDEC_CC0x404JEDEC Continuation Code configuration register.
spi_device.JEDEC_ID0x444JEDEC ID register.
spi_device.READ_THRESHOLD0x484Read Buffer threshold register.
spi_device.MAILBOX_ADDR0x4c4Mailbox Base address register.
spi_device.UPLOAD_STATUS0x504Upload module status register.
spi_device.UPLOAD_STATUS20x544Upload module status 2 register.
spi_device.UPLOAD_CMDFIFO0x584Command Fifo Read Port.
spi_device.UPLOAD_ADDRFIFO0x5c4Address Fifo Read Port.
spi_device.CMD_FILTER_00x604Command Filter
spi_device.CMD_FILTER_10x644Command Filter
spi_device.CMD_FILTER_20x684Command Filter
spi_device.CMD_FILTER_30x6c4Command Filter
spi_device.CMD_FILTER_40x704Command Filter
spi_device.CMD_FILTER_50x744Command Filter
spi_device.CMD_FILTER_60x784Command Filter
spi_device.CMD_FILTER_70x7c4Command Filter
spi_device.ADDR_SWAP_MASK0x804Address Swap Mask register.
spi_device.ADDR_SWAP_DATA0x844The address value for the address swap feature.
spi_device.PAYLOAD_SWAP_MASK0x884Write Data Swap in the passthrough mode.
spi_device.PAYLOAD_SWAP_DATA0x8c4Write Data Swap in the passthrough mode.
spi_device.CMD_INFO_00x904Command Info register.
spi_device.CMD_INFO_10x944Command Info register.
spi_device.CMD_INFO_20x984Command Info register.
spi_device.CMD_INFO_30x9c4Command Info register.
spi_device.CMD_INFO_40xa04Command Info register.
spi_device.CMD_INFO_50xa44Command Info register.
spi_device.CMD_INFO_60xa84Command Info register.
spi_device.CMD_INFO_70xac4Command Info register.
spi_device.CMD_INFO_80xb04Command Info register.
spi_device.CMD_INFO_90xb44Command Info register.
spi_device.CMD_INFO_100xb84Command Info register.
spi_device.CMD_INFO_110xbc4Command Info register.
spi_device.CMD_INFO_120xc04Command Info register.
spi_device.CMD_INFO_130xc44Command Info register.
spi_device.CMD_INFO_140xc84Command Info register.
spi_device.CMD_INFO_150xcc4Command Info register.
spi_device.CMD_INFO_160xd04Command Info register.
spi_device.CMD_INFO_170xd44Command Info register.
spi_device.CMD_INFO_180xd84Command Info register.
spi_device.CMD_INFO_190xdc4Command Info register.
spi_device.CMD_INFO_200xe04Command Info register.
spi_device.CMD_INFO_210xe44Command Info register.
spi_device.CMD_INFO_220xe84Command Info register.
spi_device.CMD_INFO_230xec4Command Info register.
spi_device.CMD_INFO_EN4B0xf04Opcode for EN4B.
spi_device.CMD_INFO_EX4B0xf44Opcode for EX4B
spi_device.CMD_INFO_WREN0xf84Opcode for Write Enable (WREN)
spi_device.CMD_INFO_WRDI0xfc4Opcode for Write Disable (WRDI)
spi_device.TPM_CAP0x8004TPM HWIP Capability register.
spi_device.TPM_CFG0x8044TPM Configuration register.
spi_device.TPM_STATUS0x8084TPM submodule state register.
spi_device.TPM_ACCESS_00x80c4TPM_ACCESS_x register.
spi_device.TPM_ACCESS_10x8104TPM_ACCESS_x register.
spi_device.TPM_STS0x8144TPM_STS_x register.
spi_device.TPM_INTF_CAPABILITY0x8184TPM_INTF_CAPABILITY
spi_device.TPM_INT_ENABLE0x81c4TPM_INT_ENABLE
spi_device.TPM_INT_VECTOR0x8204TPM_INT_VECTOR
spi_device.TPM_INT_STATUS0x8244TPM_INT_STATUS
spi_device.TPM_DID_VID0x8284TPM_DID/ TPM_VID register
spi_device.TPM_RID0x82c4TPM_RID
spi_device.TPM_CMD_ADDR0x8304TPM Command and Address buffer
spi_device.TPM_READ_FIFO0x8344TPM Read command return data FIFO.
spi_device.TPM_WRITE_FIFO0x8384TPM Write command received data FIFO.
spi_device.buffer0x10004096SPI internal buffer.

INTR_STATE

Interrupt State Register

  • Offset: 0x0
  • Reset default: 0x0
  • Reset mask: 0xfff

Fields

BitsTypeResetNameDescription
31:12Reserved
11ro0x0tpm_header_not_emptyTPM Header(Command/Address) buffer available
10rw1c0x0readbuf_flipRead buffer flipped event. The host system accesses other side of buffer.
9rw1c0x0readbuf_watermarkRead Buffer Threshold event. The host system accesses greater than or equal to the threshold of a buffer.
8rw1c0x0upload_payload_overflowUpload payload overflow event. When a SPI Host system issues a command with payload more than 256B, this event is reported. When it happens, SW should read the last written payload index CSR to figure out the starting address of the last 256B.
7rw1c0x0upload_payload_not_emptyUpload payload is not empty. The event occurs after SPI transaction completed
6rw1c0x0upload_cmdfifo_not_emptyUpload Command FIFO is not empty
5rw1c0x0generic_tx_underflowTX Async FIFO underflow
4rw1c0x0generic_rx_overflowRX Async FIFO overflow
3rw1c0x0generic_rx_errorSDI in FwMode has error
2rw1c0x0generic_tx_watermarkTX SRAM FIFO is under the level
1rw1c0x0generic_rx_watermarkRX SRAM FIFO is above the level
0rw1c0x0generic_rx_fullRX SRAM FIFO Full

INTR_ENABLE

Interrupt Enable Register

  • Offset: 0x4
  • Reset default: 0x0
  • Reset mask: 0xfff

Fields

BitsTypeResetNameDescription
31:12Reserved
11rw0x0tpm_header_not_emptyEnable interrupt when INTR_STATE.tpm_header_not_empty is set.
10rw0x0readbuf_flipEnable interrupt when INTR_STATE.readbuf_flip is set.
9rw0x0readbuf_watermarkEnable interrupt when INTR_STATE.readbuf_watermark is set.
8rw0x0upload_payload_overflowEnable interrupt when INTR_STATE.upload_payload_overflow is set.
7rw0x0upload_payload_not_emptyEnable interrupt when INTR_STATE.upload_payload_not_empty is set.
6rw0x0upload_cmdfifo_not_emptyEnable interrupt when INTR_STATE.upload_cmdfifo_not_empty is set.
5rw0x0generic_tx_underflowEnable interrupt when INTR_STATE.generic_tx_underflow is set.
4rw0x0generic_rx_overflowEnable interrupt when INTR_STATE.generic_rx_overflow is set.
3rw0x0generic_rx_errorEnable interrupt when INTR_STATE.generic_rx_error is set.
2rw0x0generic_tx_watermarkEnable interrupt when INTR_STATE.generic_tx_watermark is set.
1rw0x0generic_rx_watermarkEnable interrupt when INTR_STATE.generic_rx_watermark is set.
0rw0x0generic_rx_fullEnable interrupt when INTR_STATE.generic_rx_full is set.

INTR_TEST

Interrupt Test Register

  • Offset: 0x8
  • Reset default: 0x0
  • Reset mask: 0xfff

Fields

BitsTypeResetNameDescription
31:12Reserved
11wo0x0tpm_header_not_emptyWrite 1 to force INTR_STATE.tpm_header_not_empty to 1.
10wo0x0readbuf_flipWrite 1 to force INTR_STATE.readbuf_flip to 1.
9wo0x0readbuf_watermarkWrite 1 to force INTR_STATE.readbuf_watermark to 1.
8wo0x0upload_payload_overflowWrite 1 to force INTR_STATE.upload_payload_overflow to 1.
7wo0x0upload_payload_not_emptyWrite 1 to force INTR_STATE.upload_payload_not_empty to 1.
6wo0x0upload_cmdfifo_not_emptyWrite 1 to force INTR_STATE.upload_cmdfifo_not_empty to 1.
5wo0x0generic_tx_underflowWrite 1 to force INTR_STATE.generic_tx_underflow to 1.
4wo0x0generic_rx_overflowWrite 1 to force INTR_STATE.generic_rx_overflow to 1.
3wo0x0generic_rx_errorWrite 1 to force INTR_STATE.generic_rx_error to 1.
2wo0x0generic_tx_watermarkWrite 1 to force INTR_STATE.generic_tx_watermark to 1.
1wo0x0generic_rx_watermarkWrite 1 to force INTR_STATE.generic_rx_watermark to 1.
0wo0x0generic_rx_fullWrite 1 to force INTR_STATE.generic_rx_full to 1.

ALERT_TEST

Alert Test Register

  • Offset: 0xc
  • Reset default: 0x0
  • Reset mask: 0x1

Fields

BitsTypeResetNameDescription
31:1Reserved
0wo0x0fatal_faultWrite 1 to trigger one alert event of this kind.

CONTROL

Control register

  • Offset: 0x10
  • Reset default: 0x80000010
  • Reset mask: 0x80030031

Fields

BitsTypeResetName
31rw0x1sram_clk_en
30:18Reserved
17rw0x0rst_rxfifo
16rw0x0rst_txfifo
15:6Reserved
5:4rw0x1MODE
3:1Reserved
0rw0x0ABORT

CONTROL . sram_clk_en

SRAM Clock Enable.

This controls the clock gating cell lying on DP SRAM clock. As the nature of absent of SPI_CLK in idle state, the clock mux for SRAM B port cannot be glitch-free MUX. So, it is up to SW to change the clock safely.

Programming sequence:

  1. Check if SPI line is idle
  2. Clear sram_clk_en to 0.
  3. Change mode to FwMode for peri clk, FlashMode or PassThrough for SPI_CLK.
  4. Set sram_clk_en to 1.

CONTROL . rst_rxfifo

Reset Async RX_FIFO.

This only resets asynchronous fifo. If firmware wants to reset SRAM FIFO, it should write 0 into read pointer and write pointer.

Note: This value should be controlled only when SPI interface is in Idle state as this reset signal doesn’t have reset synchronizer.

CONTROL . rst_txfifo

Reset Async TX_FIFO.

This only resets asynchronous fifo. If firmware wants to reset SRAM FIFO, it should write 0 into read/write pointers.

Note: This value should be controlled only when SPI interface is in Idle state as this reset signal doesn’t have reset synchronizer.

CONTROL . MODE

SPI Device operation mode. Currently only FwMode is supported.

ValueNameDescription
0x0fwmodeFW operation mode. HW just dumps incoming data to SRAM and reads from SRAM and sends to SDO. This mode doesn’t support Dual or Quad mode
0x1flashmodeSPI Flash Emulation mode. In flash mode, SPI Device IP accepts SPI Flash commands and processes internally, then returns data for the read commands. HW processes the Status, JEDEC ID, SFDP commands. The current version does not support Dual/Quad IO and QPI commands.
0x2passthroughIn passthrough mode, SPI Device IP forwards the incoming SPI flash traffics to the attached downstream flash device. HW may processes commands internally and returns data. SW may configure the device to drop inadmissable commands.

Other values are reserved.

CONTROL . ABORT

Abort pending TX data in Generic mode.

If TX_FIFO (Asynchronous) is full, the TXF waits indefinitely to push the next byte into the asynchronous FIFO. SW may reset the Async FIFO along with aborting the current task. SW should update the write pointer of the TXF in order not to push the byte to Asynchronous FIFO again by TXF logic.

CFG

Configuration Register

  • Offset: 0x14
  • Reset default: 0x7f00
  • Reset mask: 0x101ff0f

Fields

BitsTypeResetName
31:25Reserved
24rw0x0mailbox_en
23:17Reserved
16rw0x0addr_4b_en
15:8rw0x7ftimer_v
7:4Reserved
3rw0x0rx_order
2rw0x0tx_order
1rw0x0CPHA
0rw0x0CPOL

CFG . mailbox_en

Mailbox enable.

If 1, in the flash and passthrough mode, the IP checks the incoming address and return from the internal Mailbox buffer if the address falls into the MAILBOX range (MAILBOX_ADDR:MAILBOX_ADDR+MAILBOX_SIZE)}.

CFG . addr_4b_en

4B Address Mode enable.

This field configures the internal module to receive 32 bits of the SPI commands. The affected commands are the SPI read commands except QPI, and program commands. It is expected for SW to configure this field at the configuration stage and leave the updation to HW until next reset.

Even though Read SFDP command has address fields, the SFDP command is not affected by this field. The command always parse 24 bits on the SPI line 0 following the SPI command as the address field.

CFG . timer_v

number of clocks for RXF to wait.

To reduce traffic to SRAM, RXF control module waits given clock cycle if it doesn’t fill SRAM data width even if Async RX FIFO is empty.

CFG . rx_order

RX bit order on SDI. Module stores bitstream from MSB to LSB if value is 0.

CFG . tx_order

TX bit order on SDO. 0 for MSB to LSB, 1 for LSB to MSB

CFG . CPHA

Data phase. 0 for negative edge change, 1 for positive edge change

CFG . CPOL

Clock polarity. 0 for normal SPI, 1 for negative edge latch

FIFO_LEVEL

RX/ TX FIFO levels.

  • Offset: 0x18
  • Reset default: 0x80
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16rw0x0txlvlTX FIFO level. If TX SRAM FIFO level drops below this value, it triggers interrupt.
15:0rw0x80rxlvlRX FIFO level. If RX SRAM FIFO level exceeds this value, it triggers interrupt.

ASYNC_FIFO_LEVEL

RX/ TX Async FIFO levels between main clk and spi clock

  • Offset: 0x1c
  • Reset default: 0x0
  • Reset mask: 0xff00ff

Fields

BitsTypeResetName
31:24Reserved
23:16roxtxlvl
15:8Reserved
7:0roxrxlvl

ASYNC_FIFO_LEVEL . txlvl

TX Async FIFO level.

This value shows the number of available entry in TX Async FIFO. If the software writes message into SRAM FIFO and update FIFO write pointer but no clock from the host is given, the data stuck at this async fifo waiting host toggles SCK. This value represents the number of bytes.

ASYNC_FIFO_LEVEL . rxlvl

RX Async FIFO level.

This value shows the number of available entry in RX Async FIFO.

STATUS

SPI Device status register

  • Offset: 0x20
  • Reset default: 0x7a
  • Reset mask: 0x7f

Fields

BitsTypeResetNameDescription
31:7Reserved
6ro0x1tpm_csbDirect input of TPM CSb
5ro0x1csbDirect input of CSb signal
4ro0x1abort_doneAbort process is completed. Current version does not implement abort_done logic. It is tied to 1 always.
3ro0x1txf_emptyTX FIFO empty
2roxtxf_fullTX FIFO full
1ro0x1rxf_emptyRX FIFO empty
0roxrxf_fullRX FIFO full

RXF_PTR

Receiver FIFO (SRAM) pointers

  • Offset: 0x24
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16ro0x0WPTRWrite pointer. Bit x is phase bit.
15:0rw0x0RPTRRead pointer. bit x is for phase bit. check circular fifo description

TXF_PTR

Transmitter FIFO (SRAM) pointers

  • Offset: 0x28
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16rw0x0WPTRWrite pointer. Bit x is phase bit.
15:0ro0x0RPTRRead pointer. bit x is for phase bit. check circular fifo description

RXF_ADDR

Receiver FIFO (SRAM) Addresses

  • Offset: 0x2c
  • Reset default: 0x1fc0000
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16rw0x1fclimitLimit offset in bytes in the SRAM. Lower 2 bits are ignored.
15:0rw0x0baseBase offset in bytes in the SRAM. Lower 2 bits are ignored.

TXF_ADDR

Transmitter FIFO (SRAM) Addresses

  • Offset: 0x30
  • Reset default: 0x3fc0200
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16rw0x3fclimitLimit offset in bytes in the SRAM. Lower 2 bits are ignored.
15:0rw0x200baseBase offset in bytes in the SRAM. Lower 2 bits are ignored.

INTERCEPT_EN

Intercept Passthrough datapath.

  • Offset: 0x34
  • Reset default: 0x0
  • Reset mask: 0xf

Fields

BitsTypeResetNameDescription
31:4Reserved
3rw0x0mbxIf set, Read Command to Mailbox region is processed internally.
2rw0x0sfdpIf set, Read SFDP is processed internally.
1rw0x0jedecIf set, Read JEDEC ID is processed internally.
0rw0x0statusIf set, Read Status is processed internally.

LAST_READ_ADDR

Last Read Address

This register shows the last address accessed by the host system. It is updated by the HW when CSb is de-asserted.

  • Offset: 0x38
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0roxaddrLast address

FLASH_STATUS

SPI Flash Status register.

This register emulates the SPI Flash Status 3, 2, 1 registers. bit [7:0] is for Status register, bit [15:8] is for Status-2 register, and bit [23:16] is for Status-3 register. It is SW responsibility to maintain this register value up to date.

The HW latches the value when SPI Flash transaction begins. Any updates during the transaction will be updated after the transaction is completed.

  • Offset: 0x3c
  • Reset default: 0x0
  • Reset mask: 0xffffff

Fields

BitsTypeResetName
31:24Reserved
23:1rwxstatus
0rw0cxbusy

FLASH_STATUS . status

Rest of the status register.

Fields other than the bit 0 (BUSY) and bit 1 (WEL) fields are SW-maintained fields. HW just reads and returns to the host system.

Bit 1 (WEL) is a SW modifiable and HW modifiable field. HW updates the WEL field when WRDI or WREN command is received.

  • [ 1]: WEL
  • [ 2]: BP0
  • [ 3]: BP1
  • [ 4]: BP2
  • [ 5]: TB
  • [ 6]: SEC
  • [ 7]: SRP0
  • [ 8]: SRP1
  • [ 9]: QE
  • [11]: LB1
  • [12]: LB2
  • [13]: LB3
  • [14]: CMP
  • [15]: SUS
  • [18]: WPS
  • [21]: DRV0
  • [22]: DRV1
  • [23]: HOLD /RST

FLASH_STATUS . busy

BUSY signal is cleared when CSb is high. SW should read back the register to confirm the value is cleared.

JEDEC_CC

JEDEC Continuation Code configuration register.

Read JEDEC ID must return the continuation code if the manufacturer ID is not shown in the first page of JEDEC table. This register controls the Continuation Code.

  • Offset: 0x40
  • Reset default: 0x7f
  • Reset mask: 0xffff

Fields

BitsTypeResetNameDescription
31:16Reserved
15:8rw0x0num_ccThe number that Continuation Code repeats
7:0rw0x7fccContinuation Code byte

JEDEC_ID

JEDEC ID register.

  • Offset: 0x44
  • Reset default: 0x0
  • Reset mask: 0xffffff

Fields

BitsTypeResetNameDescription
31:24Reserved
23:16rw0x0mfManufacturer ID
15:0rw0x0idDevice ID

READ_THRESHOLD

Read Buffer threshold register.

  • Offset: 0x48
  • Reset default: 0x0
  • Reset mask: 0x3ff

Fields

BitsTypeResetNameDescription
31:10Reserved
9:0rw0x0thresholdIf 0, disable the watermark. If non-zero, when the host access above or equal to the threshold, it reports an interrupt. The value is byte-granularity not SRAM index.

MAILBOX_ADDR

Mailbox Base address register.

The mailbox size is fixed. In this version of IP, the size is 1kB. Lower 10 bits of the Mailbox address is tied to 0.

  • Offset: 0x4c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0addrMailbox Address. Lower 10 bits are ignored

UPLOAD_STATUS

Upload module status register.

  • Offset: 0x50
  • Reset default: 0x0
  • Reset mask: 0x9f9f

Fields

BitsTypeResetNameDescription
31:16Reserved
15ro0x0addrfifo_notemptyUpload Address FIFO Not Empty
14:13Reserved
12:8ro0x0addrfifo_depthAddress FIFO Entry
7ro0x0cmdfifo_notemptyUpload Command FIFO Not Empty
6:5Reserved
4:0ro0x0cmdfifo_depthCommand FIFO Entry

UPLOAD_STATUS2

Upload module status 2 register.

This register contains payload related status. payload_depth indicates the payload size (from 0 to 256 bytes).

payload_start_idx indicates the start of the 256B. This stays 0 usually. However, when the SPI host system issues more than 256B of payload in a command, this field may not be 0. For example, if the system issues 258B payload, the payload_depth is 256 (as the IP only holds 256B of payload), the payload_start_idx is 2. SW should read from 2 to 255 then 0 and 1.

  • Offset: 0x54
  • Reset default: 0x0
  • Reset mask: 0xff01ff

Fields

BitsTypeResetNameDescription
31:24Reserved
23:16ro0x0payload_start_idxPayload Start Index
15:9Reserved
8:0ro0x0payload_depthPayload buffer depth

UPLOAD_CMDFIFO

Command Fifo Read Port.

  • Offset: 0x58
  • Reset default: 0x0
  • Reset mask: 0xff

Fields

BitsTypeResetNameDescription
31:8Reserved
7:0roxdataread data

UPLOAD_ADDRFIFO

Address Fifo Read Port.

  • Offset: 0x5c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0roxdataread data

CMD_FILTER_0

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x60
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_31If 1, command will be filtered
30rw0x0filter_30If 1, command will be filtered
29rw0x0filter_29If 1, command will be filtered
28rw0x0filter_28If 1, command will be filtered
27rw0x0filter_27If 1, command will be filtered
26rw0x0filter_26If 1, command will be filtered
25rw0x0filter_25If 1, command will be filtered
24rw0x0filter_24If 1, command will be filtered
23rw0x0filter_23If 1, command will be filtered
22rw0x0filter_22If 1, command will be filtered
21rw0x0filter_21If 1, command will be filtered
20rw0x0filter_20If 1, command will be filtered
19rw0x0filter_19If 1, command will be filtered
18rw0x0filter_18If 1, command will be filtered
17rw0x0filter_17If 1, command will be filtered
16rw0x0filter_16If 1, command will be filtered
15rw0x0filter_15If 1, command will be filtered
14rw0x0filter_14If 1, command will be filtered
13rw0x0filter_13If 1, command will be filtered
12rw0x0filter_12If 1, command will be filtered
11rw0x0filter_11If 1, command will be filtered
10rw0x0filter_10If 1, command will be filtered
9rw0x0filter_9If 1, command will be filtered
8rw0x0filter_8If 1, command will be filtered
7rw0x0filter_7If 1, command will be filtered
6rw0x0filter_6If 1, command will be filtered
5rw0x0filter_5If 1, command will be filtered
4rw0x0filter_4If 1, command will be filtered
3rw0x0filter_3If 1, command will be filtered
2rw0x0filter_2If 1, command will be filtered
1rw0x0filter_1If 1, command will be filtered
0rw0x0filter_0If 1, command will be filtered

CMD_FILTER_1

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x64
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_63For SPI_DEVICE1
30rw0x0filter_62For SPI_DEVICE1
29rw0x0filter_61For SPI_DEVICE1
28rw0x0filter_60For SPI_DEVICE1
27rw0x0filter_59For SPI_DEVICE1
26rw0x0filter_58For SPI_DEVICE1
25rw0x0filter_57For SPI_DEVICE1
24rw0x0filter_56For SPI_DEVICE1
23rw0x0filter_55For SPI_DEVICE1
22rw0x0filter_54For SPI_DEVICE1
21rw0x0filter_53For SPI_DEVICE1
20rw0x0filter_52For SPI_DEVICE1
19rw0x0filter_51For SPI_DEVICE1
18rw0x0filter_50For SPI_DEVICE1
17rw0x0filter_49For SPI_DEVICE1
16rw0x0filter_48For SPI_DEVICE1
15rw0x0filter_47For SPI_DEVICE1
14rw0x0filter_46For SPI_DEVICE1
13rw0x0filter_45For SPI_DEVICE1
12rw0x0filter_44For SPI_DEVICE1
11rw0x0filter_43For SPI_DEVICE1
10rw0x0filter_42For SPI_DEVICE1
9rw0x0filter_41For SPI_DEVICE1
8rw0x0filter_40For SPI_DEVICE1
7rw0x0filter_39For SPI_DEVICE1
6rw0x0filter_38For SPI_DEVICE1
5rw0x0filter_37For SPI_DEVICE1
4rw0x0filter_36For SPI_DEVICE1
3rw0x0filter_35For SPI_DEVICE1
2rw0x0filter_34For SPI_DEVICE1
1rw0x0filter_33For SPI_DEVICE1
0rw0x0filter_32For SPI_DEVICE1

CMD_FILTER_2

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x68
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_95For SPI_DEVICE2
30rw0x0filter_94For SPI_DEVICE2
29rw0x0filter_93For SPI_DEVICE2
28rw0x0filter_92For SPI_DEVICE2
27rw0x0filter_91For SPI_DEVICE2
26rw0x0filter_90For SPI_DEVICE2
25rw0x0filter_89For SPI_DEVICE2
24rw0x0filter_88For SPI_DEVICE2
23rw0x0filter_87For SPI_DEVICE2
22rw0x0filter_86For SPI_DEVICE2
21rw0x0filter_85For SPI_DEVICE2
20rw0x0filter_84For SPI_DEVICE2
19rw0x0filter_83For SPI_DEVICE2
18rw0x0filter_82For SPI_DEVICE2
17rw0x0filter_81For SPI_DEVICE2
16rw0x0filter_80For SPI_DEVICE2
15rw0x0filter_79For SPI_DEVICE2
14rw0x0filter_78For SPI_DEVICE2
13rw0x0filter_77For SPI_DEVICE2
12rw0x0filter_76For SPI_DEVICE2
11rw0x0filter_75For SPI_DEVICE2
10rw0x0filter_74For SPI_DEVICE2
9rw0x0filter_73For SPI_DEVICE2
8rw0x0filter_72For SPI_DEVICE2
7rw0x0filter_71For SPI_DEVICE2
6rw0x0filter_70For SPI_DEVICE2
5rw0x0filter_69For SPI_DEVICE2
4rw0x0filter_68For SPI_DEVICE2
3rw0x0filter_67For SPI_DEVICE2
2rw0x0filter_66For SPI_DEVICE2
1rw0x0filter_65For SPI_DEVICE2
0rw0x0filter_64For SPI_DEVICE2

CMD_FILTER_3

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x6c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_127For SPI_DEVICE3
30rw0x0filter_126For SPI_DEVICE3
29rw0x0filter_125For SPI_DEVICE3
28rw0x0filter_124For SPI_DEVICE3
27rw0x0filter_123For SPI_DEVICE3
26rw0x0filter_122For SPI_DEVICE3
25rw0x0filter_121For SPI_DEVICE3
24rw0x0filter_120For SPI_DEVICE3
23rw0x0filter_119For SPI_DEVICE3
22rw0x0filter_118For SPI_DEVICE3
21rw0x0filter_117For SPI_DEVICE3
20rw0x0filter_116For SPI_DEVICE3
19rw0x0filter_115For SPI_DEVICE3
18rw0x0filter_114For SPI_DEVICE3
17rw0x0filter_113For SPI_DEVICE3
16rw0x0filter_112For SPI_DEVICE3
15rw0x0filter_111For SPI_DEVICE3
14rw0x0filter_110For SPI_DEVICE3
13rw0x0filter_109For SPI_DEVICE3
12rw0x0filter_108For SPI_DEVICE3
11rw0x0filter_107For SPI_DEVICE3
10rw0x0filter_106For SPI_DEVICE3
9rw0x0filter_105For SPI_DEVICE3
8rw0x0filter_104For SPI_DEVICE3
7rw0x0filter_103For SPI_DEVICE3
6rw0x0filter_102For SPI_DEVICE3
5rw0x0filter_101For SPI_DEVICE3
4rw0x0filter_100For SPI_DEVICE3
3rw0x0filter_99For SPI_DEVICE3
2rw0x0filter_98For SPI_DEVICE3
1rw0x0filter_97For SPI_DEVICE3
0rw0x0filter_96For SPI_DEVICE3

CMD_FILTER_4

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x70
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_159For SPI_DEVICE4
30rw0x0filter_158For SPI_DEVICE4
29rw0x0filter_157For SPI_DEVICE4
28rw0x0filter_156For SPI_DEVICE4
27rw0x0filter_155For SPI_DEVICE4
26rw0x0filter_154For SPI_DEVICE4
25rw0x0filter_153For SPI_DEVICE4
24rw0x0filter_152For SPI_DEVICE4
23rw0x0filter_151For SPI_DEVICE4
22rw0x0filter_150For SPI_DEVICE4
21rw0x0filter_149For SPI_DEVICE4
20rw0x0filter_148For SPI_DEVICE4
19rw0x0filter_147For SPI_DEVICE4
18rw0x0filter_146For SPI_DEVICE4
17rw0x0filter_145For SPI_DEVICE4
16rw0x0filter_144For SPI_DEVICE4
15rw0x0filter_143For SPI_DEVICE4
14rw0x0filter_142For SPI_DEVICE4
13rw0x0filter_141For SPI_DEVICE4
12rw0x0filter_140For SPI_DEVICE4
11rw0x0filter_139For SPI_DEVICE4
10rw0x0filter_138For SPI_DEVICE4
9rw0x0filter_137For SPI_DEVICE4
8rw0x0filter_136For SPI_DEVICE4
7rw0x0filter_135For SPI_DEVICE4
6rw0x0filter_134For SPI_DEVICE4
5rw0x0filter_133For SPI_DEVICE4
4rw0x0filter_132For SPI_DEVICE4
3rw0x0filter_131For SPI_DEVICE4
2rw0x0filter_130For SPI_DEVICE4
1rw0x0filter_129For SPI_DEVICE4
0rw0x0filter_128For SPI_DEVICE4

CMD_FILTER_5

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x74
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_191For SPI_DEVICE5
30rw0x0filter_190For SPI_DEVICE5
29rw0x0filter_189For SPI_DEVICE5
28rw0x0filter_188For SPI_DEVICE5
27rw0x0filter_187For SPI_DEVICE5
26rw0x0filter_186For SPI_DEVICE5
25rw0x0filter_185For SPI_DEVICE5
24rw0x0filter_184For SPI_DEVICE5
23rw0x0filter_183For SPI_DEVICE5
22rw0x0filter_182For SPI_DEVICE5
21rw0x0filter_181For SPI_DEVICE5
20rw0x0filter_180For SPI_DEVICE5
19rw0x0filter_179For SPI_DEVICE5
18rw0x0filter_178For SPI_DEVICE5
17rw0x0filter_177For SPI_DEVICE5
16rw0x0filter_176For SPI_DEVICE5
15rw0x0filter_175For SPI_DEVICE5
14rw0x0filter_174For SPI_DEVICE5
13rw0x0filter_173For SPI_DEVICE5
12rw0x0filter_172For SPI_DEVICE5
11rw0x0filter_171For SPI_DEVICE5
10rw0x0filter_170For SPI_DEVICE5
9rw0x0filter_169For SPI_DEVICE5
8rw0x0filter_168For SPI_DEVICE5
7rw0x0filter_167For SPI_DEVICE5
6rw0x0filter_166For SPI_DEVICE5
5rw0x0filter_165For SPI_DEVICE5
4rw0x0filter_164For SPI_DEVICE5
3rw0x0filter_163For SPI_DEVICE5
2rw0x0filter_162For SPI_DEVICE5
1rw0x0filter_161For SPI_DEVICE5
0rw0x0filter_160For SPI_DEVICE5

CMD_FILTER_6

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x78
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_223For SPI_DEVICE6
30rw0x0filter_222For SPI_DEVICE6
29rw0x0filter_221For SPI_DEVICE6
28rw0x0filter_220For SPI_DEVICE6
27rw0x0filter_219For SPI_DEVICE6
26rw0x0filter_218For SPI_DEVICE6
25rw0x0filter_217For SPI_DEVICE6
24rw0x0filter_216For SPI_DEVICE6
23rw0x0filter_215For SPI_DEVICE6
22rw0x0filter_214For SPI_DEVICE6
21rw0x0filter_213For SPI_DEVICE6
20rw0x0filter_212For SPI_DEVICE6
19rw0x0filter_211For SPI_DEVICE6
18rw0x0filter_210For SPI_DEVICE6
17rw0x0filter_209For SPI_DEVICE6
16rw0x0filter_208For SPI_DEVICE6
15rw0x0filter_207For SPI_DEVICE6
14rw0x0filter_206For SPI_DEVICE6
13rw0x0filter_205For SPI_DEVICE6
12rw0x0filter_204For SPI_DEVICE6
11rw0x0filter_203For SPI_DEVICE6
10rw0x0filter_202For SPI_DEVICE6
9rw0x0filter_201For SPI_DEVICE6
8rw0x0filter_200For SPI_DEVICE6
7rw0x0filter_199For SPI_DEVICE6
6rw0x0filter_198For SPI_DEVICE6
5rw0x0filter_197For SPI_DEVICE6
4rw0x0filter_196For SPI_DEVICE6
3rw0x0filter_195For SPI_DEVICE6
2rw0x0filter_194For SPI_DEVICE6
1rw0x0filter_193For SPI_DEVICE6
0rw0x0filter_192For SPI_DEVICE6

CMD_FILTER_7

Command Filter

If a bit in this CSR is 1, then corresponding SPI command w.r.t the bit position among 256 bit is dropped in SPI Passthrough mode.

  • Offset: 0x7c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31rw0x0filter_255For SPI_DEVICE7
30rw0x0filter_254For SPI_DEVICE7
29rw0x0filter_253For SPI_DEVICE7
28rw0x0filter_252For SPI_DEVICE7
27rw0x0filter_251For SPI_DEVICE7
26rw0x0filter_250For SPI_DEVICE7
25rw0x0filter_249For SPI_DEVICE7
24rw0x0filter_248For SPI_DEVICE7
23rw0x0filter_247For SPI_DEVICE7
22rw0x0filter_246For SPI_DEVICE7
21rw0x0filter_245For SPI_DEVICE7
20rw0x0filter_244For SPI_DEVICE7
19rw0x0filter_243For SPI_DEVICE7
18rw0x0filter_242For SPI_DEVICE7
17rw0x0filter_241For SPI_DEVICE7
16rw0x0filter_240For SPI_DEVICE7
15rw0x0filter_239For SPI_DEVICE7
14rw0x0filter_238For SPI_DEVICE7
13rw0x0filter_237For SPI_DEVICE7
12rw0x0filter_236For SPI_DEVICE7
11rw0x0filter_235For SPI_DEVICE7
10rw0x0filter_234For SPI_DEVICE7
9rw0x0filter_233For SPI_DEVICE7
8rw0x0filter_232For SPI_DEVICE7
7rw0x0filter_231For SPI_DEVICE7
6rw0x0filter_230For SPI_DEVICE7
5rw0x0filter_229For SPI_DEVICE7
4rw0x0filter_228For SPI_DEVICE7
3rw0x0filter_227For SPI_DEVICE7
2rw0x0filter_226For SPI_DEVICE7
1rw0x0filter_225For SPI_DEVICE7
0rw0x0filter_224For SPI_DEVICE7

ADDR_SWAP_MASK

Address Swap Mask register.

This register is used in the SPI passthrough mode. If any of bits in this register is set, the corresponding address bit in the SPI Read commands is replaced with the data from ADDR_SWAP_DATA.

If 3B address mode is active, upper 8bit [31:24] is ignored.

  • Offset: 0x80
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0maskWhen a bit is 1, the SPI read address to the downstream SPI Flash device is swapped to ADDR_SWAP_DATA.

ADDR_SWAP_DATA

The address value for the address swap feature.

  • Offset: 0x84
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0dataDesired value to be swapped for the SPI read commands.

PAYLOAD_SWAP_MASK

Write Data Swap in the passthrough mode.

PAYLOAD_SWAP_MASK CSR provides the SW to change certain bits in the first 4 bytes of the write payload in the passthrough mode.

  • Offset: 0x88
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0maskbyte mask

PAYLOAD_SWAP_DATA

Write Data Swap in the passthrough mode.

PAYLOAD_SWAP_DATA combined with PAYLOAD_SWAP_MASK provides the SW to change certain bits in the first 4 bytes of the write payload in the passthrough mode.

The register should be written in Little-Endian order. [7:0] bits are processed in the first received payload byte. [31:24] bits for the 4th byte.

  • Offset: 0x8c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0datareplaced data

CMD_INFO

Command Info register.

  • Reset default: 0x7000
  • Reset mask: 0x833fffff

Instances

NameOffset
CMD_INFO_00x90
CMD_INFO_10x94
CMD_INFO_20x98
CMD_INFO_30x9c
CMD_INFO_40xa0
CMD_INFO_50xa4
CMD_INFO_60xa8
CMD_INFO_70xac
CMD_INFO_80xb0
CMD_INFO_90xb4
CMD_INFO_100xb8
CMD_INFO_110xbc
CMD_INFO_120xc0
CMD_INFO_130xc4
CMD_INFO_140xc8
CMD_INFO_150xcc
CMD_INFO_160xd0
CMD_INFO_170xd4
CMD_INFO_180xd8
CMD_INFO_190xdc
CMD_INFO_200xe0
CMD_INFO_210xe4
CMD_INFO_220xe8
CMD_INFO_230xec

Fields

BitsTypeResetName
31rw0x0valid
30:26Reserved
25rw0x0busy
24rw0x0upload
23:22Reserved
21rw0x0payload_swap_en
20rw0x0payload_dir
19:16rw0x0payload_en
15rw0x0dummy_en
14:12rw0x7dummy_size
11rw0x0mbyte_en
10rw0x0addr_swap_en
9:8rw0x0addr_mode
7:0rw0x0opcode

CMD_INFO . valid

Set to 1 if the config in the register is valid

CMD_INFO . busy

Set to 1 to set the BUSY bit in the FLASH_STATUS when the command is received. This bit is active only when upload bit is set.

CMD_INFO . upload

Set to 1 to upload the command.

If upload field in the command info entry is set, the cmdparse activates the upload submodule when the opcode is received. addr_en, addr_4B_affected, and addr_4b_forced (TBD) affect the upload functionality. The three address related configs defines the command address field size.

The logic assumes the following SPI input stream as payload, which max size is 256B. If the command exceeds the maximum payload size 256B, the logic wraps the payload and overwrites.

CMD_INFO . payload_swap_en

Swap the first byte of the write payload.

If payload_swap_en is set, the passthrough logic swaps the first byte of the write payload with DATA_SWAP CSR.

payload_swap_en only works with write data and SingleIO mode. payload_en must be 4’b 0001 and paylod_dir to be PayloadIn.

CMD_INFO . payload_dir

Set to 1 if the command returns data. If 0, the payload sends to the downstream Flash device.

ValueNameDescription
0x0PayloadInFrom host to the downstream flash device
0x1PayloadOutFrom the downstream flash device to the host

CMD_INFO . payload_en

Payload Enable per SPI lane.

Set to non-zero if the command has payload at the end of the protocol. This field has four bits. Each bit represents the SPI line. If a command is a Single IO command and returns data to the host system, the data is returned on the MISO line (IO[1]). In this case, SW sets payload_en to 4’b 0010.

CMD_INFO . dummy_en

Set to 1 if the command has a dummy cycle following the address field.

CMD_INFO . dummy_size

The number of dummy cycles -1 for the command

CMD_INFO . mbyte_en

If 1, the command has a MByte field following the address field. This is set to 1 for DualIO, QuadIO commands.

CMD_INFO . addr_swap_en

This field is used in the passthrough logic. If this field is set to 1, the address in the passthrough command is replaced to the preconfigured value.

CMD_INFO . addr_mode

Command address mode

A command can have four modes:

  • 0: Command does not have an address field
  • 1: CFG.addr_4b_en decides the address size (3B/4B)
  • 2: Address size is always 3B regardless of CFG.addr_4b_en
  • 3: Address size is always 4B regardless of CFG.addr_4b_en
ValueNameDescription
0x0AddrDisabledAddress field does not exist
0x1AddrCfgCFG.addr_4b_en determines the address size
0x2Addr3BAddress size in the command is always 3B.
0x3Addr4BAddress size in the command is always 4B.

CMD_INFO . opcode

Command Opcode

CMD_INFO_EN4B

Opcode for EN4B.

If the register is active, it affects in flash / passthrough modes.

  • Offset: 0xf0
  • Reset default: 0x0
  • Reset mask: 0x800000ff

Fields

BitsTypeResetNameDescription
31rw0x0validIf 1, Opcode affects
30:8Reserved
7:0rw0x0opcodeEN4B opcode

CMD_INFO_EX4B

Opcode for EX4B

  • Offset: 0xf4
  • Reset default: 0x0
  • Reset mask: 0x800000ff

Fields

BitsTypeResetNameDescription
31rw0x0validIf 1, Opcode affects
30:8Reserved
7:0rw0x0opcodeEX4B opcode

CMD_INFO_WREN

Opcode for Write Enable (WREN)

  • Offset: 0xf8
  • Reset default: 0x0
  • Reset mask: 0x800000ff

Fields

BitsTypeResetNameDescription
31rw0x0validIf 1, opcode affects
30:8Reserved
7:0rw0x0opcodeWREN opcode

CMD_INFO_WRDI

Opcode for Write Disable (WRDI)

  • Offset: 0xfc
  • Reset default: 0x0
  • Reset mask: 0x800000ff

Fields

BitsTypeResetNameDescription
31rw0x0validIf 1, opcode affects
30:8Reserved
7:0rw0x0opcodeWRDI opcode

TPM_CAP

TPM HWIP Capability register.

This register shows the features the current TPM HWIP supports.

  • Offset: 0x800
  • Reset default: 0x660100
  • Reset mask: 0x7701ff

Fields

BitsTypeResetName
31:23Reserved
22:20ro0x6max_rd_size
19Reserved
18:16ro0x6max_wr_size
15:9Reserved
8ro0x1locality
7:0ro0x0rev

TPM_CAP . max_rd_size

The maximum read size in bytes the TPM submodule supports. The value is the exponent of the 2.

  • 3’b 010: Support up to 4B
  • 3’b 011: Support up to 8B
  • 3’b 100: Support up to 16B
  • 3’b 101: Support up to 32B
  • 3’b 110: Support up to 64B

All other values are reserved.

It is not recommended for SW to advertise TPM supporting more than max_rd_size to the South Bridge.

TPM_CAP . max_wr_size

The maximum write size in bytes the TPM submodule supports. The value is the exponent of the 2.

  • 3’b 010: Support up to 4B
  • 3’b 011: Support up to 8B
  • 3’b 100: Support up to 16B
  • 3’b 101: Support up to 32B
  • 3’b 110: Support up to 64B

All other values are reserved.

It is not recommended for SW to advertise TPM supporting more than max_wr_size to the South Bridge.

TPM_CAP . locality

If 1, the TPM submodule supports 5 Locality. If 0, only one Locality is provided

TPM_CAP . rev

Revision of the TPM submodule

TPM_CFG

TPM Configuration register.

  • Offset: 0x804
  • Reset default: 0x0
  • Reset mask: 0x1f

Fields

BitsTypeResetName
31:5Reserved
4rw0x0invalid_locality
3rw0x0tpm_reg_chk_dis
2rw0x0hw_reg_dis
1rw0x0tpm_mode
0rw0x0en

TPM_CFG . invalid_locality

If 1, TPM submodule returns the invalid data (0xFF) for the out of the max Locality request. If it is a write request, HW still uploads the command and address. SW needs to process the incoming invalid command.

If 0, TPM submodule uploads the TPM command and address. The SW may write 0xFF to the read FIFO.

Note: The TPM submodule uploads the TPM commands that do not fall into the FIFO registers (0xD4_XXXX) regardless of invalid_locality bit.

TPM_CFG . tpm_reg_chk_dis

If 1, the logic does not compare the upper 8 bit of the received address with the TpmAddr constant, D4h.

If this field is 0, the HW uploads the command, address, and write payload to the buffers in case of address that is not 0xD4_XXXX.

TPM_CFG . hw_reg_dis

If 0, TPM submodule directly returns the return-by-HW registers for the read requests.

If 1, TPM submodule uploads the TPM command regardless of the address, and the SW may return the value through the read FIFO.

TPM_CFG . tpm_mode

Configure the TPM mode. 1 for CRB, 0 for FIFO.

If the SW set this field to 1, the HW logic always pushes the command/addr and write data to buffers. The logic does not compare the incoming address to the list of managed-by-HW register addresses.

The invalid locality check still runs based on the invalid_locality configuration.

TPM_CFG . en

If 1, TPM submodule accepts the transactions over SPI

TPM_STATUS

TPM submodule state register.

The TPM_STATUS CSR provides the current TPM status, mostly the buffer and FIFO status.

  • Offset: 0x808
  • Reset default: 0x0
  • Reset mask: 0x7f0001

Fields

BitsTypeResetNameDescription
31:23Reserved
22:16ro0x0wrfifo_depthThis field represents the current write FIFO depth.
15:1Reserved
0ro0x0cmdaddr_notemptyIf 1, the TPM_CMD_ADDR has a valid data. This status is reported via the interrupt also.

TPM_ACCESS_0

TPM_ACCESS_x register.

  • Offset: 0x80c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:24rw0x0access_3TPM_ACCESS
23:16rw0x0access_2TPM_ACCESS
15:8rw0x0access_1TPM_ACCESS
7:0rw0x0access_0TPM_ACCESS

TPM_ACCESS_1

TPM_ACCESS_x register.

  • Offset: 0x810
  • Reset default: 0x0
  • Reset mask: 0xff

Fields

BitsTypeResetNameDescription
31:8Reserved
7:0rw0x0access_4For TPM1

TPM_STS

TPM_STS_x register.

The register is mirrored to all Localities. The value is returned to the host system only when the activeLocality in the TPM_ACCESS_x is matched to the current received Locality.

  • Offset: 0x814
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0stsTPM_STS_x

TPM_INTF_CAPABILITY

TPM_INTF_CAPABILITY

  • Offset: 0x818
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0intf_capabilityTPM_INTF_CAPABILITY

TPM_INT_ENABLE

TPM_INT_ENABLE

  • Offset: 0x81c
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0int_enableTPM_INT_ENABLE

TPM_INT_VECTOR

TPM_INT_VECTOR

  • Offset: 0x820
  • Reset default: 0x0
  • Reset mask: 0xff

Fields

BitsTypeResetNameDescription
31:8Reserved
7:0rw0x0int_vectorTPM_INT_VECTOR

TPM_INT_STATUS

TPM_INT_STATUS

  • Offset: 0x824
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0rw0x0int_statusTPM_INT_STATUS

TPM_DID_VID

TPM_DID/ TPM_VID register

  • Offset: 0x828
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:16rw0x0didTPM_DID
15:0rw0x0vidTPM_VID

TPM_RID

TPM_RID

  • Offset: 0x82c
  • Reset default: 0x0
  • Reset mask: 0xff

Fields

BitsTypeResetNameDescription
31:8Reserved
7:0rw0x0ridTPM_RID

TPM_CMD_ADDR

TPM Command and Address buffer

The SW may get the received TPM command and address by readin gthis CSR.

  • Offset: 0x830
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:24roxcmdreceived command
23:0roxaddrreceived address

TPM_READ_FIFO

TPM Read command return data FIFO.

The write port of the read command FIFO.

  • Offset: 0x834
  • Reset default: 0x0
  • Reset mask: 0xffffffff

Fields

BitsTypeResetNameDescription
31:0woxvaluewrite port of the read FIFO

TPM_WRITE_FIFO

TPM Write command received data FIFO.

  • Offset: 0x838
  • Reset default: 0x0
  • Reset mask: 0xff

Fields

BitsTypeResetNameDescription
31:8Reserved
7:0roxvalueRead only port of the write FIFO

buffer

SPI internal buffer.

In Generic mode, this buffer is used for RX/TX buffer. In Flash & Passthrough mode, lower 2kB is for Read content emulating eFlash. next 1kB is for Mailbox read/write buffer. The rest is 256B SFDP buffer, 32B of CmdFIFO, 32B of AddrFIFO, and 256B of payload FIFO.

  • Word Aligned Offset Range: 0x1000to0x1ffc
  • Size (words): 1024
  • Access: rw
  • Byte writes are not supported.