跳到主要内容

14.9 eSPI

14.9.1 Overview

The eSPI v1.0 specification was released by Intel in 2016 to replace the LPC interface, reducing pin count and power consumption. It is widely used in Embedded Controllers (EC), Baseboard Management Controllers (BMC), Super I/O (SIO), and Port-80 debug cards.

eSPI adopts the electrical characteristics of the SPI bus and redefines the protocol layer. Compared with LPC, eSPI offers the following advantages:

  1. Significantly reduced pin count by converting LPC/SMBus/Sideband signals into in-band communication;
  2. Support for multiple operating frequencies (20 / 25 / 33 / 50 / 66 MHz), providing higher bandwidth;
  3. Operates at a 1.8 V I/O voltage;

eSPI defines four channel types:

  1. Channel 0: Peripheral Channel Provides communication between the eSPI Host and Endpoint, supporting I/O and memory access;

  2. Channel 1: Virtual Wires Channel Carries GPIO and IRQ signals, with the highest priority;

  3. Channel 2: OOB Message Channel Used for SMBus message transport;

  4. Channel 3: Flash Access Channel Enables Flash access for eSPI slave devices such as ECs and BMCs;

Each channel defines dedicated 8-bit opcodes. In addition, common opcodes independent of channel include GET_STATUS, SET_CONFIGURATION, GET_CONFIGURATION, and RESET.

14.9.2 Features

14.9.2.1 Basic

  • Compliant with Enhanced Serial Peripheral Interface (eSPI) v1.0 (2016)
  • Supports Peripheral, OOB, Virtual Wires, and Flash Access channels
  • Clock and reset:
    • mclk (IP core clock, AXI clock) with asynchronous reset mresetn
    • sclk (eSPI interface clock) with interface logic reset sresetn
  • APB3 slave interface: 32-bit address, 32-bit data width; used for controller register configuration and for initiating Peripheral / VW / OOB / Flash transactions (default: 0x2F84_8000 ~ 0x2F84_8100); operates synchronous to or divided from mclk
  • AXI4 slave interface: 32-bit address, 32-bit data width; supports up to burst length of 16, byte write, non-burst byte read, and word-aligned burst read; used to initiate direct PR channel read/write transactions to the slave
  • AXI3 master interface: 64-bit address, 32-bit data width; supports up to burst length of 16 and byte write; used for PR channel transactions initiated by the slave
  • Supports 1x / 2x / 4x eSPI I/O modes
  • Supports 20 / 25 / 33 / 50 / 66 MHz operating frequencies
  • Supports up to one slave device (SLAVE0)
  • Supports automatic CRC insertion and CRC checking; CRC checking can be disabled via CRC_CHECK_EN (0x68, SLAVE0_CONFIG)
  • Provides two aggregated interrupt outputs: controller status/error interrupt and VW interrupt; interrupt sources are identified via status registers
  • Supports watchdog and software reset (sw_rst) to prevent bus stall when the slave does not respond to PR read transactions initiated via the AXI4 slave interface
  • Supports automatic clock gating on the master interface to reduce idle power consumption
  • Allows software override of the internal slave status for debugging
  • Provides a register-mapped RESET# signal for eSPI slave reset

14.9.2.2 PR Channel

  • Provides a software-transparent mechanism for direct slave read/write access via the AXI slave interface

  • Translates AXI slave requests on the eSPI master side into eSPI PR read/write operations, and converts eSPI slave requests into AXI master read/write transactions, simplifying PR channel operation

  • TX and RX data are stored in separate FIFOs (32-bit × 16 entries each)

  • Two address regions are defined for PR memory accesses:

    • Default: 0x2200_0000–0x2300_0000 (16 MB), cacheable
    • Default: 0x2300_0000–0x2400_0000 (16 MB), cacheable
  • One address region is defined for PR I/O accesses:

    • Default: 0x2000_0000–0x2001_0000 (64 KB), device type
  • PR channel message transactions are initiated and received via register operations, using a dedicated 32-byte FIFO

  • PR_MAX_SIZE = 64 B; PR transactions initiated by the master or slave must not cross a 64B boundary

  • By configuring PR_BASE_ADDR_MEM_0 (0x38) and PR_BASE_ADDR_MEM_1 (0x3C), full 32-bit memory address space access to the slave is supported, along with direct access to the 16-bit I/O space. Address formation is as follows:

    • Memory: PR_BASE_ADDR_MEM_0[31:24] + aw/araddr[23:0]
    • Memory: PR_BASE_ADDR_MEM_1[31:24] + aw/araddr[23:0]
    • I/O: aw/araddr[15:0]
  • Supports PR access prior to initialization with automatic response, preventing bus stall

14.9.2.3 VW Channel

  • Supports VW interrupts 0–23
  • Provides a dedicated interrupt output (vw_intr), separate from controller-related interrupts (con_intr)
  • Supports up to 16-bit GPIO, organized into 4 groups mapped to 4 indices; configurable mapping between GPIO groups and VW channel indices
  • Maximum transfer count per VW transaction is 16
  • Supports interrupt and GPIO control of the slave via register configuration
  • Supports automatic update of interrupt and GPIO status
  • Supports system events for index 2–7, with corresponding interrupt generation
  • Each interrupt has an independent status register and supports interrupt masking and polarity configuration

14.9.2.4 OOB Channel

  • OOB requests are handled via CPU intervention with interrupt-driven processing
  • Maximum payload size per OOB transaction is 128 bytes
  • PUT_OOB transactions are initiated via register configuration to send data to the slave
  • Data from the slave is received via interrupt and register reads (FIFO shared with the Flash channel)
    • To prevent data overwrite, hardware flow control is implemented:
      • UP_RXHDR_0[3] serves as a valid flag
      • When valid == 1, no new Flash or OOB requests are accepted
      • Software must clear the valid flag after data is read

14.9.2.5 Flash Access Channel

  • Flash Access requests are handled via CPU intervention with interrupt-driven processing
  • Maximum payload size per Flash Access transaction is 128 bytes
  • PUT_FLASH_C transactions are issued via register configuration to send completion responses to the slave

14.9.2.6 Unsupported Features

  • Direct Flash access by the slave without CPU involvement in a chipset architecture is not supported
  • Shared Flash between CPU and EC/BMC connected as Slave Attached (as defined in the Addendum for Server Platforms, e.g., PUT_FLASH_NP / GET_FLASH_C) is not supported, as it does not align with the SoC architecture
  • Split transactions on the eSPI interface are not supported
    • If addr[5:0] + length > 0x40 (crossing a 64-byte boundary), an invalid length interrupt is generated, and an unsuccessful completion is returned to the slave
    • Slave-initiated transactions must not cross a 64-byte boundary; requests must be split if necessary
  • Non-word-aligned burst reads on the AXI slave interface are not supported
  • Modifier completion response encoding is not supported, except for P1P0 = 2'b11

14.9.3 Functional Description

14.9.3.1 Interface Signals

