1 /* SPDX-License-Identifier: BSD-3-Clause */
3 * Texas Instruments System Control Interface (TISCI) Protocol
5 * Communication protocol with TI SCI hardware
6 * The system works in a message response protocol
7 * See: http://processors.wiki.ti.com/index.php/TISCI for details
9 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
10 * Based on drivers/firmware/ti_sci.h from Linux.
17 /* Generic Messages */
18 #define TI_SCI_MSG_ENABLE_WDT 0x0000
19 #define TI_SCI_MSG_WAKE_RESET 0x0001
20 #define TI_SCI_MSG_VERSION 0x0002
21 #define TI_SCI_MSG_WAKE_REASON 0x0003
22 #define TI_SCI_MSG_GOODBYE 0x0004
23 #define TI_SCI_MSG_SYS_RESET 0x0005
24 #define TI_SCI_MSG_BOARD_CONFIG 0x000b
27 * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses
28 * @type: Type of messages: One of TI_SCI_MSG* values
29 * @host: Host of the message
30 * @seq: Message identifier indicating a transfer sequence
31 * @flags: Flag for the message
33 struct ti_sci_msg_hdr {
37 #define TI_SCI_MSG_FLAG(val) (1 << (val))
38 #define TI_SCI_FLAG_REQ_GENERIC_NORESPONSE 0x0
39 #define TI_SCI_FLAG_REQ_ACK_ON_RECEIVED TI_SCI_MSG_FLAG(0)
40 #define TI_SCI_FLAG_REQ_ACK_ON_PROCESSED TI_SCI_MSG_FLAG(1)
41 #define TI_SCI_FLAG_RESP_GENERIC_NACK 0x0
42 #define TI_SCI_FLAG_RESP_GENERIC_ACK TI_SCI_MSG_FLAG(1)
43 /* Additional Flags */
48 * struct ti_sci_secure_msg_hdr - Header that prefixes all TISCI messages sent
49 * via secure transport.
50 * @checksum: crc16 checksum for the entire message
51 * @reserved: Reserved for future use.
53 struct ti_sci_secure_msg_hdr {
59 * struct ti_sci_msg_resp_version - Response for a message
60 * @hdr: Generic header
61 * @firmware_description: String describing the firmware
62 * @firmware_revision: Firmware revision
63 * @abi_major: Major version of the ABI that firmware supports
64 * @abi_minor: Minor version of the ABI that firmware supports
66 * In general, ABI version changes follow the rule that minor version increments
67 * are backward compatible. Major revision changes in ABI may not be
68 * backward compatible.
70 * Response to a generic message with message type TI_SCI_MSG_VERSION
72 struct ti_sci_msg_resp_version {
73 struct ti_sci_msg_hdr hdr;
74 char firmware_description[32];
75 u16 firmware_revision;
80 #endif /* __TI_SCI_H */