@@ -112,14 +112,38 @@ enum espi_channel {
112
112
* eSPI bus event to indicate events for which user can register callbacks
113
113
*/
114
114
enum espi_bus_event {
115
+ /** Indicates the eSPI bus was reset either via eSPI reset pin.
116
+ * eSPI drivers should convey the eSPI reset status to eSPI driver clients
117
+ * following eSPI specification reset pin convention:
118
+ * 0-eSPI bus in reset, 1-eSPI bus out-of-reset
119
+ *
120
+ * Note: There is no need to send this callback for in-band reset.
121
+ */
115
122
ESPI_BUS_RESET = BIT (0 ),
123
+
124
+ /** Indicates the eSPI HW has received channel enable notification from eSPI host,
125
+ * once the eSPI channel is signal as ready to the eSPI host,
126
+ * eSPI drivers should convey the eSPI channel ready to eSPI driver client via this event.
127
+ */
116
128
ESPI_BUS_EVENT_CHANNEL_READY = BIT (1 ),
129
+
130
+ /** Indicates the eSPI HW has received a virtual wire message from eSPI host.
131
+ * eSPI drivers should convey the eSPI virtual wire latest status.
132
+ */
117
133
ESPI_BUS_EVENT_VWIRE_RECEIVED = BIT (2 ),
134
+
135
+ /** Indicates the eSPI HW has received a Out-of-band package from eSPI host.
136
+ */
118
137
ESPI_BUS_EVENT_OOB_RECEIVED = BIT (3 ),
138
+
139
+ /** Indicates the eSPI HW has received a peripheral eSPI host event.
140
+ * eSPI drivers should convey the peripheral type.
141
+ */
119
142
ESPI_BUS_PERIPHERAL_NOTIFICATION = BIT (4 ),
120
143
ESPI_BUS_SAF_NOTIFICATION = BIT (5 ),
121
144
};
122
145
146
+
123
147
/**
124
148
* @brief eSPI peripheral channel events.
125
149
*
@@ -354,6 +378,12 @@ struct espi_request_packet {
354
378
355
379
/**
356
380
* @brief eSPI out-of-band transaction packet format
381
+ *
382
+ * For Tx packet, eSPI driver client shall specify the OOB payload data and its length in bytes.
383
+ * For Rx packet, eSPI driver client shall indicate the maximum number of bytes that can receive,
384
+ * while the eSPI driver should update the length field with the actual data received/available.
385
+ *
386
+ * In all cases, the length does not include OOB header size 3 bytes.
357
387
*/
358
388
struct espi_oob_packet {
359
389
uint8_t * buf ;
@@ -895,12 +925,11 @@ static inline int z_impl_espi_flash_erase(const struct device *dev,
895
925
* | | | eSPI reset | eSPI host
896
926
* | | IRQ +<------------+ resets the
897
927
* | | <-----------+ | bus
898
- * | | | |
899
- * | | Processed | |
928
+ * |<----------------------------- | | |
929
+ * | Report eSPI bus reset | Processed | |
900
930
* | | within the | |
901
931
* | | driver | |
902
932
* | | | |
903
-
904
933
* | | | VW CH ready| eSPI host
905
934
* | | IRQ +<------------+ enables VW
906
935
* | | <-----------+ | channel
0 commit comments