NameI/ODescription
Serial ClockOThis pin provides the reference timing for all the serial input and output operations
Chip Select#ODriving Chip Select# low selects a particular eSPI slave for the transaction
I/O[3:0]I/OThese are bi-directional input/output pins used to transfer data between master and slaves.
Alert#IThis pin is used by the eSPI Slave to request service from the eSPI Master.
Alert# is either a driven or an open-drain output from the Slave, with the default being a driven output.
Reset#OResets the eSPI interface for both Master and Slave devices

14.9.3.2 Bus Protocol

eSPI transfers consist of three phases: Command Phase, Turn-around Phase, and Response Phase.

Command Phase

In the Command Phase, CMD is an 8-bit opcode that indicates the transfer type (Get/Put) and the associated channel. Each channel defines its own opcodes, as shown below:

PR channel

  • PUT_IORD_SHORT, PUT_IOWR_SHORT: Master-initiated I/O short read/write
  • PUT_MEMRD32_SHORT, PUT_MEMWR32_SHORT: Master-initiated memory short read/write

VW channel

  • PUT_VWIRE: Master configures GPIO or IRQ
  • GET_VWIRE: Master reads GPIO or IRQ status

OOB channel

  • PUT_OOB: Master sends OOB messages
  • GET_OOB: Master retrieves OOB requests

Flash Access channel

  • PUT_FLASH_C: Master sends completion to the slave
  • GET_FLASH_NP: Master retrieves flash requests initiated by the slave

Public

  • GET_STATUS: Retrieves slave queue status
  • SET_CONFIGURATION: Configures the slave
  • GET_CONFIGURATION: Reads slave configuration
  • RESET: In-band reset

HDR is the packet header that describes the transfer. The presence of the HDR and DATA phases depends on the opcode. The HDR typically includes: Cycle Type, TAG, Length, and Address.

For master-initiated transfers, the opcode together with the HDR defines the transfer type. For slave-initiated requests, the master determines the request details via the corresponding channel GET operation and the HDR in the response.

Turn-around Phase

The Turn-around Phase consists of two clock cycles. After transmitting the last bit on the data lines, the host drives all data lines high for one cycle, followed by one cycle in a tri-state condition.

If the slave is ready, it returns data in the next cycle; otherwise, WAIT_STATE, DEFER, or ERROR is inserted.

Response Phase

The eSPI specification defines the opcodes for response transactions.

  • Normal response: Response Modifier = 2'b00
  • NO_RESPONSE: Response Modifier = 2'b11 (default pull-up)

When the Response Modifier Enable bit in the Slave device's General Capabilities and Configuration register is set via the SET_CONFIGURATION command, the Response Modifier field in GET_STATUS indicates the completion channel, as shown below:

Response Code

When the Response Modifier feature is enabled, R1R0 indicates the channel associated with the completion.

RESPONSEEncoding
[7:6]
Encoding
[5:4]
Encoding
[3:0]
Description
ACCEPTR₁R₀¹RSV1000Command was successfully received.

If the command was a PUT_NP, a response of ACCEPT means that the non-posted transaction is being completed as a “connected” transaction.
DEFER00RSV0001Only valid in response to a PUT_NP. A non-posted command was successfully received, and completing the non-posted transaction is deferred to a future split completion.
NON_FATAL_ERROR00RSV0010The received command had an error with non-fatal severity. The error does not affect the ability to process the received command.
FATAL_ERROR00RSV0011The received command had a fatal error that prevented the transaction layer packet from being successfully processed. Fatal errors include malformed transactions, Put without Free, Get without Avail, etc.
WAIT_STATE00RSV1111Adds one byte-time of delay when responding to a transaction on the bus.
NO_RESPONSE11111111The response encoding of all 1’s is defined as no response. It is the default response to the GET_CONFIGURATION when no slave is present (as a result of weak pull-up on the data lines).

It is also the default response when:
• Fatal CRC error is detected on the command packet,
• Command opcode is not supported,
• The slave must not drive the response phase.

Alert Phase

The Alert Phase is driven by the Slave and is used to request service from the Host. After detecting Alert asserted low, the Host automatically sends a GET_STATUS command to obtain Slave request events and performs the corresponding operation according to the request type.

The Slave generates an Alert event in the following cases:

  1. A new request is pending, including transfer completion, a Virtual Wires message, an OOB message, or a Flash Access request;
  2. Space remains in the Slave buffer.

Status Phase

Each Alert event of the Slave corresponds to one STATUS bit. When STATUS changes, an Alert event is triggered. Each Response returned by the Slave carries STS at the end for status synchronization between the Master and the Slave.

Among the status bits:

  • Avail: indicates that the corresponding Channel request is pending on the Slave side;
  • Free: indicates that the corresponding Channel transfer from the Master can be accepted;

Status synchronization between the Master and the Slave is performed in the following two ways:

  1. For each Command initiated by the Master, the corresponding Response carries the current Status at the end;
  2. When Slave status changes, the Slave notifies the Master by asserting Alert low, and the Master automatically sends GET_STATUS to obtain the status.

Wait State Phase

After TAR, the slave may insert WAIT_STATE cycles. The maximum number of WAIT_STATE cycles is defined in the master registers, and the slave must not exceed this limit. In non-posted transactions, transfers that would otherwise return DEFER may return data directly after WAIT_STATE insertion.

WAIT_STATE is 1 byte of data, corresponding to the following cycle counts:

  • 1x mode: 8 cycles
  • 2x mode: 4 cycles
  • 4x mode: 2 cycles

Posted and Non-Posted Transfers

After the Master initiates a non-posted request, the Slave may respond immediately or return Defer. After the data on the Slave side is ready, the Slave notifies the Master through Alert. The Master queries the Alert event through GET_STATUS, determines that the corresponding Channel avail is asserted, and then issues a GET command to retrieve the data.

For posted requests, Response supports only ACCEPT / FATAL ERROR / NON-FATAL ERROR.

Transfer type summary:

  • PR Channel:
    • Normal write is Posted
    • Normal read is Non-Posted
    • Message transfer is Posted
  • Flash Access Channel: all transfers are Non-Posted
  • OOB Channel: all transfers are Posted

14.9.3.3 Transport-Layer Protocol

This section mainly describes HDR and DATA in the Common Phase.

PR channel

  • Cycle Type: 8 bits; indicates the operation type (CMD and Cycle Type together fully define the target channel and operation)
  • Tag: 4 bits; similar to AXI ID, supporting up to 16 outstanding non-posted requests. Completions with the same Tag within the same channel must be returned in order; no ordering is required across different Tags or channels
  • Length: in bytes; a value of 0 indicates 4 KB. For read/write operations, Length specifies the data size. For Completion Without Data or Unsuccessful Completion, Length must be driven as 0 by the initiator. For some operations, Length is encoded within the opcode and no separate Length field is present
  • Address: field length depends on the Cycle Type
  • Data: length depends on the Cycle Type and Length

VW channel

Used for transmission of sideband signals such as IRQ and GPIO.

The counter field in the packet header is 6 bits and indicates the number of Virtual Wire Groups in the current VW channel transaction (each group corresponds to one IRQ or GPIO, up to 64).

