Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Public APIs for eSPI driver. More...
#include <errno.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/sys/slist.h>
#include <zephyr/syscalls/espi.h>
Go to the source code of this file.
Data Structures | |
struct | espi_evt_data_kbc |
Bit field definition of evt_data in struct espi_event for KBC. More... | |
struct | espi_evt_data_acpi |
Bit field definition of evt_data in struct espi_event for ACPI. More... | |
struct | espi_event |
eSPI event More... | |
struct | espi_cfg |
eSPI bus configuration parameters More... | |
struct | espi_request_packet |
eSPI peripheral request packet format More... | |
struct | espi_oob_packet |
eSPI out-of-band transaction packet format More... | |
struct | espi_flash_packet |
eSPI flash transactions packet format More... | |
Macros | |
#define | ESPI_VWIRE_SIGNAL_OCB_0 ESPI_VWIRE_SIGNAL_TARGET_GPIO_0 |
#define | ESPI_VWIRE_SIGNAL_OCB_1 ESPI_VWIRE_SIGNAL_TARGET_GPIO_1 |
#define | ESPI_VWIRE_SIGNAL_OCB_2 ESPI_VWIRE_SIGNAL_TARGET_GPIO_2 |
#define | ESPI_VWIRE_SIGNAL_OCB_3 ESPI_VWIRE_SIGNAL_TARGET_GPIO_3 |
#define | HOST_KBC_EVT_IBF BIT(0) |
#define | HOST_KBC_EVT_OBE BIT(1) |
Typedefs | |
typedef void(* | espi_callback_handler_t) (const struct device *dev, struct espi_callback *cb, struct espi_event espi_evt) |
Define the application callback handler function signature. | |
Functions | |
int | espi_config (const struct device *dev, struct espi_cfg *cfg) |
Configure operation of a eSPI controller. | |
bool | espi_get_channel_status (const struct device *dev, enum espi_channel ch) |
Query to see if it a channel is ready. | |
int | espi_read_request (const struct device *dev, struct espi_request_packet *req) |
Sends memory, I/O or message read request over eSPI. | |
int | espi_write_request (const struct device *dev, struct espi_request_packet *req) |
Sends memory, I/O or message write request over eSPI. | |
int | espi_read_lpc_request (const struct device *dev, enum lpc_peripheral_opcode op, uint32_t *data) |
Reads SOC data from a LPC peripheral with information updated over eSPI. | |
int | espi_write_lpc_request (const struct device *dev, enum lpc_peripheral_opcode op, uint32_t *data) |
Writes data to a LPC peripheral which generates an eSPI transaction. | |
int | espi_send_vwire (const struct device *dev, enum espi_vwire_signal signal, uint8_t level) |
Sends system/platform signal as a virtual wire packet. | |
int | espi_receive_vwire (const struct device *dev, enum espi_vwire_signal signal, uint8_t *level) |
Retrieves level status for a signal encapsulated in a virtual wire. | |
int | espi_send_oob (const struct device *dev, struct espi_oob_packet *pckt) |
Sends SMBus transaction (out-of-band) packet over eSPI bus. | |
int | espi_receive_oob (const struct device *dev, struct espi_oob_packet *pckt) |
Receives SMBus transaction (out-of-band) packet from eSPI bus. | |
int | espi_read_flash (const struct device *dev, struct espi_flash_packet *pckt) |
Sends a read request packet for shared flash. | |
int | espi_write_flash (const struct device *dev, struct espi_flash_packet *pckt) |
Sends a write request packet for shared flash. | |
int | espi_flash_erase (const struct device *dev, struct espi_flash_packet *pckt) |
Sends a write request packet for shared flash. | |
static void | espi_init_callback (struct espi_callback *callback, espi_callback_handler_t handler, enum espi_bus_event evt_type) |
Callback model. | |
static int | espi_add_callback (const struct device *dev, struct espi_callback *callback) |
Add an application callback. | |
static int | espi_remove_callback (const struct device *dev, struct espi_callback *callback) |
Remove an application callback. | |
Public APIs for eSPI driver.