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
25 #define TI_SCI_MSG_BOARD_CONFIG_RM 0x000c
26 #define TI_SCI_MSG_BOARD_CONFIG_SECURITY 0x000d
27 #define TI_SCI_MSG_BOARD_CONFIG_PM 0x000e
30 * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses
31 * @type: Type of messages: One of TI_SCI_MSG* values
32 * @host: Host of the message
33 * @seq: Message identifier indicating a transfer sequence
34 * @flags: Flag for the message
36 struct ti_sci_msg_hdr {
40 #define TI_SCI_MSG_FLAG(val) (1 << (val))
41 #define TI_SCI_FLAG_REQ_GENERIC_NORESPONSE 0x0
42 #define TI_SCI_FLAG_REQ_ACK_ON_RECEIVED TI_SCI_MSG_FLAG(0)
43 #define TI_SCI_FLAG_REQ_ACK_ON_PROCESSED TI_SCI_MSG_FLAG(1)
44 #define TI_SCI_FLAG_RESP_GENERIC_NACK 0x0
45 #define TI_SCI_FLAG_RESP_GENERIC_ACK TI_SCI_MSG_FLAG(1)
46 /* Additional Flags */
51 * struct ti_sci_secure_msg_hdr - Header that prefixes all TISCI messages sent
52 * via secure transport.
53 * @checksum: crc16 checksum for the entire message
54 * @reserved: Reserved for future use.
56 struct ti_sci_secure_msg_hdr {
62 * struct ti_sci_msg_resp_version - Response for a message
63 * @hdr: Generic header
64 * @firmware_description: String describing the firmware
65 * @firmware_revision: Firmware revision
66 * @abi_major: Major version of the ABI that firmware supports
67 * @abi_minor: Minor version of the ABI that firmware supports
69 * In general, ABI version changes follow the rule that minor version increments
70 * are backward compatible. Major revision changes in ABI may not be
71 * backward compatible.
73 * Response to a generic message with message type TI_SCI_MSG_VERSION
75 struct ti_sci_msg_resp_version {
76 struct ti_sci_msg_hdr hdr;
77 char firmware_description[32];
78 u16 firmware_revision;
84 * struct ti_sci_msg_board_config - Board configuration message
85 * @hdr: Generic Header
86 * @boardcfgp_low: Lower 32 bit of the pointer pointing to the board
88 * @boardcfgp_high: Upper 32 bit of the pointer pointing to the board
90 * @boardcfg_size: Size of board configuration data object
91 * Request type is TI_SCI_MSG_BOARD_CONFIG, responded with a generic
94 struct ti_sci_msg_board_config {
95 struct ti_sci_msg_hdr hdr;
101 #endif /* __TI_SCI_H */