Each group’s data field contains an index and data value, where the index identifies the target GPIO or IRQ, and the data represents the associated event. Edge detection is supported, allowing operations on the same interrupt ID with different signal levels within a single VW transaction.

Notes:

  • index 0-1 correspond to IRQ 0-127 and IRQ 128-255, respectively. The specific level and interrupt number are transmitted in data.
  • index 2-7 are System Events defined by the specification and correspond to a series of system events.
  • index 8-63 are Reserved.
  • index 64-127 are Platform-defined events.
  • index 128-255 correspond to GPIO.

In the interrupt service routine, the Master-side Controller shall clear the Slave-side interrupt status through the VW Channel, then issue GET_VW to obtain the interrupt status and update the interrupt status.

OOB channel

Based on the SMBUS protocol. The packet format is basically the same as that of PR Channel, but all transfers are Posted type.

Flash Access channel

Initiated by the Slave side through Alert. The Controller obtains the operation type (Write/Read/Erase) and address through GET_STATUS or GET_FLASH_NP. After the operation is completed, the Controller returns Completion and corresponding data through PUT_FLASH_C.

14.9.4 Register List

14.9.4.1 Attribute Description

AttributeDescription
RRead-only register field
WWrite-only register field
R/WRead/Write register field
R/W1CRead/Write 1 to clear
RC/W1CRead to clear/Write 1 to clear

14.9.4.2 Register List

OffsetRegisterNameDescription
0x0DN_TXHDR_0Downstream HDR 0
0x4DN_TXHDR_1Downstream HDR 1
0x8DN_TXHDR_2Downstream HDR 2
0xCDN_TXDATA_PORTDownstream TX FIFO
0x10UP_RXHDR_0Upstream HDR 0
0x14UP_RXHDR_1Upstream HDR 1
0x18UP_RXDATA_PORTUpstream RX FIFO
0x2CMASTER_CAPeSPI controller capabilities register
0x30GLOBAL_CONTROL_0Global control register 0
0x34GLOBAL_CONTROL_1Global control register 1
0x38PR_BASE_ADDR_MEM_0PR channel memory access base addr(0~16MB)
0x3CPR_BASE_ADDR_MEM_1PR channel memory access base addr(16~32MB)
0x44SLAVE0_STS_SHADOWSlave 0 status shadow access
0x68SLAVE0_CONFIGSlave 0 related configuration register
0x6CSLAVE0_INT_ENSlave 0 interrupt enable register
0x70SLAVE0_INT_STSSlave 0 interrupt status register
0x74SLAVE0_RXMSG_HDR0RX message HDR 0
0x78SLAVE0_RXMSG_HDR1RX message HDR 1
0x7CSLAVE0_RXMSG_DATA_PORTRX message FIFO
0x98SLAVE0_RXVW_STSRX VW status
0x9CSLAVE0_RXVWRX VW status & select
0xA0SLAVE0_RXVW_DATARX VW GPIO group data
0xA4SLAVE0_RXVW_INDEXRX VW mapping between GPIO with VW index
0xA8SLAVE0_VW_CTLSlave 0 Virtual Wire control register
0xACSLAVE0_VW_POLARITYSlave 0 Virtual Wire interrupt polarity register
0xB0SLAVE0_M2S_STSSlave 0 M2S hardware event status
0xB4SLAVE0_M2S_MASKSlave 0 M2S hardware event mask
0xB8SLAVE0_S2M_MASKSlave 0 S2M hardware event mask

14.9.4.3 Register Description

DN_TXHDR_0(0x0)

BitsNameR/WDefaultDescription
31:24DNCMD_HDATA2R/W0x0
23:16DNCMD_HDATA1R/W0x0Note: In Get/Set Configuration, [15:8] is deprecated; use [31:16] as the address.
15:8DNCMD_HDATA0R/W0x0Defined by DNCMD_TYPE:
3'b000: Set Configuration, with 6B data (16-bit address + 32-bit data).
3'b001: Get Configuration, with 2B data (16-bit address).
3'b010: In-Band Reset, with no additional data. Note: After issuing In-Band Reset, wait for the DNCMD_INT interrupt before continuing transmission; after execution, resend Get/Set Configuration to reacquire or reconfigure the Slave; In-Band Reset also resets the internal Slave0-related registers of the Controller.
3'b100: PUT_PC, with 7B data (1B Cycle Type + 1B Tag/Length + 1B Length + 4B Address); subsequent data is provided by the FIFO.
3'b101: PUT_VW, with 1B data as the VW Count (6-bit, maximum 64); the VW Index and Data are provided by the FIFO.
3'b110: PUT_OOB, with 6B data (1B Cycle Type + 1B Tag/Length + 1B Length + 1B SMBUS Slave Address + 1B SMBUS CMD Opcode + 1B SMBUS Byte Count); subsequent data is provided by the FIFO.
3'b111: PUT_FLASH_C, with 3B data (1B Cycle Type + 1B Tag/Length + 1B Length); Flash Access Completion and data are returned to the Slave, and subsequent data is provided by the FIFO.
7:6RESERVEDR/W0x0Reserved
5:4DN_TXHDR_0_SLAVE_SELR/W0x0Slave Select. Currently, only 2'b00 is supported, which selects Slave0.
3DNCMD_ENR/W0x0Set to 1 to start transmission; cleared automatically upon completion.
2:0DNCMD_TYPER/W0x0Selects the CMD type transmitted by TX:
3'b000: Set Configuration
3'b001: Get Configuration
3'b010: In-Band Reset
3'b100: PR Message
3'b101: PUT_VW
3'b110: PUT_OOB
3'b111: PUT_FLASH_C

DN_TXHDR_1(0x4)

BitsNameR/WdefaultDescription
31:24DNCMD_HDATA6R/W0x0See the description of DN_TXHDR_0[15:8].
Note: Data returned by get_configuration is obtained from this register.
23:16DNCMD_HDATA5R/W0x0See the description of DN_TXHDR_0[15:8].
15:8DNCMD_HDATA4R/W0x0See the description of DN_TXHDR_0[15:8].
7:0DNCMD_HDATA3R/W0x0See the description of DN_TXHDR_0[15:8].

DN_TXHDR_2(0x8)

BitsNameR/WdefaultDescription
31:8RESERVEDR0x0See the description of DN_TXHDR_0[15:8].
7:0DNCMD_HDATA7R/W0x0See the description of DN_TXHDR_0[15:8].

DN_TXDATA_PORT(0xC)

BitsNameR/WdefaultDescription
31:0DN_TXDATAR/W0x0Downstream TX FIFO, maximum length 128.

UP_RXHDR_0(0x10)

BitsNameR/WdefaultDescription
31:24UPCMD_HDATA2R0x0See the description of DN_TXHDR_0[15:8].
23:16UPCMD_HDATA1R0x0See the description of DN_TXHDR_0[15:8].
15:8UPCMD_HDATA0R0x0See the description of DN_TXHDR_0[15:8].
7:0UPCMD_HDATA3R0x0See the description of DN_TXHDR_0[15:8].

UP_RXHDR_1(0x14)

BitsNameR/WdefaultDescription
31:24UPCMD_HDATA6R0x0See the description of DN_TXHDR_0[15:8].
23:16UPCMD_HDATA5R0x0
15:8UPCMD_HDATA4R0x0
7:0UPCMD_HDATA3R0x0

UP_RXDATA_PORT(0x18)

BitsNameR/WdefaultDescription
31:0UP_RXDATAR0x0Upstream RX FIFO.
Maximum length: 128.

MASTER_CAP(0x2C)

BitsNameR/WdefaultDescription
31CRC_CHECK_SUPPORTR0x1CRC check supported.
30ALERT_MODE_SUPPORTR0x1Alert mode supports eSPI_Din[1] and eSPI_Slv0_AlertB inputs.
29:28IO_MODE_SUPPORTR0x2IO modes 1x/2x/4x are supported.
27:25CLK_FREQ_SUPPORTR0x7Supports 20 MHz / 25 MHz / 33 MHz / 50 MHz / 66 MHz.
24:22SLAVE_NUMR0x1Supports up to 1 Slave.
21:19PR_MAX_SIZER0x1Maximum supported PR transaction size is 64 bytes.
18:13VW_MAX_SIZER0xFMaximum supported number of VW operations is 16.
12:10OOB_MAX_SIZER0x2Maximum supported OOB transaction size is 128 bytes.
9:7FLASH_MAX_SIZER0x2Maximum supported Flash transaction size is 128 bytes.
6:4ESPI_VERSIONR0x1Supports the eSPI v1.0 standard.
3PR_SUPPORTR0x1Peripheral channel supported.
2VW_SUPPORTR0x1Virtual Wire channel supported.
1OOB_SUPPORTR0x1OOB channel supported.
0FLASH_SUPPORTR0x1Flash Access channel supported.

GLOBAL_CONTROL_0(0x30)

BitsNameR/WdefaultDescription
31:30RESERVEDR0x0reserved
29:24WAIT_CNTR/W0x0Wait-count value, indicating the maximum number of WAIT_STATE responses from the Slave accepted by the Master. If this value is exceeded, the corresponding interrupt is generated.
Note: If set to 0, the default wait count is 0xF.
23:8WDG_CNTR/W0x0Watchdog count value. During counting, the lower bits are filled with 4'b0, that is, {WDG_CNT,4'b0}, and the counting clock is mclk divided by 4.
Used to monitor transfers on the AXI Slave interface. If a timeout occurs, the unfinished response on the AXI Slave interface is automatically returned (default is 0 to ensure immediate response return when uninitialized).
7RESERVEDR0x0reserved
6:4MST_IDLE_CNTR/W0x0Master bus idle count value, with mclk as the counting clock.
3'b000: 16 clock cycles
3'b001: 32 clock cycles
3'b010: 64 clock cycles
3'b011: 128 clock cycles
3'b100: 256 clock cycles
3'b101: 512 clock cycles
3'b110: 1024 clock cycles
3'b111: 2048 clock cycles
If the AXI Master interface idle time reaches this idle count value, the Master interface clock is automatically gated off.
3MST_STOP_ENR/W0x0Enables automatic clock gating when the Master bus is idle.
2RESERVEDR0x0reserved
1WAIT_CHK_ENR/W0x0Enables wait-time checking.
0WDG_ENR/W0x1Enables the watchdog (enabled by default to ensure response return when uninitialized).

GLOBAL_CONTROL_1(0x34)

BitsNameR/WdefaultDescription
31:8RESERVEDR0x0reserved
7NP_FORCE_ENR/W0x00: NP transfers can still be initiated even if the NP channel is not free
1: If the NP channel is not free, NP transfers cannot be initiated and the transfer request is blocked in the queue
6SUS_STATR/W0x0Writing 1 triggers a suspend event on the VW channel to the Slave, provided that bit4 of 0xA8 is 1; writing 0 exits suspend.
5ESPI_RSTNR/W0x0Mapped to RESET# on the eSPI port. Write 1 to this bit before accessing eSPI.
To perform a hardware reset of the eSPI Slave, write 0 first and then write 1.
4:3RX_SAMPLE_SELR/W0x0Selects the RX sampling edge to accommodate different delay conditions; the delay unit is 1/2 eSPI clock cycle.
According to the protocol requirement, the time from eSPI clock output by the eSPI Master to reception of the response from the Slave (including IP-to-IO PAD output, board routing, eSPI Slave clk-to-data, board routing, and IO PAD input-to-IP) must be less than 1/2 eSPI clock cycle (7.5 ns at 66 MHz).
2'b00: 0 eSPI clock cycles
2'b01: 0.5 eSPI clock cycle
2'b10: 1 eSPI clock cycle
2'b11: 1.5 eSPI clock cycles
2:1RESERVEDR0x0reserved
0SW_RSTR/W0x0Module soft reset. It is automatically cleared after the soft reset is complete, and this register can be polled to determine soft-reset completion status.
The reset scope includes:
(1) All interrupt status registers
(2) DN/UP-related registers (FIFOs)
(3) Register-related state machines
(4) PR channel-related state machines
(5) Link-related state machines
It is also used to release all transfers on the AXI Slave interfaces, typically for recovery after an AXI Slave bus timeout.

PR_BASE_ADDR_MEM_0(0x38)

BitsNameR/WdefaultDescription
31:0PR_BASE_ADDR_MEM_0R/W0x0Base address for PR channel MEM accesses. When accessing addresses in the PR MEM region from 0 to 16 MB, the upper address bits are automatically translated to the value of this register, and the request is issued through the PR channel of eSPI.
The actual Slave address accessed through the AXI Slave interface is: PR_BASE_ADDR_MEM_0[31:24] + addr[23:0]

PR_BASE_ADDR_MEM_1(0x3C)

BitsNameR/WdefaultDescription
31:0PR_BASE_ADDR_MEM_1R/W0x0Base address for PR channel MEM accesses. When accessing addresses in the PR MEM region from 16 to 32 MB, the upper address bits are automatically translated to the value of this register, and the request is issued through the PR channel of eSPI.
The actual Slave address accessed through the AXI Slave interface is: PR_BASE_ADDR_MEM_1[31:24] + addr[23:0]

SLAVE0_STS_SHADOW(0x44)

BitsNameR/WdefaultDescription
31:16STS_SHADOWR/W0x0Slave0 status shadow register, used for debugging.
It can force the Slave0 status in the Master controller. If the corresponding Avail bit is valid, the eSPI controller initiates the corresponding GET transaction.
15:1RESERVEDRreserved
0STS_SHADOW_ENR/W0x0Enables the status shadow register.
Writing 1 loads the STS_SHADOW value into the corresponding status bits of the Master controller, and it is automatically cleared after loading is complete.

SLAVE0_CONFIG(0x68)

BitsNameR/WdefaultDescription
31CRC_CHECK_ENR/W0x0Enables CRC checking.
Note: Reset to 0x0 after in-band reset.
30ALERT_MODE_SELR/W0x0Alert mode selection.
1'b0: eSPI_Din[1] as input
1'b1: eSPI_Slv0_AlertB as input
Note: Reset to 0x0 after in-band reset.
29:28IO_MODE_SELR/W0x0IO mode selection.
2'b00: 1x
2'b01: 2x
2'b10: 4x
2'b11: reserved
Note: Switching the clock frequency triggers a GET_STATUS operation.
Note: Reset to 0x0 after in-band reset.
27:25CLK_FREQ_SELR/W0x0Clock frequency selection.
0x0: 20 MHz
0x1: 25 MHz
0x2: 33 MHz
0x3: 50 MHz
0x4: 66 MHz
others: 20 MHz
Meets the eSPI frequency requirements of 20/25/33/50/66 MHz (in-band reset must support 20 MHz and below).
Note: Reset to 0x0 after in-band reset.
24:4RESERVEDR0x0reserved
3PR_ENR/W0x0Enables the Peripheral channel.
2VW_ENR/W0x0Enables the Virtual Wire channel.
1OOB_ENR/W0x0Enables the OOB (Out-of-Band) channel.
0FLASH_ENR/W0x0Enables the Flash Access channel.

SLAVE0_INT_EN(0x6C)

BitsNameR/WdefaultDescription
31FLASH_REQ_INT_ENR/W0x0Enables the Flash access request interrupt.
30RXOOB_INT_ENR/W0x0Enables the RX OOB interrupt.
29RXMSG_INT_ENR/W0x0Enables the RX PR message interrupt.
28DNCMD_INT_ENR/W0x0Enables the Downstream CMD interrupt.
27RXVW_GRP3_INT_ENR/W0x0Enables the RX VW Group3 interrupt.
26RXVW_GRP2_INT_ENR/W0x0Enables the RX VW Group2 interrupt.
25RXVW_GRP1_INT_ENR/W0x0Enables the RX VW Group1 interrupt.
24RXVW_GRP0_INT_ENR/W0x0Enables the RX VW Group0 interrupt.
23PR_INT_ENR/W0x0Enables the PR channel transaction interrupt (tx full / rx full).
22PR_WR_TIMEOUT_ENR/W0x0Enables the PR channel AXI Slave write-channel timeout interrupt, indicating Master write-to-Slave timeout.
21PR_RD_TIMEOUT_ENR/W0x0Enables the PR channel AXI Slave read-channel timeout interrupt, indicating Master read-from-Slave timeout.
20:16RESERVEDR0x0reserved
15PROTOCOL_ERR_INT_ENR/W0x0Enables the protocol error interrupt.
14RXFLASH_OFLOW_INT_ENR/W0x0Enables the Flash Access channel RX overflow interrupt.
13RXMSG_OFLOW_INT_ENR/W0x0Enables the PR channel RX overflow interrupt.
12RXOOB_OFLOW_INT_ENR/W0x0Enables the OOB channel RX overflow interrupt.
11ILLEGAL_LEN_INT_ENR/W0x0Enables the illegal length interrupt.
10ILLEGAL_TAG_INT_ENR/W0x0Enables the illegal tag interrupt.
9UNSUCSS_CPL_INT_ENR/W0x0Enables the unsuccessful completion interrupt.
8INVALID_CT_RSP_INT_ENR/W0x0Enables the invalid response count interrupt.
7INVALID_UNKNOWN_RSP_INT_ENR/W0x0Enables the invalid response interrupt.
6NON_FATAL_INT_ENR/W0x0Enables the Non-Fatal interrupt (if the Slave does not support Error grouping, all errors are Fatal type).
5FATAL_ERR_INT_ENR/W0x0Enables the Fatal interrupt.
4NO_RSP_INT_ENR/W0x0Enables the No Response interrupt.
3RESERVEDR/W0x0reserved
2CRC_ERR_INT_ENR/W0x0Enables the CRC check error interrupt.
1WAIT_TIMEOUT_INT_ENR/W0x0Enables the wait timeout interrupt.
0BUS_ERR_INT_ENR/W0x0Enables the eSPI bus error interrupt.

SLAVE0_INT_STS(0x70)

BitsNameR/WDefaultDescription
31FLASH_REQ_INTR/W1C0x0Flash access request interrupt.
30RXOOB_INTR/W1C0x0RX OOB interrupt.
29RXMSG_INTR/W1C0x0RX PR message interrupt.
28DNCMD_INTR/W1C0x0Downstream CMD interrupt.
27RXVW_GRP3_INTR/W1C0x0RX VW Group3 interrupt.
26RXVW_GRP2_INTR/W1C0x0RX VW Group2 interrupt.
25RXVW_GRP1_INTR/W1C0x0RX VW Group1 interrupt.
24RXVW_GRP0_INTR/W1C0x0RX VW Group0 interrupt.
23PR_INTR/W0x0PR channel transaction interrupt (tx full/rx full), for example when burst length exceeds 16.
22PR_WR_TIMEOUTR/W1C0x0PR channel AXI Slave write-channel timeout interrupt, indicating Master write-to-Slave timeout.
21PR_RD_TIMEOUTR/W1C0x0PR channel AXI Slave read-channel timeout interrupt, indicating Master read-from-Slave timeout.
20PR_MST_BUSYR0x0PR channel AXI Master interface busy. Read this bit before initiating sw_rst or hardware reset to confirm that there is no unfinished Slave transfer request.
19:16RESERVEDR0x0reserved
15PROTOCOL_ERR_INTR/W1C0x0Protocol error interrupt (the Slave returns a completion that does not match any existing transfer).
14RXFLASH_OFLOW_INTR/W1C0x0Flash Access channel RX overflow interrupt (Slave request exceeds FIFO depth of 128).
13RXMSG_OFLOW_INTR/W1C0x0PR channel message RX overflow interrupt (Slave request exceeds FIFO depth of 128).
12RXOOB_OFLOW_INTR/W1C0x0OOB channel RX overflow interrupt (Slave request exceeds FIFO depth of 32).
11ILLEGAL_LEN_INTR/W1C0x0Illegal length interrupt (for PR channel: a. the length returned by mst_read does not match the request; b. the Slave request addr+len exceeds the 64-byte boundary).
10ILLEGAL_TAG_INTR/W1C0x0Illegal tag interrupt (for PR channel: a. the tag returned by mst_read does not match the request).
9UNSUCSS_CPL_INTR/W1C0x0Unsuccessful completion interrupt (an unsuccessful completion sent by the Slave is received).
8INVALID_CT_RSP_INTR/W1C0x0Invalid cycle type response interrupt (the cycle type sent by the Slave and received by the Master is not as expected).
7INVALID_UNKNOWN_RSP_INTR/W1C0x0Invalid response code interrupt (the response code returned by the Slave is not defined in the protocol).
6NON_FATAL_INTR/W1C0x0Non-Fatal interrupt (if the Slave does not support Error grouping, all errors are Fatal type).
5FATAL_ERR_INTR/W1C0x0Fatal interrupt.
4NO_RSP_INTR/W1C0x0No Response interrupt.
3RESERVEDR/W1C0x0reserved
2CRC_ERR_INTR/W1C0x0CRC check error interrupt.
1WAIT_TIMEOUT_INTR/W1C0x0Wait timeout interrupt, indicating that the number of wait_state responses returned by the Slave exceeds the maximum value accepted by the Master.
0RESERVEDR0x0reserved

SLAVE0_RX_MSG_HDR0(0x74)

BitsNameR/WDefaultDescription
31:24RXMSG_HDATA2R0x0Message code
23:16RXMSG_HDATA1R0x0length_l (lower 8 bits of length)
15:8RXMSG_HDATA0R0x0[7:4]: Tag
[3:0]: length_h (length up to 4 bits)
7:0RXMSG_TYPER0x0[7:4]: Fixed to 4'b0001
[3:0]: RX_MSG type (Message Type)

SLAVE0_RX_MSG_HDR1(0x78)

BitsNameR/WDefaultDescription
31:24SPECIFIC_HDATA3R0x0Field specific to the PR Message header.
23:16SPECIFIC_HDATA2R0x0
15:8SPECIFIC_HDATA1R0x0
7:0SPECIFIC_HDATA0R0x0

SLAVE0_RXMSG_DATA_PORT(0x7C)

BitsNameR/WDefaultDescription
31:0RXMSG_DATAR0x0RX MSG FIFO, maximum supported length is 32.

SLAVE0_RXVW_STS(0x98)

BitsNameR/WDefaultDescription
31:30RESERVEDR/W0x0reserved
29SYS_EVT_STSR/W1C0x0System event, read SLAVE0_RXVW(0x9C) will also clear this bit
28:24RESERVEDR/W0x0reserved
23IRQ23_STSR/W1C0x0IRQ23 status
22IRQ22_STSR/W1C0x0IRQ22 status
21IRQ21_STSR/W1C0x0IRQ21 status
20IRQ20_STSR/W1C0x0IRQ20 status
19IRQ19_STSR/W1C0x0IRQ19 status
18IRQ18_STSR/W1C0x0IRQ18 status
17IRQ17_STSR/W1C0x0IRQ17 status
16IRQ16_STSR/W1C0x0IRQ16 status
15IRQ15_STSR/W1C0x0IRQ15 status
14IRQ14_STSR/W1C0x0IRQ14 status
13IRQ13_STSR/W1C0x0IRQ13 status
12IRQ12_STSR/W1C0x0IRQ12 status
11IRQ11_STSR/W1C0x0IRQ11 status
10IRQ10_STSR/W1C0x0IRQ10 status
9IRQ9_STSR/W1C0x0IRQ9 status
8IRQ8_STSR/W1C0x0IRQ8 status
7IRQ7_STSR/W1C0x0IRQ7 status
6IRQ6_STSR/W1C0x0IRQ6 status
5IRQ5_STSR/W1C0x0IRQ5 status
4IRQ4_STSR/W1C0x0IRQ4 status
3IRQ3_STSR/W1C0x0IRQ3 status
2IRQ2_STSR/W1C0x0IRQ2 status
1IRQ1_STSR/W1C0x0IRQ1 status
0IRQ0_STSR/W1C0x0IRQ0 status

SLAVE0_RXVW(0x9C)

BitsNameR/WDefaultDescription
31:20RESERVEDR0x0reserved
19HOST_RST_ACKR0x0Host reset acknowledge
18RCIN_BR0x1Reset CPU interrupt
17SMI_BR0x1System management interrupt
16SCI_BR0x1System controller interrupt
15SLAVE0_BOOT_LOAD_STSR0x0Status indicating that the Slave is loading boot from Flash.
14SLAVE0_ERROR_NONFATALR0x0Slave has a non-fatal error.
13SLAVE0_ERROR_FATALR0x0Slave has a fatal error.
12SLAVE0_BOOT_LOAD_DONER0x0EC/BMC boot flow completed.
11PME_BR0x1PCI power management event from Slave to Master.
10WAKE_BR0x1Wake event from Slave to Master.
9RESERVEDR0x0reserved
8OOB_RST_ACKR0x0ACK returned by the Slave on the OOB channel.
7:2RESERVEDR0x0reserved
1DNX_ACKR0x0DNX_ACK for Intel platform specific system event
0SUS_ACK_BR0x0SUS_ACK_B for Intel platform specific system event

SLAVE0_RXVW_DATA(0xA0)

BitsNameR/WDefaultDescription
31:24SLAVE0_RXVW_GRP3R/W0x0Value of GPIO Group3.
23:16SLAVE0_RXVW_GRP2R/W0x0Value of GPIO Group2.
15:8SLAVE0_RXVW_GRP1R/W0x0Value of GPIO Group1.
7:0SLAVE0_RXVW_GRP0R/W0x0Value of GPIO Group0 ([7:4] mask, [3:0] GPIO value).

SLAVE0_RXVW_INDEX(0xA4)

BitsNameR/WDefaultDescription
31:24SLAVE0_RXVW_INDEX_GRP3R/W0x0Mapping between GPIO Group3 and VW index.
23:16SLAVE0_RXVW_INDEX_GRP2R/W0x0Mapping between GPIO Group2 and VW index.
15:8SLAVE0_RXVW_INDEX_GRP1R/W0x0Mapping between GPIO Group1 and VW index.
7:0SLAVE0_RXVW_INDEX_GRP0R/W0x0Mapping between GPIO Group0 and VW index.

SLAVE0_VW_CTL(0xA8)

BitsNameR/WDefaultDescription
31IRQ23_MASKR/W0x0IRQ23 interrupt mask.
30IRQ22_MASKR/W0x0IRQ22 interrupt mask.
29IRQ21_MASKR/W0x0IRQ21 interrupt mask.
28IRQ20_MASKR/W0x0IRQ20 interrupt mask.
27IRQ19_MASKR/W0x0IRQ19 interrupt mask.
26IRQ18_MASKR/W0x0IRQ18 interrupt mask.
25IRQ17_MASKR/W0x0IRQ17 interrupt mask.
24IRQ16_MASKR/W0x0IRQ16 interrupt mask.
23IRQ15_MASKR/W0x0IRQ15 interrupt mask.
22IRQ14_MASKR/W0x0IRQ14 interrupt mask.
21IRQ13_MASKR/W0x0IRQ13 interrupt mask.
20IRQ12_MASKR/W0x0IRQ12 interrupt mask.
19IRQ11_MASKR/W0x0IRQ11 interrupt mask.
18IRQ10_MASKR/W0x0IRQ10 interrupt mask.
17IRQ9_MASKR/W0x0IRQ9 interrupt mask.
16IRQ8_MASKR/W0x0IRQ8 interrupt mask.
15IRQ7_MASKR/W0x0IRQ7 interrupt mask.
14IRQ6_MASKR/W0x0IRQ6 interrupt mask.
13IRQ5_MASKR/W0x0IRQ5 interrupt mask.
12IRQ4_MASKR/W0x0IRQ4 interrupt mask.
11IRQ3_MASKR/W0x0IRQ3 interrupt mask.
10IRQ2_MASKR/W0x0IRQ2 interrupt mask.
9IRQ1_MASKR/W0x0IRQ1 interrupt mask.
8IRQ0_MASKR/W0x0IRQ0 interrupt mask.
7:5RESERVEDR0x0reserved
4SUS_STAT_VMENR/W0x0Enable for VW suspend status.
3GRP3_ENR/W0x0Enables Group3.
2GRP2_ENR/W0x0Enables Group2.
1GRP1_ENR/W0x0Enables Group1.
0GRP0_ENR/W0x0Enables Group0.

SLAVE0_VW_POLARITY(0xAC)

BitsNameR/WDefaultDescription
31:24RESERVEDR0x0reserved
23IRQ23_POLARITYR/W0x0IRQ23 interrupt polarity.
22IRQ22_POLARITYR/W0x0IRQ22 interrupt polarity.
21IRQ21_POLARITYR/W0x0IRQ21 interrupt polarity.
20IRQ20_POLARITYR/W0x0IRQ20 interrupt polarity.
19IRQ19_POLARITYR/W0x0IRQ19 interrupt polarity.
18IRQ18_POLARITYR/W0x0IRQ18 interrupt polarity.
17IRQ17_POLARITYR/W0x0IRQ17 interrupt polarity.
16IRQ16_POLARITYR/W0x0IRQ16 interrupt polarity.
15IRQ15_POLARITYR/W0x0IRQ15 interrupt polarity.
14IRQ14_POLARITYR/W0x0IRQ14 interrupt polarity.
13IRQ13_POLARITYR/W0x0IRQ13 interrupt polarity.
12IRQ12_POLARITYR/W0x0IRQ12 interrupt polarity.
11IRQ11_POLARITYR/W0x0IRQ11 interrupt polarity.
10IRQ10_POLARITYR/W0x0IRQ10 interrupt polarity.
9IRQ9_POLARITYR/W0x0IRQ9 interrupt polarity.
8IRQ8_POLARITYR/W0x0IRQ8 interrupt polarity.
7IRQ7_POLARITYR/W0x0IRQ7 interrupt polarity.
6IRQ6_POLARITYR/W0x0IRQ6 interrupt polarity.
5IRQ5_POLARITYR/W0x0IRQ5 interrupt polarity.
4IRQ4_POLARITYR/W0x0IRQ4 interrupt polarity.
3IRQ3_POLARITYR/W0x0IRQ3 interrupt polarity.
2IRQ2_POLARITYR/W0x0IRQ2 interrupt polarity.
1IRQ1_POLARITYR/W0x0IRQ1 interrupt polarity.
0IRQ0_POLARITYR/W0x0IRQ0 interrupt polarity. Determines whether IRQ transfer on the eSPI line triggers an eSPI VW interrupt:
1: high level / rising-edge interrupt
0: low level / falling-edge interrupt

SLAVE0_M2S_STS(0xB0)

BitsNameR/WDefaultDescription
31sysevent_m2s_statusR/W1C0x0Sysevent status register, write 1 to clear intr
30:7RESERVEDR/W0x0reserved
6NMIOUT_BR0x0NMI Output, Active Low
5SMIOUT_BR0x0SMI Output, Active Low
4PLTRST_BR0x0Platform Reset, Active Low
3SUS_STAT_BR0x0Suspend Status, Active Low
2SLP_S5_BR0x0SLP_S5 status, Active Low
1SLP_S4_BR0x0SLP_S4 status, Active Low
0SLP_S3_BR0x0SLP_S3 status, Active Low

SLAVE0_M2S_MASK(0xB4)

BitsNameR/WDefaultDescription
31:7RESERVEDR/W0x0reserved
6NMIOUT_B_maskR/W0x0NMI Output mask
5SMIOUT_B_maskR/W0x0SMI Output mask
4PLTRST_B_maskR/W0x0Platform Reset mask
3SUS_STAT_B_maskR/W0x0Suspend Status mask
2SLP_S5_B_maskR/W0x0SLP_S5 status mask
1SLP_S4_B_maskR/W0x0SLP_S4 status mask
0SLP_S3_B_maskR/W0x0SLP_S3 status mask

SLAVE0_S2M_MASK(0xB8)

BitsNameR/WDefaultDescription
31:20RESERVEDR0x0reserved
19HOST_RST_ACK_MASKR0x0Host reset acknowledge mask
18RCIN_B_MASKR0x0Reset CPU interrupt mask
17SMI_B_MASKR0x0System Management Interrupt mask
16SCI_B_MASKR0x0System Controller Interrupt mask
15SLAVE0_BOOT_LOAD_STS_MASKR0x0Mask for the status indicating that the Slave is loading boot from Flash.
14SLAVE0_ERROR_NONFATAL_MASKR0x0Mask for Slave non-fatal error.
13SLAVE0_ERROR_FATAL_MASKR0x0Mask for Slave fatal error.
12SLAVE0_BOOT_LOAD_DONE_MASKR0x0Mask for EC/BMC boot flow completion.
11PME_B_MASKR0x0Mask for the PCI power management event from Slave to Master.
10WAKE_B_MASKR0x0Mask for the wake event from Slave to Master.
9RESERVEDR0x0reserved
8OOB_RST_ACK_MASKR0x0Mask for the ACK returned by the Slave on the OOB channel.
7:2RESERVEDR0x0reserved
1DNX_ACK_MASKR0x0Mask for DNX_ACK (Intel platform-specific system event).
0SUS_ACK_MASKR0x0Mask for SUS_ACK_B (Intel platform-specific system event).

Programming Model

Initialization Procedure

  1. Release mclk, mresetn, pclk, and presetn of the eSPI Controller.
  2. Write DN_TXHDR0 (RG_MEM_BASE + 0x0):
  • [2:0] selects the transfer type as GET_CONFIGURATION
  • [3] set to 1'b1 indicates start of transfer
  • [31:16] specifies the target Configuration register address and initiates GET_CONFIGURATION
  1. Read DN_TXHDR1 (RG_MEM_BASE + 0x4) to obtain Slave information, configure as needed and write back to DN_TXHDR1; then write DN_TXHDR0 (RG_MEM_BASE + 0x0): set [2:0] to Set Configuration and [3] to 1 to start the transfer, initiate SET_CONFIGURATION, and complete eSPI Slave initialization.
  2. Configure SLAVE0_CONFIG (RG_MEM_BASE + 0x68) to 0xD000_000F (example configuration: enable CRC checking, use ALERT PAD, 4x IO mode, 20 MHz, and enable all Channels). This must match the eSPI Slave configuration.
  3. Configure GLOBAL_CONTROL_0 (RG_MEM_BASE + 0x30) to 0x3FFF_FF0B (enable Watchdog, Wait Status Check, and Master Clock Auto Gating).
  4. Configure PR_BASE_ADDR_MEM_0 (RG_MEM_BASE + 0x38) and PR_BASE_ADDR_MEM_1 (RG_MEM_BASE + 0x3C) to initialize the upper address bits for PR Channel Memory accesses.
  5. Configure SLAVE0_INT_EN (RG_MEM_BASE + 0x6C) to 0xFFFF_FFFF to enable all controller interrupts.
  6. Initialization is complete.

Peripheral Channel Operations

Master Reads/Writes Slave

  1. When the CPU accesses the PR MEM_0 (default: 0x2200_0000 ~ 0x2300_0000, 16 MB) or PR MEM_1 (default: 0x2300_0000 ~ 0x2400_0000, 16 MB) address space, read/write requests to the corresponding eSPI PR Channel addresses are initiated. The upper address bits are filled by PR_BASE_ADDR_MEM_0 (RG_MEM_BASE + 0x38) and PR_BASE_ADDR_MEM_1 (RG_MEM_BASE + 0x3C).
  2. When the CPU accesses the PR IO address space (default: 0x2000_0000 ~ 0x2001_0000, 64 KB), read/write requests to the corresponding eSPI PR Channel addresses are initiated.
  3. The eSPI Master Controller accepts new AW/AR requests after the current transfer is complete.
  4. Write operations support byte writes (implemented through WSTRB) and up to burst16; read operations support 4-byte-aligned burst reads and non-burst byte reads (ARSIZE is 32-bit width).

Slave Reads/Writes Master

  1. The Slave initiates a request through Alert. After priority arbitration, the Master sends GET_STATUS to obtain the Channel type of the Slave request. When PC_avail / NP_avail is detected as set, GET_PC / GET_NP is used to obtain the request information and data.
  2. The eSPI Controller generates AXI Master write/read access requests based on the request information, and executes Memory read/write operations through the SoC bus. After the read is completed, data is returned to the Slave through PUT_PC and Completion with Data.

Virtual Wire Operations

Master Writes Slave GPIO / VW Interrupt

  1. Before the operation, the Slave must configure the corresponding GPIO as output (the specific implementation is completed by BMC software).

  2. Write to DN_TXDATA_PORT (RG_MEM_BASE + 0xC) in the format of index (8 bits) + GPIO (4-bit mask + 4-bit data), with a maximum of 16 groups.

  3. Write DN_TXHDR0 (RG_MEM_BASE + 0x0) as 0x030D:

    • [2:0] = 3'b101: indicates initiation of a PUT_VW transfer
    • [3] = 1'b1: starts the transfer
    • [15:8]: indicates the count in the PUT_VW transfer (currently set to 3, meaning the number of transfers is n+1, and 4 groups of VW transfers will be issued)

    Transfers are initiated sequentially on the bus, and CRC information is generated after the transfers are complete.

  4. After the operation is complete, con_intr is asserted. Read SLAVE0_INT_STS (RG_MEM_BASE + 0x70) to obtain the completion information.

Master Reads Slave GPIO

  1. Configure SLAVE0_RXVW_INDEX (RG_MEM_BASE + 0xA4) to specify the mapping between GPIO groups and VW indices. The current setting is 0x8382_8180, mapping GPIO group indices 128 to 131 to Group0 to Group3 of the eSPI Controller.
  2. When GPIO 128 to 131 of the Slave changes, the Slave actively initiates an Alert request. The Master automatically obtains VW_avail through GET_STATUS, initiates a GET_VW request to obtain and parse the GPIO value, and generates the corresponding con_intr interrupt.
  3. Read bits [27:24] of SLAVE0_INT_STS (RG_MEM_BASE + 0x70) to determine that the interrupt source is GPIO, and read SLAVE0_RXVW_DATA (RG_MEM_BASE + 0xA0) to obtain GPIO information.

Slave Updates VW Interrupt on the Master Side

  1. The Slave initiates an event request through Alert. After arbitration, the Master initiates GET_STATUS to obtain the request type.
  2. The Master automatically sends GET_VWIRE to obtain detailed information of the Slave VW request, and updates SLAVE0_RXVW_STS (RG_MEM_BASE + 0x98).
  3. After the CPU receives vw_intr, it reads SLAVE0_RXVW_STS (RG_MEM_BASE + 0x98) to obtain interrupt information (if it is SYS_EVT, 0x9C must also be read), and enters the corresponding interrupt service routine for processing.
  4. In the interrupt service routine, the corresponding interrupt bit of the controller must be cleared. If it is SYS_EVT, reading SLAVE0_RXVW (RG_MEM_BASE + 0x9C) clears the corresponding bit in SLAVE0_RXVW_STS (RG_MEM_BASE + 0x98).

OOB Operations

Master Reads/Writes Slave OOB

  1. Write to DN_TXDATA_PORT (RG_MEM_BASE + 0xC) according to the OOB message packet format, up to 128 bytes; write OOB Header-related information into DN_TXHDR1/2 (RG_MEM_BASE + 0x4/8); write DN_TXHDR0 (RG_MEM_BASE + 0x0) to initiate the transfer:
    • [2:0] = 3'b101: selects PUT_OOB transfer
    • [3] = 1'b1: starts the transfer
    • [31:16]: OOB Header information
  2. If the opcode in the OOB packet is read, the Slave initiates Alert after preparing the data and sets OOB avail simultaneously. The Master executes GET_STATUS and GET_OOB in sequence, generating a con_intr interrupt.
  3. After the CPU receives the con_intr interrupt, query SLAVE0_INT_STS (RG_MEM_BASE + 0x70) to confirm that the interrupt source is OOB. In the interrupt service routine, obtain OOB Header information through UP_RXHDR0/1 (RG_MEM_BASE + 0x10/0x14) and obtain OOB data through UP_RXDATA_PORT (RG_MEM_BASE + 0x18).
  4. At the end of the interrupt service routine, write SLAVE0_INT_STS (RG_MEM_BASE + 0x70) to clear the corresponding interrupt.

Flash Access Operations

Slave Writes / Erases Master Flash

  1. The Slave initiates an event request through Alert. After arbitration, the Master initiates GET_STATUS and obtains that the Channel type of the Slave request is Flash_avail.
  2. The Master automatically sends GET_FLASH_NP. The Header of the Slave Flash Access request is stored in UP_RXHDR0/1 (RG_MEM_BASE + 0x10/0x14), the request data is stored in UP_RXDATA_PORT (RG_MEM_BASE + 0x18), and the corresponding con_intr interrupt is generated at the same time.
  3. After the CPU receives the controller interrupt, it queries SLAVE0_INT_STS (RG_MEM_BASE + 0x70) to confirm that the interrupt source is FLASH_REQ_INT. In the interrupt service routine, read UP_RXHDR0/1 to obtain the request Header, and read UP_RXDATA_PORT to obtain the request data.
  4. After the Master completes the operation, it notifies the Slave of completion through PUT_FLASH_C and Successful Completion Without Data.

Slave Reads Master Flash

The procedure is the same as above, and the CPU likewise participates in the read, write, and erase operations of SPI Flash. The difference is that after the Master completes the operation, it notifies the Slave of completion and returns data through PUT_FLASH_C and Successful Completion With Data.